Mailscanner changes mail unique ID

Glenn Steen glenn.steen at
Thu Dec 10 13:32:15 GMT 2009

2009/12/9 Frank Cusack <fcusack at>:
> On December 9, 2009 12:02:44 PM +0000 Stef Morrell <stef at> wrote:
>> Postfix uses inode numbers for the queue ID. This means that when
>> Mailscanner has processed the email and needs to copy it back into the
>> queue for sending a new inode will be used and that will become the new
>> queue ID.
>> So, regretfully, the short answer is no, it's not possible.
> Mailscanner could copy the file, edit the original in-place and then
> move the original to the incoming queue.  It's possible, but MS doesn't
> work that way.
> -frank
One might think that yes, but due to how Postfix works (and the
"unstandard" practices of MailScanner:-), that isn't possible either.
Apart from making "grep" more easy, there is really no real issue with
the requeue -> new queue file -> new queue file ID...
If you're handy with perl, making a "mailloggrep" program that
correctly parses and "greps" all possible queue IDs for the message
would be rather simple.

What we ended up doing, which is to construct a completely new message
queue file, is actually what Wietse (a rather long time ago, when he
wanted to demonstrate the "folly" of working with batches of queue
files instead of (like amavisd) through the limiting interfaces at
hand (SMTP, mainly)) stipulated as the only sane way of doing this
(along with some other "rules"...). Fun thing was that he was unaware
of the fact that MS actually already did all that;-).

If you like, and have the luxury to wait for me to have some spare
time,  could probably whip a little script up for you relatively easy,
especially if you'd not mind it being ugly;-).

-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se

More information about the MailScanner mailing list