You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Anton Herber <an...@incom.de> on 2008/12/16 12:59:57 UTC

Spamassassin + Mailman

Hi,

I'm currently having a problem with spamassassin (SpamAssassin version 
3.2.5,  running on Perl version 5.10.0). I'm using Spamassassin within 
postfix/spamd/spamc in /etc/postfix/master.cf:

smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=spamassassin

/etc/postfix/transport:
lists.domain.tld          mailman:
domain.tld   local

I've also a domain based configuration for mailman (everything going to 
*.lists.domain.tld is forwarded to mailman). So if I receive a mail to 
an mailinglist it's getting scanned/scored, passed to mailman and 
scanned/scored again:

Dec 16 12:24:12 localhost spamd[21548]: spamd: getting username through 
alias: mailinglist
Dec 16 12:24:13 localhost spamd[21548]: spamd: handle_user unable to 
find user: 'mailinglist'
Dec 16 12:24:16 localhost spamd[21548]: spamd: clean message (4.7/5.0) 
for mailinglist:99 in 5.1 seconds, 1523 bytes.
Dec 16 12:24:17 localhost postfix/pipe[21584]: 2E85E714115: 
to=<ma...@lists.domain.tld>, orig_to=<ma...@domain.tld>, 
relay=mailman, delay=0.24, delays=0/0.01/0/0.24, dsn=2.0.0, status=sent 
(delivered via mailman service)
...
Dec 16 12:24:19 localhost spamd[21549]: spamd: setuid to 
mailinglistmember succeeded!
Dec 16 12:24:21 localhost spamd[21548]: spamd: clean message (-0.5/5.0) 
for mailinglistmember

So the previously score of "4.7" is getting rewritten to "-0.5" in the 
second scan after mailman is delivering them to the mailinglistmember. 
Is there a way to ignore allready scanned mails or mails coming from 
mailman, so they don't get scored again while being delivered to the 
enduser?

Regards,
Anton


Re: Spamassassin + Mailman

Posted by Martin Schütte <in...@mschuette.name>.
Anton Herber schrieb:
> Is there a way to ignore allready scanned mails or mails coming from 
> mailman, so they don't get scored again while being delivered to the 
> enduser?

You can use a separate smtpd for Mailman. A master.cf entry like this 
will open port 20025, accept only from the local IP, and skip all checks:
10.1.2.3:20025 inet n  - n - -  smtpd
     -o content_filter=
     -o receive_override_options=no_header_body_checks
     -o mynetworks=10.1.2.3/32
     -o smtpd_restriction_classes=
     -o smtpd_client_restrictions=
     -o smtpd_helo_restrictions=
     -o smtpd_sender_restrictions=
     -o smtpd_recipient_restrictions=permit_mynetworks,reject

-- 
Martin

Re: Spamassassin + Mailman

Posted by Robert Schetterer <ro...@schetterer.org>.
Anton Herber schrieb:
> Hi,
> 
> I'm currently having a problem with spamassassin (SpamAssassin version
> 3.2.5,  running on Perl version 5.10.0). I'm using Spamassassin within
> postfix/spamd/spamc in /etc/postfix/master.cf:
> 
> smtp      inet  n       -       n       -       -       smtpd
>        -o content_filter=spamassassin
> 
> /etc/postfix/transport:
> lists.domain.tld          mailman:
> domain.tld   local
> 
> I've also a domain based configuration for mailman (everything going to
> *.lists.domain.tld is forwarded to mailman). So if I receive a mail to
> an mailinglist it's getting scanned/scored, passed to mailman and
> scanned/scored again:
> 
> Dec 16 12:24:12 localhost spamd[21548]: spamd: getting username through
> alias: mailinglist
> Dec 16 12:24:13 localhost spamd[21548]: spamd: handle_user unable to
> find user: 'mailinglist'
> Dec 16 12:24:16 localhost spamd[21548]: spamd: clean message (4.7/5.0)
> for mailinglist:99 in 5.1 seconds, 1523 bytes.
> Dec 16 12:24:17 localhost postfix/pipe[21584]: 2E85E714115:
> to=<ma...@lists.domain.tld>, orig_to=<ma...@domain.tld>,
> relay=mailman, delay=0.24, delays=0/0.01/0/0.24, dsn=2.0.0, status=sent
> (delivered via mailman service)
> ...
> Dec 16 12:24:19 localhost spamd[21549]: spamd: setuid to
> mailinglistmember succeeded!
> Dec 16 12:24:21 localhost spamd[21548]: spamd: clean message (-0.5/5.0)
> for mailinglistmember
> 
> So the previously score of "4.7" is getting rewritten to "-0.5" in the
> second scan after mailman is delivering them to the mailinglistmember.
> Is there a way to ignore allready scanned mails or mails coming from
> mailman, so they don't get scored again while being delivered to the
> enduser?
> 
> Regards,
> Anton
> 

depending to your setup, i.e if your mailserver
does only mailman lists ( and you dont need seperate users prefs ), it
might be better and more easy to use spampd

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

