MailScanner won't run ...
Michael Grimm
trashcan at odo.in-berlin.de
Sun Mar 10 16:24:59 GMT 2013
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
More information about the MailScanner
mailing list