RFC problems ...
Yann Bachy
yann.b at capensis.fr
Thu Jan 22 16:50:46 GMT 2009
Hi
thanks for your help but I kind of solved the problem in the
mean-time... I'll explain you what I did:
I activated the brokenrfc2231 option to get the following header:
--=_2qw5ii3ew2uo
Content-Type: application/vnd.oasis.opendocument.spreadsheet;
name="=?utf-8?b?dMOpdMOpw6Aub2Rz?=";
name*="utf-8''t%C3%A9t%C3%A9%C3%A0.ods"
Content-Disposition: attachment;
filename="=?utf-8?b?dMOpdMOpw6Aub2Rz?=";
filename*="utf-8''t%C3%A9t%C3%A9%C3%A0.ods"
Content-Transfer-Encoding: base64
then I changed the following file:
/var/www/horde/lib/Horde/MIME/Part.php
at the following block:
/* Add any disposition parameter information, if available. */
if (!empty($name)) {
$encode_2231 = MIME::encodeRFC2231('filename', $name,
$charset);
/* Same broken RFC 2231 workaround as above. */
if (!empty($GLOBALS['conf']['mailformat']['brokenrfc2231']) &&
(strpos($encode_2231, '*=') !== false)) {
$disp .= '; filename="' . MIME::encode($name,
$charset) . '"';
}
#$disp .= '; ' . $encode_2231;
}
I commented out the following line:
#$disp .= '; ' . $encode_2231;
So I get a header that looks like the following:
--=_mjzeikmmlhk
Content-Type: application/vnd.oasis.opendocument.spreadsheet;
name="=?utf-8?b?dMOpdMOpw6Aub2Rz?=";
name*="utf-8''t%C3%A9t%C3%A9%C3%A0.ods"
Content-Disposition: attachment;
filename="=?utf-8?b?dMOpdMOpw6Aub2Rz?="
Content-Transfer-Encoding: base64
now outlook will correctly read the filename, and mailscanner accepts
to check the message...
Don't hesitat if you've got any further questions... or comments ;)
thanks anyway!
--
Yann Bachy
Quoting Julian Field <MailScanner at ecs.soton.ac.uk>:
> This will be a proplem in MIME-tools, over which I don't really have
> any control.
> So I'm not quite sure what to suggest at this point.
>
> Can you put a sample message, demonstrating the problem, on the web
> somewhere so I can download it and try it?
>
> On 21/1/09 16:54, Kai Schaetzl wrote:
>> Yann Bachy wrote on Wed, 21 Jan 2009 17:39:25 +0100:
>>
>>
>>> the problem I've got is that now MailScanner refuses to analyse the
>>> message and blocks it automaticly ... is there anyone that has got an
>>> idea?
>>>
>>
>> short term: don't scan messages from your own server
>> long term: Julian will need to have a look
>>
>> Also: in general it's better to stay with ASCII for *any* filename you
>> create! Then you don't hit such a problem, anywhere.
>>
>> Kai
>>
>>
>
> Jules
>
> --
> Julian Field MEng CITP CEng
> www.MailScanner.info
> Buy the MailScanner book at www.MailScanner.info/store
>
> 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: http://www.jules.fm/julesfm.asc
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list