Hexamail Server Administration Guide - IP - Greylisting

Greylisting

Greylisting is a process of temporarily failing connections, based on the premise that spam software and bots often do not retry to send. Legitimate clients and MTAs should retry according to the SMTP Protocol RFC and so email is received normally, with a slight delay. Each time a new combination of IP address, sender address and recipient address is spotted it is failed with a temporary error code at the SMTP server level. If the same IP address retries the same sender and recipient combination later it is then accepted and delivered normally. Therafter, all matching IP, sender and recipient combinations are allowed without delay. Spam software often wont retry so this technique effectively blocks spam software, and bots from sending email to your server. NOTE: legitimate email from new sources may be delayed according to the sending server, client or MTA retry schedule. In the worst case a badly behaved sending server may fail to retry and the email wont be delivered. The sender should however get a non delivery report from the sending server in this case. Greylisting does not affect connections from authenticated clients, IPs listed as allowed Relay IPs in your SMTP Server/Relay page, allowed senders (or domains), or 'always allowed IPs'. Use these lists to list any IPs, senders or domains you wish to bypass greylisting and have email delivered unhindered. If you have any secondary MX servers they should also implement greylisting to prevent spammers simply sending using those servers. Otherwise spam can be sent to your secondary server, which will (correctly) retry to send to your primary server and therefore bypass greylisting.

Greylisting

   Greylisting

