Preventing multple signatures in email conversation?

Julian Field MailScanner at
Sun Apr 26 10:08:14 IST 2009

On 25/04/2009 21:31, Kai Schaetzl wrote:
> Julian Field wrote on Sat, 25 Apr 2009 17:17:42 +0100:
>> There is
>> Allow Multiple HTML Signatures = no
>> which uses a marker in the HTML Signature to know not to add the
>> signature again, but with text signatures there is no way of inserting
>> "hidden text" in any way so that we would know not to add the signature
>> again.
>> There is also
>> Dont Sign HTML If Headers Exist = # In-Reply-To: References:
>> so it detects when not to add the HTML signature. Unfortunately I can't
>> tell if the text signature has already been added, without searching the
>> entire message for signs of the signature, which would be really slow
>> and unreliable as a correspondent's email app may have re-wrapped the
>> text in the message, so you can't just search for matching lines. It
>> would be very slow with multi-line sigs especially.
> I don't think this applies here, HTML or not. As I understand the point is
> that sending a message back and forth between two correspondents four times
> you may have 8 signatures in the end, most of them somewhere in the quoted
> text. He wants to have these signatures removed if I understand correctly.
> The options you mention can help with accidental double-adding of a
> signature by MailScanner (not sure in which scenario that could happen,
> maybe if you have more than one gateway server and all of them could be
> used), but not if a signature is already present somewhere deep in the
> mail, right?
That scenario does occur and I have already taken care of it, see the 
"Sign Messages Already Processed" option in MailScanner.conf.
> One possible way with text signatures might be to remove all lines that
> start with a signature marker and the next lines until it reaches a blank
> line or exceeds four lines. Might FP sometimes. But for that you have to
> scan the message completely. As I understand you wanted to avoid this.
Exactly, I don't want to have to do that, it'll slow things down quite a 
lot for every message, when you're only trying to target a tiny fraction 
of messages. I would rather leave it to the mail clients to correctly 
chop off the sig when they quote the message text in a reply or forward.


Julian Field MEng CITP CEng
Buy the MailScanner book at

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

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

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