Quantcast

Max attachment size

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Max attachment size

Paul van der Vlis
Hello,

A customer wants to sent attachments till 10 MB. I did everything what's
in the FAQ. I even use this settings for testing purposes:

upload_max_filesize = 100M
memory_limit = 100M
post_max_size = 100M
max_execution_time = 60
max_input_time = 60

But I still get this type of errors:
Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
line 1152

What will be wrong?  48525721 is much less then 104857600...

With regards,
Paul van der Vlis.




--
http://www.vandervlis.nl/

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Graeme Wood
On Wed, 25 Mar 2009, Paul van der Vlis wrote:

> Hello,
>
> A customer wants to sent attachments till 10 MB. I did everything what's
> in the FAQ. I even use this settings for testing purposes:
>
> upload_max_filesize = 100M
> memory_limit = 100M
> post_max_size = 100M
> max_execution_time = 60
> max_input_time = 60
>
> But I still get this type of errors:
> Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
> allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
> line 1152
>
> What will be wrong?  48525721 is much less then 104857600...

Look in the conf.php file for IMP (or use the Setup screen in your Horde
Adminstration portal and look under the Compose Tab) and you will find a
setting for $conf[compose] which sets the maximum total size of
attachments per message.

--
Graeme Wood, Unix Section of the IT Infrastructure Division,
Information Services, The University of Edinburgh
Email: [hidden email] Phone: +44 131 650 5003 Fax: +44 131 650 6552

The University of Edinburgh is a charitable body,
registered in Scotland, with registration number SC005336.
--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Paul van der Vlis
Graeme Wood schreef:

> On Wed, 25 Mar 2009, Paul van der Vlis wrote:
>
>> Hello,
>>
>> A customer wants to sent attachments till 10 MB. I did everything what's
>> in the FAQ. I even use this settings for testing purposes:
>>
>> upload_max_filesize = 100M
>> memory_limit = 100M
>> post_max_size = 100M
>> max_execution_time = 60
>> max_input_time = 60
>>
>> But I still get this type of errors:
>> Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
>> allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
>> line 1152
>>
>> What will be wrong?  48525721 is much less then 104857600...
>
> Look in the conf.php file for IMP (or use the Setup screen in your Horde
> Adminstration portal and look under the Compose Tab) and you will find a
> setting for $conf[compose] which sets the maximum total size of
> attachments per message.

$conf['compose']['attach_size_limit'] = '0';

I expect this means "unlimited".

With regards,
Paul van der Vlis.




--
http://www.vandervlis.nl/

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Michael M Slusarz-2
In reply to this post by Paul van der Vlis
Quoting Paul van der Vlis <[hidden email]>:

> memory_limit = 100M

[snip]

> But I still get this type of errors:
> Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
> allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
> line 1152
>
> What will be wrong?  48525721 is much less then 104857600...

Raise your memory limit.  PHP's internal string manipulation functions  
are notorious memory hogs.  Understand that processing an attachment  
may involve base64 encoding, VFS storage (one of the VFS storage  
backends - possibly mysql - is extremely memory inefficient, resulting  
in memory usage 3 or 4 times the size of the data to be stored), etc.

In all honesty, 100 megs is not all that much.  I can guarantee that  
any desktop mail application routinely uses this amount of memory,

michael

--
___________________________________
Michael Slusarz [[hidden email]]

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Paul van der Vlis
Michael M Slusarz schreef:

> Quoting Paul van der Vlis <[hidden email]>:
>
>> memory_limit = 100M
>
> [snip]
>
>> But I still get this type of errors:
>> Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
>> allocate 48525721 bytes) in /usr/share/horde3/lib/Horde/MIME/Part.php on
>> line 1152
>>
>> What will be wrong?  48525721 is much less then 104857600...
>
> Raise your memory limit.  PHP's internal string manipulation functions
> are notorious memory hogs.  Understand that processing an attachment may
> involve base64 encoding, VFS storage (one of the VFS storage backends -
> possibly mysql - is extremely memory inefficient, resulting in memory
> usage 3 or 4 times the size of the data to be stored), etc.
>
> In all honesty, 100 megs is not all that much.  I can guarantee that any
> desktop mail application routinely uses this amount of memory,

