Bug 815160

Summary: Systemd - starts not postgrey on boot
Product: [openSUSE] openSUSE 12.3 Reporter: D Engelthaller <dengel>
Component: BasesystemAssignee: Klaus Singvogel <bugzilla>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: bugzilla, chris, fcrozat, luuk34, mfilka
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description D Engelthaller 2013-04-13 21:16:38 UTC
User-Agent:       Opera/9.80 (Windows NT 6.1; Win64; x64) Presto/2.12.388 Version/12.15

Opensus 12.3 - clean install. Attempt to enable postgrey service via yast - system - runlevel editor ens with message /bin/systemctl start postgrey.service returned 1 (unspecified error), therefore starts not automatically on system boot.
Attempt starting postgrey manually using ends:

# rcpostgrey start
redirecting to systemctl  start postgrey
Job for postgrey.service failed. See 'systemctl status postgrey.service' and 'journalctl -n' for details.
# rcpostgrey status
Checking for service postgrey:                                                                                                                     unused
postgrey.service - LSB: Postgrey a greylisting server for postfix
          Loaded: loaded (/etc/init.d/postgrey)
          Active: failed (Result: exit-code) since Sat, 2013-04-13 22:55:59 CEST; 2min 55s ago
         Process: 1175 ExecStart=/etc/init.d/postgrey start (code=exited, status=7)
          CGroup: name=systemd:/system/postgrey.service
                  â 1199 /usr/sbin/postgrey -d --unix=/var/spool/postfix/postgrey/socket --auto-whitelist-clients

Apr 13 22:55:59 a.b.c.d postgrey[1175]: (Maybe you should just omit the defined()?)
Apr 13 22:55:59 a.b.c.d postgrey[1199]: Process Backgrounded
Apr 13 22:55:59 a.b.c.d postgrey[1199]: 2013/04/13-22:55:59 postgrey (type Net::Server::Multiplex) starting! pid(1199)
Apr 13 22:55:59 a.b.c.d postgrey[1199]: Using default listen value of 128
Apr 13 22:55:59 a.b.c.d postgrey[1199]: Binding to UNIX socket file /var/spool/postfix/postgrey/socket using SOCK_STREAM
Apr 13 22:55:59 a.b.c.d postgrey[1175]: ..failed
Apr 13 22:55:59 a.b.c.d systemd[1]: Failed to start LSB: Postgrey a greylisting server for postfix.
Apr 13 22:55:59 a.b.c.d systemd[1]: Unit postgrey.service entered failed state
Apr 13 22:55:59 a.b.c.d postgrey[1199]: Setting gid to "51 51"
Apr 13 22:55:59 a.b.c.d postgrey[1199]: Setting uid to "106"

But netstat after previous two command shows:
# netstat -a | grep postgrey
unix  2      [ ACC ]     STREAM     LISTENING     10367  /var/spool/postfix/postgrey/socket

i.e. postgrey is running and triplet filtering works ok (verified).
The only one solution for me at this moment is adding manual start of postgrey
to \etc\crontab using line:
@reboot root /etc/init.d/postgrey start

I think, this is a serious error for mail server installation.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Frederic Crozat 2013-04-19 11:02:30 UTC
It looks like a bug in the postgrey initscript which is returning errorcode 7 despite starting properly..
Comment 3 Luuk V 2013-05-17 12:25:27 UTC
Is this the same bug as https://bugzilla.novell.com/show_bug.cgi?id=809400

It seems to work, notwithstanding the error....

opensuse:/home/luuk # rcpostgrey status
Checking for service postgrey:                                                                                                                                            unused
postgrey.service - LSB: Postgrey a greylisting server for postfix
          Loaded: loaded (/etc/init.d/postgrey)
          Active: failed (Result: exit-code) since Fri, 2013-05-17 13:49:13 CEST; 32min ago
          CGroup: name=systemd:/system/postgrey.service
                  └ 2938 /usr/sbin/postgrey -d --inet=127.0.0.1:10031 --auto-whitelist-clients

May 17 13:49:13 opensuse postgrey[3016]: Binding to TCP port 10031 on host 127.0.0.1
May 17 13:49:13 opensuse postgrey[3008]: ..failed
May 17 13:49:13 opensuse systemd[1]: Failed to start LSB: Postgrey a greylisting server for postfix.
May 17 13:49:13 opensuse systemd[1]: Unit postgrey.service entered failed state
May 17 13:53:24 opensuse postgrey[2938]: action=pass, reason=client whitelist, client_name=mail-qa0-f42.google.com, client_address=209.85.216.42, sender=l...


Can anyone give a comment on these lines from /var/log/messages:
May 17 13:43:46 opensuse systemd[1]: Starting LSB: Postgrey a greylisting server for postfix...
May 17 13:43:46 opensuse postgrey[2930]: Starting postgrey daemondefined(@array) is deprecated at /usr/lib/perl5/vendor_perl/5.16.2/Net/Server.pm line 211.
May 17 13:43:46 opensuse postgrey[2930]: (Maybe you should just omit the defined()?)
May 17 13:43:46 opensuse postgrey[2930]: ..failed
Comment 4 Klaus Singvogel 2013-08-06 07:46:00 UTC
Thanks for your bug report.

This issue was introduced by switch to systemd, as old SysV systems work flawless with contributed initscripts.

Maybe the issue can be fixed by deeper knowledge about systemd initscripts, but at the moment I'm not motivated to do so nor have enough time.

As a matter I'm sorry to say, but I won't work on this issue. -> CLOSE with WONTFIX

Work-around: switch back to old SysV initd system :-) or ask someone else.
Comment 5 Christian Wittmer 2014-03-18 00:14:52 UTC

*** This bug has been marked as a duplicate of bug 809400 ***
Comment 6 Bernhard Wiedemann 2014-03-18 01:00:25 UTC
This is an autogenerated message for OBS integration:
This bug (815160) was mentioned in
https://build.opensuse.org/request/show/226515 12.3 / postgrey
Comment 7 Bernhard Wiedemann 2014-03-18 14:00:34 UTC
This is an autogenerated message for OBS integration:
This bug (815160) was mentioned in
https://build.opensuse.org/request/show/226595 13.1+12.3 / postgrey
Comment 8 Swamp Workflow Management 2014-03-25 10:06:26 UTC
openSUSE-RU-2014:0441-1: An update that has four recommended fixes can now be installed.

Category: recommended (low)
Bug References: 782364,809400,815160,862552
CVE References: 
Sources used:
openSUSE 12.3 (src):    postgrey-1.34-22.3.1, postgrey-1.34-22.4.1