MailScanner won't run ...

Jerry Benton jerry.benton at mailborder.com
Sun Nov 2 07:12:07 GMT 2014


I know it has been forever, but I updated this in the source. I have tested this in the lab and MailScanner will work with enable_long_queue_ids with this fix. Thanks, Michael.

https://github.com/MailScanner/v4/blob/master/mailscanner/bin/MailScanner/Postfix.pm


Jules recently sent me his entire development environment. I will try to get it on a dedicated server and put out a package this month with a new version. 

-
Jerry Benton
www.mailborder.com



> On Mar 10, 2013, at 12:24 PM, Michael Grimm <trashcan at odo.in-berlin.de> wrote:
> 
> Hi --
> 
> On 09.03.2013, at 21:31, Michael Grimm <trashcan at odo.in-berlin.de> wrote:
> 
>> Thus: Anybody here that could teach me what to test next?
> 
> First of all I'd like to thank all of you (this list's and private mails) for reassuring that my configuration and directory protections weren't wrong.
> 
> Thus, I used the old but tedious technique of inserting debugging messages into the code until I finally found the cause for my MailScanner's refusal of service:
> 
> A sample excerpt of my postfix' hold queue looks as follows:
> 
> | test> la /var/spool/postfix/hold/
> | -rwx------  1 postfix  postfix  - 547 Mar 10 16:37 3ZP6596tR1zKR1
> | -rwx------  1 postfix  postfix  - 547 Mar 10 16:37 3ZP6596xlmzKR2
> | -rwx------  1 postfix  postfix  - 547 Mar 10 16:37 3ZP659714vzKR3
> | -rwx------  1 postfix  postfix  - 547 Mar 10 16:37 3ZP65974zXzKR4
> 
> MailScanner simply fails to recognize those filenames because every test on queue directory an filenames uses the following regex ...
> 
> | '^([\\dA-F]+)$'
> 
> ... which is plain wrong (IMHO). Thus I modified that regex to ...
> 
> | '^([\\w]+)$'
> 
> ... and MailScanner is recognizing the correct HashDirDepth and every queued file, and now it does what it is supposed to do: scanning mails ;-)
> 
> That regex might well be optimized, I'm not that much an expert. And, I don't have any clue if my patch is going to break other parts (haven't done extensive testing up to now!).
> 
> Here's my udiff:
> --- Postfix.pm.old	2013-03-10 16:33:29.917729549 +0100
> +++ Postfix.pm	2013-03-10 16:36:23.032728554 +0100
> @@ -85,7 +85,9 @@
> 
>   # These need to be improved
>   # No change for V4
> -  $this->{HDFileRegexp} = '^([\\dA-F]+)$';
> +# GRIMM (modified regex to recognize filenames in /var/spool/postfix/hold)
> +# $this->{HDFileRegexp} = '^([\\dA-F]+)$';
> +  $this->{HDFileRegexp} = '^([\\w]+)$';
>   $this->{TFileRegexp} = '^tf-' . $$ . '-([\\dA-F]+)$';
>   # JKF Must fix this once I know what it's for.
>   $this->{QueueFileRegexp} = '^([\\d]+-[\\d]+)$';
> 
> To those which are running postfix as well: which versions do you run and how do your filenames look like? (I am running postfix 2.9.5) Not sure if I happened to alter some postfix option that might have impact to those filenames, though.
> 
> Thanks to all and with kind regards,
> Michael
> 
> 
> -- 
> MailScanner mailing list
> 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! 



More information about the MailScanner mailing list