[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Sendmail.cf help -- list of all recipients



Raj Mathur forced the electrons to say:
> Hi,
> 
> I've written a faxmail gateway using Perl.  One of the things I have
> to do for this is modify sendmail.cf to send all messages for
> 6426681@fax to my program, for which I have defined a new mailer in
> sendmail like so:
> 
> Mfax, P=/usr/people/raju/Fax/FaxMail.pl, F=msDFMul, S=10, R=20, E=\r\n,
>         A=FaxMail.pl "$u"
> 
> Now I want the mailer to have a list of /all/ recipients, including
> CC's, BCC's, To's, Resent-To's etc on the command line.  Is that
> possible?  Is the complete list of recipients available in any
> variable in sendmail.cf?
> 

You could use formail(1) to extract the headers you want. Working out the
exact details is left to you (whether formail should invoke your program, or
whether the perl script should open a pipe to formail etc.)

I don't think the BCC field is available - it is removed at source itself, but
you can get all the remaining fields. If formail is not available, it comes
along with the procmail package.

Binand

- -- 
#include <stdio.h>                                   | Binand Raj S.
char *p = "#include <stdio.h>%cchar *p = %c%s%c;     | This is a self-
int main(){printf(p,10,34,p,34,10);return 0;}%c";    | printing program.
int main(){printf(p,10,34,p,34,10);return 0;}        | Try it!!

- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------