On 01/05/2012 12:02 AM, Tobey Wheelock wrote:
I have a content_filter installed that pipes mail to a script that
invokes spamassassin. That's working fine. Relevant lines from
master.cf:
smtp inet n - n - - smtpd
-o content_filter=spamfilter:dummy
<snip>
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter.sh -f ${sender} --
${recipient}
I would now like to install an autoresponder script. I had hoped I
could add an additional line after "smtp inet...." like so:
smtp inet n - n - - smtpd
-o content_filter=spamfilter:dummy
-o content_filter=autoresponder:dummy
and then add the pipe declaration below the spamfilter lines:
autoresponder unix - n n - - pipe
flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender}
-r ${recipient} -S ${sasl_username} -C ${client_address}
However, that doesn't work because the only script that seems to receive
the email is the last one listed in the smtp inet .... smtpd line.
I can filter the mail with one script or the other, but not both.
What's the best away to achieve a system that both checks for spam and
offers users the ability to auto-reply if they desire?
These are very different functions.
Spam filtering is best achieved when mail is received, such as with
amavisd-new and spamassassin.
Autoreply is best taken care of by the users' own delivery agent, or
.forward file.
--
J.