I have some trouble with getting greylisting to work. First I enabled greylisting from virtualmin but no emails got delivered.
/var/log/syslog Mar 24 22:00:17 [SERVER_HOSTNAME] postfix/smtpd[25943]: warning: connect to 127.0.0.1:10023: Connection timed out
Mar 24 22:00:17 [SERVER_HOSTNAME] postfix/smtpd[25943]: warning: problem talking to server 127.0.0.1:10023: Connection timed out
Mar 24 22:00:17 [SERVER_HOSTNAME] postfix/smtpd[25943]: NOQUEUE: reject: RCPT from unknown[REMOTE_SERVER_PUBLIC_IP]: 451 4.3.5 Server configuration problem; from=johndoe@sender.com to=johndoe@reciver.com proto=ESMTP helo=<mail.sender.com>
I found some threads in this forum suggesting the following change:
/etc/default/postgrey POSTGREY_OPTS="–inet=10023"
to
POSTGREY_OPTS="–inet=127.0.0.01:10023"
But this didn’t work so I figured I’d disable the greylisting for the moment but I think something messed up the postfix configuration.
/var/log/syslog Mar 24 23:40:48 [SERVER_HOSTNAME] postfix/smtpd[2057]: connect from [RDNS][REMOTE_IP]
Mar 24 23:40:48 [SERVER_HOSTNAME] postfix/smtpd[2057]: warning: restriction check_policy_service must be followed by transport:server
Mar 24 23:40:48 [SERVER_HOSTNAME] postfix/smtpd[2057]: NOQUEUE: reject: RCPT from [RDNS][SENDER IP]: 451 4.3.5 Server configuration error; from=johndoe@sender.com to=johndoe@reciver.com proto=ESMTP helo=<mail.sender.com>
Here is the command from netstat -an | grep :10023
tcp 0 0 127.0.0.1:10023 0.0.0.0:* LISTEN
I’ve also tried to send an email from my Zimbra installation, it got greylisted so waiting for Zimbra to send the email again. But it seems to be working now. Let me just evaluate a little bit more.
Seems to be working now, don’t know what happend yesterday. I also tried to restart the server to be 100% sure but it’s still working.
I notice one thing that happend yesterday, I was updating my DNS servers to google DNS from (Webmin < Networking < Network configuration) and my hostname got messed up on save.
Before save: Hostname: server.domain.com
After save: Hostname: server
of course I changed the hostname back but maybe this was the cause ?
postgrey has been a nightmare on Ubuntu+Virtualmin. Always crashing.
I ended up using gld from https://www.gasmi.net/progs.php and never had a problem.