What is greylisting and how do I enable it?

Greylisting is a new anti-SPAM feature implemented in SmarterMail 4 and later.

Overview

Any time an e-mail is sent to a server which implements greylisting, the server will check the messages' originating server, the sender, and the recipient. If previous mail matching these values has already been sent through, the message will bypass the greylisting and deliver without issue. However if the message is "new" based on one of these attributes, the e-mail will be sent an error indicating the mail is temporarily rejected. This is often the case with Yahoo if you see a bounce back similar to the following:

421 4.7.0 [GL01] Message from (67.222.132.194) temporarily deferred - 4.16.50. Please refer to http://postmaster.yahoo.com/errors/postmaster-21.html

Properly functioning mail servers will make note of the temporary rejection and try to re-send the mail later at which point it will be accepted.

This is very effective at spam filtering for three main reasons:

  • most servers that send spam work in "fire and forget" mode and will not retry temporarily rejected messages
  • even if a spam server does retry the message later, the host will be far more likely to be blacklisted by that time
  • greylisting is "resource cheap". By auto-rejecting spam prior to more advanced filtering, greylisting can help the server perform better and cost you less

Problems with Greylisting

One problem is when first setting up and enabling greylisting, any incoming mail will be automatically delayed for a significant amount of time. Once rules get setup for the people you normally correspond with, this effect is mitigated but there may still be annoyances. As an example, websites which require e-mail confirmation on signup will have some issues sending mail since the web server isn't a mail server and doesn't know better to retry the email later. Also, if a recipient's mail server doesn't function properly, that server may bounce back e-mails based on the temporary rejection. More frequently, the original senders may get "e-mail delivery delayed" messages, which they may find confusing.

A more difficult problem is hosts that have mail gateways setup. If a remote host is rotating IPs or cycling messages through multiple servers, it could result in a new IP being used each time the message attempts to resend, preventing the mail from ever being accepted through the greylist which ultimately would result in a bounced message

Ultimately most greylisting issues should be corrected through selective whitelisting leaving the greylist still effective against the majority of spam.

Activating

As the SmarterMail administrator, you have the ability to disable all domain greylisting. This is located in SmarterMail as the system administrator under Settings > Defaults > Domain Defaults > Technical. The checkbox for Disable Greylisting should be checked if you wish to disable it on all domains on the server. To enable greylisting, log into SmarterMail the system administrator and navigate to Security > Greylisting and check the box Enable Greylisting. Then click Save.

You may also choose to configure greylisting further under this interface by allowing users to override greylisting or telling a message how long to block, pass, or expire. By default, this is not enabled on shared mail servers with Hosting.com.