I finally got around to upgrading wordpress to the newest version. I'm hoping this might help thwart the large amounts of comment spam I've been getting lately as well so I don't have to approve comments anymore. The upgrade was rather painless and I was able to use my slightly modified default theme from 1.2. I did the upgrade as per the
canadian translated instructions as well which was fun :)
posted at: 15:16 |
path: /general |
permanent link to this entry
I installed dspam 3.0.0 many moons ago and set it up for single user usage through procmail for my main email account. It worked very well indeed and has been doing it's job well. I decided today to upgrade and change to a server based install so that everyone can use it. Since it was a bit of a pain to install I thought I'd share some details as to possibly help someone else in a similar situation.
First, I'm running debian unstable with exim 4 as the MTA. I was running mysql 4.0 but upgraded to 4.1 as it was recommended in the latest version of dspam (3.4.4 at this time). The mysql upgrade was painless (
apt-get install mysql-server-4.1) and didn't break anything else I am using it for.
The next step was getting dspam installed. It's not currently a debian package but work is being done to change that at
http://alioth.debian.org/projects/pkg-dspam/ I downloaded the latest cvs version of the files from there and created debian packages using the
dpkg-buildpackage -rfakeroot command. This produced the debian packages I needed to install. To save some time, you can
download the deb's that I created for version 3.4.4. You will need to installed the dspam-mysql_3.4.4-1_i386.deb & libdspam6-mysql_3.4.4-1_i386.deb files.
Next you'll need to setup the mysql database (if your using mysql that is). Create a database and give a user the proper access to the database. Then, import
mysql_objects-4.1.sql into the database to create the table structure.
Now, edit the
/etc/dspam/dspam.conf file and change the TrustedDeliveryAgent option to "/usr/sbin/exim4". You will also need trust the Debian-exim user to run dspam. You will find a few lines of "Trust
username" in the file, add a line for Debian-exim. Also provide the database details for the mysql server in the proper location. In debian the mysql.sock file is located in /var/run/mysqld/mysqld.sock
The final thing you'll need to setup is exim itself. You can do so by editing the /etc/exim4/exim4.conf.template file and adding the following routers and transports. It is important to add these in the right locations in the file. For the router add the following after the userforward router (and right before procmail):
dspam_router:
no_verify
check_local_user
# When to scan a message :
# - it isn't already flagged as spam from Spamassassin
# - it isn't already flagged as spam from DSPAM
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
# - it is less than 512k in size
condition = "${if and {
{!def:h_X-Spam-Flag:}
{!def:h_X-FILTER-DSPAM:}
{!eq {$received_protocol}{local}}
{ < = {$message_size}{512k}}
}
{1}{0}}"
headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
driver = accept
transport = dspam_spamcheck
# Which users to run dspam for.
#local_parts = /usr/local/etc/exim/dspam-testers
dspam_addspam_router:
driver = accept
local_part_prefix = spam-
transport = dspam_addspam
dspam_falsepositive_router:
driver = accept
local_part_prefix = nospam-
transport = dspam_falsepositive
Add the transports to the file after the "begin transports" line:
dspam_spamcheck:
driver = pipe
command = "/usr/bin/dspam --deliver=innocent --user ${lc:$local_part} -f '$sender_address' %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = Debian-exim
group = Debian-exim
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
dspam_addspam:
driver = pipe
command = "/usr/bin/dspam --class=spam --source=error --user ${lc:$local_part} -f '$sender_address' %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = Debian-exim
group = Debian-exim
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
dspam_falsepositive:
driver = pipe
command = "/usr/bin/dspam --class=innocent --source=error --deliver=innocent,spam --user ${lc:$local_part} -f '$sender_address' %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = Debian-exim
group = Debian-exim
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =
And that should do it. Run update-exim4.conf and restart exim with /etc/init.d/exim4 restart If all goes well everything should be set. A couple of notes however:
- Make sure the dc_use_split_config config option is set to false in the update-exim4.conf.conf file, or do the editing to the indvidual smaller config files of exim4.
- You may need to run chown -R Debian-exim.Debian-exim /var/spool/dspam to set the proper permissions for dspam+exim4
For more information on the above topics you may wish to check out the following pages:
posted at: 18:47 |
path: /debian |
permanent link to this entry
Every time I setup a new machine I at some point end up having to install the flash plugin for the browser as it's impossible to browse some sites without it (grrrrr). As I was browsing around this evening, I noticed that many sites use flash for advertising, and many other just retarded uses of flash that use up my precious cpu cycles only to display annoying content. It was at that moment that I thought, "hey, I bet there is a firefox extension to block flash, but still let me view it if I choose to do so"... and sure enough, there is. Head on over to
flashblock.mozdev.org to install the extension. It replaces all flash with a nice little button that you can click to then view the flash if you so choose to.
posted at: 23:11 |
path: /general |
permanent link to this entry