1

I'm setting up fetchmail for use with Request Tracker on a RHEL 8 server. It's not working and I'm unable to troubleshoot because it doesn't appear to be writing to /var/log/syslog or /var/log/fetchmail.log. How do I get it to write to one of these logs?

Here's my /etc/fetchmailrc:

set daemon 60 set invisible set postmaster administrator set syslog set logfile /var/log/fetchmail.log poll pop.gmail.com protocol pop3 port 995 username "[email protected]" password "xxxxxx" ssl mda "/var/www/html/requesttracker/bin/rt-mailgate --queue YLN --action correspond --url https://subdomain.example.com" nokeep 

I restart fetchmail after each fetchmailrc edit. What am I doing wrong?

Update: I tried this (I had already touched fetchmail.log with root:root access) and restarted fetchmail:

set daemon 60 set invisible set postmaster administrator set logfile /var/log/fetchmail.log poll pop.gmail.com protocol pop3 port 995 username "[email protected]" password "xxxxxx" ssl mda "/var/www/html/requesttracker/bin/rt-mailgate --queue YLN --action correspond --url https://subdomain.example.com" nokeep 

Nothing. The fetchmail.log file remains empty.

So then I tried this and restarted fetchmail:

set daemon 60 set invisible set postmaster administrator set syslog poll pop.gmail.com protocol pop3 port 995 username "[email protected]" password "xxxxxx" ssl mda "/var/www/html/requesttracker/bin/rt-mailgate --queue YLN --action correspond --url https://subdomain.example.com" nokeep 

Again nothing. There are sendmail entries in the maillog file from my testing but they're from hours ago.

I figured out to run sudo env LC_ALL=C fetchmail -vvv --nodetach --nosyslog -f /etc/fetchmailrc to see what's happening when it connects with Google. As it turns out, I didn't have one of those special passwords that Google needs to generate for you. If you're in this boat, see https://security.google.com/settings/security/apppasswords.

2
  • 1
    I thought fetchmail used LOG_MAIL as the facility. The default RHEL8 configuration would send those messages to /var/log/maillog. And I think set logfile may override set syslog. For the log file you need to ensure it already exists and is writeable by the user running fetchmail. Commented Oct 25, 2022 at 16:17
  • From the man page: set logfile -L Name of a file to append error and status messages to. Only effective in daemon mode and if fetch‐mail detaches. If effective, overrides set syslog. Note that the logfile **must exist before** fetchmail is run, you can use the touch(1) command with the filename as its sole argument to create it. Commented Oct 25, 2022 at 17:29

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.