[arch-general] Popa3d and systemd

Mikau mikau at aaathats3as.com
Mon Jun 13 22:47:54 UTC 2022


On Mon, 13 Jun 2022 16:56:24 -0400
"Paul M. Foster via arch-general" <arch-general at lists.archlinux.org>
wrote:

> Folks:
> 
> I'm attempting to use popa3d to handle POP3 on my box for my home
> network. The authors assume you will be running an init.d system, but
> obviously, I'm running systemd. Does anyone know how to set this up
> with systemd so it will run without simply terminating. I've set up a
> system user called "popa3d" to satisfy a getpwnam() error generated by
> systemd, and I have a service file as follows:
> 
> [Unit]
> Description=POP3 Daemon
> [Service]
> ExecStart=/usr/sbin/popa3d -D
> User=root
> [Install]
> WantedBy=multi-user.target
> 
> Any help would be appreciated.
> 
> Paul
> 

When not specifying a Type= in your .service file, systemd will use the
'simple' type, which assumes that the process keeps running in the
foreground. If you want systemd to handle a daemon that forks into the
background, use Type=forking. This isn't recommended tho, since systemd
will have to guess which the main process of the service is.
A better way is to run your daemon in a non-forking manner. I'm not
familiar with popa3d, but from the manpage, it seems like omitting '-D'
from the command line should accomplish that.
For specifics about how to write systemd service files, read
systemd.service(5)


More information about the arch-general mailing list