What is A-record spam (and how can you prevent it)?

A back door standing ajar, with post slipping through it

If you are an Onlinespamfilter customer and you suddenly receive six spam messages in one day, we can imagine that you start to doubt our service. After all, if we do our job well, an unwanted email should slip through only very occasionally at most. Usually, though, something else is going on: you are dealing with so-called ‘A-record spam’.

What is A-record spam?

You may be familiar with the term A record or Address record: a series of numbers that links a web or email domain to an IP address. A-record spam is spam that is delivered directly to your system by means of such an A record. With this method, the sender tries to get around spam filters. After all, if we don’t see the mail pass by, we can’t stop it either, and the same goes for every other online spam filter company.

When will you run into it?

You may never run into A-record spam, but about 10% of new customers do. This can have several causes:

  • You run your website on the same server (and on the same IP address) as your mail server. The spammer then takes a gamble that your web server, which has no spam filter running, will accept mail as well, and succeeds.
  • The spammer uses outdated data from the DNS (the phone book for mail servers) and tries to deliver spam to your server when he should actually be delivering it to us. We sometimes see this when a domain has only recently been connected, and it usually goes away by itself after a few days.
  • You have an A record ‘mail.yourdomain.nl’ or ‘mx.yourdomain.nl’ and it does indeed point to your mail server. Some spammers try this A record directly and so manage to get around our service.
  • In rare cases the spam is delivered to your own server from inside your network. This is usually a compromised computer within your own network.

How do you recognise A-record spam?

If you do come across a spam message, there are two ways to tell whether you are dealing with A-record spam:

  • Check whether you can find the message in our portal. If you can’t, the mail was indeed delivered directly to your system without passing through Onlinespamfilter.
  • Check whether you see an “X-OSF-SUM” header in the metadata of the spam message (via Properties > Message headers). We add this ‘tag’ to every email message we see passing by. If this header is missing, you can be 100% sure that the message did not come through our system.

What can you do about it?

As mentioned, Onlinespamfilter cannot stop A-record spam for you, but we are happy to help you take the right measures to keep it from bothering you. You can do the following:

  • Don’t run your mail server on the same IP address as your web server. Request a new IP address from your hosting provider and assign the new IP number to your email server (so leave your web server running on the old IP address!).
  • Don’t refer to your email server as ‘mail.example.nl’ or ‘mx.example.com’, but choose an unusual (and therefore not so easy to guess) A-record name.
  • Don’t have incoming mail delivered on port 25, as the internet protocol prescribes, but on some other random port. Then let us know that your system runs on, for example, port 36 or 2525. This shakes off A-record spammers, while you simply keep receiving your mail, neatly scanned by us.
  • If this doesn’t help, change your firewall settings so that it only lets mail traffic from our IP addresses through to your mail server. Block all IP numbers except ours (you can find our IP addresses in our documentation).

Watch out if you manage multiple email domains!

Do you manage several mail domains that are not all scanned by us? Then setting up an alternative port or blocking on your firewall is not an option. In that case you can configure the domains concerned to accept only mail that comes from our servers. This does fall under the heading ‘advanced’.
If you have any questions about (preventing) A-record spam, feel free to get in touch with us!