procmail
[Top] [All Lists]

Re: To: field handling Question.

1999-03-31 21:21:22
"Banerjee, Tapas" <Tapas(_dot_)Banerjee(_at_)gs(_dot_)com> writes:
      I'd like to do the following using proc mail/formail.
      
      1. Re-format "To:" field, but I don't want the mail to be send "To: 
filed users.
          rather it will go the all the user present in Bcc: list.

          For example:

           Mail to the all user, forwarded by procmail should show
              To: "To the subscribers'"  - which is not valid address.

Right.  So make it a valid address: turn it into a 'group' address with
an empty group:

        To: The subscribers:;

Check out rfc822 if you want to know more about group addresses.


...
      2.  The above example I implemented as
              :0
              * <conditions> 
              | (formail -I"To: To the subscribers" \  # Fictitious mailing 
list
                        - I "Bcc: valid_mail_list \
                       ..........) |sendmail -oi -t    

Make that action

        | formail -I"To: the subscribers:;" \
                -I"Bcc: valid addresses here" \
                ...
                | $SENDMAIL $SENDMAILFLAGS -t

Or better yet, rather than stuff addresses into the Bcc: header just so
that sendmail can extract them back out, simply put the recipients on
the sendmail command line.  This'll be faster and less error prone.
For example, the above action forgot to destroy the Cc: header.  When
you put the recipients on the command line, the To:, Cc: and Bcc: header
are not scanned for recipients.

        | formail -I"To: the subscribers:;" \
                ...
                | $SENDMAIL $SENDMAILFLAGS valid recipients here



Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>