------------------------------------------------------------------------------------------------
(C)2014-2018 - Matthias Hackbarth - http://www.haggybear.de
Plesk Greylisting Manager

History:
2.7        (23.05.2018) - Plesk 17.8.x Support 
2.6        (13.03.2018) - Full Plesk Onyx Support
2.5.2      (29.01.2016) - Bugfix SQLite rights after running GLM
2.5.1      (23.12.2015) - Performanceupdate for personal white-/blacklists
2.5        (14.03.2015) - Plesk 12 performance optimize
2.4.2      (29.08.2014) - Security issue fix. Reseller were able to see the administration!!
2.4.1      (15.06.2013) - Bugfix serverwide white/blacklists for Plesk 11 and higher
2.4        (11.06.2013) - Fixes for Plesk 12.x.x and automatic setup of sqlite database rights
2.3.2      (22.08.2013) - Fix for E-Mail aliases when trying to put then on a personal list
2.3.1      (23.06.2013) - Fixes for Plesk 11.5.x
2.3        (04.03.2013) - Quicklink integration in the left Menu of the Plesk Panel for the admin
2.2.1      (24.10.2012) - Improvement of the mail analysis
2.2        (16.10.2012) - Analyze mail communication to show the mail processing of qmail/postfix
2.1.2      (06.08.2012) - Bugfix deleting personal white/blacklists in Plesk 11
2.1.1      (18.07.2012) - Bugfix editing personal white/blacklists in Plesk 11
2.1        (05.07.2012) - Several bugfixes in personal white/blacklists and administration
2.0.6      (03.05.2012) - Bugfix that no one execpt the admin can access the GLM
2.0.5      (28.04.2012) - Bugfix if a additional domain user in Plesk 10 try to use the GLM
2.0.4      (28.03.2012) - Code review to prevent unnecessary warnings
2.0.3      (05.03.2012) - Fixes the error while try to add an entry to the personal blacklist
2.0.2      (02.03.2012) - Bugfix of the datebox at the domain and overview
2.0.1      (28.02.2012) - Bugfix for Plesk 9.x to run GLM
2.0        (24.02.2012) - Complete new GUI and code redesign. Fully ajax improved.
1.2.7      (02.02.2012) - View fix for Plesk 10.4.x
1.2.6      (28.09.2011) - Fullscreen mode for Plesk 10 added and polish language file included.
1.2.5      (17.08.2011) - Bugfix for Plesk 10. Wrong CSS implementation!
1.2.4      (24.07.2011) - New jQuery 1.4.2 embedded and bugfix of personal white-/blacklists
1.2.3      (10.03.2011) - Bugfix of IP-Info and statistics view! (not shown after click)
1.2.2      (16.02.2011) - Implementation for Plesk Version 10.1.1 and higher so use the GLM without
                          the HaggybearController. Custombutton path is like in Plesk 9. (e.g. /glm/index.php)
1.2.1      (24.01.2010) - Personal white/blacklists improved for silent adding from the overview
1.2        (21.01.2010) - Personal white/blacklists added to set different lists for each email address
1.1.1      (05.01.2010) - Supertoken for admin remote access added
1.1        (31.10.2010) - Remote access added to read the glm details via xml
1.0.2      (24.08.2010) - Fix for Safari to browse and use the administration. GLM Flattr-Button embedded.
                          Flattr-Button can be deactivated in config.inc.php
1.0.1      (07.06.2010) - Many layout fixes. Collecting and checking of IP/email data improved and speeded up.
                          French translation added. Thanks to Samuel Guerbadot (losdelsolo@hotmail.fr) !!
1.0.0      (18.01.2010) - Automatic abuse function for admin to inform the webmaster of the spamming server.
                          The template for the generated mail can be edited in the administration. Some Bugs
                          are fixed for the final V1.0.0
0.9.9      (27.08.2009) - White/Blacklist management improved and some view fixes. 
0.9.5      (28.06.2009) - CSV export added and some fixes in domain view 
0.9.2      (12.06.2009) - Fix in overview statistics that all domains are shown again 
0.9.1      (11.06.2009) - Fix for IE
0.9        (11.06.2009) - filter settings are staying during a search and quiet placement of the
                          IPs to the white/blacklist
0.0.5      (03.06.2009) - New icon by martin-tomczyk.de and lists fix for IP entries
0.0.4      (22.05.2009) - Spanish language added domain statistics in overview added
0.0.3      (07.05.2009) - selection "all" fixed, and date selection added
0.0.2      (06.05.2009) - white/blacklist management added and bugfix in administration view
0.0.1      (04.05.2009) - first public release
------------------------------------------------------------------------------------------------

Install Instructions:

1)
-Change into you Plesk Admin htdocs directory (e.g. /opt/psa/admin/htdocs)
-Make a directory for the Greylisting Manager (e.g. "mkdir glm")
-Set chown of the directory you made above to root:psaadm ("chown root:psaadm glm") 
-Set chmod of the directory you made above to 755 ("chmod 777 glm")
-Extract all files of the ZIP into that directory
-Set chown of all files to root:psaadm ("chown -R root:psaadm *")
-Set chmod of all files to 755 ("chmod 755 -R *")
-Set chmod of all txt files to 777 ("chmod 777 -R dbs/ *.txt")
-Set the wrapper to chown root:root ("chown root:root sh/wrapper")
-Set the wrapper to chmod 4755 ("chmod 4755 sh/wrapper")

The wrapper is compliled on a 64 bit system with Plesk 10. If you want (or have)
to compile your own wrapper just do this:

cd sh
wget http://www.haggybear.de/download/wrapper/psa9-11/glm2.zip
unzip glm2.zip
gcc wrapper.c -o wrapper
strip wrapper
chown root:root wrapper
chmod 4755 wrapper
rm glm2.zip wrapper.c

IF NO ENTRIES ON PLESK 11.5 OR HIGHER WILL BE SHOW JUST CHANGE THE PERMISSIONS OF THE
SQLITE DATABASE FOLDER AND DATABASE FILES: 
"chmod 775 /var/lib/plesk/mail/greylist"
"chmod 775 /var/lib/plesk/mail/greylist/*.db"

============================================================================================================
IMPORTANT THE GLM DON'T WORK ON PLESK LOWER THAN VERSION 9!!!
============================================================================================================

-make your settings in file config.inc.php

2)
-Login to your Plesk as admin
-Make a new Custom Button with the following settings:

Button label: Just choose a name ;-)
Location: Domain administration page
Priority: 100
Background image: choose the glmlogo.gif of the ZIP
URL: your directory you made above an the index file (e.g. "/glm/index.php")
Include domain id: yes
Include domain name: yes
Include FTP Login: no
Include FTP password: no
Include client id: yes
Include client's company name: no
Include client's contact name: no
Include client's e-mail: no
Context help tip contents: whatever you want
Open URL in the Control Panel: yes
Visible to all sub-logins: yes (if your clients are allowed to use the glm) ["no" in Plesk 10.x]


IF YOU'RE USING THE ADDONS WITH PLESK 10.x A SPECIAL CONTROLLER IS NEEDED!
DOWNLOAD THE CONTROLLER AND INSTALL WITH THE INSTRUCTIONS FROM THE INSTALL.txt
Download -> http://haggybear.de/download/psa10_controller.zip 

Since Plesk 10.4.x no additional controller is needed!

Thats it!

Have Fun!

04.05.09 Haggy (ich@haggybear.de)
