How to configure Greylisting


2016-11-16 13:07:39 UTC


2017-08-18 15:24:22 UTC


Was this article helpful?

Have more questions?

Submit a request

How to configure Greylisting

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux


How to configure Greylisting in Plesk?


Greylisting works as follows: the first message is rejected, and the next message sent from the same address (sender server IP address and 'From:') will be accepted after a certain length of time passes.

After the first email is rejected, the sender's address is added to the Greylisting database. The information is stored there for an expiration time interval (expire-interval) .
For the message to be accepted, the grey interval (grey-interval) must complete. If the message was sent before the grey interval has passed, the penalty interval (penalty-interval) is added.

Greylisting configuration is not possible via Plesk web-interface, but only with Plesk CLI.

The utility is /usr/local/psa/bin/grey_listing for Redhat-based OS and /opt/psa/bin/grey_listing on Debian-based OS.

Parameters like expire-interval , grey-interval , penalty-interval , and others are configured via the utility grey_listing . Run the utility with --info-server to display configuration settings:

# /usr/local/psa/bin/grey_listing --info-server  
Grey listing configuration.

Grey listing checking  disabled
Grey interval          5 minutes
Expire interval        51840 minutes
Penalty interval       2 minutes
Penalty                disabled
Personal grey listing
configuration          allowed

Server-wide black list:

Server-wide white list:

White domains patterns list:

Black domains patterns list:

SUCCESS: Gathering of server wide information complete.

However, Black/White lists for Greylisting are configured server-wide and per individual mail account in GUI.

Server-wide Greylisting White/Black lists are configured on the page Spam Filter Settings at Tools & Settings > Spam Filter Settings . Greylisting White/Black lists configuration per mail account: Domains > domain name > Mail Accounts > mail_account@domain_name > Spam Filter .

The page allows you to add email addresses only. To add the domain localhost to the White list, try adding the address *@localhost .

Alternatively, you may use Plesk CLI grey_listing to configure the spam filter. For example, to add the domain to the server-wide White list:

# /usr/local/psa/bin/grey_listing --update-server -whitelist add:*@domain.tld  
SUCCESS: Update of server-wide settings complete.

To add the domain to the Greylisting White list for the mail account mail@domain.tld:

# /usr/local/psa/bin/grey_listing --update-mailname mail@domain.tld -whitelist add:*
SUCCESS: Update of mail 'mail@
domain.tld' complete.

To get information about Black/White lists on mail accounts for mail@domain.tld:

# /usr/local/psa/bin/grey_listing --info-mailname mail@domain.tld

Grey listing configuration for mail@domain.tld

User's black list:

User's white list:

SUCCESS: Gathering information for 'mail@domain.tld

Additional information

Note: Greylisting feature is available only in Plesk for Unix/Linux.

Have more questions? Submit a request
Please sign in to leave a comment.