spamassassin-users January 2011 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: Fwd: Re: Q about short-circuit over ruli

Re: Fwd: Re: Q about short-circuit over ruling blacklisting rule

From: J4 <junk4_at_nospam>
Date: Tue Jan 18 2011 - 16:49:35 GMT

On 01/18/2011 05:39 PM, Patrick Ben Koetter wrote:
> * J4 <junk4@klunky.co.uk>:
>>>> I know this is off-topic but is there a way for a third party programme
>>>> to silently drop spam from delivery?
>>> There are several: MimeDefang, Spamassassin-Milter and amavisd-new come to
>>> mind.
>>>
>>> MimeDefang and Spamassassin-Milter work as MILTERS (see: smtpd_milters or
>>> MILTER_README in Postfix).
>>>
>>> amavisd-new may be integrated either as MILTER or as content_filter or
>>> smtpd_proxy_filter using either SMTP or LMTP. You probably want amavisd-new if
>>> you also want a content filter to identify and classify other mail content
>>> categories (virus, banned, spam, undecipherable and, surprise, clean
>>> messages) <http://www.ijs.si/software/amavisd/README.postfix.html>
>>>
>>> p@rick
>>>
>> Thank-you for the suggestions.
>>
>> I have Dovecot LDA so Sieve might well be a good idea, but I would like
>> to inform the sender that the Email was dropped as spam, and avoid
>> backscatter. I don't think I can do this with Sieve/Dovecot LDA.
> You probably could with Sieve Rules, but I believe you don't want to if you
> give it second thought: Notifying senders that their message was spam is
> considered backscatter by most people I know.
>
> Given a spam ratio higher than 95% your server might end up not delivering 95%
> of the messages, but notifying those senders.
>
> If I may suggest a strategy:
>
> - Analyze messages while the client sits in the SMTP session
> - REJECT spam in the SMTP session. Don't let spam hit the discs or you will
> end up wasting ressources (I/O, computing power etc.)
> - Do not notify spam senders/recipients/admins
>
>> Is MIMEDefang resource hungary, especially when used as a before queue
>> milter with Postfix?
> I haven't used MIMEDefang yet. By definition a MILTER runs in the SMTP session
> and only uses RAM. That's good.
>
> IIRC MIMEDefang is Perl. It's probably fast.
>
> p@rick

Hi P@trick,

    This is pretty much what I would like to achieve, & the reason I
decided not to use Dovecot Sieve (apart from me being incapable of
setting it. ;) ).

        Parse the SPAM during the SMPT session and use only RAM: Perfect.
 
I would still like to notify the connecting SMTP client with a reject
message. Real spammers are uninterested anyway, but legitimate
e-mailers would be, although this is not essential to let them know.

The problem is that I don't know how to achieve this with postfix :(
The postfix set-up I have is below (master.cf), but I do not know for
certain that it is filtering during the SMTP session afore it hits the
disc, and I have not found any information about how to configure this.
My hunt for guides goes on.

smtp inet n - - - - smtpd
  -o content_filter=spamassassin
dovecot unix - n n - - pipe
    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
${recipient}
spamassassin unix - n n - - pipe
  user=nobody argv=/usr/bin/spamc -f -e
  /usr/sbin/sendmail -oi -f ${sender} ${recipient}