{Disarmed} Re: Graphic inline Signature
Julian Field
MailScanner at ecs.soton.ac.uk
Mon Apr 14 17:01:37 IST 2008
Peter Farrow wrote:
> Dave Jones wrote:
>>> Dave Jones wrote:
>>>
>>>>> Dave Jones wrote:
>>>>>
>>>>>>> Dave Jones wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Can someone post a sample of a working inline.sig.html? I am getting
>>>>>>>> an email with the attached jpg file but it only shows an image box of
>>>>>>>> 186 x 23 with no image inside it. Am I missing something in my html
>>>>>>>> file that puts it inline within the body?
>>>>>>>>
>>>>>>>> _*MailScanner.conf*_
>>>>>>>> Attach Image To Signature = yes
>>>>>>>> Inline HTML Signature = %rules-dir%/inline-html
>>>>>>>>
>>>> -signature.rules
>>>>
>>>>>>>> Signature Image Filename = %rules-dir%/signature-image-filename.rules
>>>>>>>> Signature Image <img> Filename = signature.jpg
>>>>>>>>
>>>>>>>> _*cat inline-html-signature.rules*_
>>>>>>>> From: me <at> mydomain.com <http://mydomain.com/> <mailto:me
>>>>>>>>
>>>> <mailto:me> <at> mydomain.com <http://mydomain.com/>>
>>>>
>>>>>>>> %report-dir%/inline.oneteam.sig.html
>>>>>>>> FromOrTo: default no
>>>>>>>>
>>>>>>>> _*cat signature-image-filename.rules *_
>>>>>>>> From: me <at> mydomain.com <http://mydomain.com/> <mailto:me
>>>>>>>>
>>>> <mailto:me> <at> mydomain.com <http://mydomain.com/>>
>>>>
>>>>>>>> %report-dir%/OneTeam.jpg
>>>>>>>> FromOrTo: default no
>>>>>>>>
>>>>>>>> _*cat inline.oneteam.sig.html*_
>>>>>>>> <img width=186 height=23 src="signature.jpg">
>>>>>>>>
>>>>>>>>
>>>>>>> You need to call it src="cid:signature.jpg"
>>>>>>>
>>>>>>>
>>>>>> I made my "inline.oneteam.sig.html" have "<img width=186 height=23
>>>>>> src="cid:signature.jpg>" " but now the src= text value is getting
>>>>>> dropped off when I view the source of the email. This is a snip of
>>>>>> the end of the source:
>>>>>>
>>>>>> </BODY><img width=186 height=23 src=>
>>>>>> </HTML>
>>>>>>
>>>>>>
>>>>> That's because you've got the quotes in the wrong place.
>>>>> src="cid:signature.jpg"
>>>>> just as I said last time, so the whole thing looks like
>>>>> <img width=186 height=23 src="cid:signature.jpg">
>>>>>
>>>> My apologies for the previous bad posting. I had the real file
>>>> exactly as you have it above and still get the resulting HTML dropping
>>>> the src= value inside the img tag.
>>>>
>>> Here is my (working fine) setup. Remember that MailScanner will always
>>> add a text signature to a plain-text message, and will only add an HTML
>>> signature to the HTML part of an HTML message. So if you are using
>>> Thunderbird, you need to pursuade it to send HTML *and* plain-text parts
>>> of the message. You can do this by adding a bold space on the last line
>>> of the message. That's enough to trigger it and doesn't show up visibly
>>> in the resulting message.
>>>
>>
>>
>>> Dave ---- if you want to add this to the Wiki, it might be a good idea.
>>> Just register yourself and add it in the configuration section.
>>>
>>
>>
>>> ***** MailScanner.conf:
>>> Inline HTML Signature = %rules-dir%/inline.html.sig.rules
>>> Inline Text Signature = %rules-dir%/inline.text.sig.rules
>>> Signature Image Filename = %report-dir%/jules/julessig.png
>>> Signature Image <img> Filename = julessig.png
>>> Attach Image To Signature = %rules-dir%/attach.image.to.sig.rules
>>>
>>
>>
>>> ***** %rules-dir%/inline.html.sig.rules:
>>> From: sysjkf at ecs.soton.ac.uk
>>> /etc/MailScanner/reports/ECS/jules/jules.inline.sig.html
>>> From: *@jules.fm
>>> /etc/MailScanner/reports/ECS/jules/jules.fm.inline.sig.html
>>> FromOrTo: default /etc/MailScanner/reports/ECS/inline.sig.html
>>>
>>
>>
>>> ***** %rules-dir%/inline.text.sig.rules:
>>> From: sysjkf at ecs.soton.ac.uk
>>> /etc/MailScanner/reports/ECS/jules/jules.inline.sig.txt
>>> From: *@jules.fm
>>> /etc/MailScanner/reports/ECS/jules/jules.fm.inline.sig.txt
>>> FromOrTo: default /etc/MailScanner/reports/ECS/inline.sig.txt
>>>
>>
>>
>>> ***** %rules-dir%/attach.image.to.sig.rules:
>>> From: sysjkf at ecs.soton.ac.uk yes
>>> From: *@jules.fm yes
>>> FromOrTo: default no
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/jules/jules.inline.sig.html:
>>> <br /><img src="cid:julessig.png">
>>> <br />--
>>> <br />sysjkf at ecs.soton.ac.uk
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/jules/jules.fm.inline.sig.html
>>> <br /><img src="cid:julessig.png">
>>> <br />--
>>> <br />Jules at Jules.FM
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/inline.sig.html:
>>> <br />--
>>> <br />This message has been scanned for viruses and
>>> <br />dangerous content by
>>> <a href=*MailScanner has detected a possible fraud attempt from "www.mailscanner.info" claiming to be* "http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
>>> <br />believed to be clean.
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/jules/jules.inline.sig.txt:
>>> Jules
>>> --
>>> sysjkf at ecs.soton.ac.uk
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/jules/jules.fm.inline.sig.txt:
>>> --
>>> Jules at Jules.FM
>>>
>>
>>
>>> ***** /etc/MailScanner/reports/ECS/inline.sig.txt:
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>
>>
>>> ***** THAT'S IT! *****
>>>
>>
>>
>>> Jules
>>>
>> Thanks for the detailed configs. I had my settings correct and nearly
>> identical to your settings. The problem still exists that the image
>> is not getting displayed inline on a number of different email clients
>> (Outlook, Scalix, Gmail, etc.). I looked at my raw queue files in my
>> quarantine (I save everything that is not high spam on my low-volume
>> server at home) and the inline.html file is getting appended properly.
>> Now it appears to be the "Content-ID:" multipart header is not
>> getting generated in the MIME encoding so there is nothing to match my
>> src="cid:signature.jpg" img tag. Could this be the problem?
>>
>> Working inline email image:
>> ------_=_NextPart_001_01C89E3C.224B45D2
>> Content-Type: image/gif;
>> name="image001.gif"
>> Content-Transfer-Encoding: base64
>> Content-ID: <image001.gif at 01C89E12.38C00F50>
>> Content-Description: image001.gif
>> Content-Location: image001.gif
>>
>> Non-working inline email image:
>> ------------=_1208183216-10649-0
>> Content-Type: image/jpeg; name="signature.jpg"
>> Content-Disposition: attachment; filename="signature.jpg"
>> Content-Transfer-Encoding: base64
>> MIME-Version: 1.0
>> X-Mailer: MIME-tools 5.425 (Entity 5.425)
>>
>>
>>
> Just for the record,
>
> Mine displays an empty box too...
>
> Gave up trying to make it work..
Works great for me (inevitably). The only suggestion I have is to edit
/usr/lib/MailScanner/MailScanner/Message.pm. Around line 4407 there
should be a line that says this:
Id => '<' . $internalname .
'>');
Change that to
'Content-Id:' => '<' .
$internalname . '>');
Then
service MailScanner restart
and let me know if this helps at all.
Jules
--
Julian Field MEng CITP CEng
www.MailScanner.info
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
--
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