Chapter 7. Avoiding Being An Open Mail Relay

A mail relay is a machine which lets other machines send email through it. This is not necessarily bad. You can decide which other machines to permit to do this. But it is possible to be an open mail relay which lets anyone send email through your machine. Spammers love such machines, and if you accidentally allow open relaying, sooner or later, a spammer will use your machine's facilities to forward spam mail. This is a very nasty experience.

Services exist now to check your mail setup to make sure it is not accidentally an open relay. If you have configured Lokkit so that your mail port is open, Lokkit will offer to check for relaying for you. If you select OK at the Check for relaying? dialogue box, then Lokkit will connect to a test program at the Relay Spam Stopper site. This site attempts to relay email via your machine in several different ways. It should be not able to manage this.

Lokkit will tell you what the test results were. If you are using an up-to-date distribution with all the latest package updates, you will probably be fine. If you have an old distribution, one without updated mail packages, or if you have made changes to the mail configuration, then you may not be. Lokkit is not clever enough to correct your email setup, but if the results of this test say you have an open relay, then you will almost always be able to correct this by going to your distributor's website and checking for, downloading and applying all the latest updates for whatever mail transfer agent your machine uses. It will almost certainly be exim (for Debian users, for example) or sendmail (for Red Hat users). You may also want to check for updates for any programs which are used to configure things: for example, linuxconf, or SuSE's yast.