Rhinokiller
IS-IT--Management
Below is my standard vacation auto responder which works just fine if incomming email is addressed to user@mydomain.com. However if mail arrives to the same user at email address user.lastname@mydomain.com, the autoresponder just delivers the mail. If anyone has any ideas on how to modify this to check incomming mail for user@mydomain.com aswell as user.lastname@mydomain.com I'd appreciate it.
FORMAIL=/usr/bin/formail
SENDMAIL=/usr/sbin/sendmail
SHELL=/bin/sh
MAILDIR=/var/spool/mail/username
### Vacation Recipe ###
:0 Whc: user.lock
# Check to see if mail was addressed to user
* $^To:username@mydomain.com
# Don't Reply To Daemons and mailling lists
* !^FROM_DAEMON
* !^X-Loop: user@mydomain.com
* !^X-Loop: user.lastname@peigenesis.com
| FORMAIL -rD 8192 user.cache
:0c eh # if the name was not in the cache
| (formail -rI"Precedence: junk" -I "From: Auto Responder <autoresponder@mydomain.com>" ;
-A"X-Loop: user@mydomain.com" ; echo "I received your email, however I will be out of the office
until next week." ; echo "If you have an issue that requires immediate attention please contact
some_one_else@mydomain.com" ; echo "Thank you." | sendmail -oi -t
There is no God, only 10001010
FORMAIL=/usr/bin/formail
SENDMAIL=/usr/sbin/sendmail
SHELL=/bin/sh
MAILDIR=/var/spool/mail/username
### Vacation Recipe ###
:0 Whc: user.lock
# Check to see if mail was addressed to user
* $^To:username@mydomain.com
# Don't Reply To Daemons and mailling lists
* !^FROM_DAEMON
* !^X-Loop: user@mydomain.com
* !^X-Loop: user.lastname@peigenesis.com
| FORMAIL -rD 8192 user.cache
:0c eh # if the name was not in the cache
| (formail -rI"Precedence: junk" -I "From: Auto Responder <autoresponder@mydomain.com>" ;
-A"X-Loop: user@mydomain.com" ; echo "I received your email, however I will be out of the office
until next week." ; echo "If you have an issue that requires immediate attention please contact
some_one_else@mydomain.com" ; echo "Thank you." | sendmail -oi -t
There is no God, only 10001010