Re: Spamassassin + Mailman

Posted by mouss <mo...@netoyen.net>.
Anton Herber a écrit :
> Hi,
> 
> I'm currently having a problem with spamassassin (SpamAssassin version
> 3.2.5,  running on Perl version 5.10.0). I'm using Spamassassin within
> postfix/spamd/spamc in /etc/postfix/master.cf:
> 
> smtp      inet  n       -       n       -       -       smtpd
>        -o content_filter=spamassassin
> 
> /etc/postfix/transport:
> lists.domain.tld          mailman:
> domain.tld   local
> 
> I've also a domain based configuration for mailman (everything going to
> *.lists.domain.tld is forwarded to mailman). So if I receive a mail to
> an mailinglist it's getting scanned/scored, passed to mailman and
> scanned/scored again:
> 
> Dec 16 12:24:12 localhost spamd[21548]: spamd: getting username through
> alias: mailinglist
> Dec 16 12:24:13 localhost spamd[21548]: spamd: handle_user unable to
> find user: 'mailinglist'
> Dec 16 12:24:16 localhost spamd[21548]: spamd: clean message (4.7/5.0)
> for mailinglist:99 in 5.1 seconds, 1523 bytes.
> Dec 16 12:24:17 localhost postfix/pipe[21584]: 2E85E714115:
> to=<ma...@lists.domain.tld>, orig_to=<ma...@domain.tld>,
> relay=mailman, delay=0.24, delays=0/0.01/0/0.24, dsn=2.0.0, status=sent
> (delivered via mailman service)
> ...
> Dec 16 12:24:19 localhost spamd[21549]: spamd: setuid to
> mailinglistmember succeeded!
> Dec 16 12:24:21 localhost spamd[21548]: spamd: clean message (-0.5/5.0)
> for mailinglistmember
> 
> So the previously score of "4.7" is getting rewritten to "-0.5" in the
> second scan after mailman is delivering them to the mailinglistmember.
> Is there a way to ignore allready scanned mails or mails coming from
> mailman, so they don't get scored again while being delivered to the
> enduser?
> 

either add "-o content_filter=" under the pickup service in master.cf or
use amavisd-new to run SA. You can get more infos on the postfix-users
list.

Re: Spamassassin + Mailman

Posted by Anton Herber <an...@incom.de>.
Hi Mark, Hi Mouss.

Thanks, it's working like a charm now! While thinking about how to 
implement mouss' suggestion your mail arrived and saved much time 
searching the web again, Mark. Thank you again.

Mark Martinec schrieb:
> Anton,
>
>   
>> I'm currently having a problem with spamassassin (SpamAssassin version
>> 3.2.5,  running on Perl version 5.10.0). I'm using Spamassassin within
>> postfix/spamd/spamc in /etc/postfix/master.cf:
>>
>> smtp      inet  n       -       n       -       -       smtpd
>>         -o content_filter=spamassassin
>>     
> [...]
>   
>> So the previously score of "4.7" is getting rewritten to "-0.5" in the
>> second scan after mailman is delivering them to the mailinglistmember.
>> Is there a way to ignore allready scanned mails or mails coming from
>> mailman, so they don't get scored again while being delivered to the
>> enduser?
>>     
>
> There is no point in content filtering fan-out mail coming from mailman.
> Just set up another smtpd service instance on a dedicated TCP port
> with content filtering disabled:
>
> master.cf:
>
> 10025           inet n  -       n       -       -  smtpd
>     -o content_filter=
>     -o smtpd_milters=
>     -o smtpd_client_restrictions=permit_mynetworks,reject
>     -o mynetworks=127.0.0.0/8
>     -o receive_override_options=no_header_body_checks
>
> then configure mailman to deliver its output to that port:
>
> mm_cfg.py:
>
> SMTPHOST = '127.0.0.1'
> SMTPPORT = 10025
>
>
>   Mark
>   

Re: Spamassassin + Mailman

Posted by Mark Martinec <Ma...@ijs.si>.
Anton,

> I'm currently having a problem with spamassassin (SpamAssassin version
> 3.2.5,  running on Perl version 5.10.0). I'm using Spamassassin within
> postfix/spamd/spamc in /etc/postfix/master.cf:
>
> smtp      inet  n       -       n       -       -       smtpd
>         -o content_filter=spamassassin
[...]
> So the previously score of "4.7" is getting rewritten to "-0.5" in the
> second scan after mailman is delivering them to the mailinglistmember.
> Is there a way to ignore allready scanned mails or mails coming from
> mailman, so they don't get scored again while being delivered to the
> enduser?

There is no point in content filtering fan-out mail coming from mailman.
Just set up another smtpd service instance on a dedicated TCP port
with content filtering disabled:

master.cf:

10025           inet n  -       n       -       -  smtpd
    -o content_filter=
    -o smtpd_milters=
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o receive_override_options=no_header_body_checks

then configure mailman to deliver its output to that port:

mm_cfg.py:

SMTPHOST = '127.0.0.1'
SMTPPORT = 10025


  Mark