Rejecting mail based on a Milter results

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Rejecting mail based on a Milter results

@lbutlr
The spamass-milter is not rejecting mail that scores above the number set in the -r flag for the milter (confirmed by other people this is a bug in spamass-milter).

Is there something I can do in postfix to reject mails that the Milter logs like:

spamd: result: Y 18

Where “18” is a something I set like “>=10”?

Seems a long shot, but it is unlikely anyone is working on spamass-milter at this point.

--
Truth is seen through keyholes


Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Nicky Thomassen
Wed, 26 Jun 2019 20:23:44 -0600 skrev "@lbutlr" <[hidden email]>:

> The spamass-milter is not rejecting mail that scores above the number set in
> the -r flag for the milter (confirmed by other people this is a bug in
> spamass-milter).
>
> Is there something I can do in postfix to reject mails that the Milter logs
> like:
>
> spamd: result: Y 18
>
> Where “18” is a something I set like “>=10”?
>
> Seems a long shot, but it is unlikely anyone is working on spamass-milter at
> this point.
>

spamass-milter works fine here on FreeBSD current


in /etc/rc.conf
spamass_milter_localflags="-r 7 ... "
Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

@lbutlr


> On Jun 27, 2019, at 12:38 AM, [hidden email] wrote:
>
> Wed, 26 Jun 2019 20:23:44 -0600 skrev "@lbutlr" <[hidden email]>:
>
>> The spamass-milter is not rejecting mail that scores above the number set in
>> the -r flag for the milter (confirmed by other people this is a bug in
>> spamass-milter).
>>
>> Is there something I can do in postfix to reject mails that the Milter logs
>> like:
>>
>> spamd: result: Y 18
>>
>> Where “18” is a something I set like “>=10”?
>>
>> Seems a long shot, but it is unlikely anyone is working on spamass-milter at
>> this point.
>>
>
> spamass-milter works fine here on FreeBSD current

Possibly it is an 11.2 issue then.

> in /etc/rc.conf
> spamass_milter_localflags="-r 7 ... "

Yep, that is what doesn’t work (though mine is 10).

spamass_milter_enable="YES"
spamass_milter_socket_owner="postfix"
spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “

Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Matt Anton

On 27 Jun 2019, at 19:57, @lbutlr wrote:

> Possibly it is an 11.2 issue then.
>
>
>> in /etc/rc.conf
>> spamass_milter_localflags="-r 7 ... "
>
>
> Yep, that is what doesn’t work (though mine is 10).
>
> spamass_milter_enable="YES"
> spamass_milter_socket_owner="postfix"
> spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “
Jumping in the me too boat, also on 11.2 (as far as I can remember this used to works on FreeBSD 9…)

--
matt [at] lv223.org
GPG key ID: 7D91A8CA

