procmail
[Top] [All Lists]

Change of address auto reply

2004-09-23 07:58:19
On Wed, Sep 22, 2004 at 02:24:56PM -0500, C. Wilson wrote:
>> I will be changing domains and would like to send out an auto reply
>> to those that send an email to my old domain email address. Below is
>> my email address setup and my current .procmailrc. Any help will be
>> greatly appreciated.

Dallman Ross wrote:
> Maybe you can be a bit more specific about what isn't working, why you
> think that might be, what exactly does happen instead of what you want,
> what the verbose logs say about that section when it runs, etc.
>
> --
> dman

I got it to work, finally. My problem was I did not understand how to test against the 
"To:" address.

If anyone is interested in my solution:

SHELL=/bin/sh    # for other shells, this might need adjustment

:0
# Was it to me
* ^TO_test(_at_)olddomain\(_dot_)net
# Ignore messages for daemons
* ! ^FROM_DAEMON
# Avoid email loops
* ! ^X-Loop: test1(_at_)localhost\(_dot_)net
{
                :0
                 * ^Subject:[    ]*\/[^  ].*
                 {
                         SUBJECT=$MATCH
                 }

                 :0c
                 | (/usr/bin/formail -rI"Precedence: junk" \
                         -I"Subject:  Change Of Address RE: $SUBJECT" \
                         -A"X-Loop: test1(_at_)localhost(_dot_)net" ; \
                         cat $HOME/info.txt ) \
                         | $SENDMAIL -oi -t -f test(_at_)newdomain(_dot_)com

}

Thanks,

--
C Wilson


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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