Muffinresearch Labs by Stuart Colville

Sendmail Backup MX | 0 Comments

Posted in Linux/Unix on 26th October 2004, 7:07 pm by

One project I had whilst at Eclipse Presentations was to provide a solution to the perrenial problem of being able to read mail that is spooling on a back-up (linux) mail server. To that end I started to writea web-based solution using PHP and MySQL that could read the queue files and dump them into a database. You could then view the mail in a similar way to Hotmail or any other webmail. This was going well until I decided to re-think the idea.

The Re-think

I had an idea which was why don’t I try to redirect the mail so that it’s delivered by Sendmail to IMAP accounts on the Linux box? This seemed even better as it would then be possible to hook up Thunderbird with a bunch of localised IMAP accounts. Check out the downloads page for the full guide on how to set up a server to do just this. The latest version of the document shows you how to utilise the chainmail milter to facilitate the mail redirection to the local IMAP accounts.

The How-to

This document takes you through installing and setting up a back-up mail server on your network. For example I have used this method to provide a fallback server in a network using Microsoft Exchange 2003. I have also used the same method to provide a back-up for Sendmail on a webserver with several domains. Some level of Linux experience will be necessary but everything is explained in this guide. If anyone has any addendums or notes to add then please feel free to drop me a line here

Update: 26-10-04

Here is the latest version of this document which provides in addition to a guide to creating a back-up MX a way of being able to divert the spooling mail to local email accounts using the chainmail milter. This means you can set-up IMAP or POP3 accounts pointing at the back-up mail server to read mail from that server.

Post Tools

GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(2)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.457s.