ISPConfig 2 Squirrelmail Quota Plugin

Mindwatering Incorporated

Author: Tripp W Black

Created: 08/01/2014 at 02:14 PM

 

Category:
Linux
Configuration

Issue:
How to enable the quota bar in Squirrelmail in ISPConfig (2).

Solution:
1. Navigate to the Squirrelmail plugin folder.
# cd /home/admispconfig/ispconfig/web/squirrelmail/plugins/check_quota

2. Download the check_quota plugin from the squirrelmail.org web site. (Typically, use wget command.)
Note:
The instructions are in the INSTALL file within the tar.gz file. You have to uncompress it to see the instructions, which ironically, the first is how to uncompress it.
# wget http://www.squirrelmail.org/plugins/check_quota-versionnumber.tar.gz

3. Uncompress / extract the files:
# tar -xvfz check_quota-*.tar.gz
Notes:
This makes the check_quota folder and copies all the files.
This also gives you the INSTALL folder so you can follow the instructions there.

4. Make production file from the config.spample.php file of the config file:
# cp config.sample.php config.php

5. Choose how your are going to give the apache2 server access to view quotas. (e.g. sudo or the other hack). Configure access to the quota executable.
Assuming you do sudo, here are the ISPConfig specific environmental things to know.

a. Quota Type: 0 (UNIX / filesystem)
b. Sudo: /usr/bin/sudo
c. Quota: /usr/bin/quota
d. Use visudo add the following line:
# visudo
Do one of the following:
- If Squirrelmail is installed in the path in step 1 above, add the line:
admispconfig ALL=NOPASSWD: /usr/bin/quota -v *
- If you did a custom install of Squirrelmail, the www-data is the httpd/apache2 user. Add this line instead:
www-data ALL=NOPASSWD /usr/bin/quota -v *
- Use <control>+W keys to close and save the file.

6. Test your web servers access to use quota now:
# su -admispconfig
$ /usr/bin/sudo /usr/bin/quota -v web123_shortname
If you get a password prompt, you probably misspelled or entered the wrong ID for the httpd user. Otherwise, it will give the quota information for the user queried unless they don't have one.
$ exit
(to return to the # root prompt)

WARNING:
Within ISPConfig, if you have the Site limit to say 2048 MB and don't set individual limits to the mail users within the site, by leaving them -1, then there quota will return that they have none, but their account will reject mail at 2048MB.

7. At this point, edit the config.php file and enter your configuration values from step 5 above:
# vi config.php
Note: You can also enable the options page debugging page. Don't forget to turn that off once you are working for step #6.

8. Now that you are done, enable the plugin by going up 2 levels and running the configure program:
# cd ../..
# ./configure
- Take selection 8 for plugins,
- Click the entry number for check_quota plugin and it will move sections from available to the enabled/ in use ones.
- Choose R to return to the menu and choose S to save.

9. Test by logging back into a Squirrelmail account and see if the quota shows up under the left menu.
Note: We had to log out and re-log in a couple minutes before it seemed to just "take".


previous page

×