Management: "Spam Proof" Email Hosting

It is great to have a web site ! But, to have a successful web site you also need to make it easy for visitors to your web site to contact you. Unfortunately, this also provides a convenient way for email address harvesting programs to find you so that they can bombard you with junk mail.

For Starters
First, you need to make sure that your email software is capable of filtering incoming email. If you are managing your own mail server, you can install a program like spamassasin that will help. Most email client software, like Thunderbird, Eudora, Outlook, Pegasus and Netscape have junk mail filters and the capacity to establish filters for particular email content.

Your mail server will probably need to be setup with a generic email address to receive any misdirected mail — for times when an email address intended for you is misaddressed. Some companies use these email addresses to collect junk on the basis that if someone really wants to contact you they will try again or give you a call. Email aliases, additional email addresses that send email to a single real address, are also a very valuable resource.

As an example of alias usage, you might be a one-man show, but to impress your clients you might have a CEO address of theboss@mydomain.com and aliases of sales@mydomain.com, info@mydomain.com and support@mydomain.com. The sales, info and support email addresses are set up as aliases that redirect email to theboss@mydomain.com automatically.

Limiting Your Exposure
Try to determine where someone might be obtaining your email address from. This is, quite frequently, your own web pages. Once it has been 'farmed', it will probably be included in an email list that will probably be sold repeatedly to spammers. Once this happens, you invariably will have to change your email address.

Primary Email Discovery: Your Website
This is now probably the biggest source of email addresses for spammers. Most sites list multiple contact addresses, each of which can be farmed if they are included in plain text form. There are ways to avoid this by using javascript to construct valid email addresses for legitimate users.

Some examples are provided below.

Primary Email Address Discovery — Other Web Forms & Email Newsletters
When subscribing to email newsletters, or providing your email address to other companies using their web forms, try to use either a catch-all email address or, for more important instances, use a separate email address for each application.

Rather than using your real email address, use your web site as your web site email address. If you subscribe to a mailing list with a generic email address, for example as mysite.com@mydomain.com and this is redirected to your real email address, if you ever start receiving junk email you will be able to tell where it came from then easily block that mail.

Free links pages, which you will want to use to improve your search engine rankings, are infamous for flooding the world with junk mail. You may want to eliminate the email address you have provided to the links server as soon as you have established your links to reduce your exposure to spam.

Tertiary Email Address Discovery — Domain Name Registrations
When you register a domain name you have to provide at least 3 email addresses. This is necessary because there are technical and administrative issues (you have to pay the annual fees) for which the registrar will need to contact you. It used to be that providing your real email address to registrars guaranteed volumes of spam mail.

Nowadays, most registrars will lock your domain records and prevent your email address being acquired for nefarious purposes. Just in case, however, you might consider using a particular alias. If this alias starts to get bombed with junk mail, you know which one to change.

Securing Your Website — Avoiding Spam Robots (Spambots)
If you have a web site you want as many search engines to visit as many of your pages as frequently as possible as you can get them to do so. Should you be perverse and not want your web pages scanned by search engine robots you can create a robots.txt file that will limit their activity. Unfortunately, robots that are harvesting email addresses from your web pages do not honor your robots.txt file rules.

So, how do you prevent them from harvesting your email addresses, necessary for legitimate visitors ?

Use JavaScript To Mask your Email Addresses
Javascript is a programming language. A scripting programming language. Robots, or spiders as they are also know, cannot run scripts. This means that if you replace a regular, plain text email address with a few lines of Javascript, the harvesters won't be able to discover your email addresses from your web pages. Visitors to your web site, on the other hand, will be able to retrieve your email address and contact you as easily as if the address was provided in plain text (like myemail@mydomain.com).

Here are a couple of examples you can use anywhere on your web page where you want your email address to appear. Incidentally, these are known as MAILTO: links.

A Clickable Link — No Email Address Displayed

<script type="text/javascript">
<!--
var ename = "myemail";
var dname = "mydomain.com";
var linktxt = "We'd like to hear from you. Email us.";
document.write("<a href=" + "mail" + "to:" + ename + "@" + dname + ">" + linktxt + "</a>")
//-->
</script>

A Clickable Link — Displays Your eMail Address
This is probably a better option as it displays your actual email address for those that can't use a MAILTO: link for some reason and need to type your email address into their mail client.

<script type="text/javascript">
<!--
var ename = "myemail";
var dname = "mydomain.com";
var linktxt = ename + "@" + dname;
document.write("<a href=" + "mail" + "to:" + ename + @" + dname + ">" + linktxt + "</a>")
//-->
</script>

Using A Contact Form
Sometimes you just want more control over the kind of email you receive. You may want to include specific keywords so that your mail filters can route your incoming mail more usefully. This is best achieved through the use of a web mail form.

There are many free scripts in a multiplicity of languages, Java, ASP, PHP and Perl, providing form email capabilities. These vary in complexity from very simple two field forms, sender and content with little or no spam protection, to multiple fields with drop-down lists and various methods for reducing spam.

Remember though, just because you are using a form does not protect you from an email address harvesting spider. You still need to script encode your email address to prevent the spambot from acquiring your email address(es).

Here is an example of such a script for a form:

<script type="text/javascript">
<!--
var ename = "myemail";
var dname = "mydomain.com";
var linktxt = ename + "@" + dname;
document.write("<input type=hidden name=email value=" +ename + "@" + dname" + ">";
document.write(ename + "@" + dname);
//-->
</script>

URL Rewriting — Something To Be Avoided If Possible ?
URL rewriting refers to the changing of the URL (universal resource locator address) by the web server itself. This is a module provided for both Apache, the most widely used web server, and Microsoft's IIS. These modules can rewrite addresses based on regular expression processing. This is not normally a simple thing to do although you will be able to find examples on the Internet. Note that you will need to be able to create module configuration rules in a file on your server.