procmail
[Top] [All Lists]

Re: Nesting forwarding addresses?

1997-07-14 12:28:00
Thomas Wagner <gnostic3(_at_)televar(_dot_)com> writes:
Is there a way to simplify the following list of mail forwarding recipes
by nesting them all into one recipe?

:0:
* ^TOjoe(_at_)mydomain(_dot_)com
! joesmith(_at_)provider1(_dot_)com

:0:
* ^TObill(_at_)mydomain(_dot_)com
! billy(_at_)provider2(_dot_)com

:0:
* ^TOfrank(_at_)mydomain(_dot_)com
! frank(_at_)provider3(_dot_)com

etc.

I started out with a single email address that I needed to forward, but
now there are over a dozen and the list keeps getting longer. Thanks for
any suggestions as to how I can streamline this!

This looks like you're trying to use procmail to handle a virtual
domain.  However, you're matching on the headers instead of the
"envelope" (e.g., the values used in the SMTP MAIL From: and RCPT To:
commands).  This doesn't work if one of the above addresses subscribes
to a mailing list or is sent a Bcc:, as the address won't appear in the
header at all.  You need to have sendmail (or whatever the MTA involved
is) pass the envelope recipient address to procmail on it's command
line which you can access via the $1 pseudo-variable.  This may require
modifications to your sendmail setup.  How is procmail currently
invoked?  Is there a special sendmail rule involved, or are you using
the wonderful mailertable feature?


Philip Guenther

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