Enable greylisting
Enable greylisting of new triplets (IP, sender, recipient sets)
Example interface
On/Off
on
Temporarily fail for
The length of time to fail a new 'triplet' (IP sender and recipient combination) with a temporary failure error (a 4.x.x SMTP error). This is the MINIMUM delay you will experience in receiving email from a new source triplet. Delays may be longer if the sending server retry schedule is longer than the time specified here. Well behaved clients and MTAs should retry multiple times for a period of time. Spam software and bots often do not bother retrying and so will effectively be blocked. Lowering this setting allows faster receipt of email from new triplets, but may expose you to spam tools that do retry.
Example interface
2 - 360 Minutes
15 Minutes
60 Minutes
Check first
This setting can be used to control how strict the greylist checking is. IF it is set to 4 it will check the entire IP address (IP4) or 16 for IP6. If it is reduced to 3 or 2 it only checks the first parts of the IP address. This is useful if email is coming from very large email providers with very many servers. In some cases the retried email is sent from a new server each time, causing strict greylisting to fail the email temporarily for a long time. Using the 3 or even 2 setting can ensure the email is delivered more rapidly.
Example interface
2 - 16 Octets
3 Octets
Expire bad after
The length of time to keep records about triplets that have not retried after a temporary fail, often these are the records of spammers and not generally worth keeping for too long. You do need to keep these records for long enough for legitimate senders to retry though, otherwise you will repeatedly block legitimate triplets. Busy servers should set this setting low (2-4 hours) to avoid wasting resources. Less busy servers can extend this period to ensure more reliable delivery. If you receive 1,500,000 email per day and it is mainly spam, you will require 25MBytes of RAM and disk space to store 4 hours of records.
Example interface
2 - 12 Hours
5 Hours
4 Hours
Expire good after
The length of time to keep records about triplets that have succesfully sent email and are therefore no longer temporarily blocked. Its worth keeping these for some time to allow legitimate clients and servers to send to your domain unhindered. Some expiry is necessary to prevent a build up of no longer used records which waste resources. Hexamail updates these records on every email that is passed, so the most common senders will never be delayed again.
Example interface
1 - 365 Days
36 Days
60 Days
Exclude Whitelisted Senders
Don't greylist whitelisted senders
Example interface
On/Off
Exclude DontCheck Recipients
Don't greylist recipients excluded from spam checks
Example interface
On/Off
Exclude Recipients
Don't greylist recipients listed here, you can use wildcards e.g. *@domain.com
Example interface
IP Whitelist
You may not wish to delay the email from some servers using greylisting. This may be because they are known reputable servers, or incapable of correct SMTP retry behaviour. If you find you can't receive email from a specific server, even after the block delay, you may wish to whitelist the IP here. This IP list is in addition to your Always Allowed IPs and the list of Relay IP servers specified in SMTP Server. This list specifically allows IPs to bypass greylisting and nothing more. The default list includes local network addresses, reputable servers and some servers known to have trouble sending thru greylisting servers. If you set your SMTP Server log to DEBUG mode you will see whitelisted servers being skipped for greylisting, allowing you to identify servers you may wish to remove.
Example interface
10.*.*.*, 104.47.0.0/17, 104.47.0.0/19, 104.47.32.0/19, 104.47.64.0/18, 108.177.96.0/19, 12.107.209.244, 12.5.136.141, 12.5.136.142, 12.5.136.143, 12.5.136.144, 127.*.*.*, 134.170.132.0/24, 134.170.140.0/24, 143.166.224.132, 152.163.225.*, 157.55.133.0/25, 157.55.234.0/24, 157.56.110.0/23, 157.56.112.0/24, 172.16-31.*.*, 172.217.0.0/19 , 173.194.0.0/16, 192.168.*.*, 193.129.24.11, 194.70.94.141, 194.8.211.5, 195.238.2.*, 195.238.3.*, 204.107.120.10, 204.60.8.162, 205.188.139.136, 205.188.139.137, 205.188.144.207, 205.188.144.208, 205.188.156.66, 205.188.157.*, 205.188.157.40, 205.188.159.7, 205.206.231.*, 205.211.164.50, 206.190.53.32, 207.115.63.*, 207.126.144.0/20 , 207.171.168.*, 207.171.180.*, 207.171.187.*, 207.171.188.*, 207.171.190.*, 207.218.206.108, 207.46.100.0/24, 207.46.163.0/24, 207.46.248.41, 207.46.248.43, 207.46.51.64/26, 209.104.63.*, 209.132.176.174, 209.85.128.0/17 , 211.29.132.*, 212.114.215.6, 212.58.226.18, 212.58.232.2, 212.58.232.3, 212.58.232.4, 213.121.128.45, 213.136.52.31, 213.199.154.0/24, 213.199.180.128/26, 213.20.85.240, 216.239.209.138, 216.239.32.0/19, 216.32.180.0/23, 216.32.180.0/24, 216.58.192.0/19 , 216.73.95.137, 217.146.176.72, 217.146.176.77, 217.146.176.79, 217.146.176.81, 217.146.176.82, 217.146.176.83, 217.146.176.86, 217.146.177.69, 217.146.177.73, 217.146.177.74, 217.146.177.75, 217.146.177.76, 217.146.177.77, 217.146.188.61, 23.103.132.0/22, 23.103.136.0/21, 23.103.144.0/20, 23.103.144.0/22, 23.103.148.0/22, 23.103.152.0/22, 23.103.156.0/22, 23.103.198.0/23, 23.103.198.0/24, 23.103.200.0/21, 23.103.200.0/22, 23.103.212.0/22, 40.107.0.0/16, 40.107.0.0/17, 40.107.0.0/18, 40.107.128.0/18, 40.107.64.0/18, 40.92.0.0/14, 40.92.0.0/18, 40.92.128.0/17, 40.92.64.0/18, 40.93.0.0/18, 40.93.128.0/17, 40.93.64.0/18, 40.94.0.0/18, 40.94.128.0/17, 40.94.64.0/18, 40.95.0.0/18, 40.95.128.0/17, 40.95.64.0/18, 52.100.0.0/14, 52.100.0.0/15, 52.100.0.0/16, 52.100.0.0/18, 52.100.128.0/17, 52.100.64.0/18, 52.101.0.0/18, 52.101.128.0/17, 52.101.64.0/18, 52.102.0.0/18, 52.102.128.0/17, 52.102.64.0/18, 52.103.0.0/18, 52.103.128.0/17, 52.103.64.0/18, 62.24.128.121, 63.169.44.143, 63.169.44.144, 63.82.37.110, 64.12.137.*, 64.12.138.*, 64.124.204.39, 64.125.132.254, 64.18.0.0/20 , 64.233.160.0/19 , 64.233.162.*, 64.233.170.*, 64.233.182.*, 64.233.182.185, 64.233.182.188, 64.233.182.189, 64.233.182.191, 64.233.184.*, 64.7.153.18, 65.54.246.*, 65.55.169.0/24, 65.55.88.0/24, 66.100.210.82, 66.102.0.0/20 66.24, 66.135.197.*, 66.135.209.*, 66.162.216.166, 66.206.22.82, 66.206.22.83, 66.206.22.84, 66.206.22.85, 66.218.66.*, 66.218.67.*, 66.218.69.*, 66.249.82.*, 66.27.51.218, 66.89.73.101, 66.94.237.*, 66.94.237.30, 66.94.237.48, 66.94.237.49, 66.94.237.56, 68.15.115.88, 69.147.64.128, 69.147.64.131, 69.147.64.169, 69.147.64.186, 69.147.64.213, 72.14.204.*, 74.125.0.0/16 108.177.8.0/21 , 80.4.121.33, 82.117.36.*, 83.100.223.171, 85.158.137.83, 85.189.39.71, 9.80.0/20 72.14.192.0/18 , 94.245.120.64/26, 94.245.120.64/27
Schedule
You can optionally schedule greylisting only for specific times of the week. For example this can be used to prevent any unnecessary delay in email during working hours, but allow greylisting to take effect at weekends. Remember that only email from a new sender, ip and recipient triplet is delayed.
Example interface