procmail
[Top] [All Lists]

Re: domain problems...

2001-05-17 15:25:54
* Lawrence Mitchell 
<lawrence(_at_)chello212186054218(_dot_)11(_dot_)vie(_dot_)surfer(_dot_)at> 
[20010516 20:27]: writing on the subject 'Re: domain problems...'
Lawrence> * On [010516 16:24] Scott Pitsley 
<Pitsley(_dot_)Scott(_at_)fsd(_dot_)com> wrote:
Lawrence> > I am new to procmail and am trying to use it to help with a domain 
name 
Lawrence> > change.
Lawrence> > Currently I accept mail for @olddomain.com and @newdomain.com. I 
want any
Lawrence> > message that comes in to uname(_at_)olddomain(_dot_)com to generate 
a message to the 
Lawrence> > sender
Lawrence> > and recipient that says olddomain.com is going away on "date" in 
the future
Lawrence> > please use uname(_at_)newdomain(_dot_)com(_dot_)

Try This:


#Autoresponder.....instead of VACATION!
## Avoid e-mail loops and accept mail from lists I am subscribed to.
* ! ^(TO|CC|Cc).*youraddress
* ! ^FROM:.*yourdomain.com
* ! ^FROM:.*your_address
* ! ^FROM_DAEMON
* ! ^FROM_MAILER
* ! ^List-
* ! ^(Mailing-List|Approved-By|BestServHost|Resent-(Message-ID|Sender)):
* ! ^Sender: (.*-errors@|owner-)
* ! ^X-[^:]*-List:
* ! ^X-(Authentication-Warning|Loop|Sent-To|(Listprocessor|Mailman)-Version):
* ! ^Precedence: (junk|bulk|list)
* ! ^X-Loop: *\<you(_at_)yourdomain\(_dot_)com>
* ! ^From:.*you@([-a-z0-9_]+\.)*yourdomain\.com
* ! ^From:.*nobody
{
 :0 h c
# Prepare and send notification
# Be sure to customize for your sendmail path
| (formail -rt \
        -I "Subject: E-mail address change!." \
        -A "X-Loop: you(_at_)yourdomain(_dot_)com" \
        -I "From: Your Humble Assistant" ; \
echo    "*************************************************" ; \
echo    "*  This response message is computer-generated. *" ; \
echo    "*  Please do not respond to this auto-message   *" ; \
echo    "*************************************************" ; \
echo    ; \
echo    "I am soon changing my e-mail address." ; \
echo    "to <newaddresshere> with effect from <date_here>." ; \
echo    "I will stop using current address as of <some_date>" ; \
echo    ; \
echo    "Thank you.") \
        | $SENDMAIL -oi -t
:0 c
| /usr/local/bin/formail -rtzxTo: >> $FILEDIR/autobot.log

:0:
CHANGE
}
#EOF

This way, you have a log of all people this message is sent to appended to
a file $HOME/autobot.log and also you have a folder called CHANGE where
the messages that were sent to you are kept.

Please feel free to contact me in case of problem with the above.

HTH

NB: Create the file CHANGE in your defined Mail directory. Also do
touch autobot.log in your home directory!!


-Wash

--
Odhiambo Washington Wananchi Online Ltd.,
wash(_at_)wananchi(_dot_)com 1st Flr Loita Hse
Tel: 254 2 313985 Loita Street.,
Fax: 254 2 313922 PO Box 10286, 00100-NAIROBI,KE.

Mandrell: "You know what I think?"
Doctor:   "Ah, ah that's a catch question. With a brain your size you
          don't think, right?"
                -- Dr. Who

Attachment: pgp1Cu2iGnPg5.pgp
Description: PGP signature

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