New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Problems with IMAP server when downloading attached files

Got problems with Bubba? Then this forum is for you.
Locked
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Problems with IMAP server when downloading attached files

Post by dsp76 »

Hi,
I got send an email with a 9MB attachement. However I'm not able to save to local neither by the browser interface (it only saves 1,5 Mb) nor by the IMAP client (Thunderbird)...
Whats the problem here? Via SSH I can see the message file in my mail directory is indeed around 9MB.

regards
dsp76
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Post by dsp76 »

Hi,
got one lead:
This only happens when I connect to my server through dyndns over my home DSL router (from outside). It worked fine tonight, when I connected through my bubbas IP adress directly. What could be the reason?

dsp76
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi dsp76,

Could this perhaps be some form of timeout problem? When connecting "directly" to your Bubba i assume you are doing this on your Lan which would(?) much better bandwidth.

/Tor
Co-founder OpenProducts and Ex Excito Developer
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Post by dsp76 »

Hi,
yes - directly means in my local LAN: IP based (no dyndns). Yes bandhwith is much better than from remote with only 192kb upload of my home DSL. However, which part in the chain could insert this timeout?

dsp76
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Do this happen even when using IMAP from the outside i would say either your router or docecot, the imap server. But i looked at the imap config and it do not indicate any timeouts.

If it only happens with the webmail i would say that it is the IlohaMail web-application that is the problem. PHP has a default timeout of something like 30S. And if Iloha does not override this the download will be terminated when that happens.

/Tor
Co-founder OpenProducts and Ex Excito Developer
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Post by dsp76 »

It was also when I connected via IMAP. Strange... Could anyone else reproduce this error?

dsp76
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Ok, if this occurs even when connecting via IMAP then it is either your router, which i doubt, or there is some strangeness in either dovecot or Bubbas network config affecting the IMAP server.

I will have to do some more research on this.

/Tor
Co-founder OpenProducts and Ex Excito Developer
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Post by dsp76 »

By the way, the router is a Fritz!Box 7170 by AVM - quite popular in Germany and relatively current with updates and fixes. Please let me know, whether I should forward a trouble ticket to them...

dsp76
dsp76
Posts: 76
Joined: 15 Apr 2007, 14:18

Post by dsp76 »

Hello tor,
are there any news on this? Ouf of an 5,6 MB attachement, being connected locally via IMAP I always only get 4MB.... (via evolution/thunderbird) - (and still 1,5 MB via the browserinterface.

Thanks for any suggestions...
dsp76
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi dsp76,

We have done further investigations on this. And when it comes to the webmail, attachments handling has turned out to be less than optimal. There is an execution timeout on downloads. That means that download of attachment is terminated after 30 seconds leaving you with whatever has gotten downloaded. To make things even worse it seams like the imap implementation in Ilohamail is somewhat inefficient when reading out attachments.

Regarding pure imap. We have however not been able to reproduce any error. With a setup of a Bubba and a PC with Evolution we get correct downloads of attachments.

A few thoughts on this. If an attachment is reported as 5.6MB by the email program. (Such as Ilohamail) The downloaded attachment is most likely a bit smaller. This is due to the attachment being stored somewhat inefficient. So fx a 7MB attachment is reported as a 9800KB attachment. Further more we have a 10MB per mail limit in our mailserver so any mail with attachment larger than that will be rejected.

/Tor
Co-founder OpenProducts and Ex Excito Developer
limpo
Posts: 59
Joined: 24 Mar 2007, 06:50

Post by limpo »

Hi,

If Im not mistaken I belive its PHP that is set to max limit 8MB for file attachments.


/Limpo
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

In this case PHP has nothing to do with it. I think Tor is referring to the message_size_limit setting in Postfix, which I believe also has nothing to do with it.

1) the PHP limit is an issue when uploading attachments via webmail
2) the postfix limit is placed during the SMTP session. Postfix will reject the mail if it is too big. The fact that you received it means it was accepted.

Your problem here seems to be in either the IMAP server (dovecut, highly unlikely) or ilohamail (which indeed seems to be the culprit). As Tor said, the size of mail attachments is deceiving due to the 7bit conversion that takes place. Instead check if the document comes through uncorrupted (open the attached image or document). The only time I've seen a problem with downloading large attachments directly via IMAP in the way you describe was when the interface on the client was a GB with jumboframes which the router could not handle. So first be really really sure that the error also takes place in a direct IMAP or POP3 session.

If I understand the mailing lists correctly an upgrade of ilohamail may solve the issue. Such an upgrade may be required anyway, as our 0.8.13 version has a vulnerability http://www.securityfocus.com/bid/11872
Locked