You are not logged in.

#1 2012-08-03 15:10:07

Kilzool
Member
From: Ireland
Registered: 2010-08-04
Posts: 232

[SOLVED] postgrey and systemd

Can  we get an update for postgrey with systemd configuration?

Last edited by Kilzool (2012-10-08 04:08:19)

Offline

#2 2012-09-01 18:45:20

Morrad
Member
Registered: 2012-01-18
Posts: 54

Re: [SOLVED] postgrey and systemd

There appear to be a couple systemd unit files for postgrey listed on this bug report.  I'm about to give them a try.

https://bugzilla.redhat.com/show_bug.cgi?id=714430

Offline

#3 2012-09-04 00:05:48

Kilzool
Member
From: Ireland
Registered: 2010-08-04
Posts: 232

Re: [SOLVED] postgrey and systemd

Super.  Let us know afterwards what you come up with that works, after thorough usage.

Offline

#4 2012-09-04 20:19:39

Morrad
Member
Registered: 2012-01-18
Posts: 54

Re: [SOLVED] postgrey and systemd

Reporting back:

I experimented converting my VPS over to systemd this weekend, including postgrey.  I sadly wasn't able to get postgrey to work properly with the systemd files from Redhat that I linked to above.  I since converted back to using sysvinit, and will try again in a few months.

I would have more leeway to experiment if I tried on a test system rather than my web / mail server though smile

Offline

#5 2012-10-07 17:10:01

Morrad
Member
Registered: 2012-01-18
Posts: 54

Re: [SOLVED] postgrey and systemd

Just updated postgrey to postgrey-1.34-6, which comes with a systemd service file.

EDIT: The service file provided doesn't work, I had to change override it with the following in /etc/systemd/system/postgrey.service.  Note I have a inet type connection, if you use a socket you will need to change it a bit.

[Unit]
Description=Postfix Greylisting Service
Before=postfix.service

[Service]
Type=forking
EnvironmentFile=-/etc/conf.d/postgrey
ExecStartPre=-/bin/rm -f /var/run/postgrey.pid
PIDFile=/var/run/postgrey.pid
ExecStart=/usr/sbin/postgrey --daemonize --${POSTGREY_TYPE}=${POSTGREY_HOST}:${POSTGREY_PORT} \
	--group=postgrey --user=postgrey ${POSTGREY_OPTS} --pidfile=/var/run/postgrey.pid \
	--greylist-text="${POSTGREY_TEXT}"

Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target

Last edited by Morrad (2012-10-07 22:02:59)

Offline

#6 2012-10-08 04:07:48

Kilzool
Member
From: Ireland
Registered: 2010-08-04
Posts: 232

Re: [SOLVED] postgrey and systemd

Thank you.  Big help!

Should we mark this as solved now?

Offline

Board footer

Powered by FluxBB