Archive Mail, Exim and Locking Bug? (was RE: [MAILSCANNER] Locki ng failing?)
Tony Finch
dot at DOTAT.AT
Thu Apr 24 19:57:05 IST 2003
"Desai, Jason" <jase at SENSIS.COM> wrote:
>
>I am testing out my new MailScanner server and I think I see a problem with
>message locking when I have Archive Mail set. To test, I send an email with
>a large attachment which will take several seconds to scan. When I have
>
>Archive Mail = /var/spool/MailScanner/archive
>
>it seems that all 3 of my MailScanner processes scan the same single email
>and 2 of them (as would be expected) have problems moving the email to the
>out queue (see logs below). But if I comment out Archive Mail and send the
>same email again, only one MailScanner process scans the email and moves it
>to the out queue with no problem.
>
>I also tried setting Lock Type = flock (just as a test) and sent the same
>email again. With this, only one MailScanner process scanned the mail and
>moved it to the out queue fine. But I don't think I should keep it this way
>because I am using Exim. Is this a bug? Is anyone else using Exim and
>Archive Mail? Can anyone else duplicate this?
I think I've worked out where the problem comes from, and I caused it :-(
The FreeBSD fcntl manual page says:
This interface follows the completely stupid semantics of System V and
IEEE Std 1003.1-1988 (``POSIX.1'') that require that all locks associated
with a file for a given process are removed when any file descriptor for
that file is closed by that process.
which has implications for MailScanner when it copies messages around :-(
I'll be back at some point with a patch.
Tony.
--
f.a.n.finch <dot at dotat.at> http://dotat.at/
HEBRIDES BAILEY: EAST OR NORTHEAST 4 OR 5, OCCASIONALLY 6. OCCASIONAL RAIN.
MODERATE OR GOOD.
More information about the MailScanner
mailing list