Trying to prevent large file attachments in Squirrelmail, on U8.10S.

Xn Nooby xnooby at
Wed Dec 24 18:32:50 UTC 2008

On Wed, Dec 24, 2008 at 12:00 PM, Sarunas Burdulis
<sarunas at> wrote:
> Hash: SHA1
> Xn Nooby wrote:
>> On Tue, Dec 23, 2008 at 4:47 PM, Chris Mohler <cr33dog at> wrote:
>>> On Wed, Dec 24, 2008 at 3:46 PM, Chris Mohler <cr33dog at> wrote:
>>>> On Wed, Dec 24, 2008 at 3:33 PM, Xn Nooby <xnooby at> wrote:
>>>>> Is it possible to prevent Squirrelmail users from uploading large
>>>>> files to a server running Squirrelmail?  My testing seems to indicate
>>>>> that the attachment size limits enforced by Squirrelmail take place
>>>>> *after* the file has been uploaded - at which time Squirrelmail aborts
>>>>> the entire message. I will have some remote users, and I do not want
>>>>> them to be able to upload files that are over a limit (say 10MB).
>>>>> If a remote user tries to attach a 500MB attachment to their email, I
>>>>> don't want them to upload the entire 500MB file, only to then have SM
>>>>> abort the message.  I want it to fail immediately, or after the 10MB
>>>>> limit has been reached.
>>>>> I though there was a way to do this in Apache or PHP, but have been
>>>>> unable to find it.  I am running Ubuntu Server 8.10 with Apache,
>>>>> Postfix, Dovecot, and Squirrelmail.
> Have you tried Apache's LimitRequestBody directive? It can be set per
> directory.
> Sarunas
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAklSaqEACgkQejaFVltl6E+4oACeJ5OFd4zQ4SSr64feJtg5s2To
> MyQAn15fzNocbExuCQHyews2R4YPdrBa
> =8iUU
> --
> ubuntu-users mailing list
> ubuntu-users at
> Modify settings or unsubscribe at:

I putting the limit in the Apache config file worked, thanks!  I did
this for an 11MB cap:

sudo vi /etc/apache2/mods-enabled/php5.conf
LimitRequestBody 11222333
sudo /etc/init.d/apache2 restart

Apache blew up early, which is what I wanted.


More information about the ubuntu-users mailing list