procmail
[Top] [All Lists]

Re: Procmail before .forward

2001-07-15 22:09:13
"Colin J. Raven" <cjraven(_at_)ddf-lab(_dot_)com> writes:
I wouldn't do it that way. I'd just use their .procmailrc to do *both*
messing with the mail headers (or whatever action you desire) *and* then
sending it onward to the internal mail server.

Agreed.  The user's .procmailrc is the right place to do this.


...
Anyway in the complete absence of any other information, pseudo code to
accomplish some "stuff" and then send the mail to the user on the internal
mail server:

:0 some_set_of_flags
* ^To: user(_at_)gateway_box(_dot_)tld
some_header_action_or_other_stuff
      {

              :0
              ! user(_at_)internal_mail_server(_dot_)tld
      }


Three comments: recipes can only have one action, you don't want
to forward bounces, and you don't want to match with ^To: in the
/etc/procmailrc file to see which user you're delivering to.  The correct
test is to check the LOGNAME variable:

        :0
        * LOGNAME ?? ^^user^^
        * ! ^FROM_MAILER
        {
                :0 some_set_of_flags
                some_header_action_or_other_stuff

                :0 w
                ! user(_at_)internal_mail_server(_dot_)tld
        }


You don't want to forward bounces to avoid mail loops if the user's
internal address ever bounces (probably temporary, but...).


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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