How to block e-mail relaying?
Relaying is when the machine sending the e-mail message is not your local machine
and the machine receiving the e-mail message is also not your local machine.
Spammers relay millions of e-mail messages through an open relay to disguise
the source of SPAM. This is why blocking relaying is A Good Thing.
On UNIX machines, I know of three ways to prevent spammers using you as a relay:
Simply kill the Sendmail daemon.
This prevents the machine receiving e-mail and so will prevent relaying.
This is the appropriate solution for almost all workstations.
Having killed the Sendmail daemon, you need to run Sendmail every 15 minutes
or so to clear the queue. You can do this either via cron or by invoking
Sendmail with something similar to:
/usr/lib/sendmail -q15m
With no Sendmail daemon running, e-mail sent to the machine will need to
be redirected to your mail hub using DNS MX records.
If you cannot use MX records for some reason (I couldn’t) then e-mail sent
to the machine will queue on the sending machine, probably for several days.
This is impolite and can be avoided by running a dummy SMTP server
that rejects all incoming e-mail.
Install Sendmail Version 8.9.x or later.
The later versions of Sendmail block relaying by default.
Install Kai’s SpamShield.
This Perl script works by scanning the Sendmail Version 8 log file
every few minutes and disconnecting any discovered spammers.
SpamShield is particularly useful for ISPs as it can stop their users sending SPAM.
Note that SpamShield can be configured to only send e-mail about potential problems,
thus allowing an ISP to gain confidence before unleashing the beast.
All three ways are free.
Note that if you run a mail hub then it will only be secure against relaying
if the machines you permit to relay through it are also secure against relaying.
The easiest way to secure the other machines is by killing the Sendmail daemon.
On my mail hub I used Sendmail Version 8.8.8 with Claus Aßmann’s “check_*” rulesets.
These additional rulesets are built into Sendmail versions 8.9.x and later.
On my client machines I used a simple Sendmail configuration file that
punts all e-mail to a mail hub. I pulled it from the Internet years ago
and do not know who wrote it. It seems to work with all versions of Sendmail,
but note that it gives you no protection from relaying so you must block this on the client machines.

With so many work from home offers out there I am incredibly happy to find one that works!
Wow! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
I really liked your blog!
Very nice information. Thanks for this.
I found your site on google, great site, keep it up. Will return in the future. Submitted this post to Google News Reader.
Great job! Thanks, I learned something new.
I’d like to subscribe via google reader but not sure how to do that. Can you explain please?
I will try to enable it soon. Check back after a week, Perhaps same time next week.
I’d like to subscribe via email but not sure how to do that. Can you explain please?