Created attachment 365956 [details, diff] Add type=forking to fetchmail service unit The fetchmail service fork, but Type=forking is not specified in the [Service] section, so once fetchmail forks, the service dies. This patch adds the necessary line to keep it alive. Note that fetchmail does support a "--nodaemon" (-N) option which could work as welll, the problem is fetchmail can (and often does) return exit codes other than 0 even on a clean exit. Exit code "8" is deemed a unsuccessful exit, but systemd has no "FailExitStatus" directive (the hypothetical complement of SuccessExitStatus)
What about running it with "-d0" option to prevent forking?
Also, our unit file is similar to the one used in opensuse and Arch that looks to pretend to restart the service when it dies after the time specified as -d parameter
the only difference is that they specify -d 900 instead of -d 60