[MAILSCANNER] Convert HTML To Text rule doesn't work as expected

Bart Smit mailscanner at SMITS.CO.UK
Wed Sep 21 10:39:22 IST 2005


I am having problems with stripping HTML from inbound messages. One of our
customers wants all HTML stripped but recently they have requested that
messages from a trusted sending domain need to arrive with HTML intact.

These are my relevant configuration details (names and IP's changed to
protect the innocent). 

I have this line in MailScanner.conf:
Convert HTML To Text = %rules-dir%/strip.html.rules

The original rule worked very well; only the single recipient domain had
their messages stripped. /etc/MailScanner/rules/strip.html.rules contained:
To:  *@recipient.domain  yes
FromOrTo: default    no

To test with a single recipient, I changed this to:
To:  recipient at recipient.domain no
To:  *@recipient.domain  yes
FromOrTo: default    no

and reloaded the service. This had no effect, so I added:
From:  10.10.10.10              no
To:  recipient at recipient.domain no
To:  *@recipient.domain  yes
FromOrTo: default    no

But still the messages are being stripped as shown from this maillog snippet:

Sep 20 02:55:49 mailscanner sendmail[21571]: j8K6tnVS021571:
from=<sender at sender.domain>, size=103382, class=0, nrcpts=1,
msgid=<00e201c5bdb0$533f7a90$4301a8c0 at sender.domain>, proto=ESMTP,
daemon=MTA, relay=relay.senderdomain.com [10.10.10.10]

Sep 20 02:55:49 mailscanner sendmail[21571]: j8K6tnVS021571:
to=<recipient at recipient.domain>, delay=00:00:00, mailer=esmtp, pri=133382,
stat=queued

Sep 20 02:55:58 mailscanner MailScanner[10446]: Content Checks: Detected and
will convert HTML message to plain text in j8K6tnVS021571

Sep 20 02:56:00 mailscanner sendmail[21648]: j8K6tnVS021571:
to=<recipient at recipient.domain>, delay=00:00:11, xdelay=00:00:02,
mailer=esmtp, pri=223382, relay=[217.13.144.114] [217.13.144.114],
dsn=2.0.0, stat=Sent ( <00e201c5bdb0$533f7a90$4301a8c0 at sender.domain> Queued
mail for delivery)

The server has been rebooted for another reason but this has had no effect
on this problem. I'm running version 4.40.11 and I cannot see any relevant
fixes in the change log of later versions.

Bart...

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list