Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

reproducible crashing on reloading config

reproducible crashing on reloading config

2016-11-15 by Marcus Schopen

Hi,

regarding to my todays post "weighting blacklists" I can reproducible
crash milter-greylist with this configuration:

Step 1: add this to greylist.conf
----------------
list "my_bl_1" addr {   \
          192.168.100.100/32    \
}


racl continue rset $bl_score=0
racl continue rset $bl_listname=":"
racl continue list "my_bl_1" set $bl_score+=3 set
$bl_listname="%P{bl_listname}my_bl_1 "
racl "BL_DNSBL" blacklist $bl_score >= 3 msg "Bad reputation - %d [%i]
listed on too many DNS blacklists %P{bl_listname}(hit %P{bl_score})"
flushaddr
----------------

Step 2: check config:
----------------
milter-greylist -c greylist.conf
[...]
config file "/etc/milter-greylist/greylist.conf" is okay
----------------

Step 3: connect to host via telnet
----------------
~ $ telnet 192.168.100.34 25
Trying 192.168.100.34...
Connected to 192.168.100.34.
Escape character is '^]'.
220 testme.de ESMTP Sendmail 8.14.4/8.14.4/Debian-4.1ubuntu1; Tue, 15
Nov 2016 16:19:24 +0100; (No UCE/UBE) logging access from:
[192.168.100.100](FAIL)-[192.168.100.100]
ehlo me
250-testme.de Hello [192.168.100.100], pleased to meet you
[...]
mail from: <me@...>
250 2.1.0 <me@...>... Sender ok
quit
221 2.0.0 testme.de closing connection
Connection closed by foreign host.
----------------

Step 4: change something in greylist.conf
----------------
I changed the delay time in "racl greylist list "grey users" delay 31m
autowhite 3d" to "racl greylist list "grey users" delay 32m autowhite
3d"
----------------

Step 4: connect to host via telnet again
----------------
~ $ telnet 192.168.100.34 25
Trying 192.168.100.34...
Connected to 192.168.100.34.
Escape character is '^]'.
220 testme.de ESMTP Sendmail 8.14.4/8.14.4/Debian-4.1ubuntu1; Tue, 15
Nov 2016 16:22:26 +0100; (No UCE/UBE) logging access from:
[192.168.100.100](FAIL)-[192.168.100.100]
ehlo me
250-testme.de Hello [192.168.100.100], pleased to meet you
[...]
mail from: <me@...>
451 4.3.2 Please try again later
----------------

milter-greylist is crashed now.

Maillog:
----------------
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516: <-- mail from:
<me@...>
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516: Milter: sender:
<me@...>
Nov 15 16:22:42 vorlage milter-greylist: reloading config file
"/etc/milter-greylist/greylist.conf"
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516:
milter_sys_read(greylist): cmd read returned 0, expecting 5
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516: Milter (greylist):
to error state
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516: Milter:
from=<me@...>, reject=451 4.3.2 Please try again later
Nov 15 16:22:42 vorlage sm-mta[5516]: uAFFMQRE005516: --- 451 4.3.2
Please try again later
----------------

I has something to do with these lines

racl continue rset $bl_score=0
racl continue rset $bl_listname=":"

As soon as one of those lines is active the crash is reproducible.
If I remove them, changes to greylist.conf while running the milter will
result in a proper reloading of the greylist.conf.

sendmail.mc:
----------------
define(`MILTER',1)
define(`confMILTER_LOG_LEVEL', `15')dnl
INPUT_MAIL_FILTER(`greylist',`S=local:/var/run/milter-greylist/milter-greylist.sock,
F=T, T=S:1m;R:1m')dnl
----------------

System is Ubuntu 14.04 LTS:
ii  libmilter1.0.1                     8.14.4-4.1ubuntu1
ii  milter-greylist                    4.6.1-1
ii  sendmail                           8.14.4-4.1ubuntu1

Any ideas?

Ciao
Marcus

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.