Setting up the web UI

The 'web UI' stands for the web user interface. It is a collection of PHP scripts, so to use it, you need a web server with PHP support.

Important! The register_globals PHP setting _must_ be turned off. If you really need to enable it at the php.ini level, then turn it off in your Apache httpd.conf or in a .htaccess file, eg.

php_flag register_globals off

Create the config.php via the setup tool

First, copy the webui/ directory to the proper destination folder, then configure your webserver to let the users access the web UI at an URL, eg. http://webui.yourdomain.com/. Of course you may put it under any path, such as http://www.yourdomain.com/dir1/dir2/clapf/webui/.

Point your web browser to http://webui.yourdomain.com/ and you are in the setup utility. Fill the input fields as appropriate. Finally remove group and world write permissions from the configuration:

chmod 644 config.php

Configuring the quarantine feature

clapf creates the per user directories with 770 permission. You have to add the webserver to be in the clapf group otherwise nobody can remove a message from the quarantine.

#usermod -g www-data clapf

#id www-data
uid=80(www-data) gid=80(www-data) groups=80(www-data),2110(clapf)

#grep www-data /etc/group
www-data::80:
clapf:x:2110:www-data

Configuring the history feature

Create the history database:

#mysql -u root -p
mysql>create database clapfhistory character set 'utf8';
mysql>grant all privileges on clapfhistory.* to clapf@localhost;
mysql>flush privileges;
mysql>quit;

mysql -u clapf -p clapfhistory < clapf-x.y.z/history/mail.sql

or if you want to store the history in sqlite3:

sqlite3 /var/lib/clapf/data/history.sdb < clapf-x.y.z/history/mail-sqlite3.sql

Edit clapf.conf, and set the historydb, maillog, and optionally the historypid variables:

historydb=clapfhistory
#historydb=/var/lib/clapf/data/history.sdb
historypid=/var/lib/clapf/history.pid
maillog=/var/log/maillog

If the historydb parameter has any slashes (/) then it's considered as an SQLite3 database, otherwise as a MySQL database.

Run the maillog.pl script to collect data:

/usr/local/libexec/clapf/maillog.pl /usr/local/etc/clapf.conf

Enabling logging

The webui logs its operation into a logfile. Be sure to restrict it with a .htaccess file (or equivalent)

Set cron jobs

root's crontab (optional):

### optional: query queue statistics
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape > /var/lib/clapf/stat/active+incoming
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape -s > /var/lib/clapf/stat/active+incoming-sender
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape deferred > /var/lib/clapf/stat/deferred
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape -s deferred > /var/lib/clapf/stat/deferred-sender

clapf's crontab:


### update the quarantine table
*/5 * * * * php /usr/local/libexec/clapf/qrunner.php /srv/www/webui.yourdomain.com

### purge of the stored messages from the queue directory
1 2 * * * find /var/lib/clapf/queue -type f  -atime +`/usr/local/sbin/clapfconf -q days_to_retain_quarantine_data|cut -f2 -d'='` -exec rm -f '{}' \;

### remove the aged spam images from cache directory
1 2 * * * find /srv/www/webui.yourdomain.com/cache -type f  -atime +`/usr/local/sbin/clapfconf -q days_to_retain_quarantine_data|cut -f2 -d'='` -exec rm -f '{}' \;

### count the number of quarantined messages
*/5 * * * * find /var/lib/clapf/queue/ -name s\.\* | wc -l > /var/lib/clapf/stat/quarantined.messages

### optional: show cpu usage
*/5 * * * * mpstat | tail -1 | awk '{print $12}' > /var/lib/clapf/stat/cpu.stat

### optional: send daily quarantine report to users
0 8 * * * /usr/bin/php /usr/local/libexec/clapf/quarantine-daily-report.php /srv/www/webui.yourdomain.com

### optional: regular AD sync
0 8 * * * /usr/bin/php /usr/local/libexec/clapf/ldap_sync.php /srv/www/webui.yourdomain.com > /var/lib/clapf/stat/adsync.stat

Addtional notes

Please note that you should not configure your webserver to authenticate your users with a .htaccess file or even your webserver configuration (eg. httpd.conf), because the webui authenticates users on its own. Though you can use a .htaccess file to restrict your users by IP-address.

Please read Upgrading for changes.

Note 1: The default sql schema has an administrative user 'admin' with a password 'admin', and 'admin@local' as his email to login. Be sure to change the password.

Note 2: the password field is the crypt()'ed password of the given user. The webui encrypts the plain text password, then stores it to the backend.

