[pkg-fetchmail-maint] fetchmail: bad-headers accept breaks correct lmtp behavior

Pfannenschmid, P. (Binarus) info at binarus.de
Thu Jun 27 09:04:18 UTC 2013


Subject: fetchmail: bad-headers accept breaks correct lmtp behavior
Package: fetchmail
Version: 6.3.21-4
Severity: important
Tags: upstream

Dear Maintainer,

I think I might have encountered a bug in fetchmail as shipped with wheezy (amd64, all updates applied): The usage of bad-headers accept (in fetchmailrc) or --bad-headers accept (on the command line) seems to break the correct behavior regarding lmtp. Steps to reproduce:

- Install wheezy (amd64), install fetchmail
- Install cyrus-imapd, configure unixlmtp, configure a user / mailbox johndoe.

Notably, in /etc/cyrus.conf, configure lmtp as follows:

# At least one form of LMTP is required for delivery
# (you must keep the Unix socket name in sync with imap.conf)
#lmtp           cmd="lmtpd" listen="localhost:lmtp" prefork=0 maxchild=20
lmtpunix        cmd="lmtpd" listen="/var/run/cyrus/socket/lmtp" prefork=0 maxchild=20

- Make fetchmail run as daemon (by editing /etc/default/fetchmail)
- Add user "fetchmail" to group "mail" (to avoid problems with writing to the lmtp socket)
- Create /etc/fetchmailrc with the following content:

poll
pop3-server.domain.com
proto pop3
#bad-header accept
user johndoe
pass secret
is johndoe
smtphost /var/run/cyrus/socket/lmtp
ssl

- Restart fetchmail and make sure that fetchmail correctly delivers mail to the cyrus imapd / to the mailbox of johndoe; this works correctly in my case
- Now the key part: uncomment the line which starts with bad-header, restart fetchmail and observe:

1) fetchmail can't deliver the mails any more to the cyrus user / mailbox.
2) In /var/log/mail.err, there are now messages like the following:

Jun 27 01:11:17 spock fetchmail[8484]: Connection errors for this poll:#012name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.#012name 1: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.

I am unsure if I get this right, but it seems that fetchmail wants to deliver via localhost:smtp instead of lmtp as soon as bad-header accept is used. The behavior is identical if --bad-headers is given on the command line. Since I am a noob, I am not sure if this is a bug or if I did something wrong.

So what do the experts think about that?

Regards,

Peter



-- System Information:
Debian Release: 7.1
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fetchmail depends on:
ii  adduser           3.113+nmu3
ii  debianutils       4.3.2
ii  libc6             2.13-38
ii  libcomerr2        1.42.5-1.1
ii  libgssapi-krb5-2  1.10.1+dfsg-5+deb7u1
ii  libkrb5-3         1.10.1+dfsg-5+deb7u1
ii  libssl1.0.0       1.0.1e-2
ii  lsb-base          4.1+Debian8+deb7u1

Versions of packages fetchmail recommends:
ii  ca-certificates  20130119

Versions of packages fetchmail suggests:
pn  fetchmailconf                 <none>
pn  resolvconf                    <none>
ii  ssmtp [mail-transport-agent]  2.64-7

-- Configuration Files:
/etc/default/fetchmail changed:
START_DAEMON=yes


-- no debconf information



More information about the pkg-fetchmail-maint mailing list