New functionality?

Julian Field mailscanner at ecs.soton.ac.uk
Mon Nov 17 16:57:58 GMT 2003


At 14:54 17/11/2003, you wrote:
>After having some internal problems with my exchange server(cringe), which
>our MailScanner server, must forward all mail to afterwards, I thought of
>some cleaver ideas, perhaps they are not original, but here is something I
>would like to see:
>
>MailScanner to have the ability to specify separate outbound directories,
>and therefore Queue runners for the different levels of Mail:  1 for
>Non-Spam, 1 for Spam, 1 for High-Scoring Spam.
>
>so.. i.e. (sendmail)
>
>                 /var/spool/mqueue for non-spam email
>                 /var/spool/mqueue.spam for spam email
>                 /var/spool/mqueue.highspam for high scoring email.
>
>And in addition, each queue directory would have a Queue Runner associated
>for it.

You can do this already with a very simple Custom Function.
Here is how you do it:

In MailScanner.conf, set
Outgoing Queue Dir = &MyQueueDir

and then in CustomConfig.pm add this code.

sub MyQueueDir {
         my($message) = @_;

         return '/var/spool/mqueue' unless $message; # catch-all if message
is duff
         return '/var/spool/mqueue.highspam' if $message->{ishigh};
         return '/var/spool/mqueue.spam' if $message->{isspam};
         return '/var/spool/mqueue';
}

Note: I haven't tested that at all, but it should work okay.

Create the 2 new queue directories, restart MailScanner and run your new
extra queue runners like this
/usr/sbin/sendmail -q30m -OQueueDirectory=/var/spool/mqueue.highspam
/usr/sbin/sendmail -q20m -OQueueDirectory=/var/spool/mqueue.spam

--
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