CentOS 7 - Greylisting doesn't enable and breaks postfix

I was able to do this on 4 systems. I even spun up a instance on Digital Ocean and was able to duplicate it twice.

The install part finishes without a problem, when I click enable everything looks ok. But it never gets enabled, when I go back it still says "Enable Greylisting" and the smtpd part of postfix constantly errors out.

Oct 22 13:34:07 voltarus postfix/smtpd[27093]: connect from <removed>[1.2.3.4]
Oct 22 13:34:08 voltarus postfix/smtpd[27093]: fatal: 127.0.0.1:: missing service information
Oct 22 13:34:09 voltarus postfix/master[10057]: warning: process /usr/libexec/postfix/smtpd pid 27093 exit status 1
Oct 22 13:34:09 voltarus postfix/master[10057]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

I had to change the "smtpd_recipient_restrictions" line in postfix back to get it working.

from this

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:

to this

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
Status: 
Closed (fixed)

Comments

On CentOS 6 postgrey was configured to use a socket, on CentOS 7 it seems to be trying to use a local tcp port to connect to the postgrey daemon, something there is broken but I have no idea what.

It doesn't seem to be configuring postgrey or postfix to use a specific TCP port so it ends up failing.

I was able to get it manually working using the socket configuration from CentOS 6.

Howdy -- it should be able to use a port... in fact, that's what it does on my Ubuntu system. However, it may be having trouble detecting the port that's being used, as it didn't include that in your Postfix config.

What was it that you changed though in order to get it working?

I looked at my working CentOS 6 boxes, they use this on "smtpd_recipient_restrictions"

check_policy_service unix:/var/spool/postfix/postgrey/socket

The module isn't configuring postgrey to use a tcp port, it uses the default socket.

Doing this postgrey is working perfectly now, The postgrey page still says "Enable postgrey" so it doesn't seem to know that it is working. I tried to trace it down, but reading too much perl gives me a headache :)

If you run the command ps axuwww | grep postgrey , what does it output on your system? That's what Virtualmin examines to find the Postgrey socket or port.

Ok, I see the bug that is causing this now - your work around is fine, and the underlying issue (of detecting the Postgrey socket file) will be fixed in the next release.

Automatically closed -- issue fixed for 2 weeks with no activity.