Fw: Download specific attachments from e-mails

Mircea Galut mircea.galut at prudentgrup.ro
Wed Sep 27 18:17:46 CEST 2006

Okay, more details now:

As said earlier, only _certain_ messages are affected by this behaviour.

For example message #1, with an xls attachment, has this mime detail in 
------------------------------------------ begin to paste ---
MIME-Version: 1.0
Content-Type: multipart/mixed;
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962

This is a multi-part message in MIME format.

Content-Type: multipart/alternative;

Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=3DContent-Type content=3D"text/html; =
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR>
<BODY bgColor=3D#ffffff>


Content-Type: application/vnd.ms-excel;
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
----------------------------------------------- enf of paste ---
..folowed by the attached file.

this one is okay, I can download corectly the small attachment.

Now we go the message #2 that has this as mime detail:
------------------------------------------ begin to paste ---
MIME-Version: 1.0
Content-Type: multipart/mixed;boundary="----=_20060927113419_81775"
X-Priority: 3 (Normal)
Importance: Normal

Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 8bit

Content-Type: application/octet-stream; name="matiz.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="matiz.xls"
------------------------------------------ end of paste ---
..folowed by the attached file.

The file attached has 13,8KB (kilobytes) but when I try to download it via 
roundcube I get a 1,78KB file named 'mail2' without an extension.

(now I see that) You don't have to be a genius/expert to see that the 
Content-Type field is different in the two files and that could trick 
roundcube. They are both the same type of files, but with different mime 

Now message #3, a wmv file attached:
----------------------------------- begin to paste ---
Content-Type: application/octet-stream; name="freakinbrothers.wmv"
Content-Transfer-Encoding: base64
Content-Description: pat2111045844
Content-Disposition: attachment; filename="freakinbrothers.wmv"
----------------------------------- end of paste ---

As you could guess, it behaves just like example #2. I get a file named 
'mail2.2' but has 2.04MB (megabytes), the corect lenght of the attached 

Modifying the debug level in the config file has no effect, the log files 
remain unchanged.

My only conclusion is that MSOE saves the file reading the extension of 
attachment ignoring the Content-Type field, while RoundCube does not. Who's 
with me?! :)

Thank you all for replies,

P.S. I use roundcubemail-0.1beta2

----- Original Message ----- 
From: "phil" <phil at cryer.us>
To: "Mark Clarkson" <mark.clarkson at smorg.co.uk>
Cc: "Mircea Galut" <mircea.galut at prudentgrup.ro>; 
<users at lists.roundcube.net>
Sent: Wednesday, September 27, 2006 5:33 PM
Subject: Re: Fw: Download specific attachments from e-mails

On Wed, 27 Sep 2006 11:59:22 +0100, Mark Clarkson <mark.clarkson at smorg.couk> 
> You're probably right. I've just downloaded an xls doc through roundcube
> however, and it worked fine. Maybe your version is broke and mine is ok?

I'm running SVN, updating nightly (I like bugs ;)) Feel free to email me any 
attachments and I can test it and watch my logs for comments.  Also, have 
you bumped up the debug level in your RC config?  It may share something.

More information about the users mailing list