Quantcast

Re: Can't make SquirrelMail have chosen attach size. Why?

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

Re: Can't make SquirrelMail have chosen attach size. Why?

André Z. D. A.
I have the following situation:

1. Squirrelmail hosted in its own directory, similar to:

https://me.server.com/squi/

To log into Squirrelmail we use the above URL, and it works from there as wanted.

All paths in the following items are relative to this URL, unless noted otherwise.

It is an Apache running on Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-61-generic x86_64).

2. The file .htaccess has nothing related to attachment sizes. It did not work for these.

3. The php.ini file has, among others, these lines:

magic_quotes_gpc=false
magic_quotes_runtime=false
magic_quotes_sybase=false
post_max_size=50M
memory_limit=300M
upload_max_filesize=20M

4. Running a PHP script now to call php_info() reports (as it was reported long ago, it stays the same; the server was rebooted for sure, it was reinstalled ~1 month ago) :

post_max_size 50M 50M
memory_limit 300M 300M
upload_max_filesize 20M 20M

5. Since it do not work since I reported it, several weeks ago, I have check source code. The src/compose.php file has the lines:

        /* php.ini vars which influence the max for uploads */
        $configvars = array('post_max_size', 'memory_limit', 'upload_max_filesize');
        foreach($configvars as $var) {
            /* skip 0 or empty values, and -1 which means 'unlimited' */
            if( $size = getByteSize(ini_get($var)) ) {
                if ( $size != '-1' ) {
                    $sizes[] = $size;
                }
            }
        }

6. Squirrelmail only allows at most 2 MiB sized attachments, or it gives an error.

7. I have made an upload test with PHP, in this same folder. I can use size of to the reported limits, except in Squirrelmail.

How should it be solved?


-----------------------------------------------
Date: 2015-04-30 06:11
From: André Z. D. A. [hidden email]
To: 'Squirrelmail User Support Mailing List' [hidden email]

>
> I'll research a bit on what exactly I can do (with my server) in htaccess.
>
> And I'll post phpinfo output without removing the "uneeded" lines - complete, basically.
>
> Just give me a couple of days.
>
> Thank you, very much
>
>>> Ryan,
>>>
>>> As far as I am aware two php.ini files is a Debianism.. CentOS/RHEL uses
>>
>> only one php.ini which is located in /etc/ . I don't do a huge amount of web
>> oriented stuff, mostly OS/system level and openstack/cloudstack things these
>> days with some admin of various services like the company wiki and chat
>>
>>> servers, so I may be wrong but I have been doing CentOS/RH admin since RH
>>
>> 1.x and have never seen two php.ini files..
>>
>>> Good pointer on the .htaccess stuff.. I forgot all about stuffing vars
>>
>> into there..
>>
>>> Have a good day.
>>> -R
>>
>> Yeah that probably is the case; I use Gentoo mainly, and it has the 2
>> php.ini. As long as you're changing the right file, it should be fine,
>> though it does require an apache restart to take effect (might be a good
>> idea to do so in off-peak time despite generally being very quick). I
>> mentioned the htaccess as there was some discussion about limited access to
>> system modification, in which case htaccess is a simple alternative. I did
>> notice in my own configuration, I changed both upload_max_filesize &
>> post_max_size--though I'm not sure both are required. Not all PHP variables
>> can be managed in htaccess but the list is easily googled.
>>
>> --
>> Ryan
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> -----
>> squirrelmail-users mailing list
>> Posting guidelines: http://squirrelmail.org/postingguidelines
>> List address: [hidden email]
>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>> List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> -----
> squirrelmail-users mailing list
> Posting guidelines: http://squirrelmail.org/postingguidelines
> List address: [hidden email]
> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
> List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't make SquirrelMail have chosen attach size. Why?

Dave Anderson
Hi,

It could be your mail server and not SquirrelmaiI. I use Debian with
Posttfix and Dovecot. For Squirrelmail I changed the php.ini settings in
/etc/php5/apache2/ to:
post_max_size = 110M
upload_max_filesize = 100M

For Postfix I sdded a line in /etc/postfix/main.cf file as follows:
message_size_limit = 102400000

So if someone sends/receives a message over 102.4MB Postfix will not
allow it and Squirrelmail won't get it either. In my case I'm using
Postfix to limit the message (with attachment) size. That is why the
PHP, post_max_size, is greater than Postfix, upload_max_filesize.

