ZMailer - ROUTERDIRHASH

Mariano Absatz mailscanner at LISTS.COM.AR
Tue Apr 27 20:47:20 IST 2004


Hi people,

we developed an optional add-in for ZMailer that high traffic people may be
interested in.

The original (current) MailScanner+ZMailer implementation only supports a
single 'Incoming Queue Dir'... at least, ZMailer-wise.

The point is that, when ZMailer uses directory hashes for the smtpserver (the
process 'before' MailScanner), it must also use them for the router (the
process 'after' MailScanner)... that is, there's a ZMailer setting (not used
by default, but very recommended when you handle hundreds of messages a
minute) that allows you to spread the queue directory in 26 subdirectories
(named A thru Z)... but if you configure the smtpserver to use that
structure, the router will look in the same structure, so you must spread
MailScanner output queue files in the 26 directories.

That is, if you say:
Incoming Queue Dir = /var/spool/postoffice-incoming/router/?

You should also say:
Outgoing Queue Dir = /var/spool/postoffice/router/?

But that last setting is completely invalid.

You might just say:
Outgoing Queue Dir = /var/spool/postoffice/router/a

and you'd be using 26 dirs for input and only one for output, but at least
one that is checked by the router... anyway, we developed a small set of
functions that you can drop in the CustomFunctions directory and get it
right.

The setting (in MailScanner.conf) becomes:
Outgoing Queue Dir = &ChooseZMOutQueueDir

And you have to configure the directory glob within the ZMRouterDirHash.pm
file (near the top), like:

my @ZMOutQueueDirs=("/var/spool/postoffice/router/?");

The init function checks that the outgoing queue directories are in the same
filesystem as the incoming ones, and it also verifies their existence...

It will log errors but, if at least one of the entries exist and is in the
correct file system, it will start and log the actual number of output queue
directories to be used.

We currently have this in production with MailScanner 4.29.7 and it works
without a hitch. AFAIK, this should be MailScanner and ZMailer version
agnostic (for old MailScanner versions, you can simply add the contents of
the file to the CustomConfig.pm file).

Julian,

I copied your standard boilerplate and added a couple of lines for the actual
guilty people behind this tiny module... if you'd like to add it to the
distribution, do it as you please.

Regards.

--
Mariano Absatz
El Baby
----------------------------------------------------------
bashian roulette:
[ $(($RANDOM%6)) -eq 0 ] && rm -rf ~



-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at    http://www.mailscanner.biz/maq/     and the archives
at    http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZMRouterDirHash.pm
Type: application/octet-stream
Size: 5091 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20040427/5d029d7d/ZMRouterDirHash.obj


More information about the MailScanner mailing list