Scanning Email

Incoming email can scanned for spam and viruses on a per-domain basis. These features are not enabled by default. Please follow these instructions to enable them!

If you'd rather use the Bytemark Anti-spam service than run SpamAssassin? and ClamAV on the machine, then create the file config/bytemark-antispam. This will add the required DNS records too.

For example:

  • To switch on Bytemark spam rejection for example.com, just create the file /srv/example.com/config/bytemark-antispam.

This should start working within a few hours for an existing domain.

Scanning For Spam

To enable scanning and reject of junk email, simply create the file antispam in the config directory of the domain that requires it. This enables mail to be scanned for that domain. If an incoming mail is deemed to be spam, it will be rejected. If the domain does not require mail to be rejected, config/antispam should start with the word tag, causing all mail to be accepted, whether deemed to be spam or not.

For example:

  • To switch on spam rejection for example.com, just create the file /srv/example.com/config/antispam.
  • To switch on spam tagging for example.org, just create the file /srv/example.org/config/antispam with the word "tag" in it.

For emails that are accepted and deemed to be spam, the following headers are added to the message:

X-Spam-Score: 5.0
X-Spam-Bar: +++++
X-Spam-Status: Spam

If the email is not spam, then the headers look like this:

X-Spam-Score: 4.0
X-Spam-Bar: ++++
X-Spam-Status: Innocent

Scanning For Viruses

This is configured in a similar way to the spam scanning. Simply create the file antivirus in the config directory of the domain that requires it. Once again, the mail server will default to rejecting mail that it deems to contain a virus. If you would rather have the mail tagged, config/antivirus should start with the work tag.

For example:

  • To switch on rejection of emails that contain viruses for example.com, just create the file /srv/example.com/config/antivirus.
  • To switch on tagging of emails that contain viruses for example.org, just create the file /srv/example.org/config/antivirus with the word "tag" in it.

For emails that are accepted and determined to contain a virus, the following headers are added to the message (where virus_name is the name of the infection detected):

X-Anti-Virus: infected virus_name

Otherwise the header will be

X-Anti-Virus: not infected

Further Information