Feature request: Multiple rules for MailScanner variable.

Julian Field MailScanner at ecs.soton.ac.uk
Fri Feb 27 09:18:48 GMT 2009

Hash: SHA1

On 27/2/09 01:18, Jim Barber wrote:
> Hi Jules.
> I have a CustomFunction that checks for users that are using SMTP AUTH.
> eg:
>    Spam Checks = &CheckSMTPAuth
> The above will skip spam checks for anyone that has authenticated to 
> our mail server.
> I also have entries in my MailScanner.conf file that refer to rules 
> files to turn off certain features for trusted networks.
> eg:
>    Also Find Numeric Phishing = %rules-dir%/phishing.rules
> Where the /etc/MailScanner/MailScanner/rules/phishing.rules file will 
> contain entries like so:
>    # Local host
>    From:    no
>    # Internal subnets
>    From:       10.          no
>    From:       192.168.     no
>    FromOrTo:   default      yes
> Which handles not doing numeric phishing checks on emails sent by 
> internal users.
> However, what if I want to skip numeric phishing checks for both the 
> networks defined in the rules file and anyone that has authenticated 
> to the mail server?
> As far as I can tell, at the moment I'd need to make a new custom 
> function that does both the SMTP AUTH check, and parses the rule file 
> (or get a list of networks in any number of other ways).
> I was wondering if you could add a feature that is something like the 
> following.
> Either allow a syntax like:
>    Also Find Numeric Phishing = %rules-dir%/phishing.rules OR 
> &CheckSMTPAuth
> Or being able to specify the same parameter multiple times and have 
> each one checked.
> eg:
>    Also Find Numeric Phishing = %rules-dir%/phishing.rules
>    Also Find Numeric Phishing = &CheckSMTPAuth
> I guess the difficulty would be how to handle the "default" rules when 
> you have multiple checks going on.
> Maybe just leave it up to the mail administrators to create custom 
> rule files that don't have a default on the end, except for in the 
> last one to be referenced... Maybe that would be a pain to support on 
> these lists though :(
> Any thoughts?
> Or is the functionality I am looking for already there and I'm just 
> missing it?
You can do it with a Custom Function that also looks at a ruleset. Look in
and you'll find an example showing you exactly how to do it.


- -- 
Julian Field MEng CITP CEng
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

Version: PGP Desktop 9.9.1 (Build 287)
Comment: Use Enigmail to decrypt or check this message is legitimate
Charset: ISO-8859-1


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list