Important ZMailer patch

Julian Field mailscanner at ecs.soton.ac.uk
Wed Mar 31 21:23:32 IST 2004


Consider your comment at the end of your posting, I'll leave this out this 
time around so you have more time to polish the code and possibly add some 
more docs to it.

I am considering splitting up CustomConfig.pm into a whole bundle of files 
in the CustomFunctions directory with each one implementing 1 set of 
functions. This should make it a lot easier to see what there is and use 
the functionality you want. I am worried that there is now quite a lot 
there, but no-one ever finds out what is possible such as the IPBlock 
functions which are potentially very useful to busy sites for DoS protection.

At 21:17 31/03/2004, you wrote:
>El 31 Mar 2004 a las 20:06, Julian Field escribió:
>
> > I have just applied the patch, seemed to go okay. This will be in
> > tomorrow's stable release.
>Great!
>
>I have another thing we developed that is optional, but high traffic people
>may need it.
>
>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 message 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 put in CustomConfig.pm (or in the brand new
>CustomFunctions directory) and get it right.
>
>The setting (in MailScanner.conf) becomes:
>Outgoing Queue Dir = &ChooseZMOutQueueDir
>
>We've already tested and it works.
>
>
>================= CUT HERE AND PASTE IN CustomConfig.pm ==================
># ZMailer only: if you have set
># ROUTERDIRHASH=1
># in your zmailer.conf you have to put (in MailScanner.conf) the
># following settings:
>#
># Incoming Queue Dir = /var/spool/postoffice-incoming/router/?
># Outgoing Queue Dir = &ChooseZMOutQueueDir
>
>my @zmaileroutdirs=("/var/spool/postoffice/router/?");
>
>sub InitChooseZMOutQueueDir {
>   my @aux=@zmaileroutdirs;
>   @zmaileroutdirs=();
>   for (@aux) {
>     push @zmaileroutdirs, ( /[\*\?\{]/ ) ? glob($_) : $_;
>     if( ! -d $zmaileroutdirs[-1] ) {
>       MailScanner::Log::DieLog("Some outgoing queue dirs aren't dirs" .
>                            " (%s)", $zmaileroutdirs[-1]);
>     }
>   }
>   unless( @aux ) {
>     MailScanner::Log::DieLog("zmaileroutdirs is empty");
>   }
>}
>sub EndChooseZMOutQueueDir {
>}
>sub ChooseZMOutQueueDir {
>   return $zmaileroutdirs[rand( int( @zmaileroutdirs ) ) ];
>}
>======================== CUT HERE =========================
>
>
>It could be a bit more foolproof (e.g. we may want to do something à la
>'CheckQueuesAreTogether' for these directories), but if you are doing this,
>you should know what you're doing...
>
>
>--
>Mariano Absatz
>El Baby
>----------------------------------------------------------
>Macho Law forbids me from admitting I'm wrong.

-- 
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654




More information about the MailScanner mailing list