Web interface |
Top Previous Next |
We provide sample ASP and PHP pages that interface with the quarantine database. The webserver does not need to communicate in any way with the server where SpamFilter is installed on. The web server instead does need to connect to the database server. We recommend using an UDL file for the database connection in the ASP/PHP code, as you are able to place this file in a secure location on the webserver, outside the public web area, making it harder for intruders to gain access to it. The UDL file can contain the database password, so you will not have to store it in the web pages. The database connection is defined in the db_Connect web page The important part in using the web interface is choosing a way to authenticate users. We provide a tblLogins table in the database that can store a list of Email addresses and passwords. Our sample authenticate.asp and authenticate.php pages perform authentication based on that table. You can choose your own authentication schema and create your own pages to authenticate in other ways. At the end, ensure that the authenticated email address will be stored in a session variable. The ListSpam and ResolveSpam pages list and deliver the emails belonging to the address stored in the session variable. For the ASP pages only (PHP version will follow soon) we created a sample Register.asp page where users can self-register for the quarantine access. Users can enter their email address, it will be stored in the tblLogins table, a random password will be generated and emailed to them. With it they will be able to then access their quarantine area. Starting from SpamFilter ISP v 2.1, when an end user forces the delivery of a quarantined email to his mailbox, the sender of that email will be whitelisted so that the number of false-positives (good emails wrongly classified as spam) is reduced. The list of user-created entries is stored in the file AutoWhiteListForceDelivery.txt. The whitelisting is on a per-user basis, meaning that a sender is whitelisted only when he sends emails to that specific recipient. This will prevent a user mistakenly whitelisting a spammer, who could then send spam to all of your users. Note that in the free version of SpamFilter, the web interface will not deliver emails to the recipients! The tblQuarantine has a Deliver field and an Expire field with default values of 0. Changing the Deliver field to 1 will cause SpamFilter to deliver that email within 10 seconds. Changing the Expire field to 1 will cause SpamFilter to erase that email from the database within 1 hour. The web pages simply update these two fields to deliver and delete the emails.
|