This feels like a sendmail problem, but I have a feeling that some part of fetchmail is duplicating some of sendmail's behavior, because when it happens, and I reboot fetchmail, it stops happening - until the next time.

I'm using fetchmail (6.3.17+GSS+RPA+NTLM+SDPS+SSL+HESIOD+NLS+KRB5) on CentOS 6.8 to grab mail from a few mailboxes and send them to an internal Exchange server. The fetchmail config file (with accounts and passwords removed is

set syslog
set postmaster "it@our.domain"
set showdots
set bouncemail
set properties ""
set invisible
set no softbounce

poll pop.host port 995 proto POP3 timeout 12
user "user1" there with password "..." is user2@our.domain here ssl sslproto TLS1
user "user2" there with password "..." is user2@our.domain here ssl sslproto TLS1

And our /etc/mail/mailertable says

our.domain smtp:[exchange.our.domain]

So fetchmail usually delivers the mail it fetches from pop.host to the exchange server.

But every once in a while fetchmail starts trying to deliver the mail to local mailboxes (which don't exist). As I said at the top, restarting the fetchmail daemon fixes this, I'd expect restarting sendmail would be what was needed, but it isn't.

It logs lines like this in /var/log/maillog when that happens (I know this is out of sequence, but it looks like procmail logs its message, returns failure, and then fetchmail logs its message

Sep 11 03:50:39 mailer procmail[21164]: Unknown user "user1"
Sep 11 03:50:39 mailer fetchmail[1029]: reading message user1@smtp.host:
14 of 14 (348741 octets) (log message incomplete)

I'm really hoping that someone has seen this before, or if not, could tell me where the code is in the fetchmail source that hands mail it's fetched to sendmail so I could add some more log messages.

  • What is the hostname of the system that runs fetchmail? – thrig Sep 13 '16 at 17:48
  • the hostname is "mailer" – Warren Burstein Sep 13 '16 at 20:24
  • Hmm, maybe crank the logging level in fetchmail? (A sendmail host named after our.domain can be problematical, but if it's mailer.our.domain that should be okay.) – thrig Sep 13 '16 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.