This is just a reminder to those people who run their own mail servers … make sure your backup MX’s are running properly.
Category Archives: Technical Tidbits
Creating Bootable Ghost Recovery USB Flash Drive
Those of you who follow my blog (or know me in person) are well aware that I’m a big fan of Norton Ghost backup software.
One of the major problems I’ve had with Norton Ghost is the fact that it only provides the ability to create a recovery CD … it doesn’t provide any ability to install the recovery software on a USB flash drive. USB flash drives are much faster that CD’s and are read/write, so they can be updated at a later date.
After a bit of digging, I’ve figured out how to create one without too much trouble.
Wake On LAN
There is apparently going to be a bit more getting used to this new laptop.
The other day, before I went to bed, I put my new Dell Latitude E6400 into standby mode … I’m 99% sure I did this.
The next morning, however, when I went down stairs I found my laptop powered on.
That evening, before I went to bed I hibernated the laptop.
Once again, the next morning, I found the laptop powered on.
Obviously this is pretty odd.
So last night I tried an experiment … I put the laptop into standby mode and, within seconds, it resumed from standby. I then put the laptop into hibernate mode … and 30 minutes later, it powered itself back up.
iPhone Buzzing
Ever since I got the iPhone, I’ve noticed that it causes nearby speakers (radios, desk phones, etc) to emit a buzzing noise.
The odd thing is, my boss Brian’s Blackberry does the same thing.
I finally found the reason why:
The cause of this buzzing has to do with GSM’s “time division nature. The ever-knowledgeable Keith Nowak, spokesperson for Nokia, explains it as follows: “[[With GSM]] the RF transmitter is turned on/off at a fast rate, and that ‘pulsing’ is often picked up by nearby devices that don’t have good RF shielding. In the case of GSM the pulse rate is 217 Hz, which can be easily heard.
When I put my iPhone in the clock radio / iPhone dock that Ginny got me for the holidays, it does the same thing. Luckily the dock isn’t recognized as being 100% iPhone compatible, so the iPhone offers to shut off the radio (go into Airplane mode) whenever I dock it. This eliminates the buzzing (mostly) because the phone isn’t transmitting.
Clean up /tmp
Recently I noticed that there’s a lot of temporary files in the /tmp directory on my mail server … all the files have spamassassin in the file name. I figured that in some cases, SpamAssassin (or programs it calls) isn’t cleaning up properly.
I whipped up this script that will clean up any spamassassin files & directories that are older than a set number of minutes (60 in my case)…
#!/bin/sh AGE=60 if [ "$1" == "--test" ] then CMD="-exec echo" echo "$0: test mode" else CMD="-exec" fi /usr/bin/find /tmp \ -mmin +$AGE \ -name spamassassin.ocr* \ $CMD /bin/rm -f '{}' \; /usr/bin/find /tmp \ -maxdepth 1 \ -mmin +$AGE \ -type d \ -name .spamassassin\* \ $CMD /bin/rm -rf '{}' \;
If you run the script with a parameter of ‘–test’, it will just show the commands it would have executed.
I put the script in /etc/cron.hourly directory so it gets executed every hour.
Thunderbird message list out of sync
Sometimes I find that the message list in Thunderbird gets out of sync with the message bodies. When this happens, if I click on a message in the list, the message body that is brought up doesn’t match the subject.
I found a easy solution … just shut down Thunderbird, delete the corresponding .msf file from the accounts data directory, and start Thunderbird back up. Thunderbird will rebuild the .msf file and everything should be fine again.
To find accounts data directory, click on the “Server Settings” category of the effected account and look at the “Local directory” field.
[tags]thunderbird, mozilla, email[/tags]
mod_auth_pam and flatfile
The other day I found myself needing to restrict access to a web site to only users who had logins to a system … while also allowing other users, who didn’t have logins, to access.
mod_auth_pam was the solution for the users with a login … and standard ‘htpasswd’ access was the answer for the other users … but getting the two to work together was causing problems.
A bit of Googling turned up this technique that solves the problem quite nicely.
AuthPAM_Enabled on AuthPAM_FallThrough on AuthAuthoritative Off AuthUserFile /path/to/htpassword AuthType Basic AuthName "Secure" Require valid-user
[tags]apache, authentication, htaccess[/tags]
Say NO to Backup MX’s
Word of advice … with a few exceptions, there is absolutely no need for most organizations to implement backup MX’s. In fact, if they are not setup and managed very carefully, they can cause significant harm to an organization.
In the past week I’ve had two people on my mailing lists get their subscriptions suspended because their companies backup MX’s were not configured properly.
For those who don’t know, a “Backup MX” is a mail server that can accept mail delivery if the primary mail server is not available. A domain’s DNS records have “MX” records that list the mail servers in order of priority. Sending mail servers will try to connect to the first receiving mail server on the MX list, if that connection fails, it will try the next, etc.
Why are they not needed and, more importantly, why can they cause harm?
- Not needed
- Most sending mail server will try to deliver mail for a few days (generally around 5). Even if your mail server is down for a whole weekend, the sending server will continue delivery attempts.
- Unless your organization is expecting a massive amount of email (and I’m talking about thousands of mail deliveries per second, the kind a major national ISP might get), most mail servers are more than capable of handling the load … and the extra work involved in maintaining the additional servers probably isn’t worth it.
- Why harmful
- If not configured properly, mail delivered to the backup MX might not be accepted … thus causing non-delivery errors. This is what happened to the subscribers to my lists. Their primary MX was accepting mail, but the backup MX wasn’t. The rejection messages were being processed by the list software and their subscriptions were suspended
- Backup MX’s are often not as spam & virus resistant as primary MX’s. For this reason, spammers and virus writers often target backup MX’s instead of primary MX’s.
In the end … backup MX’s do have their uses … but only if implemented where absolutely needed and managed very carefully.
Oh, and by the way, if you are having problems sending mail from a different system than your primary mail server … it’s not because you need a backup MX. It’s probably because the other system needs to have a reverse IP name setup in DNS. Many mail servers are configured to reject mail sent from systems that do not have reverse IP dns entries setup.
[tags]SMTP, mail, email, Mail Servers, MX records, DNS[/tags]
Disable IPV6
You can disable the ipv6 module by adding or changing /etc/modprobe.conf:
alias net-pf-10 off
After a reboot it should be gone.
Note: I only know that this works with Fedora Core 2 and higher.
[tags]Linux, IPV6, networking[/tags]
Generic Listname Identification
As you might suspect, I’m subscribed to a large number of mailing lists (most of which I host myself).
One of the problems with mailing lists is that, if you use a singe email address for all your list subscriptions, there isn’t an easy way to file individual list messages based on the list name.
The other day, however, I found a rather handy procmail recipe that helps with that work…
Continue reading