I hope this is what you are looking for.

Dave A.


On 2015-09-17 02:53, André Z. D. A. wrote:

> I have the following situation:
>
> 1. Squirrelmail hosted in its own directory, similar to:
>
> https://me.server.com/squi/
>
> To log into Squirrelmail we use the above URL, and it works from there
> as wanted.
>
> All paths in the following items are relative to this URL, unless
> noted otherwise.
>
> It is an Apache running on Ubuntu 14.04.2 LTS (GNU/Linux
> 3.13.0-61-generic x86_64).
>
> 2. The file .htaccess has nothing related to attachment sizes. It did
> not work for these.
>
> 3. The php.ini file has, among others, these lines:
>
> magic_quotes_gpc=false
> magic_quotes_runtime=false
> magic_quotes_sybase=false
> post_max_size=50M
> memory_limit=300M
> upload_max_filesize=20M
>
> 4. Running a PHP script now to call php_info() reports (as it was
> reported long ago, it stays the same; the server was rebooted for
> sure, it was reinstalled ~1 month ago) :
>
> post_max_size 50M 50M
> memory_limit 300M 300M
> upload_max_filesize 20M 20M
>
> 5. Since it do not work since I reported it, several weeks ago, I have
> check source code. The src/compose.php file has the lines:
>
>         /* php.ini vars which influence the max for uploads */
>         $configvars = array('post_max_size', 'memory_limit',
> 'upload_max_filesize');
>         foreach($configvars as $var) {
>             /* skip 0 or empty values, and -1 which means 'unlimited'
> */
>             if( $size = getByteSize(ini_get($var)) ) {
>                 if ( $size != '-1' ) {
>                     $sizes[] = $size;
>                 }
>             }
>         }
>
> 6. Squirrelmail only allows at most 2 MiB sized attachments, or it
> gives an error.
>
> 7. I have made an upload test with PHP, in this same folder. I can use
> size of to the reported limits, except in Squirrelmail.
>
> How should it be solved?
>
>
> -----------------------------------------------
> Date: 2015-04-30 06:11
> From: André Z. D. A. [hidden email]
> To: 'Squirrelmail User Support Mailing List'
> [hidden email]
>>
>> I'll research a bit on what exactly I can do (with my server) in
>> htaccess.
>>
>> And I'll post phpinfo output without removing the "uneeded" lines -
>> complete, basically.
>>
>> Just give me a couple of days.
>>
>> Thank you, very much
>>
>>>> Ryan,
>>>>
>>>> As far as I am aware two php.ini files is a Debianism.. CentOS/RHEL
>>>> uses
>>>
>>> only one php.ini which is located in /etc/ . I don't do a huge amount
>>> of web
>>> oriented stuff, mostly OS/system level and openstack/cloudstack
>>> things these
>>> days with some admin of various services like the company wiki and
>>> chat
>>>
>>>> servers, so I may be wrong but I have been doing CentOS/RH admin
>>>> since RH
>>>
>>> 1.x and have never seen two php.ini files..
>>>
>>>> Good pointer on the .htaccess stuff.. I forgot all about stuffing
>>>> vars
>>>
>>> into there..
>>>
>>>> Have a good day.
>>>> -R
>>>
>>> Yeah that probably is the case; I use Gentoo mainly, and it has the 2
>>> php.ini. As long as you're changing the right file, it should be
>>> fine,
>>> though it does require an apache restart to take effect (might be a
>>> good
>>> idea to do so in off-peak time despite generally being very quick). I
>>> mentioned the htaccess as there was some discussion about limited
>>> access to
>>> system modification, in which case htaccess is a simple alternative.
>>> I did
>>> notice in my own configuration, I changed both upload_max_filesize &
>>> post_max_size--though I'm not sure both are required. Not all PHP
>>> variables
>>> can be managed in htaccess but the list is easily googled.
>>>
>>> --
>>> Ryan
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across
>>> Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable
>>> Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> -----
>>> squirrelmail-users mailing list
>>> Posting guidelines: http://squirrelmail.org/postingguidelines
>>> List address: [hidden email]
>>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>>> List info (subscribe/unsubscribe/change options):
>>> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across
>> Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable
>> Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> -----
>> squirrelmail-users mailing list
>> Posting guidelines: http://squirrelmail.org/postingguidelines
>> List address: [hidden email]
>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>> List info (subscribe/unsubscribe/change options):
>> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>
> ------------------------------------------------------------------------------
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> -----
> squirrelmail-users mailing list
> Posting guidelines: http://squirrelmail.org/postingguidelines
> List address: [hidden email]
> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
> List info (subscribe/unsubscribe/change options):
> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't make SquirrelMail have chosen attach size. Why?

