Created
December 3, 2017 15:40
-
-
Save gwire/0edf28658e6638b3699f621b5d5c70ec to your computer and use it in GitHub Desktop.
systemd service unit for Exim (Debian)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Exim Mail Transport Agent | |
After=network.target | |
[Service] | |
PrivateTmp=true | |
Environment=QUEUEINTERVAL=30m | |
EnvironmentFile=-/etc/default/exim4 | |
ProtectSystem=full | |
PIDFile=/run/exim4/exim.pid | |
ExecReload=/bin/kill -HUP $MAINPID | |
ExecStartPre=/usr/bin/install -d -oDebian-exim -gDebian-exim -m750 /run/exim4 | |
ExecStart=/usr/sbin/exim4 -bd -q${QFLAGS}${QUEUEINTERVAL} $COMMONOPTIONS $QUEUERUNNEROPTIONS $SMTPLISTENEROPTIONS | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exim wasn't restarting after reboot on some Ubuntu systems. I suspect it's to do with not being able to create the pid file, so I've added
/etc/systemd/system/exim4.service
to replace the standard debian one. It doesn't support everything (only works for "combined" config, doesn't do config tests) but it works for now.