[Dovecot] One user having reproducible IMAP issues
Dovecot version upgraded to 1.0r26 (did not fix problem).
The server is a CentOS 4 x86 box.
Using ext3 filesystem.
Previous attempts to fix the issue have included simply moving aside
the user's INBOX to recreating a new account from scratch. Sometimes
the email behaves for a while, but within a day is not working
again. In Mail.app (the user's usual mail client) the INBOX folder
simply appears empty. mutt (run locally on the server) shows the
messages there correctly.
The problem is easily reproducible. Move /var/spool/mail/[username]
to a backup file and remove all .imap directories for that user.
Mail may work for a while, but will stop within 24 hours. The
SquirrelMail message is: ERROR:
The server couldn't find the message you requested.
Most probably your message list was out of date and the message has
been moved away or deleted (perhaps by another program accessing the
same mailbox).
Click here to return to INBOX
dovecot -n :
# /etc/dovecot.conf log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.debug.log login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_location: mbox:~/mail:INBOX=/var/spool/mail/%u mail_full_filesystem_access: yes mail_executable(default): /usr/libexec/dovecot/rawlog /usr/libexec/ dovecot/imap mail_executable(imap): /usr/libexec/dovecot/rawlog /usr/libexec/ dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth default: mechanisms: plain login passdb: driver: pam args: dovecot userdb: driver: passwd
Thanks! Alex

On Wed, 2007-03-14 at 13:26 -0700, Alex Boster wrote:
X-IMAPbase: 1173814340 4280058374 $NotJunk JunkRecorded X-UID: 4280058361
This is your problem. Your UID has gotten higher than 2^31 which confuses many clients, even though it's still valid from IMAP protocol's point of view.
As for why it has gotten this high.. Well, recent Dovecot RCs could break them sometimes, but at least with 1.0.rc27 everything should be working.
If you remove the X-IMAPbase, X-IMAP and X-UID headers and delete Dovecot's index files the messages will be given new UIDs beginning from 1.
If this just keeps happening, then I think it's because the incoming mails contains invalid X-UID headers. Normally those shouldn't break anything as long as you haven't deleted Dovecot's index files or the mbox file isn't empty. If they do and you can figure out how to reproduce it, please let me know.
Anyway, the problems would most likely go away if you just filter out all the X-UID headers from incoming mails. See the bottom of http://wiki.dovecot.org/MboxProblems
Does anyone have a quick recipe for how to do the filtering?
We are on CentOS 4 using a near default setup...
Thanks for the help! Alex
On Mar 16, 2007, at 5:26 AM, Timo Sirainen wrote:
On Wed, 2007-03-14 at 13:26 -0700, Alex Boster wrote:
X-IMAPbase: 1173814340 4280058374 $NotJunk JunkRecorded X-UID: 4280058361
This is your problem. Your UID has gotten higher than 2^31 which confuses many clients, even though it's still valid from IMAP
protocol's point of view.As for why it has gotten this high.. Well, recent Dovecot RCs could break them sometimes, but at least with 1.0.rc27 everything should be working.
If you remove the X-IMAPbase, X-IMAP and X-UID headers and delete Dovecot's index files the messages will be given new UIDs beginning
from 1.If this just keeps happening, then I think it's because the incoming mails contains invalid X-UID headers. Normally those shouldn't break anything as long as you haven't deleted Dovecot's index files or the mbox file isn't empty. If they do and you can figure out how to reproduce it, please let me know.
Anyway, the problems would most likely go away if you just filter out all the X-UID headers from incoming mails. See the bottom of http://wiki.dovecot.org/MboxProblems
On 16/03/2007 19:06, Alex Boster wrote:
Does anyone have a quick recipe for how to do the filtering?
We are on CentOS 4 using a near default setup...
Does that mean dovecot 0.99? If so you ought to build or download something more recent (ready-made latest is available from atrpms.net)
The filtering recipe is man procmail
, man formail
, then add
something like the following (which I haven't tested) to /etc/procmailrc
:0 fh | formail -I X-UID:
Cheers,
John.
Thanks -- we figured it out, but that is good to see.
Yes, it was 0.99 but has been upgraded. We are filtering out the
problematic headers and removed them from the "broken" mbox files.
Everything is working fine now.
I'm on rc26, but will go to rc27 when there is a CentOS 4 / RHEL 4
source RPM. Are there are config file or other gotchas in going from
rc26 to rc27?
AB
On Mar 18, 2007, at 6:15 PM, John Robinson wrote:
On 16/03/2007 19:06, Alex Boster wrote:
Does anyone have a quick recipe for how to do the filtering? We are on CentOS 4 using a near default setup...
Does that mean dovecot 0.99? If so you ought to build or download
something more recent (ready-made latest is available from atrpms.net)The filtering recipe is
man procmail
,man formail
, then add
something like the following (which I haven't tested) to /etc/ procmailrc:0 fh | formail -I X-UID:
Cheers,
John.
Is there a way to upgrade from rc26 to rc27 without causing our POP
users to see duplicate new mail? That was a problem last week with
the 0.99 to 1.0rc26, and the other admin on the box is reluctant to
upgrade again if that is going to happen again...
Thanks, AB
On Mar 18, 2007, at 6:17 PM, Alex Boster wrote:
Thanks -- we figured it out, but that is good to see.
Yes, it was 0.99 but has been upgraded. We are filtering out the
problematic headers and removed them from the "broken" mbox files.
Everything is working fine now.I'm on rc26, but will go to rc27 when there is a CentOS 4 / RHEL 4
source RPM. Are there are config file or other gotchas in going
from rc26 to rc27?AB
On Mar 18, 2007, at 6:15 PM, John Robinson wrote:
On 16/03/2007 19:06, Alex Boster wrote:
Does anyone have a quick recipe for how to do the filtering? We are on CentOS 4 using a near default setup...
Does that mean dovecot 0.99? If so you ought to build or download
something more recent (ready-made latest is available from
atrpms.net)The filtering recipe is
man procmail
,man formail
, then add
something like the following (which I haven't tested) to /etc/ procmailrc:0 fh | formail -I X-UID:
Cheers,
John.
On Sun, 2007-03-18 at 18:22 -0700, Alex Boster wrote:
Is there a way to upgrade from rc26 to rc27 without causing our POP
users to see duplicate new mail? That was a problem last week with
the 0.99 to 1.0rc26, and the other admin on the box is reluctant to
upgrade again if that is going to happen again...
I guess you used a different pop3_uidl_format. See http://wiki.dovecot.org/UpgradingDovecot
Thank you again!
I will check out that setting. If I change the setting, does
anything else need to be done?
AB
On Mar 18, 2007, at 7:32 PM, Timo Sirainen wrote:
On Sun, 2007-03-18 at 18:22 -0700, Alex Boster wrote:
Is there a way to upgrade from rc26 to rc27 without causing our POP users to see duplicate new mail? That was a problem last week with the 0.99 to 1.0rc26, and the other admin on the box is reluctant to upgrade again if that is going to happen again...
I guess you used a different pop3_uidl_format. See http://wiki.dovecot.org/UpgradingDovecot
On Sun, Mar 18, 2007 at 06:17:24PM -0700, Alex Boster wrote:
Thanks -- we figured it out, but that is good to see.
Yes, it was 0.99 but has been upgraded. We are filtering out the
problematic headers and removed them from the "broken" mbox files.
Everything is working fine now.I'm on rc26, but will go to rc27 when there is a CentOS 4 / RHEL 4
source RPM. Are there are config file or other gotchas in going from
rc26 to rc27?
It is available for quite some time, but the web display doesn't update as often as the repo. Either point yum to the repo, or pick it up at dl.atrpms.net.
The web creation takes longer than simply updating the repo, and the manual web downloading is less than 0.1% at ATrpms, which is why it is just recreated every now and then and may be out of date.
AB
On Mar 18, 2007, at 6:15 PM, John Robinson wrote:
On 16/03/2007 19:06, Alex Boster wrote:
Does anyone have a quick recipe for how to do the filtering? We are on CentOS 4 using a near default setup...
Does that mean dovecot 0.99? If so you ought to build or download
something more recent (ready-made latest is available from atrpms.net)The filtering recipe is
man procmail
,man formail
, then add
something like the following (which I haven't tested) to /etc/ procmailrc:0 fh | formail -I X-UID:
-- Axel.Thimm at ATrpms.net
participants (4)
-
Alex Boster
-
Axel Thimm
-
John Robinson
-
Timo Sirainen