signature.asc (871 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Matus UHLAR - fantomas
In reply to this post by @lbutlr
>> On Jun 27, 2019, at 12:38 AM, [hidden email] wrote:
>>
>> Wed, 26 Jun 2019 20:23:44 -0600 skrev "@lbutlr" <[hidden email]>:
>>
>>> The spamass-milter is not rejecting mail that scores above the number set in
>>> the -r flag for the milter (confirmed by other people this is a bug in
>>> spamass-milter).
>>>
>>> Is there something I can do in postfix to reject mails that the Milter logs
>>> like:
>>>
>>> spamd: result: Y 18
>>>
>>> Where “18” is a something I set like “>=10”?
>>>
>>> Seems a long shot, but it is unlikely anyone is working on spamass-milter at
>>> this point.
>>>
>>
>> spamass-milter works fine here on FreeBSD current

On 27.06.19 11:57, @lbutlr wrote:
>Possibly it is an 11.2 issue then.

check sa-milter RC script. doesn't it redefine reject score on commandline
somewhere?

>> in /etc/rc.conf
>> spamass_milter_localflags="-r 7 ... "
>
>Yep, that is what doesn’t work (though mine is 10).
>
>spamass_milter_enable="YES"
>spamass_milter_socket_owner="postfix"
>spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “

ps axuww|grep spamass-milter

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Honk if you love peace and quiet.
Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

@lbutlr
On Jun 28, 2019, at 2:22 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
> On 27.06.19 11:57, @lbutlr wrote:
>> Possibly it is an 11.2 issue then.
>
> check sa-milter RC script. doesn't it redefine reject score on commandline somewhere?

It does, it just doesn’t actually reject the mail. In facts, in behaves exactly as if the setting were not there.

>
>>> in /etc/rc.conf
>>> spamass_milter_localflags="-r 7 ... "
>>
>> Yep, that is what doesn’t work (though mine is 10).
>>
>> spamass_milter_enable="YES"
>> spamass_milter_socket_owner="postfix"
>> spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “
>
> ps axuww|grep spamass-milter

root     23945   0.0  0.3  31560  10908  -  Ss   Sun14       0:14.52 /usr/local/sbin/spamass-milter -f -p /var/run/spamass-milter.sock -u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10


Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Matus UHLAR - fantomas
>On Jun 28, 2019, at 2:22 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
>> On 27.06.19 11:57, @lbutlr wrote:
>>> Possibly it is an 11.2 issue then.
>>
>> check sa-milter RC script. doesn't it redefine reject score on commandline somewhere?
>
>It does, it just doesn’t actually reject the mail. In facts, in behaves exactly as if the setting were not there.
>
>>
>>>> in /etc/rc.conf
>>>> spamass_milter_localflags="-r 7 ... "
>>>
>>> Yep, that is what doesn’t work (though mine is 10).
>>>
>>> spamass_milter_enable="YES"
>>> spamass_milter_socket_owner="postfix"
>>> spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “
>>
>> ps axuww|grep spamass-milter

On 28.06.19 06:01, @lbutlr wrote:
>root     23945   0.0  0.3  31560  10908  -  Ss   Sun14       0:14.52 /usr/local/sbin/spamass-milter -f -p /var/run/spamass-milter.sock -u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10

doesn't -e require defaultdomain to be added?
Doesn't it complain at startup?
bad arguments could result in their misinterpretation

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
He who laughs last thinks slowest.
Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

@lbutlr
On Jun 28, 2019, at 6:42 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
> On 28.06.19 06:01, @lbutlr wrote:
>> root     23945   0.0  0.3  31560  10908  -  Ss   Sun14       0:14.52 /usr/local/sbin/spamass-milter -f -p /var/run/spamass-milter.sock -u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10
>
> doesn't -e require defaultdomain to be added?

No, it passes the full [hidden email] for working with virtual users. Without -e it passes only the username, assuming that all users are local. You can pass a default domain that will be added if a bare username is passed, but since all my users are virtual this is not relevant.

> Doesn't it complain at startup?
> bad arguments could result in their misinterpretation

No complaints at startup and the milter successfully scans spam and marks it up.



--
You know a thorn can main / But a lover does the same / A gem will
reflect light / And a Fool will marvel at the sight / A fool such as me,
/Who sees not the gold, but the beauty of the shine


Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Nicky Thomassen
In reply to this post by @lbutlr
Thu, 27 Jun 2019 11:57:33 -0600 skrev "@lbutlr" <[hidden email]>:

> > in /etc/rc.conf
> > spamass_milter_localflags="-r 7 ... "
>
> Yep, that is what doesn’t work (though mine is 10).

Thats very odd. I've been using spamass-milter through the entire Debian 6
lifecycle, and then FreeBSD 10, 11 and 12 without any issue (I might not have
used every minor version of FreeBSD).

I don't think I can offer any more help than my entire setup.

/etc/rc.conf
spamd_enable="YES"
spamd_flags="--username=spamd --socketpath=/var/spool/postfix/spamd.sock
--socketowner=spamd --socketgroup=spamd --socketmode=0660 --max-children=2
--helper-home-dir=/var/spool/spamd --nouser-config --setuid-with-sql
--sql-config --local --daemonize"
spamass_milter_enable="YES"
spamass_milter_socket="/var/spool/postfix/spamass.sock"
spamass_milter_socket_owner="postfix"
spamass_milter_socket_group="postfix"
spamass_milter_socket_mode="660"
# Flags: -u user, -r reject, -d debug level, -e standard domain,
#        -a ignore AUTH clients, -m don't touch headers, -P PID file
# Local flags after -- is passed to spamc: socket and max size 12582912b = 12mb
spamass_milter_localflags="-u spamass -r 7 -d misc -e aptget.dk -a -m
-P /var/run/spamass.pid -- --socket=/var/spool/postfix/spamd.sock
--max-size=12582912"

In /usr/local/etc/mail/spamassassin/local.cf the report_safe is set to 1
https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html

And then the SQL login info and scoring info.

In /usr/local/etc/postfix/main.cf the (standard?) milter options is set
# Relative path from Postfix datadir to the spamass-milter socket
smtpd_milters = unix:spamass.sock

# What to do in case the milter is offline
milter_default_action = accept

# Info handed over to the milter
milter_connect_macros = j {daemon_name} v {if_name} _

The milter settings is in the docs
https://postfix.aptget.dk/MILTER_README.html

I hope it helps
Reply | Threaded
Open this post in threaded view
|

Re: Rejecting mail based on a Milter results

Matus UHLAR - fantomas
In reply to this post by @lbutlr
>> On 28.06.19 06:01, @lbutlr wrote:
>>> root     23945   0.0  0.3  31560  10908  -  Ss   Sun14       0:14.52 /usr/local/sbin/spamass-milter -f -p /var/run/spamass-milter.sock -u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10

>On Jun 28, 2019, at 6:42 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
>> doesn't -e require defaultdomain to be added?

On 28.06.19 14:43, @lbutlr wrote:
>No, it passes the full [hidden email] for working with virtual users.
> Without -e it passes only the username, assuming that all users are local.
> You can pass a default domain that will be added if a bare username is
> passed, but since all my users are virtual this is not relevant.

according to manpage, you are supposed to pass efaultdomain after the "-e"
option. I was justguessing if this doesn't create the problem.

>> Doesn't it complain at startup?
>> bad arguments could result in their misinterpretation
>
>No complaints at startup and the milter successfully scans spam and marks it up.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Support bacteria - they're the only culture some people have.