I have fetchmail set up to grab emails from a Google account. If I set fetchmailrc ownership to root:root
and run fetchmail -vvv --nodetach --nosyslog -f /etc/fetchmailrc
, it gets the emails as expected. If I set ownership to fetchmail:root
and restart fetchmail then nothing happens. Permissions are 600. Here's my /etc/fetchmailrc:
set daemon 60
set invisible
set postmaster administrator
set no syslog
set logfile /var/log/fetchmail.log
poll pop.gmail.com protocol pop3 port 995 username "user@example.com" password "xxxxxx" ssl mda "/var/www/html/requesttracker/bin/rt-mailgate --queue YLN --action correspond --url https://subdomain.example.com" nokeep
How do I get the daemon to work?
Update: Further exploration has revealed that fetchmail isn't running. When I start fetchmail (systemctl start fetchmail
), it doesn't return any errors so I've thought it was running. A status returns this:
● fetchmail.service - A remote-mail retrieval utility
Loaded: loaded (/usr/lib/systemd/system/fetchmail.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-10-27 06:49:23 MST; 2s ago
Process: 51920 ExecStart=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example (code=exited, status=5)
Main PID: 51920 (code=exited, status=5)
Oct 27 06:49:23 ylntest.yln.info systemd[1]: Started A remote-mail retrieval utility.
Oct 27 06:49:23 ylntest.yln.info systemd[1]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALL>
Oct 27 06:49:23 ylntest.yln.info systemd[1]: fetchmail.service: Failed with result 'exit-code'.
Why does it fail? In particular, this line confuses me:
ExecStart=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example
. Why is trying to load the example file?