procmail
[Top] [All Lists]

Re: Procmail receipe help to send auto reply and forward for all users in the domain

2002-11-19 15:20:37
On Mon, 18 Nov 2002, Rakesh-Shah-Exch wrote:

R> The Original problem:  Given a hundred users who email addresses have
R> moved from one company to another. ie user(_at_)A(_dot_)com to 
user(_at_)B(_dot_)com(_dot_)
R> I needed to forward all messages to the new account and do an auto-reply
R> to the orignator, with an explaination and the new users email address.
R>
R> I have A mailertable entry for A.com like
R>
R> a.com   procmail:/etc/procmailrc
R>
R> but do not know what to put in /etc/procmailrc
R>
R>


How about a virtual user table with:

@a.com    %1(_at_)b(_dot_)com



So fred(_at_)a(_dot_)com will be sent to fred(_at_)b(_dot_)com


In /etc/procmailrc, you will need an autoresponder.  Modifying the example
in man procmailex:



:0 h c
* ^TO(_dot_)*(_at_)a\(_dot_)com
* !^X-Loop: postmaster(_at_)b(_dot_)com
| (formail -rt -I"Precedence: junk" \
-A"X-Loop: postmaster(_at_)b(_dot_)com" ; \
echo "%{LOGNAME}(_at_)a(_dot_)com is now an invalid address. "; \
echo "Please use %{LOGNAME}(_at_)b(_dot_)com(_dot_)") \
 | $SENDMAIL -t

# as the above was a copy, the original will be delivered to the user's
mailbox.




Alan

( Please do not email me AS WELL as replying to the list. Personal
  email is welcome but may invoke a password autoresponder. )



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