André Z. D. A.
In reply to this post by André Z. D. A.
Hello! Thank you for the answer, Dave.

That's a possibility. But the fact that Squirrelmail configtest doesn't say there is something wrong, in my opinion it is something to be improved, at least. I run the test after configuring all possible aspects, including IMAP (or POP, although there is none today) and SMTP details.

Further, I think it is not using postfix to send messages, since it access external SMTP servers. For example, there is one setup for Yahoo accounts (use the server smtp.mail.yahoo.com). From SM's configure, I set it to use SMTP, and not sendmail (which I assume is where postfix would come in, as my own SMTP server, in this machine). I didn't think Yahoo's SMTP server would limit attachments to 2 MiB. and I have tested these limits the other way, and I looked in SM source code for "hints" of what/where to look. Still can't see clearly what is the problem. Using Thunderbird as a mail client, Yahoo's SMTP sends 10MiB+ big attachments, so it is possible Squirrelmail doing it too.

The global files you pointed here should not apply to me because: being global, I cannot change them, and an user dependent limit should be either known/discoverable or changeable, within it. My /etc/php5/ folder only contain two folders, and no hidden files. Its full listing gives just these files:

./cli/conf.d
./cli/conf.d/10-pdo.ini
./cli/conf.d/20-json.ini
./cli/conf.d/20-readline.ini
./cli/conf.d/05-opcache.ini
./cli/php.ini
./mods-available/pdo.ini
./mods-available/opcache.ini
./mods-available/readline.ini
./mods-available/json.ini

And this php.ini file contain 3 "important" values I have seen in other places:

post_max_size = 8M
upload_max_filesize = 2M
memory_limit = -1

So, the 2M is the same as the limit I have. But if phpinfo() running from Squirrelmail folder shows different (bigger) values, why can't Squirrelmail feel this difference? I have followed its install instructions and made the configtest. I have made upload scripts to receive bigger upload.

Right now I did:

- configure SqM to use an SMTP server
- check the used SMTP server sends messages with bigger attachments
- check that my server setup allows uploads with more than 2MiB
- follow SqM install instructions and made a configtest as the last setup step, no problem pointed

Still no change.

------------- Dave A. wrote:

