Subject: Re: Moving mail to ~user/mbox first goes to /var/mail/user?

From: Todd Piket <[email-masked]>
Date: Wed, 13 Oct 2004 09:52:12 -0400

> What is doing this "moving"?  It's not c-client, since c-client always
 > dotlocks.

My mistake.  After watching the NFS packets we see the server/c-client 
definitely creates the lock.  This makes sense to me anyway since what 
we are seeing doesn't appear to be a lock contention issue.  The problem 
occurs if a mail client moves a message from one folder to "INBOX".  At 
this point the IMAP server puts the message into MAILSPOOL/user 
(/var/mail/user) and then snarfs it back to the mbox.  It's during this 
operation that we see the introduction of a significant number of null 
characters into the message, sometimes over 5MB (yes megabytes).  The 
nulls always occur right before the From line of a message though they 
aren't always introduced.  It's very strange behavior.  I'm not entirely 
convinced the IMAP server alone is the problem, but after much analysis 
it and NFS are the only places to look.

I forgot to mention in my last mention that this is imap-2002d.  Is this 
possibly fixed in 2004a?

Thanks for the quick reply.

 > Courier is not an IMAP-compliant server.  If you must go to maildir,
 > look at Dovecot instead.

Thanks for the tip.  I've been hearing a lot about Dovecot and will 
check it out.

-- 
Regards,

  ------------------------------------------------------------
| Todd Piket                        | Email: [email-masked]    |
| Programmer/Analyst                | Phone: (906) 487-1720  |
| Distributed Computing Services    |                        |
| Michigan Technological University |                        |
  ------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Wed, 13 Oct 2004 22:05:24 -0700 (PDT)

On Wed, 13 Oct 2004, Todd Piket wrote:
> It's during this operation that we see the 
> introduction of a significant number of null characters into the message, 
> sometimes over 5MB (yes megabytes).  The nulls always occur right before the 
> From line of a message though they aren't always introduced.

Hmm.  I wonder if this is NFS inode vs. data cache skew; that is, the 
inode data returned by stat() (and in particular the file size) doesn't 
match the data on the NFS client.

> I forgot to mention in my last mention that this is imap-2002d.  Is this 

Try it and see.  Since this is probably not a c-client bug, and is instead 
something in your NFS infrastructure that c-client, it isn't clear that a 
version upgrade of c-client imapd will fix it.  However, it could be that 
some subtle difference in how the new version does I/O may avoid tickling 
the NFS issue.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.