I raised memory_limit to 800M and now it works fine. I lowered the
post_max_size and upload_max_filesize to 20M. It still works fine.
Thanks for your help!

I did forward the 10MB attachment and I was wondering that this takes
about 120 seconds. But my max_execution_time and max_input_time are both
'60'. Strange that it works. To be sure I raised the times to 200 seconds...

Another point I see is that the forwarded message has a size (in Horde)
of 24023 KB. The first message had a size of 14035 kB. Any idea what is
wrong?

When I download the forwarded attachement the file has a size of
10485612 bytes. The original was 10485760 bytes. The first attachement
(not forwarded in Horde) was still the correct size after downloading.
Any idea?

With regards,
Paul van der Vlis.




--
http://www.vandervlis.nl/

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Paul van der Vlis
Paul van der Vlis schreef:

> Another point I see is that the forwarded message has a size (in Horde)
> of 24023 KB. The original message had a size of 14035 kB. Any idea what is
> wrong?

In the source of the original message I see this:
--------------050304040604000904020505
Content-Type: application/octet-stream;
 name="10mb.bin"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="10mb.bin"

81QM2QjCrW7jhII1TkUIYGq7tru8OIq82janvVgo5bQ+V3yxPGZk4vMBHwADm8bEU2NPrUA7
Rdj/SWmip7jCcaW6vdr0m9AwEH4MENopgCRaFp3NgCi0LalkNAHE542Yf++HnEznlm63P5LS
XNQbydS70+9Agg4Y03eYI5ZSuZdTVWp6WL2YcjHmxOykMkXoBtIG0IB9uac+ejTbOXaNy9KK
yDdywbFl/5AWqwTkynS0d8vOUowpFgqDjG1yS0RC/b9j7sw7uFAqvdfsU4E3dvLh1EO8lhKz
5uLX8iIYE0L5HKY23UrfigyDhnmumsRAv8qjq6l6xCXEcZxVti6PopzTnM6Z3nTMgMnK1XrG
AKUoTw0legqLlExhkulFyRcDJFRyT9/37OOMXtbjIrIbnOxJNeQRiNFChq8z7j7u+F7Tgd/W
(...)

In the source of the forwarded message I see this:
--=_5i1pjokhu740
Content-Type: text/plain;
        charset=ISO-8859-1;
        name="10mb.bin"
Content-Disposition: attachment;
        filename="10mb.bin"
Content-Transfer-Encoding: quoted-printable

