Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272223 - qdeliver of net-mail/courier-imap-4.0.6-r3 delivers only once with multiple recipients
Summary: qdeliver of net-mail/courier-imap-4.0.6-r3 delivers only once with multiple r...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-02 07:01 UTC by Thomas Skyt
Modified: 2009-06-13 20:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Another run, with 'pipe -v' in master.conf (gentoo_272223.txt,21.26 KB, text/plain)
2009-06-13 00:24 UTC, Thomas Skyt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Skyt 2009-06-02 07:01:49 UTC
Running postfix-2.5.5 with courier-imap-4.0.6-r3 for IMAP and local quota-enabled delivery, I am experiencing delivery issues when receiving mail for multiple recipients on the same vhost'ed domain.

If an e-mail is received that has several recipients in the To:, CC: or BCC: fields who share a domain, the mail is correctly passed through to MailScanner, local aliases are resolved and the mail is piped through to qdeliver for local delivery.
However, only the first recipient actually receives the mail. All the other ones are apparently silently discarded. This only appears to be happening to recipients with the same domain name.

The setup used to work, but I haven't checked precisely when it stopped working. I did roll in a couple of updates recently.

Reproducible: Always

Steps to Reproduce:
1. send e-mail to two or more recipients on one domain
2. check both inboxes
3. check the maildir


Actual Results:  
Only the first recipient has received the e-mail.
The folders 'new' and 'cur' in the maildir of the other recipients have not received any new messages.

Expected Results:  
Both recipients should have received the e-mail.
The new message should have been stored in the 'cur' folder of the other users' maildir.

I am using postfix-2.5.5 with MailScanner-4.70.7.1 and courier-imap-4.0.6-r3.

The postfix configuration files can be viewed at http://sofagang.dk/postfix.
I can pass on mysql-dumps of the relevant database tables too.

emerge --info output:
---------------------

Portage 2.1.6.11 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.21-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.21-gentoo-r4-i686-AMD_Athlon-tm-_64_Processor_3800+-with-glibc2.0
Timestamp of tree: Tue, 02 Jun 2009 01:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r6, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apm berkdb bzip2 chroot cli cracklib crypt ctype cups dba dbus dri expat fam fortran ftp gd gdbm gif gmp hal iconv idn imap imlib ipv6 isdnlog javascript jpeg lcms libg++ libwww loop-aes maildir memlimit mhash midi mikmod mime mmx mng motif mudflap mysql nas ncurses nls nptlonly openmp pam pcre perl php png posix pppd python readline reflection samba sdl session simplexml slang soap sockets spl sse ssl sysfs tcpd threads tiff tokenizer unicode x86 xml xorg xsl zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon    authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default    authz_groupfile authz_host authz_owner authz_user autoindex cache    dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter    file_cache filter headers include info log_config logio mem_cache mime    mime_magic negotiation rewrite setenvif speling status substitute    unique_id userdir usertrack vhost_alias" APACHE2_MPMS="itk" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Thomas Skyt 2009-06-02 07:11:50 UTC
Log excerpt showing what happens. Note that wrt. to CB2F25880AA only the message to 'daniel' and wrt. to 1C469588065 the first one to 'thomas' arrived.
------------------------------------------------------------

