Postfix: Mails aren't delivered with MS 4.41.3

Jacques Caruso jacques at MONACO.NET
Tue Jun 21 18:55:08 IST 2005


    [ The following text is in the "iso-8859-15" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hi Julian and everybody else,

I encountered a weird problem today : our mail server (running Debian
Testing) runs Postfix in a split-MTA fashion due to some constraints (I
don't want relayed mail to be scanned, and I don't have a clue how to do
this easily with the official installation method) and MailScanner along
with SA and ClamAV (basically it's quite a standard setup, except for
the two instances of Postfix running).

Today, the server was upgraded to Postfix 2.2.3 and MailScanner 4.41.3,
and we immediately encountered a problem : mails would just sit still in
the outgoing Postfix's `incoming' queue after being processed by MS. I
discovered that what bothered Postfix is that MS creates subdirectories
in the outgoing queue directory ; apparently, Postfix 2.2 expects a
flat, non-hashed hierarchy there, and won't process queue files hidden
in subdirectories unless I manually do a `postqueue -f'. I tried
searching the list archives, to no avail. But some further investigation
yielded better results. Apparently, what happens is this :

- Postfix is configured to have a hash depth of 1, but *only* for the  
  `defer' and `deferred' queues (note this is by default, I didn't set
  these values in either of my main.cf files) :

  [root at sceuzi][~]# grep hash_queue /etc/postfix/main.cf /etc/postfix.in/main.cf
  [root at sceuzi][~]# postconf hash_queue_depth hash_queue_names
  hash_queue_depth = 1
  hash_queue_names = deferred, defer

- MailScanner tries to determine the hash depth, but it uses for this
  purpose one of the two queues with a hash depth of 1 :

Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Hash dir depth value being calculated
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading . from dir . (/var/spool/postfix.in/deferred)
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading .. from dir . (/var/spool/postfix.in/deferred)
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading 4 from dir . (/var/spool/postfix.in/deferred)
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading . from inner dir 4
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading .. from inner dir 4
Jun 21 19:05:21 sceuzi MailScanner[13147]: JKF: Reading 1293535005C from inner dir 4
Jun 21 19:05:21 sceuzi MailScanner[13147]: Postfix queue structure is depth 1

- It then proceeds to create files in the `incoming' queue with the same
  depth, but Postfix expects a depth of 0 in that queue, and doesn't
  process the files.

Currently, I've just kludged the file PFDiskStore.pm to apply the steps
for a depth of 0 even if the stated depth is 1, but this is ugly and
wrong. It would be way better to modify FindHashDirDepth() to call
postconf and check the depth directly with Postfix, but I'm not sure
about how to do it exactly, as MailScanner is somewhat complex, and I
don't want to break everything...


Cheers,
-- 
[ Jacques Caruso <jacques at monaco.net>                  Développeur PHP ]
[ Monaco Internet                           http://monaco-internet.mc/ ]
[ Tél : (+377) 93 10 00 43                        Clé PGP : 0x41F5C63D ]
[ *  To err is human; to make a real disaster requires a computer!   * ]

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list