Antiword errors causing Attachment too small

Jules Field MailScanner at ecs.soton.ac.uk
Wed Jul 13 17:08:35 IST 2011


Can you try this?

Edit /usr/lib/MailScanner/MailScanner/Antiword.pm
You should find line 194 says
   return 0 unless -f "$dir/$unpackfile" && -s "$dir/$unpackfile";
Move that line up a couple of lines, so it is just before the line
   $parententity->make_multipart;
and then restart MailScanner.

Does that help?

On 13/07/2011 16:29, Alessandro Bianchi wrote:
> Il 13/07/2011 17:19, Mark Sapiro ha scritto:
>> On 7/13/2011 12:33 AM, Alessandro Bianchi wrote:
>>
>>> I'm using MS 4.83-5 and antiword 0.37
>> Which is essentially the same as I have. As far as I can see there is no
>> difference between 4.83-5 and 4.84-1 that would affect this.
>
> i agree!
>>
>>> The errors I see are of two different kinds.
>>>
>>> While in any case the attach is seen with MIME application/msword
>>> antiword either says "yourfile.doc is not a Word Document" or it says
>>> "YOURFILE.DOC is not a Word Document. It is probably a Rich Text Format
>>> file YOURFILE.DOC is not a Word Document." and in both cases this leads
>>> MS to a "zero size attach" that causes removal of *any* attachment from
>>> the mail message and not only the offending one.
>> I am not seeing this.
>>
>>
>>> Obiovusly this is untrue since this *is* a word document and if I
>>> download it direcly from the blocked message and open it in LibreOffice
>>> it opens perfectly as a word document format, and the same happens if i
>>> forward it to a user using a non protected acoount and he opens it using
>>> MS Word.
>>>
>>> Funny enougth I tried the file command aganinst two of the offending
>>> attachment causing the "zero size", and this is surprising:
>>>
>>> First file:
>>> file yourfile.doc - : OpenDocument Text Zip archive data (so this is
>>> most likely an OpenOffice document saved with the .doc extension or
>>> conversion) In this case antiword may be right not to embed the text but
>>> what is the reason fro removing every attachment from the message?
>> Or it is a MS-Word .docx file named as .doc.  I don't see what you see
>> in this case. If I have such a document and manually run antiword on it,
>> antiword says "xxx.doc is not a Word Document." and returns exit status
>> 1. If I attach the file to an email and send it through MailScanner,
>> MailScanner does not alter the original attachment.
>>
>> What is your setting for 'Antiword' in MailScanner.conf or
>> MailScanner/conf.d/*? Is it different from the default
>>
>> Antiword = /usr/bin/antiword -f
>>
>> If not, I don't know why this doesn't work for you as it does for me.
>> Maybe it's a perl module difference?
>>
>> [...]
>>> The only solution I found so far is to disable the antiword conversion
>>> at all, but I'd like to find a fix since my users love this feature
> Hi
>
> My settings are as follows:
>
> Antiword = /usr/bin/antiword -f
> Antiword Timeout = 50
>
> The error doesn't happen all the times and on every document, but only 
> with some documents.
>
> Unfortunately while earlier we had very few of those damned errors, in 
> tha last weeks they have increased so much to force me to disable the 
> feature.
>
> It happens about 4 times every 10 documents, and the users get very 
> annoyed about that ...
>
> I've supposed that it may be related to the specific application 
> generating the doc, but this is just a guess ...
>
> Thank you
>
> Alessandro Bianchi
>
> -- 
>
> SkyNet SRL
>
> Via Maggiate 67/a - 28021 Borgomanero (NO) - tel. +39 
> 0322-836487/834765 - fax +39 0322-836608
>
> http://www.skynet.it <http://www.skynet.it/>
>
> Autorizzazione Ministeriale n.197
>
> Le informazioni contenute in questo messaggio sono riservate e 
> confidenziali ed è vietata la diffusione in qualunque modo eseguita.
> Qualora Lei non fosse la persona a cui il presente messaggio è 
> destinato, La invitiamo ad eliminarlo ed a distruggerlo non 
> divulgandolo, dandocene gentilmente comunicazione.
> Per qualsiasi informazione si prega di contattare info at skynet.it 
> (e-mail dell'azienda). Rif. D.L. 196/2003
>
>
>
>
> Jules
>
> -- 
> Julian Field MEng CITP CEng
> www.MailScanner.info
>
> Buy the MailScanner book at www.MailScanner.info/store
> Need help customising MailScanner? Contact me!
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
> Follow me at twitter.com/JulesFM
>
> 'All programs have a desire to be useful' - Tron, 1982

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20110713/356314be/attachment.html


More information about the MailScanner mailing list