E-mail attachment loses file name

0 votes
asked Nov 12, 2010 by davidatpfl (170 points)
edited Mar 21, 2011

I have an e-mail with an attachment that is being saved with an incomplete file name. The part of the name after the first space is missing, including the extension. The raw message data looks like this:

--Apple-Mail-10--296320181 Content-Transfer-Encoding: base64 Content-Type: application/pdf; x-unix-mode=0644; name=1234 abc def.pdf X-WatchGuard-AntiVirus: scanned '1234abcdef.pdf'. clean action=allow

[large chunk of encoded data here]

But the file is saved as "1234". When I open the e-mail in Outlook Express, I see the full file name with the extension. I have tested a few other e-mail parsers, and they also save the file as just "1234" without the extension. Other e-mails with attachments that include spaces seem to work fine. Is the e-mail formatted incorrectly? Is the number at the beginning of the file name causing this?

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Nov 15, 2010 by Lukas Pokorny (101,990 points)
edited Feb 21, 2011
 
Best answer

The cause are the missing quotes around the file name. There is:

Content-type: application/pdf; x-unix-mode=0644; name=1234 abc def.pdf

But there ought to be:

Content-type: application/pdf; x-unix-mode=0644; name="1234 abc def.pdf"

We should be able to add a workaround for this to the next release of Rebex Mail. Thanks for letting us know about it!

EDIT: The fix is included in Rebex Secure Mail version 1.0.4060.0 released in February 2011.

...