Question about the HOLD header check: why use "Received" ?

Glenn Steen glenn.steen at
Tue Feb 7 00:20:05 GMT 2012

Just to add my .02 SEK ... :-)
Postfix has, to my knowledge, no way of feeding multiple messages
)semi-simultaneosly) into a filter/milter/whatever... The only way
around this limitation of the officially supported APIs is to stuff
the files somewhere Postfix will leave them alone, plunder them, rip
them apart and reconstruct them as entirely new queue files that
eventually get reintroduced to Postfix (or not:-).
The batch-processing behaviour of MailScanner is central to its
power/performance. According to some PF activists, it is MailScanners
only selling point, but... We know better:-).

Now, there have been  basically two apporoaches to this problem,
either a "two-instance setup" that worked really badly, or the "one
instance with the hold-trick#. The latter is useful, safe and has
worked well for several years... Doesn't mean you couldn't do it
differenly... Hugo van der Koij published a very nifty variation a few
yesrs ago, use gmane to find it). To answer the question about "why
received:?"... Well, according to the RFCs this is about the first
thing an MTA need stick in there, even when dealing with "locally
generated email", so it is safe to assume it is present. As mentioned
in this thread, at least two variants that don't use Received: have
seen the light of day... and you could probably do all sorts of
silliness... But the main part isn't about that tiny detail,... it is
about getting the queue files into hold, so that Postfix don't try do
anything with them (Postfix don't do queue file locking, since ...
Well, it's not needed internally).

Now, about the newfangled long, non-repeatable queue IDs, I'd say ...
don't use them... Not until more systems have been updated to PF 2.9
... I imagine most PF systems are at best 2.7 today, at worst ... a
lot older... (CentOS 5 anyone..?:-).
In time someone (possibly me, possibly Jules, possibly... someone
else...:-) will find time to implement support for them, BUT ... we
really don't need it, due to the entropy MailScanner add to the
short/repeating queue ID, to make them virtually non-repeating.

Hope that this is of interrest to someone ...:-)
-- -- Glenn
On 4 February 2012 13:33, Martin Hepworth <maxsec at> wrote:
> On Saturday, 4 February 2012, Stuart Henderson <stu at> wrote:
>> On 2012-01-31, Martin Hepworth <maxsec at> wrote:
>>> Because using a hold queue makes it more smtp agnostic
>> It's not agnostic to queue implementation though. For example long
>> queue IDs in the current stable verson of Postfix break mailscanner.
> More agnostic not completely as you need to understand the queue file etc.
>> --
>> MailScanner mailing list
>> mailscanner at
>> Before posting, read
>> Support MailScanner development - buy the book off the website!
> --
> --
> Martin Hepworth
> Oxford, UK
> --
> MailScanner mailing list
> mailscanner at
> Before posting, read
> Support MailScanner development - buy the book off the website!

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

More information about the MailScanner mailing list