From: Mauro F. <mau...@ti...> - 2022-05-29 17:58:27
|
I configured fetchmail to run at startup, via systemd. It runs, without errors, but it exits as a "one time running" and not like a daemon. In the file "/home/mf/.config/systemd/user/fetchmail.service" : ----------------------------------------------------------------------------------------------------------------------- [Unit] Description=A remote-mail retrieval utility [Service] ExecStartPre=/usr/bin/setmail ExecStart=/usr/bin/fetchmail -v --daemon 60 --fetchmailrc /home/mf/.fetchmailrc RestartSec=1 [Install] WantedBy=default.target ----------------------------------------------------------------------------------------------------------------------- In the /home/mf/.fetchmailrc : set idfile /spazio/tmp/Logs/fetchmail-mf-uidl defaults timeout 60 proto pop3 uidl options fetchall mda '/usr/bin/procmail -d %T'; I also tried adding in the ".fetchmailrc" file the option set daemon 60 but with identical result : the fetchmail process ends with no error, but not persists running. $ systemctl --user status fetchmail ○ fetchmail.service - A remote-mail retrieval utility Loaded: loaded (/home/mf/.config/systemd/user/fetchmail.service; enabled; vendor preset: disabled) Active: inactive (dead) since Sun 2022-05-29 18:57:00 CEST; 43min ago Process: 1365 ExecStartPre=/usr/bin/setmail (code=exited, status=0/SUCCESS) Process: 1572 ExecStart=/usr/bin/fetchmail -v --daemon 60 --fetchmailrc /home/mf/.fetchmailrc (code=exited, status=0/SUCCESS) Main PID: 1572 (code=exited, status=0/SUCCESS) CPU: 14ms mag 29 18:57:00 mfhost systemd[1311]: Starting fetchmail.service - A remote-mail retrieval utility... mag 29 18:57:00 mfhost systemd[1311]: Started fetchmail.service - A remote-mail retrieval utility. $ journalctl --user -xeu fetchmail.service mag 29 18:57:00 mfhost systemd[1311]: Starting fetchmail.service - A remote-mail retrieval utility... ░░ Subject: L'unità UNIT inizia la fase di avvio ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ L'unità UNIT ha iniziato la fase di avvio. mag 29 18:57:00 mfhost systemd[1311]: Started fetchmail.service - A remote-mail retrieval utility. ░░ Subject: L'unità UNIT ha terminato la fase di avvio ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ L'unità UNIT ha terminato la fase di avvio. ░░ ░░ La fase di avvio è done. if I run, in a terminal, as user "mf" the command: /usr/bin/fetchmail --fetchmailrc /home/mf/.fetchmailrc it runs with no errors and fetches the email, normally. Where is the problem? Thank you for your help -- *Mauro Folcarelli* |