Hello,
due to increase in spam I thought I should play with postgrey, so I went to Virtualmin>Email messages>email greylisting and installed postgrey. It installed Postgrey 1.34 but the service did not start. When I try to start the service I get the following messages
[administrator@mail ~]$ sudo systemctl status postgrey.service -l
postgrey.service - Postfix Greylisting Service
Loaded: loaded (/usr/lib/systemd/system/postgrey.service; enabled)
Active: failed (Result: start-limit) since Fri 2015-11-13 22:47:23 CST; 19min ago
Docs: man:postgrey(8)
Main PID: 16031 (code=exited, status=255)
CGroup: /system.slice/postgrey.service
Nov 13 22:47:22 mail.domain.TLD systemd[1]: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 13 22:47:22 mail.domain.TLD systemd[1]: Unit postgrey.service entered failed state.
Nov 13 22:47:23 mail.domain.TLD systemd[1]: postgrey.service holdoff time over, scheduling restart.
Nov 13 22:47:23 mail.domain.TLD systemd[1]: Stopping Postfix Greylisting Service…
Nov 13 22:47:23 mail.domain.TLD systemd[1]: Starting Postfix Greylisting Service…
Nov 13 22:47:23 mail.domain.TLD systemd[1]: postgrey.service start request repeated too quickly, refusing to start.
Nov 13 22:47:23 mail.domain.TLD systemd[1]: Failed to start Postfix Greylisting Service.
Nov 13 22:47:23 mail.domain.TLD systemd[1]: Unit postgrey.service entered failed state.
Do you see additional errors in the email log regarding that problem? That would be located in either /var/log/maillog, or /var/log/mail.log, depending on your distribution.
Also, if you don’t see any errors in the email log, do you see any in either /var/log/messages, or /var/log/syslog?
Nov 15 14:37:21 mail postgrey[15098]: Process Backgrounded
Nov 15 14:37:21 mail postgrey[15098]: 2015/11/15-14:37:21 postgrey (type Net::Server::Multiplex) starting! pid(15098)
Nov 15 14:37:21 mail postgrey[15098]: Binding to UNIX socket file “/var/spool/postfix/postgrey/socket”
Nov 15 14:37:23 mail postgrey[15104]: Process Backgrounded
Nov 15 14:37:23 mail postgrey[15104]: 2015/11/15-14:37:23 postgrey (type Net::Server::Multiplex) starting! pid(15104)
Nov 15 14:37:23 mail postgrey[15104]: Binding to UNIX socket file “/var/spool/postfix/postgrey/socket”
Nov 15 14:37:24 mail postgrey[15110]: Process Backgrounded
Nov 15 14:37:24 mail postgrey[15110]: 2015/11/15-14:37:24 postgrey (type Net::Server::Multiplex) starting! pid(15110)
Nov 15 14:37:24 mail postgrey[15110]: Binding to UNIX socket file “/var/spool/postfix/postgrey/socket”
And also
Nov 15 17:11:29 mail postfix/smtpd[23464]: warning: connect to postgrey/socket: Connection refused
Nov 15 17:11:29 mail postfix/smtpd[23464]: warning: problem talking to server postgrey/socket: Connection refused
Nov 15 17:11:30 mail postfix/smtpd[23464]: warning: connect to postgrey/socket: Connection refused
Nov 15 17:11:30 mail postfix/smtpd[23464]: warning: problem talking to server postgrey/socket: Connection refused
And in /var/log/messages
Nov 15 14:37:21 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:21 mail systemd: Started Postfix Greylisting Service.
Nov 15 14:37:21 mail systemd: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 15 14:37:21 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:22 mail systemd: postgrey.service holdoff time over, scheduling restart.
Nov 15 14:37:22 mail systemd: Stopping Postfix Greylisting Service...
Nov 15 14:37:22 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:23 mail systemd: Started Postfix Greylisting Service.
Nov 15 14:37:23 mail systemd: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 15 14:37:23 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:24 mail systemd: postgrey.service holdoff time over, scheduling restart.
Nov 15 14:37:24 mail systemd: Stopping Postfix Greylisting Service...
Nov 15 14:37:24 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:24 mail systemd: Started Postfix Greylisting Service.
Nov 15 14:37:24 mail systemd: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 15 14:37:24 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:25 mail systemd: postgrey.service holdoff time over, scheduling restart.
Nov 15 14:37:25 mail systemd: Stopping Postfix Greylisting Service...
Nov 15 14:37:25 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:25 mail systemd: Started Postfix Greylisting Service.
Nov 15 14:37:25 mail systemd: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 15 14:37:25 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:26 mail systemd: postgrey.service holdoff time over, scheduling restart.
Nov 15 14:37:26 mail systemd: Stopping Postfix Greylisting Service...
Nov 15 14:37:26 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:26 mail systemd: Started Postfix Greylisting Service.
Nov 15 14:37:26 mail systemd: postgrey.service: main process exited, code=exited, status=255/n/a
Nov 15 14:37:26 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:27 mail systemd: postgrey.service holdoff time over, scheduling restart.
Nov 15 14:37:27 mail systemd: Stopping Postfix Greylisting Service...
Nov 15 14:37:27 mail systemd: Starting Postfix Greylisting Service...
Nov 15 14:37:27 mail systemd: postgrey.service start request repeated too quickly, refusing to start.
Nov 15 14:37:27 mail systemd: Failed to start Postfix Greylisting Service.
Nov 15 14:37:27 mail systemd: Unit postgrey.service entered failed state.
Nov 15 14:37:43 mail systemd: Reloading Postfix Mail Transport Agent.
And there is no /var/log/syslog
I am running CentOS7
Under virtulmin > Email Settings > Email Greylisting it says
Greylisting is not available on this system : The Postgrey user postgrey does not exist
However, Virtualmin can attempt to automatically install the Postgrey greylisting package for you.
Even though it was installed from vritualmin.
maybe I just need to create a user “postgrey”
I uninstalled the existing postgrey by using the Yum Extender.
Then I manually downloaded the same version Postgrey-1.34-12.el7.noarch.rpm from rpm.pbone.net
There are newer version available but they require later version of perl which is not available in Centos repos I believe.
once downloaded I installed it from terminal using
sudo rpm -ivh postgrey-1.34-12.el7.noarch.rpm
and then virtualmin gave me option to enable greylisting!
I’m having the exact same problem getting Postgrey to run on Virtualmin as the original poster. I’ve followed the steps here all the way to the part about installing Postgrey from rpm.pbone.net. I’m not sure speficically how that was done. I’m assuming a repo was added, but I’m unfamiliar with how to do that. If anyone is willing to help me troubleshoot getting Postgrey to run, I would much appreciate it.
Had the exact same issue on Centos 7 (new installation of OS and Virtualmin)
I have been fighting with this all day. Tried installing manually as well as through Virtualmin. Finally after unintalling (yum erase postgrey) I went into Webmin Users and Groups and created the group postgrey and the user postgrey and then went back to Virtualmin Email Messages - email Greylisting and allowed Virtualmin to install postgrey. This time it installed properly (as far as I can tell so far) and did not display the missing user/group message.
Now I just have to see if anything else is broken with this fix.
edit:
I started having an SQL STATE[40001]: Serialization failure: 1213 Deadlock error when I had postgrey enabled. I haven’t figure out what is causing this yet. It also appear to be blocking my log files from being updated. It might be due to the postgrey User and Group I created not having the proper settings. Can someone provide me with the proper configuration for the postgrey user and group?
edit 2:
The logging issue may have been related to another problem. I commented out “$OmitLocalLogging on” in the rsyslog.conf file and logging came back. As far as I can tell postgrey appears to be working now. The service is running. I have not seen anything coming through it yet that has been rejected but it has passed several that it should have.
I’ve got the same error when tried to start postgrey on centos 7.2, the virtualmin installation didn’t create a postgrey userso the easiest way to fix this issue is to remove the postgrey package:
yum remove postgrey
and then let virtualmin reinstall the package via:
Email messages -> Email Greylisting