-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
24 lines (17 loc) · 973 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Parallels Plesk Mail Check Script
Description
Produces a summary report of mailboxes above a certain percentage or over quota which is emailed to an
administrator via crontab. Ramon's original version dropped messages but I wanted a quieter version.
To Install
1) cd /usr/local/psa/admin/htdocs/
2) git clone git://github.com/ghazlewood/mailcheck.git
3) cd mailcheck
4) TODO rename mailcheck_config.sample.inc.php to mailcheck_config.inc.php
5) Add user to mysql with something like
GRANT USAGE ON *.* TO 'mailcheck'@'localhost' IDENTIFIED BY '123456789changeme';
GRANT SELECT ON `psa`.* TO 'mailcheck'@'localhost';
6) Customise the domain and postmaster/admin mailbox in mailcheck_config.inc.php
7) Add a cron.daily/weekly entry as below
#!/bin/sh
# Checks sizes of all mailboxes (approaching and over quota)
php -d open_basedir=/var/qmail/mailnames:/usr/local/psa/admin/htdocs/mailcheck/ -d safe_mode=0 -f /usr/local/psa/admin/htdocs/mailcheck/mailcheck.php