Re: Some thoughts from a non-ASK user

Brian Candler <[email protected]> Mon, 16 Feb 2004 11:44:21 +0000
Newsgroups gmane.mail.spam.active-spam-killer.general
Message-ID <[email protected]>
On Sun, Feb 15, 2004 at 01:46:05PM -0500, Marco Paganini wrote:
> I'm a little confused. I don't think locking is such a big issue with
> Maildir as it is with mbox. Maildir uses unique filenames and thus it's
> unlikely that we'll see locking issues. Am I missing something? What do
> current IMAP servers use? dotlock? fcntl? Both?

The actual messages are safe to create and move around without locking, if
you follow the Maildir algorithm. However, generally IMAP servers need to
store metadata in files as well, and that has to be NFS-safe too. Examples:

(1) "maildirsize", the quota state file used in Maildir++. This is
handled in an append-only way, see
http://www.inter7.com/courierimap/README.maildirquota.html

(2) Files containing UIDs, message state flags etc

The 'append data / generate new file and rotate it into position' mechanism
risks losing data if two processes do it at the same time (but we don't care
if the quota is slightly inaccurate, for example). The 'dot lock' approach
is safe but inefficient.

> Do you think the extra fork of (1) would be a big deal? It seems the
> easiest option to do what you need.

It has to be done for every RCPT TO command at SMTP receipt time. As long as
it's small and lightweight, e.g. a little C program, it's fine. But there's
no way I'd want to start up an entire Python interpreter instance for every
recipient!

> Life would be so easy if we had an SMTP cookie of sorts. I don't believe
> there's a "proper" way of matching bounces, except by using VERPs. But
> as we discussed, they bring other problems of their own...

Indeed. Right now the cookie either goes in the envelope return-path, or in
a header. Actually I vaguely remember reading about SMTP DSNs, but they seem
to have died a death.

Cheers,

Brian.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click