From c27836f832bd215e20a8aa1fe90c6107dae9c0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Sat, 27 Jul 2013 20:05:03 +0200 Subject: [PATCH] =?UTF-8?q?[Postfix]=20Mise=20en=20place=20de=20la=20base?= =?UTF-8?q?=20de=20donn=C3=A9e=20de=20white/black=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bundler/postfix.xml | 1 + .../etc/postfix/postscreen_access.cidr | 0 Python/etc/postfix/main.cf | 63 ++++++++++--------- 3 files changed, 33 insertions(+), 31 deletions(-) rename {Python => Cfg}/etc/postfix/postscreen_access.cidr (100%) diff --git a/Bundler/postfix.xml b/Bundler/postfix.xml index bdbc969..bbf91ff 100644 --- a/Bundler/postfix.xml +++ b/Bundler/postfix.xml @@ -8,6 +8,7 @@ + diff --git a/Python/etc/postfix/postscreen_access.cidr b/Cfg/etc/postfix/postscreen_access.cidr similarity index 100% rename from Python/etc/postfix/postscreen_access.cidr rename to Cfg/etc/postfix/postscreen_access.cidr diff --git a/Python/etc/postfix/main.cf b/Python/etc/postfix/main.cf index 626abb2..823d256 100644 --- a/Python/etc/postfix/main.cf +++ b/Python/etc/postfix/main.cf @@ -288,34 +288,35 @@ if not secondary: if has("titanic"): @relayhost=[ovh.adm.crans.org]:25 -@# PostScreen configuration -@# Access List -@postscreen_access_list = cidr:/etc/postfix/postscreen_access.cidr -@## Tu es blacklisté ? VTFF -@postscreen_blacklist_action = drop -@ -@# Bannière d'accueil multi valuée -@postscreen_greet_banner = Bienvenue au crans, veuillez patienter quelques secondes. -@## On fait semblant d'aller à RCPT TO, puis poubelle -@postscreen_greet_action = enforce -@ -@# RBL, le retour -@postscreen_dnsbl_sites = -@ zen.spamhaus.org*2 -@ dnsbl.inps.de*2 -@ dnsbl.ahbl.org -@ b.barracudacentral.org -@ -@# Score >= 3 ? Bye bye -@postscreen_dnsbl_threshold = 3 -@postscreen_dnsbl_action = enforce -@ -@# Filtre utilisé par postfix, mis en amont via postscreen -@postscreen_non_smtp_command_enable = yes -@postscreen_non_smtp_command_action = enforce -@ -@postscreen_bare_newline_enable = yes -@postscreen_bare_newline_action = enforce -@ -@postscreen_pipelining_enable = yes -@postscreen_pipelining_action = enforce +if mx: + @# PostScreen configuration + @# Access List + @postscreen_access_list = cidr:/etc/postfix/postscreen_access.cidr + @## Tu es blacklisté ? VTFF + @postscreen_blacklist_action = drop + @ + @# Bannière d'accueil multi valuée + @postscreen_greet_banner = Bienvenue au crans, veuillez patienter quelques secondes. + @## On fait semblant d'aller à RCPT TO, puis poubelle + @postscreen_greet_action = enforce + @ + @# RBL, le retour + @postscreen_dnsbl_sites = + @ zen.spamhaus.org*2 + @ dnsbl.inps.de*2 + @ dnsbl.ahbl.org + @ b.barracudacentral.org + @ + @# Score >= 3 ? Bye bye + @postscreen_dnsbl_threshold = 3 + @postscreen_dnsbl_action = enforce + @ + @# Filtre utilisé par postfix, mis en amont via postscreen + @postscreen_non_smtp_command_enable = yes + @postscreen_non_smtp_command_action = enforce + @ + @postscreen_bare_newline_enable = yes + @postscreen_bare_newline_action = enforce + @ + @postscreen_pipelining_enable = yes + @postscreen_pipelining_action = enforce