Jun  2 09:04:32 hetzner postfix/smtpd[15463]: connect from gmp-eb-inf-1.sun.com[192.18.6.21]
Jun  2 09:04:32 hetzner postfix/smtpd[15463]: setting up TLS connection from gmp-eb-inf-1.sun.com[192.18.6.21]
Jun  2 09:04:32 hetzner postfix/smtpd[15481]: warning: 123.27.101.177: address not listed for hostname localhost
Jun  2 09:04:32 hetzner postfix/smtpd[15481]: connect from unknown[123.27.101.177]
Jun  2 09:04:32 hetzner postfix/smtpd[15463]: Anonymous TLS connection established from gmp-eb-inf-1.sun.com[192.18.6.21]: TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)
Jun  2 09:04:33 hetzner postfix/policy-spf[15472]: : SPF none (No applicable sender policy available): Envelope-from: Thomas.Jessen@Sun.COM
Jun  2 09:04:33 hetzner postfix/policy-spf[15472]: handler sender_policy_framework: is decisive.
Jun  2 09:04:33 hetzner postfix/policy-spf[15472]: : Policy action=PREPEND Received-SPF: none (sun.com: No applicable sender policy available) receiver=hetzner.sofagang.dk; identity=mailfrom; envelope-from="Thomas.Jessen@Sun.COM"; helo=gmp-eb-inf-1.sun.com; client-ip=192.18.6.21
Jun  2 09:04:33 hetzner sqlgrey: grey: domain awl match: updating 192.18.6(192.18.6.21), sun.com
Jun  2 09:04:33 hetzner postfix/smtpd[15463]: CFDB158805F: client=gmp-eb-inf-1.sun.com[192.18.6.21]
Jun  2 09:04:33 hetzner postfix/policy-spf[15472]: CFDB158805F: SPF none (No applicable sender policy available): Envelope-from: Thomas.Jessen@Sun.COM
Jun  2 09:04:33 hetzner postfix/policy-spf[15472]: CFDB158805F: Policy action=DUNNO
Jun  2 09:04:33 hetzner sqlgrey: grey: domain awl match: updating 192.18.6(192.18.6.21), sun.com
Jun  2 09:04:33 hetzner postfix/cleanup[15491]: CFDB158805F: hold: header Received: from gmp-eb-inf-1.sun.com (gmp-eb-inf-1.sun.com [192.18.6.21])??(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))??(No client certificate requested)??by smtp.sofagang.dk (Postfix from gmp-eb-inf-1.sun.com[192.18.6.21]; from=<Thomas.Jessen@Sun.COM> to=<thomas@sofagang.dk> proto=ESMTP helo=<gmp-eb-inf-1.sun.com>
Jun  2 09:04:33 hetzner postfix/cleanup[15491]: CFDB158805F: message-id=<4A24CEF7.4010900@Sun.COM>
Jun  2 09:04:33 hetzner postfix/smtpd[15463]: disconnect from gmp-eb-inf-1.sun.com[192.18.6.21]

[...]

Jun  2 09:05:46 hetzner MailScanner[15677]: MailScanner E-Mail Virus Scanner version 4.70.7 starting...
Jun  2 09:05:46 hetzner MailScanner[15677]: Read 855 hostnames from the phishing whitelist
Jun  2 09:05:46 hetzner MailScanner[15677]: Read 10675 hostnames from the phishing blacklist
Jun  2 09:05:46 hetzner MailScanner[15677]: SpamAssassin temporary working directory is /var/spool/MailScanner/incoming/SpamAssassin-Temp
Jun  2 09:05:46 hetzner MailScanner[15677]: Using SpamAssassin results cache
Jun  2 09:05:46 hetzner MailScanner[15677]: Connected to SpamAssassin cache database
Jun  2 09:05:46 hetzner MailScanner[15677]: Expired 5 records from the SpamAssassin cache
Jun  2 09:05:46 hetzner MailScanner[15677]: Enabling SpamAssassin auto-whitelist functionality...
Jun  2 09:05:47 hetzner MailScanner[15677]: Using locktype = flock
Jun  2 09:05:47 hetzner MailScanner[15677]: New Batch: Scanning 2 messages, 6909 bytes
Jun  2 09:05:48 hetzner MailScanner[15677]: SpamAssassin cache hit for message CFDB158805F.1DC50
Jun  2 09:05:48 hetzner MailScanner[15677]: Virus and Content Scanning: Starting
Jun  2 09:05:48 hetzner MailScanner[15677]: WARNING: Ignoring deprecated option --unzip
Jun  2 09:05:48 hetzner MailScanner[15677]: WARNING: Ignoring deprecated option --jar
Jun  2 09:05:48 hetzner MailScanner[15677]: WARNING: Ignoring deprecated option --tar
Jun  2 09:05:48 hetzner MailScanner[15677]: WARNING: Ignoring deprecated option --tgz
Jun  2 09:05:48 hetzner MailScanner[15677]: WARNING: Ignoring deprecated option --deb
Jun  2 09:05:50 hetzner MailScanner[15677]: Requeue: 5A86A588065.43C85 to CB2F25880AA
Jun  2 09:05:50 hetzner MailScanner[15677]: Requeue: CFDB158805F.1DC50 to 1C469588065
Jun  2 09:05:50 hetzner postfix/qmgr[15392]: CB2F25880AA: from=<thomas.jessen@sun.com>, size=2642, nrcpt=2 (queue active)
Jun  2 09:05:50 hetzner postfix/qmgr[15392]: 1C469588065: from=<thomas.jessen@sun.com>, size=2645, nrcpt=2 (queue active)
Jun  2 09:05:50 hetzner postfix/pipe[15690]: CB2F25880AA: to=<daniel@sofagang.dk>, relay=qdeliver, delay=60, delays=60/0.01/0/0, dsn=2.0.0, status=sent (delivered via qdeliver service)
Jun  2 09:05:50 hetzner postfix/pipe[15690]: CB2F25880AA: to=<thomas@sofagang.dk>, relay=qdeliver, delay=60, delays=60/0.01/0/0, dsn=2.0.0, status=sent (delivered via qdeliver service)
Jun  2 09:05:50 hetzner postfix/qmgr[15392]: CB2F25880AA: removed
Jun  2 09:05:50 hetzner postfix/pipe[15691]: 1C469588065: to=<thomas@sofagang.dk>, relay=qdeliver, delay=77, delays=77/0.01/0/0, dsn=2.0.0, status=sent (delivered via qdeliver service)
Jun  2 09:05:50 hetzner postfix/pipe[15691]: 1C469588065: to=<thomas@sofagang.dk>, orig_to=<thomas.tr@sofagang.dk>, relay=qdeliver, delay=77, delays=77/0.01/0/0, dsn=2.0.0, status=sent (delivered via qdeliver service)
Jun  2 09:05:50 hetzner postfix/qmgr[15392]: 1C469588065: removed
Jun  2 09:05:50 hetzner MailScanner[15677]: Uninfected: Delivered 2 messages
Comment 2 Thomas Skyt 2009-06-13 00:24:30 UTC
Created attachment 194465 [details]
Another run, with 'pipe -v' in master.conf
Comment 3 Thomas Skyt 2009-06-13 00:26:15 UTC
I suspect that deliverquota cannot handle two maildir paths in the current version or setup.
Comment 4 Thomas Skyt 2009-06-13 18:46:43 UTC
A downgrade to courier-imap-4.0.4 has not helped.
Comment 5 Thomas Skyt 2009-06-13 20:50:33 UTC
I must have been wrong about deliverquota's capabilities.

Looking at its source code, there's just no facility for splitting one message into multiple ones for delivery into multiple mailboxes.