=F3T=0C=D9=08=C2=ADn=E3=84=825NE=08`j=BB=B6=BB=BC8=8A=BC=DA6=A7=BDX(=E5=B4>W=
|=B1<fd=E2=F3=01=1F=00=03=9B=C6=C4ScO=AD@;E=D8=FFIi=A2=A7=B8=C2q=A5=BA=BD=DA=
=F4=9B=D00=10~=0C=10=DA)=80$Z=16=9D=CD=80(=B4-=A9d4=01=C4=E7=8D=98=7F=EF=87=
=9CL=E7=96n=B7?=92=D2\=D4=1B=C9=D4=BB=D3=EF@=82=0E=18=D3w=98#=96R=B9=97SUjzX=
=BD=98r1=E6=C4=EC=A42E=E8=06=D2=06=D0=80}=B9=A7>z4=DB9v=8D=CB=D2=8A=C87r=C1=
(...)

Why is IMP using quoted-printable and not base64 ?


With regards,
Paul van der Vlis.




--
http://www.vandervlis.nl/

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Michael M Slusarz-2
Quoting Paul van der Vlis <[hidden email]>:

> Paul van der Vlis schreef:
>
>> Another point I see is that the forwarded message has a size (in Horde)
>> of 24023 KB. The original message had a size of 14035 kB. Any idea what is
>> wrong?
>
> In the source of the original message I see this:
> --------------050304040604000904020505
> Content-Type: application/octet-stream;
>  name="10mb.bin"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
>  filename="10mb.bin"
>
> 81QM2QjCrW7jhII1TkUIYGq7tru8OIq82janvVgo5bQ+V3yxPGZk4vMBHwADm8bEU2NPrUA7
> Rdj/SWmip7jCcaW6vdr0m9AwEH4MENopgCRaFp3NgCi0LalkNAHE542Yf++HnEznlm63P5LS
> XNQbydS70+9Agg4Y03eYI5ZSuZdTVWp6WL2YcjHmxOykMkXoBtIG0IB9uac+ejTbOXaNy9KK
> yDdywbFl/5AWqwTkynS0d8vOUowpFgqDjG1yS0RC/b9j7sw7uFAqvdfsU4E3dvLh1EO8lhKz
> 5uLX8iIYE0L5HKY23UrfigyDhnmumsRAv8qjq6l6xCXEcZxVti6PopzTnM6Z3nTMgMnK1XrG
> AKUoTw0legqLlExhkulFyRcDJFRyT9/37OOMXtbjIrIbnOxJNeQRiNFChq8z7j7u+F7Tgd/W
> (...)
>
> In the source of the forwarded message I see this:
> --=_5i1pjokhu740
> Content-Type: text/plain;
>         charset=ISO-8859-1;
>         name="10mb.bin"
> Content-Disposition: attachment;
>         filename="10mb.bin"
> Content-Transfer-Encoding: quoted-printable
>
> =F3T=0C=D9=08=C2=ADn=E3=84=825NE=08`j=BB=B6=BB=BC8=8A=BC=DA6=A7=BDX(=E5=B4>W=
> |=B1<fd=E2=F3=01=1F=00=03=9B=C6=C4ScO=AD@;E=D8=FFIi=A2=A7=B8=C2q=A5=BA=BD=DA=
> =F4=9B=D00=10~=0C=10=DA)=80$Z=16=9D=CD=80(=B4-=A9d4=01=C4=E7=8D=98=7F=EF=87=
> =9CL=E7=96n=B7?=92=D2\=D4=1B=C9=D4=BB=D3=EF@=82=0E=18=D3w=98#=96R=B9=97SUjzX=
> =BD=98r1=E6=C4=EC=A42E=E8=06=D2=06=D0=80}=B9=A7>z4=DB9v=8D=CB=D2=8A=C87r=C1=
> (...)
>
> Why is IMP using quoted-printable and not base64 ?

