[pmg-devel] [PATCH 1/1 package-rebuilds] fetchmail: improve shipped service file
Stoiko Ivanov
s.ivanov at proxmox.com
Wed Sep 24 13:32:29 CEST 2025
fetchmail exits with 3 if:
'The user authentication step failed...' (see fetchmail(1)).
This also includes if there are no accounts configured for fetching,
e.g. if all accounts are configured with 'skip' instead of 'poll'.
The usecase in PMG is to set all disabled accounts to 'skip'.
So simply do not consider an exit of 3 as failure.
Additionally adapt the Restart value to 'on-failure' (else systemd
tries restarting 5 times and gives up)
see systemd.service(5) for the settings.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
pkgs/fetchmail/fetchmail-6.4.39/debian/fetchmail.service | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkgs/fetchmail/fetchmail-6.4.39/debian/fetchmail.service b/pkgs/fetchmail/fetchmail-6.4.39/debian/fetchmail.service
index a6e3168..b7260ac 100644
--- a/pkgs/fetchmail/fetchmail-6.4.39/debian/fetchmail.service
+++ b/pkgs/fetchmail/fetchmail-6.4.39/debian/fetchmail.service
@@ -21,7 +21,8 @@ User=fetchmail
Type=exec
# sort $OPTIONS after "-daemon 300" to allow overwriting the interval using $OPTIONS
ExecStart=/usr/bin/fetchmail --daemon 300 $OPTIONS --nodetach -f /etc/fetchmailrc --pidfile /run/fetchmail/fetchmail.pid
-Restart=always
+SuccessExitStatus=3
+Restart=on-failure
[Install]
WantedBy=multi-user.target
--
2.47.3
More information about the pmg-devel
mailing list