Hi Xavi,
At 01:45 12-12-2006, Xavi Montero wrote:
I have SpamAssassin in my Debian box (with sendmail). I have config
A) where spamassassin is run in the delivery stage of the sendmail
(see the apendixes below) and I desire behaviour B) where it is run
at the incoming stage so the spam is rejected and the sender cannot
success at sending it.
QUESTION-1: Is this possible?
Yes.
QUESTION-2: May I break this goal into small parts and achieve each
separately?
Yes.
QUESTION-3: Where do I have to start?
See below.
Appendixes:
B) Desired config
When you send mail to a server to a wrong user, sometimes it
re-sends you back an e-mail that says: "Cannot send because user
does not exist". But sometimes you get this message DURING the
connection so you know for sure that the mail was NOT delivered. I suspect
See http://wiki.apache.org/spamassassin/IntegratedInMta There are
several milters which allow SpamAssassin to be called during the SMTP
phase instead of the delivery stage (Appendix A).
My desired behaviour would be:
- Setup SpamAssassin at the "input" of the sendmail, so anybody
sending spam to me gets a "send failure".
That's how it works when you use a milter.
- Configure the message saying "Your are suspected to send spam, if
you do not, go to this webpage (and give one under my apache) and
enter your e-mail address".
You should be able to tailor the reject message to say that.
- Provide a phpscript that if one is entering a good e-mail address
by hand, the address is added to a "white-list" that allows his
mails to arrive me.
See http://wiki.apache.org/spamassassin/UsingSQL Your PHP script can
add the whitelisted address to the SQL db.
E) What did I try (and did not run).
if ( $SIZE < 262144 )
{
## 4.1 Spamassassin
xfilter "/usr/bin/spamc"
if (/^X-Spam-Flag: YES/)
{
echo "This server thinks this is spam."
echo "If this is not spam, call me at +34 630 59 01 62"
EXITCODE = 100
exit
}
}
You cannot set a message during the delivery stage.
Regards,
-sm