quarantine release might lose mail?

Frank Cusack fcusack at fcusack.com
Mon Dec 14 23:46:31 GMT 2009


Aren't queue files named after the inode?

If that's right, then the method in the above web page would seem to
be wrong.  First of all, the queue file in the quarantine is a copy of
the original queue file, so the filename is "wrong".  This doesn't matter
and does not lead to a problem for mailscanner purposes though, AFAICT.

But the method of release involves copying the file to the incoming
directory.  This part is wrong, since the file is named incorrectly and
postfix might reuse that filename.  postfix won't itself put a file in
the incoming queue dir (unless you can somehow bypass the header_check,
not sure if that can happen for locally generated mail), but because
the inode can be reused, 2+ queue files can be in the quarantine with
the same name.  You could release all of them together and lose mail.

I would think that you need to install the queue file using mktemp,
then change the filename and lastly change the file mode.


More information about the MailScanner mailing list