jump to navigation

How To Setup a Vacation Autoresponder with Procmail + Sendmail January 8, 2008

Posted by devhen in CentOS, Fedora, Linux.
trackback

The problem with vacation auto responders like ‘vacation’ for sendmail is that spammers often fake the From: address. Auto responding to these addresses can get your mail server blacklisted. To avoid this you can setup your autoresponder with procmail and, if you are running a spam filter on your machine, you can tell procmail to auto respond only if the X Spam Status header is ‘No.’ To accomplish this copy the following into ~/.procmailrc in the home directory of the user you want auto responses for. Make sure to make any neccessary changes to MAILDIR, SENDMAIL and the three instances of ‘you@yourdomain.com':

———————————————

VERBOSE=off
LOGFILE=$HOME/procmail.log
MAILDIR=$HOME/mail
SENDMAIL=/usr/sbin/sendmail
#########################################
# Auto-responder for vacations. Please
# insert text in $MAILDIR/message.txt
#########################################
:0 ic
*!^FROM_DAEMON
*!^X-Loop: you@yourdomain.com
* ^X-Spam-Status: No
|(formail -r -A “Precedence: Auto” \
– -I”From: Testy <you@yourdomain.com>” \
– -I”Subject: Automated acknowledgement” \
– -A “X-Loop: you@yourdomain.com”; \
cat message.txt )| $SENDMAIL -t

———————————————

Now put your auto response message in ~/mail/message.txt . Don’t forget to turn off the autoresponder when you return:

mv ~/.procmailrc ~/procmailrc_backup

About these ads

Comments»

1. Michael - March 25, 2008

Need to check the message for “Precedence:” value less than zero. Never respond to “Precedence: list” (-30) or “Precedence: bulk” (-60) or “Precendence: junk” (-100).

2. funky - June 3, 2008

Funky says : I absolutely agree with this !

3. raimihusin - November 16, 2008

Hi,
I have with me about 10 free dinner coupons for restaurants in the
Philadelphia-Delaware area to give away for free. I don’t need these coupons
as I already have enough for my personal use.
Please email me at blahblah@yahoo.com for further info

4. mbithi - January 14, 2010

Working on this in my domain name: http://www.buguta.com – Domain names at affordable rates.

5. How To Setup a Vacation Autoresponder with Procmail + Sendmail | Auto responder - December 11, 2011

[...] devhen.wordpress.com © 2011 Auto responder SEO services Powered by CTR Theme [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: