Plesk Qsheff Watch
(c) 2007 - prosign.HM
http://www.prosign.hm - http://www.haggybear.de
modified by Andreas Klein with permission



-------------------------------------------------------------------------------------------------

Version history:

0.5: maintained by haggy
0.6: 

+ Improved log handling for speed
+ Modified output.

0.7:

- Corrected bug in auto-updater
+ Added parameter "RECVFROM_LOCALHOST" (true|false) to config.inc.php to exclude (false) logentries
  with mails received from localhost (for example due to internal forwarding).
+ Added script qshefflog.sh to strip the log from -x days from today from qsheff.log (should be run 
  by cron). The created qsheff_old.log can then be processed by logrotate or savelog. The script can also 
  cleanup the qsheff quarantine directory if enabled
+ Added resend option of recognized spam messages if qsheff quarantine option is used. The option needs to 
  be enabled via config.inc.php (QUARANTINE_MGMR) and the script restoremsg.sh needs to be adapted 
  for the proper qsheff quarantine directory. Be aware that subsequent spam checks will remain active so
  even when forwarding the message might be deleted again when the destination mailbox has "Delete spam
  mail when it comes to mailbox" activated. Thanks to Haggy for the wrapper source code.

0.8:

+ When using the spam resend option, the spam message is now compressed with gzip to avoid problems
  with subsequent spam checks.
! Reworked the updater to point on www.akxnet.de, scripts (*.sh), wrapper and config.inc.php will 
  never be updated automatically.
- The domain-comparison to determine whether a mail is local, inbound, outbound or relay was case
  sensitive.

ToDo:

Presently nothing.

-------------------------------------------------------------------------------------------------


Install Instructions:

1)
-Change into you Plesk Admin htdocs directory (e.g. /opt/psa/admin/htdocs)
-Make a directory for the Plesk Qsheff Watch (e.g. "mkdir qsheffwatch")
-Set chown of the directory you made above to root:psaadm ("chown root:psaadm qsheffwatch") 
-Set chmod of the directory you made above to 755 ("chmod 755 qsheffwatch")
-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 the wrapper to chown root:root ("chown root:root wrapper")
-Set the wrapper to chmod 4755 ("chmod 4755 wrapper")

-copy the qsheff-log to your "daily cron dir" e.g. for debian "/etc/cron.daily" 

============================================================================================================
IMPORTANT IF THE QSW DON'T WORK ON PLESK 8.x (WHITE SCREEN), SET ALL FILES TO 775
============================================================================================================

-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 qswlogo.gif of the ZIP
URL: your directory you made above an the index file (e.g. "/qsheffwatch/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 manager their subdomains)

3)

Configure qshefflog.sh and activate it via cron (if intended to use)

4)

Configure quarantine management (config.inc.php and restoremsg.sh) if activated in qsheff
and intended to use.


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 


Thats it!

Have Fun!

19.07.07 Haggy (ich@haggybear.de)

30.11.07 akxak (qsw@akxak.de)