分类:
2005-12-17 18:46:52
Maildir存储过程:
Brad Knowles
> Right, but without NFS you can get reliable file locking at the host
> level. With NFS, you can't.
Maildirs don't use or need file locking; they rely on hard link atomicity
instead, which NFS is somewhat better at handling. (Unfortunately for
AFS, maildir uses cross-directory hard links, which don't work at all in
AFS. Of course, you generally don't want to deliver mail to AFS anyway.)
> So the hostname of the delivering machine is used as part of the
> filename of the message under the Maildir/ scheme? Hmmm....
windlord:~> ls Mail/incoming/new/
960931893.3409.windlord.stanford.edu 960932738.3540.windlord.stanford.edu
960931953.3418.windlord.stanford.edu 960932953.3552.windlord.stanford.edu
960932152.3469.windlord.stanford.edu 960933183.3560.windlord.stanford.edu
960932164.3478.windlord.stanford.edu 960933205.3565.windlord.stanford.edu
960932165.3482.windlord.stanford.edu 960933241.3569.windlord.stanford.edu
A program delivers a mail message in six steps. First, it chdir()s
to the maildir directory. Second, it stat()s the name
tmp/time.pid.host, where time is the number of seconds since the
beginning of 1970 GMT, pid is the program's process ID, and host is
the host name. Third, if stat() returned anything other than ENOENT,
the program sleeps for two seconds, updates time, and tries the
stat() again, a limited number of times. Fourth, the program creates
tmp/time.pid.host. Fifth, the program NFS-writes the message to the
file. Sixth, the program link()s the file to new/time.pid.host. At
that instant the message has been successfully delivered.
--JFS上存在的问题:
Russ Allbery (rrastanford.edu) <>
After changing a mailserver from using mbox/ext3 (RHL9) to Maildir/jfs
(RHEL 3), dovecot
0.99.10 no longer reports new email even if asked... I have to restart
the mail client and
do a fresh login to notice new email.
This happens with multiple mail clients on multiple platforms, and
didn't happen before the
conversion... any suggestions on workarounds?
--
Trond Eivind Glomsrød
Senior Software Engineer
Scali -
High Performance Clustering
On 24.8.2004, at 20:44, Trond Eivind Glomsrød wrote:
> After changing a mailserver from using mbox/ext3 (RHL9) to Maildir/jfs
> (RHEL 3), dovecot
> 0.99.10 no longer reports new email even if asked... I have to
> restart the mail client and
> do a fresh login to notice new email.
>
> This happens with multiple mail clients on multiple platforms, and
> didn't happen before the
> conversion... any suggestions on workarounds?
Sounds pretty strange. How about if you switch from INBOX to another
folder and back, does it show then new mails? Nothing in log files? Do
the files get moved from new/ directory to cur/ even while client
doesn't see them?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url :
Timo Sirainen wrote:
> On 24.8.2004, at 20:44, Trond Eivind Glomsrød wrote:
>
>> After changing a mailserver from using mbox/ext3 (RHL9) to
>> Maildir/jfs (RHEL 3), dovecot
>> 0.99.10 no longer reports new email even if asked... I have to
>> restart the mail client and
>> do a fresh login to notice new email.
>>
>> This happens with multiple mail clients on multiple platforms, and
>> didn't happen before the
>> conversion... any suggestions on workarounds?
>
>
> Sounds pretty strange. How about if you switch from INBOX to another
> folder and back, does it show then new mails?
No.
> Nothing in log files?
Nothing.
> Do the files get moved from new/ directory to cur/ even while client
> doesn't see them
> ?
No, they stay in new/ until the mail client is restarted.
--
Trond Eivind Glomsrød
Senior Software Engineer
Scali -
High Performance Clustering
On 25.8.2004, at 16:03, Trond Eivind Glomsrød wrote:
>> Sounds pretty strange. How about if you switch from INBOX to another
>> folder and back, does it show then new mails?
>
> No.
I can't really think of anything that could cause the problem if that
doesn't work, but restarting connection works. Except if the first
connection got stuck somehow, but I guess it still worked except for
not showing new mails?
Could you look at what the client and Dovecot talks to eachothers?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url :
Timo Sirainen wrote:
> On 25.8.2004, at 16:03, Trond Eivind Glomsrød wrote:
>
>>> Sounds pretty strange. How about if you switch from INBOX to another
>>> folder and back, does it show then new mails?
>>
>>
>> No.
>
>
> I can't really think of anything that could cause the problem if that
> doesn't work, but restarting connection works. Except if the first
> connection got stuck somehow, but I guess it still worked except for
> not showing new mails?
>
> Could you look at what the client and Dovecot talks to eachothers?
>
> g
No, they talk fine... it worked before we converted to maildirs and nfs.
Closer checking shows that it works with ext3 and reiserfs, but not with
jfs.
Either there's a bug in the filesystem, or dovecot does an invalid
assumption... no idea of which.
--
Trond Eivind Glomsrød
Senior Software Engineer
Scali -
High Performance Clustering
On 26.8.2004, at 23:23, Trond Eivind Glomsrød wrote:
> Closer checking shows that it works with ext3 and reiserfs, but not
> with jfs.
> Either there's a bug in the filesystem, or dovecot does an invalid
> assumption... no idea of which.
The strange thing is that it works after reconnecting. I don't see what
the difference is between reconnecting and reselecting mailbox. If it
never worked it would be clear that the problem is with Dovecot. I
think there has been problems with Reiser as well, so it's well
possible that Dovecot assumes something wrong. I guess I should try
creating reiser/jfs partitions myself and see how they work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url :
Timo Sirainen wrote:
> On 26.8.2004, at 23:23, Trond Eivind Glomsrød wrote:
>
>> Closer checking shows that it works with ext3 and reiserfs, but not
>> with jfs.
>> Either there's a bug in the filesystem, or dovecot does an invalid
>> assumption... no idea of which.
>
>
> The strange thing is that it works after reconnecting. I don't see
> what the difference is between reconnecting and reselecting mailbox.
> If it never worked it would be clear that the problem is with Dovecot.
> I think there has been problems with Reiser as well, so it's well
> possible that Dovecot assumes something wrong. I guess I should try
> creating reiser/jfs partitions myself and see how they work.
>
I converted the partitions to reiserfs, and just as on the test system,
that solved the problem. When reconnecting (quitting the application and
restarting it), it should connect to a new instance as opposed to
keeping an open one... maybe some optimization is different when
checking for additions as opposed to opening it for the first time?