procmail
[Top] [All Lists]

Re: procmail receipe

1997-09-12 23:21:07
Omar Keblawi -MITS <keblawi(_at_)Cadence(_dot_)COM> writes:
I realize it's not the best, but I'm pretty new at procmail and sendmail.
I didn't use a global /etc/procmailrc file nor a mailertable.  The mailertable
seem pretty powerful, I'll remember that for the future, thanks for the
tip on it.  All I used was on host for company A, was the aliases file.  For 
a given user it would mail to the new user account at company B, as will as
sending it to a local user called "moveduser".  This  "moveduser" account has
a .procmailrc file that mails out a reply message with the new account info.
The aliases file on the system in A.com would be something like this:
user1: user1(_at_)B(_dot_)com,moveduser
user2: user2(_at_)B(_dot_)com,moveduser

This is suddenly reminiscent of something we do here at Gustavus for
users that have left the college, but wish to have their email
forwarded (just for a year or two): we create an alias that looks
like:

        oldaddress: newaddress(_at_)else(_dot_)where,
                "|forward.pl oldaddress newaddress(_at_)else(_dot_)where"

Then forward.pl is a small perl script which extracts the envelope sender
from the incoming message (from the Return-Path:) and send a message there
saying something like
        This is an automatic message to notify you that
        <oldaddress(_at_)gac(_dot_)edu> is no longer valid.  For a
        short period of time mail is being forwarded to
        the new address <newaddress(_at_)else(_dot_)where>.  This
        includes your message regarding "whatever".

forward.pl actually does some other local bookkeeping as well, but the
key thing here is that it's explicitly passed the recipient addresses
involved, that being the only way for it to get them.

(I would include forward.pl in this message, but it's too big, and I've
been wanting to rewrite it as a procmail script, if I ever have the time
to test such a rewrite.)

Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • Re: procmail receipe, Philip Guenther <=