Beta 4.51.1: "Add TNEF Contents"

Julian Field MailScanner at
Thu Feb 23 20:47:38 GMT 2006

Hash: SHA1

Rick Cooper wrote:
>> -----Original Message-----
>> From: mailscanner-bounces at
>> [mailto:mailscanner-bounces at]On Behalf Of Julian
>> Field
>> Sent: Thursday, February 23, 2006 2:26 PM
>> To: MailScanner discussion
>> Subject: Re: Beta 4.51.1: "Add TNEF Contents"
>> Hash: SHA1
>> Rick Cooper wrote:
>>>     -----Original Message-----
>>>     *From:* mailscanner-bounces at
>>>     [mailto:mailscanner-bounces at]*On Behalf Of
>>>     *shuttlebox
>>>     *Sent:* Thursday, February 23, 2006 4:29 AM
>>>     *To:* MailScanner discussion
>>>     *Subject:* Re: Beta 4.51.1: "Add TNEF Contents"
>>>     On 2/23/06, *Julian Field* <MailScanner at
>>>     <mailto:MailScanner at>> wrote:
>>>         I always try to leave as much of the original mail in place as
>>>         possible, so I chose to just add to it rather than replace it.
> [...]
>>>     [Rick Cooper] 
>>>     I guess I should have mentioned that in Outlook it does indeed
>>>     show the attachments twice. Once in the body of the RTF message
>>>     and once in the normal attachment (paperclip) section. If I am
>>>     remembering correctly ytnef removes the tnef attachments and
>>>     creates the new attachments. The Outlook users would have to open
>>>     the attachments for, say meetings and such, but they still work. I
>>>     thought it was working as Julian intended, that's why I didn't
>>>     mention it
>> I didn't want to remove the winmail.dat file in case the TNEF expander 
>> wasn't able to extract all the attachments. If that happens at least 
>> Outlook users can still get at everything. I don't like removing things 
>> from the message unless it's really necessary.
> I was kinda playing with this (day off today) and you can add winmail.dat (or winmail\d{0,}\.dat) to the filename rules and winmail.dat is removed (with a warning) and the other attachments remain. Of course I wasn't interested in the warning and found a fairly easy way to put a trigger in the user report portion of the rule to tell MS not to modify the subject or body with  warnings:
> deny+delete winmail\.dat$ Removed a winmail.dat file #NO_USER_REPORT
> If the user report =~ /#NO_USER_REPORT/sm then a global flag is *Not* set true for that attachment when it's stripped and the report/modifications are not made unless another rule is hit that doesn't contain the #NO_USER_REPORT string, but the log always shows the log warning "Removed a winmail.dat file"
>  Then I found an odd thing. If I send a rich text message with no attachments. the entire body is removed when I have the deny[+delete] rule for winmail.dat. I use the external tnef processor so I modified the command to:
> -f $dir/$tnefname -C $dir --overwrite  --save-body --body-pref=htr
> and voila! The message body returns and there is an attachment called message.rtf added that includes the rtf version of the message body. What ever is causing that must have something to do with my hither to unmentioned problem with messages containing winmail.dat and no attachments having the entire message body stripped. Any idea as to what causes that?
To put it briefly, not a clue.

I have got the
Use TNEF Contents = no / add / replace
What should be the default? I am going to go for "replace" unless anyone 
says otherwise.

Your thoughts please.

- -- 
Julian Field
Buy the MailScanner book at
Professional Support Services at
MailScanner thanks transtec Computers for their support

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

Version: PGP Desktop 9.0.5 (Build 5050)


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