Milter-greylist: cannot read dumpfile

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.101
Virtualmin version 7.8.2
Related packages postgrey 1.36
postfix 3.5.18

Postfix is active and running.
Postgrey is active and running.
Greylisting seems to be working.

However, file greylist.db is not created.
An error is logged to journalctl:

milter-greylist[397]: cannot read dumpfile "/var/lib/milter-greylist/greylist.db"
milter-greylist[397]: starting with an empty greylist

Hmm. Nobody has any ideas?

Does this happen more than once? That’s a normal start the first time.

Did you do anything to troubleshoot?
What “ll /var/lib/milter-greylist/” returns?

root@server:~# ls -lat /var/lib/milter-greylist/
total 8
drwxr-s---  2 greylist greylist 4096 Nov 15 09:42 .
-rw-r--r--  1 greylist greylist    0 Nov 13 23:26 greylist.db
drwxr-xr-x 45 root     root     4096 Jan 11  2023 ..

And in /etc/milter-greylist/greylist.conf:

pidfile "/var/run/milter-greylist.pid"
dumpfile "/var/lib/milter-greylist/greylist.db" 600
socket "/var/run/milter-greylist/milter-greylist.sock" 660
user "postfix"
root@server:~# ps -auxww | grep greylist
postfix  1351248  0.0  0.0 136792    96 ?        Ssl   2023   2:17 milter-greylist -v
greylist 1415444  0.0  0.0 136816   180 ?        Ssl   2023   2:17 /usr/sbin/milter-greylist -u greylist
root     2088168  0.0  0.0   6240   716 pts/0    S+   12:26   0:00 grep greylist

service milter-greylist restart
see the error?

btw, why do you use greylisting instead of more advanced techniques, like postscreen?

Could be added in the future, I know nothing about it. Does it need to one or the other, can they work together?

my humble opinion, there is no reason for greylisting once you have postscreen (postfix native) enforced with DNSBL and DNSWL. Works awesome, fights 99% spam with few lines of config code adjusted.

a piece of cake, really. Postfix Postscreen Howto

Big claim, if it true then maybe its needs looked at.

quick search https://www.linuxbabe.com/mail-server/configure-postscreen-in-postfix-to-block-spambots
do not forget to adjust postfix basic changes like require helo, ptr checks and so on.

Greylisting targets a particular type of spam, and the blocklists will not prevent spamming from new sites or servers.

Greylisting prevents delivery of email that predominately come from mail().

Keep greylisting on and then use pfSense to block IPs, spam sites and forum spammers.

Well not sure it targets anyone.
Its explained on the top of the setting

Why would that be?

Greylisting prevents delivery of email that predominately come from mail().

Greylisting works by waiting for a webserver to retransmit an email when it is refused entry. real email servers will generally retry over a period of 24 hours, scripts using mail() will not. A good majority of spam comes from PHP scripts.

This also explains why it targets a particular type of SPAM.

1 Like

That is not my understanding of the postfix greylist milter, which I guess we are talking about. It is very simple to wrap a script around mail to periodically to test the same mail server until it’s accepted. Or are you refering to the php mail function ?

It might be simple but would a spammer do this (the majority of spammers use a scattergun approach → hit thousands of suspected recipients in the hope that a few are suckered in. They don’t want to waste their resources by repeating the same spam mail repetitively on one target)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.