[Dovecot] Occasional problem with POP3-Download
Hello everyone,
I have two mailservers [1] running dovecot. Mail store format is maildir. Every once in a while I have the following problem: When a User downloads his mail via POP3, the client says something like "the server has closed the connection unexpectedly, and gives this reason: [...blahblah...]".
One can now cancel the download, and restart it, and the problem shows up again and again. The first few mails get downloaded, and then the process stops.
Strange to say the "blahblah"-portion is a piece of text out of the email that doesn't want to get downloaded.
Then I remove this single message out of the Maildir/cur-directory, and everything is fine again. It is easy to figure out which mail to delete because it's the first one that is not market as seen
[...]
filename...:2,S
otherfilename...;2, <= this file must be deleted
[...]
For me it looks as if dovecot had a problem with some byte sequence in this mail, and for some reason it gives an error message to the client which is taken out of the mail.
On the SuSE-Machine, before dovecot there was a courier-imapd running, which never showed this kind of problem, so it should not be a client problem.
Hopefully my description is clear enough.
Does anyone have an idea what's going on here?
Thanks. Andre
[1] One machine is a openSuSE 11.2 with
# rpm -qa | grep dovecot dovecot12-backend-sqlite-1.2.9-0.1.1.i586 dovecot12-backend-mysql-1.2.9-0.1.1.i586 dovecot12-backend-pgsql-1.2.9-0.1.1.i586 dovecot12-1.2.9-0.1.1.i586
The other machine is a Debian Lenny with
# dpkg -l | grep dovecot
dovecot-common 1:1.0.15-2.3+lenny1
dovecot-imapd 1:1.0.15-2.3+lenny1
dovecot-pop3d 1:1.0.15-2.3+lenny1
-- Andre Tann
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 23 Feb 2010, Andre Tann wrote:
I have two mailservers [1] running dovecot. Mail store format is maildir. Every once in a while I have the following problem: When a User downloads his mail via POP3, the client says something like "the server has closed the connection unexpectedly, and gives this reason: [...blahblah...]".
Can you provide a sample mail? Does it contains NUL (ASCII 0, 0x0, \0) characters?
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS4PXM7+Vh58GPL/cAQLc/Qf/RzyzxeB/8sOp/7bLZqkarPpuMVHe7K2b goIYun5Rm75bxShS1JYGjrDpS7bOBfgBDUBRw/VI3kEBki3lwe4TqxY7JXuN0jOx 95CwG8k5rt3PsDdfOGdAnK9gut5DBqHlR8DzVao2idibXO9fnN67Q3GxSm/LY8Em nERBpEZ4udiLUKxtUrporJLfmIyJ16PLGGW32yNNN6TsvBpPDctO7EN18Sb3Ozem ZcUN72T3XSqms501s8jRvLi9MbIVVYzUJO9QBd6IBYGyPS/hRTQUemI5pZeXd7j0 BZOWXoDjuFcfl0Y5jV+MtIE7O7nHpe0W0Cz/DG+DmnH8wOVMajtsHQ== =a+Iy -----END PGP SIGNATURE-----
Steffen Kaiser, Dienstag 23 Februar 2010:
Can you provide a sample mail? Does it contains NUL (ASCII 0, 0x0, \0) characters?
I don't have one right now. I will catch the next one that is nagging me, and post it here.
Until then: how can I find out if a mail contains a NUL-Byte? Can one grep for it? grep \0 mailfile?
-- Andre Tann
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 23 Feb 2010, Andre Tann wrote:
Can you provide a sample mail? Does it contains NUL (ASCII 0, 0x0, \0) characters?
I don't have one right now. I will catch the next one that is nagging me, and post it here.
Until then: how can I find out if a mail contains a NUL-Byte? Can one grep for it? grep \0 mailfile?
Well, I skin the cat as follows:
for file in *; do perl -ne 'exit 1 if /\0/' "$file" || echo "$file" contains NUL done
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS4PpCr+Vh58GPL/cAQKMQQf/QmBjYAPE/oMXmCWeTg5+mp20/Fr7l3nN R8wQ0sZsGAAKNVeHSHWPlOpyA66MvTSGrW6VzpRcptmrrPkN0Q03SfJRWnAupizM oDtZx6xkMa85WnmXolT9Z1Dw1kb2tjl1itI1dCR1NPN/yxUVYzofSAI+eVs/P7nu s/FMjHDqN6X7Xso+UW6DQu49FixxKc2ALilbThyytOVCrkPePHZzbHrqY8GjWhmM X1XjLvW/5r6GGLXmFHxVsa/3LDcL3pG/2Q+pqD8AySYRwKplRY6jLuBkONXQ+JJU BxxA/AyKIY4mZszFzV8uL9D4hBRwl+Yb49UILEckWFIKIhNXFqIw2w== =/A4e -----END PGP SIGNATURE-----
On 23/02/2010 13:45, Andre Tann wrote:
Steffen Kaiser, Dienstag 23 Februar 2010:
Can you provide a sample mail? Does it contains NUL (ASCII 0, 0x0, \0) characters?
I don't have one right now. I will catch the next one that is nagging me, and post it here.
Until then: how can I find out if a mail contains a NUL-Byte? Can one grep for it? grep \0 mailfile?
Also try some permutations such as
- delivering one new email to the user (yes it's then on the end before you get to it)
- does it repeatedly die with the same message/same point each time?
- if you remove the message, then allow the user to complete the download, then put the message back again does it still die on that message?
- change internet connection - does it download ok now?
I have seen something similar to what you describe over a the last few years (not server specific), only very rarely though. I can't repro it from a different network connection, ie different connection used and it downloads fine. Also simply adding/removing messages (usually any message) causes the next download to succeed.
I had actually attributed the problem to be elsewhere and perhaps a very specific interaction of MTU size with a sequence of bytes in the message which was confusing Outlook Express...? I haven't had ever managed to get a situation that I can reproduce time and time again on my side.
Good luck
Ed W
participants (3)
-
Andre Tann
-
Ed W
-
Steffen Kaiser