Note 3: SQLite3 is fully supported. You have to setup proper permissions on the database file as well as its directory, because the SQLite3 backend creates a journal file for every write (update, delete, …) command.

hirlevel@rothermetal.hu robi@rothermetal.hu ajandekkaracsonyra@medtron.hu dms@medtron.hu lipot.andrea@string.hu string@string.hu bearlock@bearlock.hu info@bestlogistics.hu bestoffice@citromail.hu oncz.illes@actel.hu kosakft@kosakft.hu loginadmin@wtcd.eu wtcd@wtcd.eu info@zebrasoftev.hu szalon@chevroletgyulai.hu ckdelta@iol.sk siklosi.zoltan@autogrid.hu info@mosolypontok.hu info@hykomm.hu info@eGlobalSurveys.com eurolock@t-online.hu info-hu@computerlinks.hu tavam@tavam.hu hotelinfo@haromsarkany.hu info@implantatum.hu nevess@nevetosok.hu info@usznp.hu tag@usznp.hu helyielnok@usznp.hu taginfo@usznp.hu adomany@usznp.hu korrupcio@usznp.hu partner@usznp.hu pszota@peugeotfabian.hu flotta@peugeotfabian.hu info@fabianbudaors.hu info@peugeotfabian.hu ertekesites@peugeotfabian.hu vevoszolgalat@peugeotfabian.hu alkatresz@peugeotfabian.hu hasznaltauto@peugeotfabian.hu varga@peugeotfabian.hu biroandras@peugeotfabian.hu biztositas@peugeotfabian.hu alkatresz@peugeotfabian.hu pappz@peugeotfabian.hu ertekesites@peugeotfabian.hu galambos@peugeotfabian.hu info@tintakiado.hu info@szakemberlista.hu dora.durjanc@dft-hungaria.hu szabo.judit@vasar.info info@csicsergo.hu info@vamdesign.hu info@civilmozgalom.hu uveges.szilvia@operagardenhotel.hu g.faska@operagardenhotel.hu sales@operagardenhotel.hu operagarden@operagardenhotel.hu sprinter@sprinterkiado.hu info@csicsergo.hu iwiw@civilmozgalom.hu ruzsicsm@csicsergo.hu hejja@csicsergo.hu seres@seresmaria.hu cmiroda@gmail.com civilmozgalom@gmail.com civilek@civilmozgalom.hu hibajelzesek@gmail.com kovari.erika@sprintmotorsport.com info@sprintmotorsport.com horvath.lazar@sprintmotorsport.com stiefel@stiefel.hu nagyker@stiefel.hu iskola@stiefel.hu ceges@stiefel.hu grafika@stiefel.hu grafika@stiefel.hu mintabolt@stiefel.hu info@natureshade.hu akcio@ssi-schaefer.hu info@ssi-schaefer.hu info@siodigit.hu sales@moziakertben.hu info@tunderkertkiado.hu diana.balogh@tunderkertkiado.hu ugyfelszolgalat@tunderkertkiado.hu info@netadmin.hu marketing@netadmin.hu helpdesk@netadmin.hu 7even@7even.hu regdony.jozsef@7even.hu 7even@affero.hu papp.csaba@7even.hu info@gumipark.hu marketing@ajandekozz.hu ugyfelszolgalat@maxxoutlet.hu info@ugyfelszolgalat@maxxoutlet.hu trainex@trainex.hu info@trainex.hu kcswolf@freemail.hu info@boldogjovo.eu nyomda@sprinternyomda.hu iroda@sprinternyomda.hu kepviselet@civilmozgalom.hu info@bidstorm.eu havancsak@havancsak.hu laszlo.havancsak@havancsak.hu aniko@havancsak.hu hirlevel@havancsak.hu hambek@havancsak.hu diadvd@diadvd.hu ugyvezeto@gyalog-h.hu info@fiszmedia.hu info@sabanorm.hu szfvar@sabanorm.hu bp@sabanorm.hu fodor.geza@yokozuna.hu info@yokozuna.hu ugyfelszolgalat@edmax.hu info@kazanwebaruhaz.hu info@klimawebaruhaz.hu info@dolphio.hu hr@dolphio.hu gasztonyi.peter@dolphio.hu support@news.dolphio.hu info@khf.hu info@cid.hu kozponti@ceg-info.hu info@1gomboc.hu info@magicice.hu marketing@magicice.hu eszekid@epitoforum.hu mek@epitoforum.hu szalaip@epitoforum.hu ferovicsz@epitoforum.hu dancsod@epitoforum.hu epkontroll@gmail.com info@brandshop24.hu pipoly@kizmantravel.com office@tanacsos.hu koveteles@tanacsos.hu edmbudapest@yahoo.com igazgyongy@dravanet.hu bathori@bathori.hu kincskereso@geniuszegyuttes.hu mesterember2010@gmail.com lykosmelas@gmail.com pongraczgabor@t-online.hu hello@marketingcommando.hu info@spp.hu info@lapszemle.hu register@re-search.hu info@re-search.hu info@uzletitervek.hu info@plutoreklam.hu plutoreklam@plutoreklam.hu leskovicspiro@t-online.hu tuzijatek-varazs@tuzijatek-varazs.hu ertekesites@crevo.hu info@crevocorp.hu gero.daniel@crevo.hu bonyar.miklos@crevo.hu support@crevo.hu tanacs.gabriella@crevo.hu gyartas@crevo.hu ksv@ksv.hu ugyfelszolgalat@ksv.hu voros.szilvia@ksv.hu balazs.eszter@ksv.hu info@forpsi.hu emailleiratkozas@freemail.hu domain@forpsi.hu admin@forpsi.hu szamlazas@forpsi.hu claim@forpsi.hu info@diamondtopconsult.hu berecz@diamondtopconsult.hu morocz@diamondtopconsult.hu den@opinionleaders.hu info@hirmedia.hu info@infosierra.hu tollasroland@gmail.com klimaklub@klimaklub.hu servian@t-online.hu fazekas.laszlo@borturak.hu info@borturak.hu simon.ariann@borturak.hu info@kftmarketing.hu marketing@hunguest-fenyo.ro fenyo@hr.astral.ro reserve@hunguest-fenyo.ro info@kolyokangol.hu hnemeth.viktoria@gmail.com katalin.welker@samling.hu balazs.sutka@samling.hu nora.sandor@samling.hu stella.erenyi@samling.hu peter.szabo@samling.hu katalin.kormos@samling.hu eva.sandor@samling.hu vera.tuba@samling.hu info@samling.hu info@neosoft.hu karasz.balazs@neosoft.hu bernadett@neosoft.hu viktor@neosoft.hu hirlevel@samling.hu info@kockazatertekeles.info munkavedelem@kockazatertekeles.info hepplaszlo@mediatime.hu hiba@szexpartnerem.net adooptimalizalas2010@gmail.com tollrol@vipmail.hu profitkommando@freemail.hu info@yourlife2000.hu info@mall.hu replyhu@nrholding.com info@konyvnet.hu konyvnetrendeles@gmail.com konyvnet.hu@gmail.com mail@fitmail.hu wellonline.hu@gmail.com info@lightmedia.hu kortvelyesi@t-online.hu info@i-business.hu director@caramell.hu titkarsag@caramell.hu salesdirector@caramell.hu marketing@caramell.hu info@caramell.hu info@elonyelvek.hu info@toeflibt.hu elonyelv@t-online.hu dmleiratkozas@freemail.hu uzemeltetes@evisual.eu elonyelvek@yahoo.com info@honlapteszt.hu hello@verdesjanos.hu info@zug.hu szerkesztoseg@zug.hu rolesz.tollaroand@citromail.hu info@jampub.hu informacio@cegnezo.hu ugyvezeto@cegnezo.hu marketing@cegnezo.hu jog@cegnezo.hu ertekesites@cegnezo.hu rendszerfejlesztes@cegnezo.hu tech@cegnezo.hu webmester@cegnezo.hu info@cegnezo.hu info@zarrud.hu henczi@enternet.hu henczi@mnyomozo.hu office@sport-gala.hu rendezvenyszervezes@sport-gala.hu hegyi@sport-gala.hu ferenczi.gabor@diotimail.com hirdetes@pont24.hu info@pont24.hu informacio@pont24.hu ugyfelszolgalat@alkupiac.hu ugyfelszolgalat@ingatlan24.com mail@holisztikusszalloda.hu bukfurdorally2010@gmail.com reklammegoldasok2011@gmail.com admin@marketingexpressz.hu ugyfelszolgalat@marketingexpressz.hu info@performia.hu informacio@netkozvetito.hu webszerk@pafi.hu szerklist@pafi.hu informacio@hitelzona.hu ugyfelszolgalat@hitelzona.com ugyfelszolgalat@szabadeuropa.com info@szabadeuropa.com info@nmsnet.hu valasz@nmsnet.hu info@horizonttitletrust.com megrendel@civilhirlap.hu civilhir.szerkesztoseg@gmail.com ugyfelszolgalat@netkozvetito.hu info@webrandi.hu czehmeiszter.j@gmail.com info@csillagvarazslo.hu leiratkoz.relaxa@t-online.hu relaxa.titkarsag@t-online.hu info@ingyenhivo.hu pfarago@skawa.hu info@skawa.hu info@tozsdeeloadasok.hu info@innoiq.hu support@innoiq.hu info@elemzeskozpont.hu info@civilhirlap.hu kerdes@gyorspenzonline.com ceginfonet@ceginfonet.hu info@ceginfobudapest.hu info@siofoknights.hu siofoknights@gmail.com tivadar.aron@arindex.hu info@arindex.hu feketem@arindex.hu zsoszeg@gmail.com info@hirlevelmegoldas.hu noreply@hitel.co.hu info@hitel.co.hu szombathely@hitel.co.hu horvath.beatrix@hitel.co.hu info@ingatlan1.hu hirdetes@ingatlan1.hu info@pannontoner.hu orsolya.rak@migaltranslations.com iroda@migal.hu ugyfelszolgalat@hitelek24.hu info@autocentrumszabo.hu info@fiatszabo.hu info@renaultszabo.hu info@fordszabo.hu info@catconsulting.hu info@zseron.com magabiztosanangolul@gmail.com csaba.schreiber@gmail.com schreibercsaba.angoltanar@gmail.com gyuratzkft@gmail.hu gyuratz@chello.hu gyuratz@upcmail.hu hirlevel@otthonteremto.hu info@otthonteremto.hu hu@migaltranslations.com info@neuronline.net iroda@kifogyott.hu error@blackservice.hu ajanlat@nyomda-nyomda.hu arajanlat@nyomda-nyomda.hu info@geonet.hu info@work24.hu bergerkonyvelo@gmail.com ingyen-konyveles@ingyen-konyveles.hu info@webmediainfo.hu hello@veddolcson.hu apongi77@gmail.com info@e-designer.hu gpek@visionext.hu gpek@gpek.hu szerkesztoseg@liferecycle.hu info@fxbulls.hu info@komarnoinyomda.hu sara.balazs@stability.hu info@mitegyek.eu info@zvk.hu office@fulldomain.hu gifton@gifton.hu pendrive_betakaritas@gifton.hu info@galoppfutar.com info@olinera.hu info@traveloutlet.hu mail@traveloutlet.hu info@mobil-homes.hu info@weblapkeszites.org.hu info@driveinstore.hu litomedia@gmail.com k.litomedia@upcmail.hu info@lineelectronic.hu ugyfelszolg@lineelectronic.hu polus@lineelectronic.hu mammut@lineelectronic.hu helpdesk@lineelectronic.hu ajanlatkeres@lineelectronic.hu csalami.janos@lineelectronic.hu hungexpo@hungexpo.hu info@hungexpo.hu pakozdi.jozsef1@hungexpo.hu sprinternyomda.kartyanaptar@happycard.hu tomibohoc@upcmail.hu varionett@upcmail.hu andrejszki.tamas@upcmail.hu info@orvoshop.hu e-dm@orvoshop.hu ranc-stop@ranc-stop.hu info@ekszershop.eu ekszershop@velvet.hu info.hu@calivary.com info@myskins.hu info@vilagszam.hu autoprofi@autoprofikft.hu karg@kargauto.hu office@mobiltelefonelado.hu will.krisztian@mobiltelefonelado.hu info@mobiltelefonelado.hu info@sztarportre.hu info@cegwebtar.hu info@havasweb.hu megrendel@zoldujsag.hu info@zoldujsag.hu zoldujsag@zoldujsag.hu andrea.farkas@servian.hu info@servian.hu hirlevel@servian.hu sprinternyomda.kartyanaptar@happycard.hu info@armada.hu parallel@parallel.hu hirlevel@bormesterek.hu cashback@mosaic.co.hu info@mosaic.co.hu konyv.ba@gmail.com info@businessmails.info bosszicica@gmail.com kapcsolat@sajatnaptar2012.com kapcsolat@mypet.hu info@e-designer.hu noreply@sajatnaptar2012.com richpoinews@gmail.com hirlevel@canonshop.hu info@canonshop.hu llumar@thomyfolia.hu info@jazzypub.hu hirlevel@jazzy.hu csaba.mezei@lightmedia.hu info@lightmedia.hu jurinovics@gmail.com mail@sikereskarterites.com info@jovotervezes.hu info@minibolt.hu info@ingyenhonlapkeszites.info webaruhazkeszites2@profiknak.info webaruhazkeszites@profiknak.info info@profiknak.info

© 2008-2011 SPAMtelenül. All rights reserved.  |  Feedback: sj@acts.hu  (public key) Atlassian JIRA