Don't know.  Most likely the attachment is being decoded from the  
original message, mime magic determines it is a text/plain document,  
and then when re-attached it is q-p encoded (as it should be).  True  
text/* should NEVER be base64 encoded.

The MIME/IMAP/attachment code has been completely rewritten in IMP 5  
and, regardless, the outputted message *is* valid MIME.  However, you  
really shouldn't be using 'Forward Attachments Only' - you should be  
using 'Forward Entire Message' (I am very close to removing the other  
2 options in IMP 5 completely).  And people *really* shouldn't be  
sending 10MB attachments.  I understand customers may think otherwise,  
but realize that things aren't going to work without massive resources  
in place.

michael

--
___________________________________
Michael Slusarz [[hidden email]]

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Ronan SALMON
In reply to this post by Paul van der Vlis
Paul van der Vlis <[hidden email]> a écrit :

> Paul van der Vlis schreef:
> In the source of the forwarded message I see this:
> --=_5i1pjokhu740
> Content-Type: text/plain;
>          charset=ISO-8859-1;
>          name="10mb.bin"
> Content-Disposition: attachment;
>          filename="10mb.bin"
> Content-Transfer-Encoding: quoted-printable
>
> =F3T=0C=D9=08=C2=ADn=E3=84=825NE=08`j=BB=B6=BB=BC8=8A=BC=DA6=A7=BDX(=E5=B4>W=
> |=B1<fd=E2=F3=01=1F=00=03=9B=C6=C4ScO=AD@;E=D8=FFIi=A2=A7=B8=C2q=A5=BA=BD=DA=
> =F4=9B=D00=10~=0C=10=DA)=80$Z=16=9D=CD=80(=B4-=A9d4=01=C4=E7=8D=98=7F=EF=87=
> =9CL=E7=96n=B7?=92=D2\=D4=1B=C9=D4=BB=D3=EF@=82=0E=18=D3w=98#=96R=B9=97SUjzX=
> =BD=98r1=E6=C4=EC=A42E=E8=06=D2=06=D0=80}=B9=A7>z4=DB9v=8D=CB=D2=8A=C87r=C1=
> (...)
>
> Why is IMP using quoted-printable and not base64 ?


If you are using firefox, try this : stop firefox, remove file named  
mimeTypes.rdf in user's profile folder, start firefox and try again.

Sometimes for whatever reason, firefox doesn't detect the right mime  
type and tells IMP that the attachement/uploaded file is a text file.

Ronan.
--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Michael Menge
In reply to this post by Michael M Slusarz-2
Hi,

Quoting Michael M Slusarz <[hidden email]>:

> The MIME/IMAP/attachment code has been completely rewritten in IMP 5  
> and, regardless, the outputted message *is* valid MIME.  However,  
> you really shouldn't be using 'Forward Attachments Only' - you  
> should be using 'Forward Entire Message' (I am very close to  
> removing the other 2 options in IMP 5 completely).

The 'Forward Attachments Only' is needed. IMP4 has problems showning
Messages Forwarded "Forwarding Entire Message" if the original  
Messages contained Attachments and was signed with SMIME. I can't  
remember if the forwarded message had to be signed that the problem  
would be shown.

See http://bugs.horde.org/ticket/4297

How will/should IMP5 handle Forwarding signed messages?


Regards

      Michael Menge
--------------------------------------------------------------------------------
M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
[hidden email]
Wächterstraße 76
72074 Tübingen
--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Michael M Slusarz-2
Quoting Michael Menge <[hidden email]>:

> Hi,
>
> Quoting Michael M Slusarz <[hidden email]>:
>
>> The MIME/IMAP/attachment code has been completely rewritten in IMP  
>> 5 and, regardless, the outputted message *is* valid MIME.  However,  
>> you really shouldn't be using 'Forward Attachments Only' - you  
>> should be using 'Forward Entire Message' (I am very close to  
>> removing the other 2 options in IMP 5 completely).
>
> The 'Forward Attachments Only' is needed. IMP4 has problems showning
> Messages Forwarded "Forwarding Entire Message" if the original  
> Messages contained Attachments and was signed with SMIME. I can't  
> remember if the forwarded message had to be signed that the problem  
> would be shown.
>
> See http://bugs.horde.org/ticket/4297
>
> How will/should IMP5 handle Forwarding signed messages?

It forwards the entire signed message.  Thinking about this more, this  
makes the most sense.  If I send an encrypted message to someone, I  
*don't* want that person to forward that message to anyone else that  
can't decrypt the message - that message is meant for the the  
receiving person only (that is the whole purpose of encryption).

Obviously we can't prohibit the receiver from copying/pasting text or  
downloading/reattaching an attachment in a new message, but this  
requires active steps on the part of the user rather than allowing  
simple forwarding via a button.

michael

--
___________________________________
Michael Slusarz [[hidden email]]

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Max attachment size

Michael Menge
Hi again,

Quoting Michael M Slusarz <[hidden email]>:

> Quoting Michael Menge <[hidden email]>:
>
>> Hi,
>>
>> Quoting Michael M Slusarz <[hidden email]>:
>>
>>> The MIME/IMAP/attachment code has been completely rewritten in IMP  
>>> 5 and, regardless, the outputted message *is* valid MIME.  
>>> However, you really shouldn't be using 'Forward Attachments Only'  
>>> - you should be using 'Forward Entire Message' (I am very close to  
>>> removing the other 2 options in IMP 5 completely).
>>
>> The 'Forward Attachments Only' is needed. IMP4 has problems showning
>> Messages Forwarded "Forwarding Entire Message" if the original  
>> Messages contained Attachments and was signed with SMIME. I can't  
>> remember if the forwarded message had to be signed that the problem  
>> would be shown.
>>
>> See http://bugs.horde.org/ticket/4297
>>
>> How will/should IMP5 handle Forwarding signed messages?
>
> It forwards the entire signed message.  Thinking about this more,  
> this makes the most sense.  If I send an encrypted message to  
> someone, I *don't* want that person to forward that message to  
> anyone else that can't decrypt the message - that message is meant  
> for the the receiving person only (that is the whole purpose of  
> encryption).
>
In this case we could get emails with more than one SMIME/signature.
The functions to verify the signature *must* be able to handle these,
and have to respect the mime-part bonderies, to be able to verifiy the  
forwarded message.


michael


--------------------------------------------------------------------------------
M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
[hidden email]
Wächterstraße 76
72074 Tübingen
--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [hidden email]

smime.p7s (7K) Download Attachment
Loading...