Greylist­ing is a reliable technique for reducing spam emails. It functions directly on the recipient’s mail server and requires no con­fig­ur­a­tion from either the sender or the recipient.

Where is greylist­ing used?

In contrast to con­ven­tion­al spam filters, greylist­ing is aimed at blocking the delivery of clear-cut spam. Since it works through a straight­for­ward mechanism, it is resource-efficient and fits seam­lessly into modern security models such as Zero Trust or Defense in Depth. Greylist­ing is mainly used to stop the il­le­git­im­ate mass dis­tri­bu­tion of spam emails. This type of spam, known as Un­so­li­cited Bulk Email (UBE), refers to non-per­son­al­ised messages sent in large volumes, often using lists of purchased or stolen email addresses.

These campaigns typically originate from com­prom­ised computers that form part of remote-con­trolled botnets, which are then exploited to send spam in bulk. Spoofed sender addresses are also commonly used in these spam waves to disguise the true source.

Greylist­ing is not suitable for tackling Un­so­li­cited Com­mer­cial Email (UCE). This type of spam often consists of in­di­vidu­ally sent, per­son­al­ised messages from seemingly le­git­im­ate busi­nesses or in­di­vidu­als. To counter UCE, content-based filters and black­list­ing.

Secure email for digital privacy
  • Email pro­tec­tion on any device
  • SSL/TLS email en­cryp­tion
  • Firewalls and spam filters offer first class virus pro­tec­tion
  • Daily pro­tec­tion and backups

How does greylist­ing work?

The idea of greylist­ing is based on sorting out potential spam emails during the delivery process. Let’s take a look at how the email sending process works.

Email trans­mis­sion sim­pli­fied

To send an email, the Simple Mail Transfer Protocol (SMTP) is used. Es­sen­tially, an email sent over the internet follows this path:

  1. The sender writes an email using their Mail User Agent (MUA). This can be a locally installed mail program or a webmail interface.

  2. To send the email, the Mail User Agent es­tab­lishes an SMTP con­nec­tion to the sender’s Mail Transfer Agent (MTA). This is software on the SMTP server that receives and forwards emails.

  3. The sender’s Mail Transfer Agent forwards the email to the recipient’s Mail Transfer Agent. If this agent accepts the email, it is deposited in the recipient’s inbox.

  4. When the recipient syn­chron­ises their local inbox via IMAP or POP3, the email appears as a new message.

When greylist­ing in­ter­venes

Greylist­ing takes effect during the third step of email delivery — when the recipient’s Mail Transfer Agent (MTA) receives the message. At this stage, the receiving MTA already knows three key pieces of in­form­a­tion before accepting the full email:

  • The IP address of the sending mail server
  • The sender’s email address, obtained via the SMTP MAIL FROM command
  • The recipient’s email address(es), obtained via the SMTP RCPT TO command

Because these details are trans­mit­ted before the message body itself, they are referred to as envelope data. The Mail Transfer Agent logs the envelope data of each incoming email in a list known as the greylist. Here’s an example of a greylist entry:

IP Address Sender Recipient
192.0.2.3 anne@example.com fred@example.net
For the UK
Email hosting services
  • Per­son­al­ised email address
  • Access from anywhere
  • Highest security standards

First and second delivery attempt

If a com­bin­a­tion of envelope data appears for the first time, the Mail Transfer Agent (MTA) initially rejects the email. It returns a fault code in­dic­at­ing a temporary technical issue. The sending MTA is then prompted to retry delivery after a specified waiting period.

A le­git­im­ate, standards-compliant Mail Transfer Agent will follow this request and attempt to resend the email later. During the second delivery attempt, the envelope data is already stored in the greylist, allowing the message to be accepted and delivered.

By contrast, il­le­git­im­ate MTAs used by spammers typically don’t retry. This is where the strength of greylist­ing lies: because no second attempt is made, the spam email is never delivered. The recipient remains unaware of this process, making greylist­ing a discreet and highly effective method of filtering out unwanted messages.

The greylist­ing process in detail

Image: How greylisting works
Greylist­ing works through multiple com­mu­nic­a­tion steps between the sender and receiver.

(a) The Mail User Agent (MUA) hands over an email to the sender’s mail server (P).

(b) The sender’s mail server (P) forwards the email to the recipient’s mail server (Q). At this stage, server Q checks the email’s envelope data: the IP address of the sending server and the as­so­ci­ated email addresses. If this com­bin­a­tion is un­fa­mil­i­ar, server Q tem­por­ar­ily rejects the email with a technical error and records the envelope data in a table. The message is now ‘greylis­ted’.

