[Dovecot] overnight clients causing lockfiles to be converted to root-owned messages on debian lenny
Greetings all,
After running for more than a year without issue on debian lenny while it was in the testing- we're now experiencing problems under Lenny/Stable.
Dovecot now converts some sort of lockfile into messages, and they're owned by root. The result is a mess; clients can't read their mailboxes with the root-owned files, and when the file is changed to be owned by them, many mail clients don't like the zero-length message (Outlook being one major client with this "problem".)
This happens to users who leave their email clients open overnight. I haven't found a cronjob that could be responsible for this.
Further details- 64 bit machine, we use maildir, /var/spool/mail is on an xfs volume, and we run postfix, procmail, and spamassassin. Dovecot version is 1.0.15; the machine is fully up-to-date with Debian Stable (Lenny.)
Sample log entry of the aftermath; please pardon the sanitizing (host/username):
Apr 22 00:08:34 host dovecot: IMAP(user): Fixed a duplicate: 1240289413.9181_0.host:2,S.lock -> 1240373314.P6717Q0M159857.host Apr 22 00:08:34 host dovecot: IMAP(user): Fixed a duplicate: 1240356531.15928_0.host:2,S.lock -> 1240373314.P9995Q3.host Apr 22 00:08:34 host dovecot: IMAP(user): open(/var/spool/mail/user/Maildir/cur/1240373314.P6717Q0M159857.host:2,) failed: Permission denied
Brett
On Wed, 2009-04-22 at 15:23 -0400, Brett Dikeman wrote:
Apr 22 00:08:34 host dovecot: IMAP(user): Fixed a duplicate: 1240289413.9181_0.host:2,S.lock -> 1240373314.P6717Q0M159857.host
Something's very wrong if .lock files are created to Maildir mail files. It looks as if the Maildir is somehow being used as a mbox or something else is very weird. Try to figure out what is creating those .lock files..
On Wed, Apr 22, 2009 at 3:38 PM, Timo Sirainen tss@iki.fi wrote:
On Wed, 2009-04-22 at 15:23 -0400, Brett Dikeman wrote:
Apr 22 00:08:34 host dovecot: IMAP(user): Fixed a duplicate: 1240289413.9181_0.host:2,S.lock -> 1240373314.P6717Q0M159857.host
Something's very wrong if .lock files are created to Maildir mail files. It looks as if the Maildir is somehow being used as a mbox or something else is very weird. Try to figure out what is creating those .lock files..
The only things we have that touch mail on that system are dovecot and procmail. We don't export /var/spool/mail, and this is a pretty minimal debian system install. Ie, no funky desktop indexing programs or the like.
The users affected have no immediate commonalities- no common clients, most are IMAP but 1-2 are POP, some were logged out after timeout while others logged out properly, etc.
The lock files are one possible problem, but it is a HUGE problem that Dovecot is converting them into root-owned zero-length emails!
Brett
On 4/22/2009, Brett Dikeman (brett.dikeman@gmail.com) wrote:
The lock files are one possible problem, but it is a HUGE problem that Dovecot is converting them into root-owned zero-length emails!
Do you have proof that it is dovecot doing this?
--
Best regards,
Charles
On Wed, Apr 22, 2009 at 4:48 PM, Charles Marcus CMarcus@media-brokers.com wrote:
On 4/22/2009, Brett Dikeman (brett.dikeman@gmail.com) wrote:
The lock files are one possible problem, but it is a HUGE problem that Dovecot is converting them into root-owned zero-length emails!
Do you have proof that it is dovecot doing this?
I don't know if dovecot is creating the lock files, but it certainly appears from the logs (provided in my original email) that Dovecot is renaming them when the users go to log in.
Further checking- the affected messages are not the result of some contention between procmail and dovecot; one of the affected messages came in at 11AM the day before the lockfile was renamed.
Brett
On Thu, 2009-04-23 at 07:12, Brett Dikeman wrote:
Further checking- the affected messages are not the result of some contention between procmail and dovecot; one of the affected messages came in at 11AM the day before the lockfile was renamed.
Brett
have you disabled procmail to eliminate it as the root cause?
Brett Dikeman wrote:
On Wed, Apr 22, 2009 at 4:48 PM, Charles Marcus CMarcus@media-brokers.com wrote:
On 4/22/2009, Brett Dikeman (brett.dikeman@gmail.com) wrote:
The lock files are one possible problem, but it is a HUGE problem that Dovecot is converting them into root-owned zero-length emails!
Do you have proof that it is dovecot doing this?
I don't know if dovecot is creating the lock files, but it certainly appears from the logs (provided in my original email) that Dovecot is renaming them when the users go to log in.
Further checking- the affected messages are not the result of some contention between procmail and dovecot; one of the affected messages came in at 11AM the day before the lockfile was renamed.
Brett
How is /var/spool/mail mounted (local disk or network)? What filesystem is it using?
-- Daniel
On Wed, Apr 22, 2009 at 8:57 PM, Daniel L. Miller dmiller@amfes.com wrote:
How is /var/spool/mail mounted (local disk or network)? What filesystem is it using?
Please read my original message.
We're in the process of eliminating our backup software (Networker.) The directives were changed around the same timeframe as the problem started. A test was semi-inconclusive (a lockfile appeared, but was gone before the backup finished.) Timo may have been right.
Thank you all for your help and suggestions! I'll report back soon, hopefully with positive news.
Brett
On Wed, 2009-04-22 at 16:33 -0400, Brett Dikeman wrote:
Apr 22 00:08:34 host dovecot: IMAP(user): Fixed a duplicate: 1240289413.9181_0.host:2,S.lock -> 1240373314.P6717Q0M159857.host
Something's very wrong if .lock files are created to Maildir mail files. It looks as if the Maildir is somehow being used as a mbox or something else is very weird. Try to figure out what is creating those .lock files..
The only things we have that touch mail on that system are dovecot and procmail. We don't export /var/spool/mail, and this is a pretty minimal debian system install. Ie, no funky desktop indexing programs or the like.
The users affected have no immediate commonalities- no common clients, most are IMAP but 1-2 are POP, some were logged out after timeout while others logged out properly, etc.
It's something that's running on the server.
The lock files are one possible problem, but it is a HUGE problem that Dovecot is converting them into root-owned zero-length emails!
Dovecot isn't converting them. They're initially zero size and created by root and they just shouldn't be there. The best Dovecot could do to them would be to simply ignore all files ending with ".lock", but I don't really see a point in working around something that really shouldn't be happening in the first place.
Since they're created by root, it's some process running as root that's creating them. Maybe some backup solution?
participants (5)
-
Brett Dikeman
-
Charles Marcus
-
Daniel L. Miller
-
Noel Butler
-
Timo Sirainen