Re: [Q] Auto delete mail from my domain - SpamAssassin

This is a discussion on Re: [Q] Auto delete mail from my domain - SpamAssassin ; ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: [Q] Auto delete mail from my domain

  1. Re: [Q] Auto delete mail from my domain


  2. Re: [Q] Auto delete mail from my domain

    Lê Ngọc Hiếu wrote:
    > Hi,
    >
    > I setup my mail server with two instance of postfix to listen on port
    > 25 for incomming mail, and port 11234 for outgoing mail. Only mail
    > coming through port 25 are filtered by SA. But now I have too many
    > spam from my server, they have bot to auto connect to our server and
    > sending mail to me.
    >
    > I want SA to auto delete mail from my domain test.com
    > . So I just write a new rule:
    >
    > header LOCAL_DEMONSTRATION_FROM From =~ /test\.com/i
    > score LOCAL_DEMONSTRATION_FROM 100
    >
    > I marked it 100 point and intend to get SA auto delete them but I just
    > get the instruction to auto delete by using procmail. I integrated SA
    > to postfix by adding:
    >
    > smtp inet n - n - - smtpd -o content_filter=spamassassin
    >
    > to /etc/postfix/main.cf . How could I setup for auto
    > deleting in this case? (SA's running normally and detect spam well)
    >
    > Or any solution for this?


    Well, I'm no postfix expert by any stretch, however I can tell you it's
    impossible for SpamAssassin to directly delete mail. It can't, because
    it has no control over the envelope. If SA were to try, most MTAs will
    simply assume SA crashed and recover the original message without even
    any markings from SA. The simplicity of the mail filter interface that
    SA works with has the advantage of letting it be used lots of places,
    but you loose the ability to do things like delete mail in SA.

    So, you really need to look at another tool in your mail chain to
    perform the deletion. This could be done at the postfix level, or at
    the MDA level (ie: procmail).

    With postfix, personally I'd suggest using something like amavis as an
    integration, and do your scanning before queuing so you can safely 550
    messages (assuming you're running SA on your MX server, instead of an
    inside server that gets mail forwarded to it). It's more complicated to
    set up, but you'll be able to set up AV scanning this way too.

    http://wiki.apache.org/spamassassin/...tfixWithAmavis


    If that's too complex, you should look at writing a simple filter script
    that can return status codes that will cause postfix to discard the
    message (and switch to the spamd/spamc pair, instead of the spamassassin
    script, which is really not intended for use under any kind of serious load)

    http://wiki.apache.org/spamassassin/...SpamdInPostfix




    >
    > Thanks for your help.



+ Reply to Thread