Multiple inline html signatures

BlaaT 0001 blaat0001 at
Sat Feb 13 18:40:54 GMT 2010

Hello everybody,

I've been struggling with MailScanner's options to avoid inserting an
additional inline HTML signature.

We're using the "Sign Clean Messages" option to add a disclaimer to
our outgoing e-mails. Replies to those e-mails include our disclaimer
once the message "comes back in". After a while our disclaimer is
added to the conversation several times and I'm trying to put a stop
to this.

MailScanner includes options to prevend adding HTML signatures to
e-mails that are allready signed (replies for instance where the
disclaimer is allready part of the body).

My settings for relevant options:

Signature Image Filename = %report-dir%/signature.jpg
Signature Image <img> Filename = signature.jpg
Sign Messages Already Processed = no
Sign Clean Messages = %rules-dir%/sign.clean.messages.rules (yes for
outgoing messages)
Attach Image To Signature = %rules-dir%/
Attach Image To HTML Message Only = yes
Allow Multiple HTML Signatures = yes
Dont Sign HTML If Headers Exist = # In-Reply-To:

The "Allow Multiple HTML Signatures = yes" is rather funny. "Yes"
means that MailScanner will try to avoid double signatures:

# This option can be used to stop any duplication of en email signature
# appearing in the HTML of an email message. It looks for the "alt"
# attribute in the <img> tag specifying the image to be inserted int the
# HTML signature. If you want to use this option without inserting an image
# into the signature, simply specify an <img> tag without a "src" attribute.
# If the "alt" tag appears, and contains the word "MailScanner" and the
# word "Signature" and the %org-name% you specified at the top of this file,
# then the message is considered to already be signed. If this option is
# also set to "yes", then it will not be signed again. Multiple image
# signatures at the bottom of a message can make the message very large and
# ugly once it has been replied to a couple of times.
# This can also be the filename of a ruleset.

In my HTML signature I've included the following line:

<img alt="MailScanner Signature %org-name%" src="cid:signature.jpg"
width="153" height="23">

(I've allready tried replacing %org-name% with the org-name from the
MailScanner.conf, no spaces in the name like it should)

The image "signature.jpg" is included in the disclaimer with the right
"ALT" tag as intended. Unfortunately the image + disclaimer are added
to every outgoing mail, including the ones allready signed.
As far as I can think of it should work with the settings specified.
Unfortunately it doesn't.
I've ran out of ideas on how to get this to work. I don't understand
why it's not working.

Our users are running Outlook 2003 mail clients with a MS Exchange
2007 server. MailScanner HTML protect features (disarm html) are
disabled (yes, no, disarm settings are always set to "yes" to allow

When I configure the "Dont Sign HTML If Headers Exist = #
In-Reply-To:" settings (remove the #-dash) then replies don't include
a signature, so that works.

Does anybody have any more suggestions on how to stop MailScanner from
adding multiple signatures to outgoing e-mails?


I'm running:

[root at mailscan01 /opt/MailScanner/bin]# ./MailScanner --version
Running on
FreeBSD 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sun
Dec  6 01:22:01 CET 2009
root at
This is Perl version 5.008009 (5.8.9)

This is MailScanner version 4.79.11
Module versions are:
1.00    AnyDBM_File
1.30    Archive::Zip
0.23    bignum
1.10    Carp
2.015   Compress::Zlib
1.119   Convert::BinHex
0.17    Convert::TNEF
2.121_17        Data::Dumper
2.27    Date::Parse
1.02    DirHandle
1.06    Fcntl
2.77    File::Basename
2.13    File::Copy
2.01    FileHandle
2.07_02 File::Path
0.22    File::Temp
0.92    Filesys::Df
3.60    HTML::Entities
3.62    HTML::Parser
3.57    HTML::TokeParser
1.25    IO
1.14    IO::File
1.13    IO::Pipe
2.04    Mail::Header
1.89    Math::BigInt
0.22    Math::BigRat
3.08    MIME::Base64
5.427   MIME::Decoder
5.427   MIME::Decoder::UU
5.427   MIME::Head
5.427   MIME::Parser
3.08    MIME::QuotedPrint
5.427   MIME::Tools
0.13    Net::CIDR
1.25    Net::IP
0.18    OLE::Storage_Lite
1.04    Pod::Escapes
3.08    Pod::Simple
1.15    POSIX
1.19    Scalar::Util
1.81    Socket
2.21    Storable
1.4     Sys::Hostname::Long
0.27    Sys::Syslog
1.40    Test::Pod
0.94    Test::Simple
1.9719  Time::HiRes
1.02    Time::localtime

More information about the MailScanner mailing list