At times, Postfix may crash with many errors in the log file, for example:
2025-07-15T12:59:50.620961+02:00 server postfix/smtpd[2243195]: warning: problem talking to server 127.0.0.1:10023: Connection refused 2025-07-15T12:59:51.112838+02:00 server postfix/smtpd[2242121]: warning: problem talking to server 127.0.0.1:10023: Connection refused 2025-07-15T12:59:51.622729+02:00 server postfix/smtpd[2243195]: warning: problem talking to server 127.0.0.1:10023: Connection refused
After frantically checking the entire service it turns out Postgrey is failed:
service postgrey status ● postgrey.service - Postfix greylisting policy server Loaded: loaded (/usr/lib/systemd/system/postgrey.service; enabled; preset:> Active: activating (auto-restart) (Result: exit-code) since Tue 2025-07-15> Docs: man:postgrey(8) Process: 2250579 ExecStart=/usr/sbin/postgrey $POSTGREY_OPTS --greylist-tex> Main PID: 2250579 (code=exited, status=22) CPU: 150ms Jul 15 12:59:44 spiderman.vander.host systemd[1]: postgrey.service: Failed with>
As with many services on Linux, status
only tells you half the story so you have to do this:
journalctl -u postgrey.service -b --no-pager
Then you see this IPv6 issue:
2]: ERROR: Can't connect to TCP port 10023 on ::1 [Invalid argument] at /usr/sbin/postgrey line 781.
To get you out of the shite, you do this:
$ cat /etc/default/postgrey # postgrey startup options, created for Debian # you may want to set # --delay=N how long to greylist, seconds (default: 300) # --max-age=N delete old entries after N days (default: 35) # see also the postgrey(8) manpage #POSTGREY_OPTS="--inet=10023" POSTGREY_OPTS="--inet=127.0.0.1:10023" # the --greylist-text commandline argument can not be easily passed through # POSTGREY_OPTS when it contains spaces. So, insert your text here: #POSTGREY_TEXT="Your customized rejection message here"
Phew! Things are working again.
How can we avoid this?
- Pro-active monitoring of services on Linux
- Ping ipv6 to server to see if they are alive