On 2016-06-14 02:28, list...@tutanota.com wrote:
I am considering the installation of Greylisting with Postfix.
I want it only for one condition, to greylist mail originating from
certain countries.
Hi,
may be mtpolicyd is an option for you:
https://www.mtpolicyd.org
It is a modular policyd and ships with a plugin for geoip.
It works like this:
<Plugin geoip>
module = "GeoIPLookup"
database = "/usr/share/GeoIP/GeoIP.dat"
</Plugin>
<Plugin geoip-good>
module = "GeoIPAction"
result_from = "geoip"
country_codes = "DE,AT,CH,FR,IT"
mode = passive
score = -1
</Plugin>
<Plugin geoip-bad>
module = "GeoIPAction"
result_from = "geoip"
country_codes = "RU,UA,CN,IN"
mode = passive
score = 5
</Plugin>
Instead of a score you could also set actions:
<Plugin geoip-block>
module = "GeoIPAction"
result_from = "geoip"
country_codes = "AQ"
mode = "reject"
reject_message = "too cold"
</Plugin>
Theres also a Greylisting plugin.
You can combine them for conditional greylisting:
<Plugin ScoreGreylist>
module = "ScoreAction"
threshold = 5
<Plugin greylist>
module = "Greylist"
score = -5
mode = "passive"
# activating the autowl will require a SQL database
use_autowl = 0
</Plugin>
</Plugin>
Markus
--
https://markusbenning.de/