Filtering problem

Howard Robinson Howard at
Thu Nov 16 11:19:01 GMT 2006

Dear list
This (coincidentally) is another filter query. I have looked at EXAMPLES & README and it appears to confirm what I have set.

I am having a problem trying to stop MailScanner filtering out HTML & script
I am sending myself an email with html script in it for testing. 
In my MailScanner.conf I have included

Allow Script Tags = %rules-dir%/script.rules
Non Spam Actions = %rules-dir%/striphtml.rules
note %rules-dir% = /etc/MailScanner/rules

in /etc/MailScanner/rules/script.rules I have

To:     hrobinson at    yes
To:     howard at       yes
# I tried FromOrTo: on both these with no different result
FromOrTo:       default no

in /etc/MailScanner/rules/striphtml.rules I have

To:     hrobinson at deliver
To:     howard at deliver
# I tried FromOrTo: on both these with no different result
FromOrTo:       default striphtml deliver
(spaces are tabs by the way)
In Maillog the following lines relate to the email, Validipdaddress & Validrelay changed from real one.

Nov 15 16:25:17 blackhole2 MailScanner[29444]: Message kAFGOisP029475 from VALIDIPADDRESS (hrobinson at to is not spam, SpamAssassin (score=-2.53, required 5, autolearn=not spam, ALL_TRUSTED -3.30, BAYES_00 -0.05, HTML_80_90 0.15, HTML_MESSAGE 0.00, HTML_NONELEMENT_00_10 0.00, NO_REAL_NAME 0.01, SUBJ_ALL_CAPS 0.67) 
A few lines later
Nov 15 16:27:22 blackhole2 MailScanner[29444]: Content Checks: Detected and will convert HTML message to plain text in kAFGOisP029475 
A few lines later
Nov 15 16:28:30 blackhole2 sendmail[30284]: kAFGOisP029475: to=howard at, delay=00:03:46, xdelay=00:00:00, mailer=esmtp, pri=125149, relay=VALIDRELAY. [VALIDIPADDRESS], dsn=2.0.0, stat=Sent (Ok)

On Mailwatch the details of the message has the line  kAFGOisP029475 
Non Spam Actions = %rules-dir%/striphtml.rules

It must have html in as it's being picked up in Maillog.
Mailscanner is using the striphtml.rules as mailwatch says it is and that's confirmed in maillog but so it should follow the rule!
I can't help feeling I am missing something that will be blatently obvious but so far it remains a mistery.
Am I right in thinking that the filters will be carried out before it looks at the aliases list. Logically I can't see it working otherwise. 
Any ideas on what else could be amiss.


Howard Robinson,
(Senior Technical Development Officer),
Harper Adams University College,
Shropshire ,
TF10 8NB.

Tel. Direct 01952 815253
Tel. Switch Board 01952 820280
Fax 01952 814783
Email hrobinson at

More information about the MailScanner mailing list