Archive for Linux

SpamAssassin: Can’t locate Mail/SPF/Query.pm

If you have SpamAssassin installed and see “Can't locate Mail/SPF/Query.pm in @INC...” in your error logs, you need to install Mail::SPF::Query.

SpamAssassin uses SPF to detect header and email-source forgery - very important in determining if e-mail is legitimate or not.

To install Mail::SPF::Query, run these commands as root:

perl -MCPAN -e shell
install Mail::SPF::Query

If you haven’t yet added SPF records to your DNS, you can find out more at the Sender Policy Framework site

Comments

GPG: There is no assurance this key belongs to the named user

In GnuPG, if you get an error saying “There is no assurance this key belongs to the named user” when trying to encrypt, you need to sign the public key.

You can sign the key by typing “gpg --sign-key user-id” at the command prompt.

Footnote: I came across this whilst migrating our e-commerce system to a new server. The system uses GnuPG to encrypt the order/credit card information and then emails it to our sales team. I’m making sure I document the process fully, so that I don’t have to spend so much time figuring this stuff out again! :)

Comments

Change default language in bash

To change the default language in the bash console (shell, terminal, command line - whatever you want to call it), go to your user home (e.g. /home/username/) edit or make a .bash_profile, and add this line to it:

export LANG=en

For some bizarre reason, our new dedicated server from 1and1 defaults to German feedback, which is really handy when you’re trying to work on the shell!

Update - 2007-02-27: If you have a 1and1 server stuck in German, this solution above doesn’t work properly (it breaks some stuff). I’ve written up a much more elegant solution which does actually work (thanks to Scott from ART).

Comments

Apache - Redirect all requests to a single page

We’re migrating servers at work, and I needed to show a single “We’re moving” page no matter what URL was requested. Here’s how to do it permanently, and temporarily:

RedirectMatch permanent .* http://yoursite.com/migration.html

RedirectMatch temp .* http://yoursite.com/migration.html

Make sure you point to a different domain than the one you’re migrating! ;)

Comments

Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales