Postfix long queue IDs

Alvaro Marín alvaro at hostalia.com
Mon May 5 13:25:24 IST 2014


Apart of that, with long queue IDs, Postfix stores messages in a
different way.

- with enable_long_queue_ids=no and hash_queue_depth = 2

/var/spool/postfix/hold/B/B/BB48D1B9DE7
/var/spool/postfix/hold/2/E/2E4441B9825

(the folder hierarchy is done with first and second characters of the
queueID/filename)

- with enable_long_queue_ids=yes and hash_queue_depth = 2

/var/spool/postfix/hold/8/8/3gMjXk3z5kzJXNJ

reading Postfix's Changelog:

20110321

	Performance: with long queue file names, queue hashing now
	produces the same result as with short names. Postfix uses
	the hexadecimal representation of the file creation time
	in microseconds, instead of the beginning of the file name
	which changes once every year or so, a problem that was
	reported by Victor Duchovni. The base 16 encoding gives
	finer control over the number of directories than possible
	with base 52 encoding.  Files: global/mail_queue.[hc]. This
	change requires "postfix reload".

So the code from PFDiskStore.pm:

  if ($MailScanner::SMDiskStore::HashDirDepth == 2) {
    $this->{hdname} =~ /^(.)(.)(.*)$/;
    $this->{hdpath} = "$dir/$1/$2/" . $this->{hdname};
  } elsif ($MailScanner::SMDiskStore::HashDirDepth == 1) {
    $this->{hdname} =~ /^(.)(.*)$/;
    $this->{hdpath} = "$dir/$1/" . $this->{hdname};
  } elsif ($MailScanner::SMDiskStore::HashDirDepth == 0) {
    $this->{hdname} =~ /^(.*)$/;
    $this->{hdpath} = "$dir/" . $this->{hdname};
  }

is not usefull for this case.

Regards,

On 05/05/14 12:22, Joolee wrote:
> https://github.com/MailScanner/MailScanner/blob/master/mailscanner/bin/MailScanner/Postfix.pm
> After line 1500, you'll find a method where the folder depth for postfix
> is detected. This method seems flawed because it only supports a folder
> depth of 1 and otherwise returns 2.
> Around line 1630, there is separate code for when folder depth for
> postfix queues is 0, 1 or 2. This code should be rewritten to support
> any depth by using recursion. I'm afraid I don't have time for that now
> though.
> 
> On 5 May 2014 11:19, Alvaro Marín <alvaro at hostalia.com
> <mailto:alvaro at hostalia.com>> wrote:
> 
>     Hi again,
> 
>     I see that the problem appears using Postfix's long IDs and
>     hash_queue_depth > 1 (I use this feature with "2").
>     With hash_queue_depth=1 (Postfix's default) and changing the regexp of
>     Postfix.pm, as is said in the thread of the URL I pasted before,
>     runs fine.
> 
>     Regards,
> 
>     On 30/04/14 12:46, Alvaro Marín wrote:
>     > Yes, I know that it can be disabled, but I would prefer to use it
>     > (sometimes, Postfix IDs are repeated).
>     > Perhaps someone has a patch to can use it, if not, I'll try to do it.
>     >
>     > Thanks.
>     > Regards,
>     >
>     > On 30/04/14 12:05, Jerry Benton wrote:
>     >> Are you running long queue ID's? If so, try disabling that in Postfix
>     >> until we can get the source updated to handle the long format.
>     >>
>     >> http://www.postfix.org/postconf.5.html#enable_long_queue_ids
>     >>
>     >>
>     >> On Wed, Apr 30, 2014 at 10:40 AM, Alvaro Marín
>     <alvaro at hostalia.com <mailto:alvaro at hostalia.com>
>     >> <mailto:alvaro at hostalia.com <mailto:alvaro at hostalia.com>>> wrote:
>     >>
>     >>     Hi,
>     >>
>     >>     I've found this thread:
>     >>
>     >>    
>     http://lists.mailscanner.info/pipermail/mailscanner/2013-March/100441.html
>     >>
>     >>     about the long queue IDs in Postfix (>2.9).
>     >>     Is there any solution to this problem (MailScanner doesn't
>     recognize the
>     >>     long Postfix queue IDs)? I've tried that solution but it
>     doesn't work
>     >>     for me.
>     >>
>     >>     Thanks!
>     >>     Regards,
>     >>
>     >>     --
>     >>     Alvaro Marín Illera
>     >>     Hostalia Internet
>     >>     www.hostalia.com <http://www.hostalia.com>
>     <http://www.hostalia.com>
>     >>
>     >>     --
>     >>     MailScanner mailing list
>     >>     mailscanner at lists.mailscanner.info
>     <mailto:mailscanner at lists.mailscanner.info>
>     >>     <mailto:mailscanner at lists.mailscanner.info
>     <mailto:mailscanner at lists.mailscanner.info>>
>     >>     http://lists.mailscanner.info/mailman/listinfo/mailscanner
>     >>
>     >>     Before posting, read http://wiki.mailscanner.info/posting
>     >>
>     >>     Support MailScanner development - buy the book off the website!
>     >>
>     >>
>     >>
>     >>
>     >> --
>     >>
>     >> --
>     >> Jerry Benton
>     >> Mailborder Systems
>     >> www.mailborder.com <http://www.mailborder.com>
>     <http://www.mailborder.com>
>     >>
>     >>
>     >
>     >
> 
> 
>     --
>     Alvaro Marín Illera
>     Hostalia Internet
>     www.hostalia.com <http://www.hostalia.com>
> 
>     --
>     MailScanner mailing list
>     mailscanner at lists.mailscanner.info
>     <mailto:mailscanner at lists.mailscanner.info>
>     http://lists.mailscanner.info/mailman/listinfo/mailscanner
> 
>     Before posting, read http://wiki.mailscanner.info/posting
> 
>     Support MailScanner development - buy the book off the website!
> 
> 
> 
> 


-- 
Alvaro Marín Illera
Hostalia Internet
www.hostalia.com



More information about the MailScanner mailing list