Archive for the tag 'loop'

Prevention of infinite mail loop with Auto Responder

This mostly happens when the mail account using autoreponder gets lot of spam mail, and as many of these spam mails use bogus From addresses, this account also recieves many mailer-daemon responses while replying to these bogus email addresses.

1) Edit /home/virtual/FILESYSTEMTEMPLATE/sendmail/etc/smrsh/responder.sh (This file is hardlinked into all the domains having autoresponder enabled as
/home/virtual/[domainname]/etc/smrsh/responder.sh)

and comment out:

${PYTHONBIN} ${RUNAPP} $@ > /dev/null 2>&1

so it looks like:

# ${PYTHONBIN} ${RUNAPP} $@ > /dev/null 2>&1

Then insert after it:

procmail -a “$*” /etc/auto.rc

2) Create the file called auto.rc with the following lines:

:0
* ^FROM_MAILER
/dev/null
:0
| /usr/bin/python2 /usr/lib/opcenter/sendmail/responder.pyc $1

Copy this file to /home/virtual/[domainname]/etc/ for all the domains using autoresponder.
(You may want to use virtDomain.sh to automatically copy or create this file when ever a new domain is added)

Now anything coming from MAILER-DAEMON or postmaster that goes to the responder will be sent to /dev/null.

Anything else will be sent to the responder.

Reference: http://parallels.com