> Hi,
>
> It could be your mail server and not SquirrelmaiI. I use Debian with
> Posttfix and Dovecot. For Squirrelmail I changed the php.ini settings in
> /etc/php5/apache2/ to:
> post_max_size = 110M
> upload_max_filesize = 100M
>
> For Postfix I sdded a line in /etc/postfix/main.cf file as follows:
> message_size_limit = 102400000
>
> So if someone sends/receives a message over 102.4MB Postfix will not
> allow it and Squirrelmail won't get it either. In my case I'm using
> Postfix to limit the message (with attachment) size. That is why the
> PHP, post_max_size, is greater than Postfix, upload_max_filesize.
>
> I hope this is what you are looking for.
>
> Dave A.
>
> On 2015-09-17 02:53, André Z. D. A. wrote:
>
>> I have the following situation:
>>
>> 1. Squirrelmail hosted in its own directory, similar to:
>>
>> https://me.server.com/squi/
>>
>> To log into Squirrelmail we use the above URL, and it works from there
>> as wanted.
>>
>> All paths in the following items are relative to this URL, unless
>> noted otherwise.
>>
>> It is an Apache running on Ubuntu 14.04.2 LTS (GNU/Linux
>> 3.13.0-61-generic x86_64).
>>
>> 2. The file .htaccess has nothing related to attachment sizes. It did
>> not work for these.
>>
>> 3. The php.ini file has, among others, these lines:
>>
>> magic_quotes_gpc=false
>> magic_quotes_runtime=false
>> magic_quotes_sybase=false
>> post_max_size=50M
>> memory_limit=300M
>> upload_max_filesize=20M
>>
>> 4. Running a PHP script now to call php_info() reports (as it was
>> reported long ago, it stays the same; the server was rebooted for
>> sure, it was reinstalled ~1 month ago) :
>>
>> post_max_size 50M 50M
>> memory_limit 300M 300M
>> upload_max_filesize 20M 20M
>>
>> 5. Since it do not work since I reported it, several weeks ago, I have
>> check source code. The src/compose.php file has the lines:
>>
>> /* php.ini vars which influence the max for uploads */
>> $configvars = array('post_max_size', 'memory_limit',
>> 'upload_max_filesize');
>> foreach($configvars as $var) {
>> /* skip 0 or empty values, and -1 which means 'unlimited'
>> */
>> if( $size = getByteSize(ini_get($var)) ) {
>> if ( $size != '-1' ) {
>> $sizes[] = $size;
>> }
>> }
>> }
>>
>> 6. Squirrelmail only allows at most 2 MiB sized attachments, or it
>> gives an error.
>>
>> 7. I have made an upload test with PHP, in this same folder. I can use
>> size of to the reported limits, except in Squirrelmail.
>>
>> How should it be solved?
>>
>> -----------------------------------------------
>> Date: 2015-04-30 06:11
>> From: André Z. D. A. [hidden email]
>> To: 'Squirrelmail User Support Mailing List'
>> [hidden email]
>>
>>> I'll research a bit on what exactly I can do (with my server) in
>>> htaccess.
>>>
>>> And I'll post phpinfo output without removing the "uneeded" lines -
>>> complete, basically.
>>>
>>> Just give me a couple of days.
>>>
>>> Thank you, very much
>>>
>>>>> Ryan,
>>>>>
>>>>> As far as I am aware two php.ini files is a Debianism.. CentOS/RHEL
>>>>> uses
>>>>
>>>> only one php.ini which is located in /etc/ . I don't do a huge amount
>>>> of web
>>>> oriented stuff, mostly OS/system level and openstack/cloudstack
>>>> things these
>>>> days with some admin of various services like the company wiki and
>>>> chat
>>>>
>>>>> servers, so I may be wrong but I have been doing CentOS/RH admin
>>>>> since RH
>>>>
>>>> 1.x and have never seen two php.ini files..
>>>>
>>>>> Good pointer on the .htaccess stuff.. I forgot all about stuffing
>>>>> vars
>>>>
>>>> into there..
>>>>
>>>>> Have a good day.
>>>>> -R
>>>>
>>>> Yeah that probably is the case; I use Gentoo mainly, and it has the 2
>>>> php.ini. As long as you're changing the right file, it should be
>>>> fine,
>>>> though it does require an apache restart to take effect (might be a
>>>> good
>>>> idea to do so in off-peak time despite generally being very quick). I
>>>> mentioned the htaccess as there was some discussion about limited
>>>> access to
>>>> system modification, in which case htaccess is a simple alternative.
>>>> I did
>>>> notice in my own configuration, I changed both upload_max_filesize &
>>>> post_max_size--though I'm not sure both are required. Not all PHP
>>>> variables
>>>> can be managed in htaccess but the list is easily googled.
>>>>
>>>> --
>>>> Ryan
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across
>>>> Physical-Virtual-Cloud
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable
>>>> Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>> -----
>>>> squirrelmail-users mailing list
>>>> Posting guidelines: http://squirrelmail.org/postingguidelines
>>>> List address: [hidden email]
>>>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>>>> List info (subscribe/unsubscribe/change options):
>>>> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across
>>> Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable
>>> Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> -----
>>> squirrelmail-users mailing list
>>> Posting guidelines: http://squirrelmail.org/postingguidelines
>>> List address: [hidden email]
>>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>>> List info (subscribe/unsubscribe/change options):
>>> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>>
>> ------------------------------------------------------------------------------
>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>> Get real-time metrics from all of your servers, apps and tools
>> in one place.
>> SourceForge users - Click here to start your Free Trial of Datadog now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>> -----
>> squirrelmail-users mailing list
>> Posting guidelines: http://squirrelmail.org/postingguidelines
>> List address: [hidden email]
>> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
>> List info (subscribe/unsubscribe/change options):
>> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
>
> ------------------------------------------------------------------------------
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> -----
> squirrelmail-users mailing list
> Posting guidelines: http://squirrelmail.org/postingguidelines
> List address: [hidden email]
> List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
> List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Loading...