(c) If the email is le­git­im­ate, the sender’s mail server (P) retries delivery after a short delay. Since the envelope data is now re­cog­nised, the recipient’s server (Q) accepts and delivers the message. Op­tion­ally, the envelope data may be added to the whitelist to ensure future emails with the same data are delivered without delay.

(d) If the email is il­le­git­im­ate, the sending system usually does not attempt re­de­liv­ery. In this case, greylist­ing succeeds as a spam pro­tec­tion method, and the fraud­u­lent email is never delivered.

Greylist­ing as part of com­pre­hens­ive spam pro­tec­tion

Greylist­ing is often used in com­bin­a­tion with other anti-spam tech­no­lo­gies. Mech­an­isms such as the Sender Policy Framework (SPF), Do­main­Keys Iden­ti­fied Mail (DKIM), and Domain-based Message Au­then­tic­a­tion, Reporting, and Con­form­ance (DMARC) help secure email traffic and protect against common forms of abuse.

Com­bin­a­tion of greylist­ing and other methods

Greylist­ing works par­tic­u­larly well in con­junc­tion with related tech­niques like whitel­ist­ing and black­list­ing. Let’s take a look at an example of the timeline of delivery attempts on the receiving mail server:

Image: Greylisting example with whitelist and blacklist
Example with greylist, blacklist, and whitelist.

e1 An email from a sender not yet listed on the greylist (‘Listed? No.’) arrives. The Mail Transfer Agent (MTA) rejects the email with a temporary error and logs the envelope data in the greylist.

e2 Later, another email from the same sender to the same recipient arrives. Since the envelope data is now in the greylist, the message is delivered. The envelope data is also added to the whitelist.

e3 After the last cor­res­pond­ence between Anne and Fred, the IP address of Anne’s SMTP server changes from 192.0.2.3 to 192.0.2.34. Because this is a new com­bin­a­tion, Anne is treated as an unknown sender and placed on the greylist.

e4 Anne writes to Fred again, this time via the original SMTP server 192.0.2.3. Since this envelope data already exists in the whitelist, the email is delivered im­me­di­ately without delay.

e5 A delivery attempt is made from server 192.0.2.66. As this server is flagged as malicious in the blacklist, the email is rejected outright. This suggests that the sender address anne@example.com was spoofed.

What are the ad­vant­ages and dis­ad­vant­ages of greylist­ing?

Advantage Dis­ad­vant­age
✓ No con­fig­ur­a­tion required by the user ✗ Users may not be aware that greylist­ing is active
✓ Normally does not lead to loss of emails ✗ In rare cases, le­git­im­ate emails may be lost
✓ Delay in ac­cept­ance can help blacklist malicious senders ✗ Delay may cause users to question the func­tion­al­ity of the mail server: ‘Sometimes emails don’t arrive’.
✓ Delay can protect against new, not yet iden­ti­fied malware ✗ May be too slow for time-sensitive emails such as password reset links
✓ Resource-efficient compared to most spam filters
✓ Highly effective technique, providing major relief for mail servers worldwide

What are the potential problems with greylist­ing?

Although greylist­ing offers clear ad­vant­ages, the technique also comes with certain drawbacks:

  • De­pend­ence on a stable IP address: If the sending SMTP server’s IP address changes, the recipient’s server treats the email as unknown and places it on the greylist.
  • Possible delivery failures due to con­fig­ur­a­tion issues: If the sender’s Mail Transfer Agent does not follow the request to retry delivery, the message will never be delivered.
  • Potential to be bypassed with enough resources: In theory, spammers could resend emails multiple times to cir­cum­vent greylist­ing. However, the effort required is currently so high that it’s rarely attempted.
  • Delays can disrupt time-sensitive messages: Emails such as password reset links or login codes may expire if they are delayed by greylist­ing. By the time the resend occurs, the content may no longer be valid.
  • Limited trans­par­ency in cloud-based solutions: In many modern cloud email services, greylist­ing is in­teg­rated by default, without direct access for ad­min­is­trat­ors or users. This can lead to un­ex­plained delivery delays.
Secure email for digital privacy
  • Email pro­tec­tion on any device
  • SSL/TLS email en­cryp­tion
  • Firewalls and spam filters offer first class virus pro­tec­tion
  • Daily pro­tec­tion and backups
Go to Main Menu