Click to See Complete Forum and Search --> : sendmail redirect and pop mail


sb
04-14-2003, 01:47 AM
Hello,

I'm currntly have two e-mail addresses that I'm using. One is a pop mail address and the other is the address on my local machine (with a static IP). I'm using fetchmail to retrieve my pop mail. Soon I'll have to move to using the pop account exclusivly.

Before I move (in two months from now) I want to configure sendmail to bounce all e-mail to my popaddress and send an automated reply to the sender notifving them of my new address.

I know how I would bounce the mail via the .forward file, but I don't know that I can send the warning.

Any suggestions would be welcome.
Thanks,

Taizong
04-14-2003, 12:24 PM
Are you also using procmail? If so, you can use it to set up the reply. This is from the procmailex man page, it says to add the following to the .procmailrc for the user:

SHELL=/bin/sh

:0 Whc: vacation.lock
# Perform a quick check to see if the mail was addressed to us
* $^To:.*${LOGNAME}
# Don't reply to daemons and mailinglists
* !^FROM_DAEMON
# Mail loops are evil
* !^X-Loop: ${LOGNAME}@your_system_here
| formail -rD 8192 vacation.cache

:0 ehc # if the name was not in the cache
| (formail -rA"Precedence: junk" \
-A"X-Loop: $LOGNAME@your_system_here" -i"Subject: $LOGNAME is away"; \
cat $HOME/vacation.msg ; \
cat $HOME/.signature 2>/dev/null\
) | $SENDMAIL -oi -t

See how it would echo the contents of a file named ~/vacation.msg into the email?

sb
04-14-2003, 12:52 PM
How can I tell if I'm using procmail? I'm running Redhat 7.2 and am using what comes as default, although I had to rerun m4 to allow incomming mail.

What is procmail and if I'm not running it what are other alternative packages should I look for on my system.

Thank you,
Scot