How to disable greylisting?

I tried enabling grey listing and now I'm not receiving mail.

From my /var/log/mail.log, I see:

warning: problem talking to server 127.0.0.1:10023: Connection refused

and a netstat shows that I don't have the greylisting service running on 10023.

Under Virtualmin > Email Messages > Email Greylisting: There's a button for Enable Greylisting.

After clicking, it responds with:

Enabling Postgrey at boot time .. .. already enabled

Starting Postgrey server .. .. started OK

Configuring Postfix to use Postgrey .. .. already configured

But on the Email Greylisting page, the only thing showing is the Enable Greylisting, even though I already enable, and there's no disable Greylisting button.

Status: 
Closed (fixed)

Comments

On further inspection, my postgrey refuses to start. Any ideas what I can do?

Howdy -- yeah, it looks like the cause of your email problems is due to Postgrey not running.

What output do you receive if you run this command on the command line as root:

/etc/init.d/postgrey restart

I get:

-bash: /etc/init.d/postgrey: No such file or directory

postgrey won't start. I can run service postgrey start, and it responds with:

postgrey start/running, process 12735

but there's nothing running, and i don't see it listening to the 10023 port.

Can I give you ssh access to take a look?

while I can't get greylisting started, how do I disable it on postfix so that mail can work again. Right now it won't deliver.

Do you see an option to disable greylisting in Email Messages -> Email Greylisting?

I believe there's an option in there to disable it when it's enabled.

Regarding getting it started -- what do these commands output:

dpkg -l 'postgrey*'
apt-cache search postgrey

Ok, I got postgrey running.

For reference, I had to change in /etc/default/postgrey:

POSTGREY_OPTS="--inet=10023"

to

POSTGREY_OPTS="--inet=127.0.0.01:10023"

Now it's running and listening.

My output for: dpkg -l 'postgrey*':

Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=============================-===================-===================-================================================================ ii postgrey 1.34-1.1 all greylisting implementation for Postfix

apt-cache search postgrey:

greylistd - Greylisting daemon for use with Exim 4 postgrey - greylisting implementation for Postfix

I'm glad you got it working!

It should normally use the "--inet=127.0.0.01:10023" option that you described.

I'll do some testing to see if I can reproduce the issue you saw, as we'd want to make sure Postgrey starts whenever that is installed.

FYI, the disable greylisting button was not available when it was stuck in limbo. I googled the issue and read that some changes were made in postgrey to default to ipv6 and that's why it's:

POSTGREY_OPTS="--inet=10023"

I got the daemon running by changing above, but on Webmin > System > Bootup and Shutdown > postgrey module says that it's not running (even though it's running now). I ran the show status:

Executing /etc/init.d/postgrey status ..

postgrey is not running ... failed!

netstat -plunt | grep postgrey shows

tcp 0 0 127.0.0.1:10023 0.0.0.0:* LISTEN 13449/postgrey.pid

I can tail -f /var/log/mail.log and see that mail is working again.

edited for update: after a reboot, everything is working correctly.