hello all

 I have written a recipe to append a footer to every    
outgoing mail.
 the procmail is invoked through sendmail(8.9).

 The footer should be attached to all the mails meant 
  for outside world and
 not to the intranet mails.(ie within a particular    
  domain eg. abc.net, the
 footer should not be attached to the mail addressed
to  [EMAIL PROTECTED])

 I want to check for each header(To,Cc,Bcc) and if the
conditions apply then attach the footer..

 The explanation is as follows:
 To:[EMAIL PROTECTED]
 Cc:[EMAIL PROTECTED]
 Bcc:[EMAIL PROTECTED]

 The footer should be attached to the copy of mails
which is addressed to [EMAIL PROTECTED] and [EMAIL PROTECTED] and
not to the copy of abc.net(since it is an intranet
mail)

 I have written a recipe,can u suggest changes for it

:0
* ^FROM.*puretech.net
{
        :0f
        * 1^0 ^X-Envelope-To:([ ]$|$)
        * 1^0 ^X-Envelope-To:
        * !^X-Envelope-To:.*puretech\.net
        |cat - /etc/procmailrcs/footer.txt


        :0fE
        * 1^0 ^X-Envelope-Cc:([ ]$|$)
        * 1^0 ^X-Envelope-Cc:
        * ! ^X-Envelope-Cc:.*puretech\.net
        |cat - /etc/procmailrcs/footer.txt


        :0fE
        * 1^0 ^X-Envelope-Bcc:([ ]$|$)
        * 1^0 ^X-Envelope-Bcc:
        * ()! ^X-Envelope-Bcc:.*puretech\.net
        |cat - /etc/procmailrcs/footer.txt
}
#pass the message back to sendmail
:0
|$SENDMAIL -oi -f "$@"

regds
shweta



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

----------------------------------------------
An alpha version of a web based tool to manage
your subscription with this mailing list is at
http://lists.linux-india.org/cgi-bin/mj_wwwusr

Reply via email to