From dc7396faf3a2cfe947413959cc67c1f4fb30e8fb Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Fri, 16 Dec 2011 19:26:02 -0200 Subject: mailscanner - version 0.2 with many improvements and sync gui postfix - package version 2.3.2 with sender acl --- config/postfix/postfix.inc | 9 ++++++++- config/postfix/postfix_acl.xml | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'config/postfix') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 5a802054..182f9d00 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -351,8 +351,13 @@ EOF; #Header Maps if ($config['installedpackages']['postfixacl']['config'][0]['header_maps']){ $postfix_main .= "header_checks = pcre:/usr/local/etc/postfix/header_check\n"; + $postfix_main .= "header_size_limit = 1024000\n"; $header_check = px_text_area_decode($config['installedpackages']['postfixacl']['config'][0]['header_maps']); } + #Sender access + if ($config['installedpackages']['postfixacl']['config'][0]['sender_access']){ + $sender_access = px_text_area_decode($config['installedpackages']['postfixacl']['config'][0]['sender_access']); + } #MIME Maps if ($config['installedpackages']['postfixacl']['config'][0]['mime_maps']){ $postfix_main .= "mime_header_checks = pcre:/usr/local/etc/postfix/mime_check\n"; @@ -454,6 +459,7 @@ smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining, reject_multi_recipient_bounce, + check_sender_access hash:/usr/local/etc/postfix/sender_access, SPFSPFSPFRBLRBLRBL EOF; @@ -637,13 +643,14 @@ MASTEREOF2; file_put_contents("/usr/local/etc/postfix/main.cf", $postfix_main, LOCK_EX); file_put_contents("/usr/local/etc/postfix/master.cf", $postfix_master, LOCK_EX); file_put_contents("/usr/local/etc/postfix/transport", $transport, LOCK_EX); + file_put_contents("/usr/local/etc/postfix/sender_access", $sender_access, LOCK_EX); file_put_contents("/usr/local/etc/postfix/cal_cidr", $cal_cidr, LOCK_EX); file_put_contents("/usr/local/etc/postfix/cal_pcre", $cal_pcre, LOCK_EX); file_put_contents("/usr/local/etc/postfix/header_check", $header_check, LOCK_EX); file_put_contents("/usr/local/etc/postfix/mime_check", $mime_check, LOCK_EX); file_put_contents("/usr/local/etc/postfix/body_check", $body_check, LOCK_EX); file_put_contents("/usr/local/etc/postfix/mynetwork_table", $mynetworks, LOCK_EX); - $FILES=array("transport"); + $FILES=array("transport","sender_access"); foreach ($FILES as $file) { mwexec("/usr/local/sbin/postmap /usr/local/etc/postfix/".$file); diff --git a/config/postfix/postfix_acl.xml b/config/postfix/postfix_acl.xml index 9837bf0a..2a2b4633 100644 --- a/config/postfix/postfix_acl.xml +++ b/config/postfix/postfix_acl.xml @@ -114,6 +114,23 @@ 15 base64 + + Sender + sender_access + HASH filters that implements whitelisting and blacklisting of full or partial email addresses and domains as specified in the MAIL FROM field :
+ myfriend@example.com OK
+ junk@spam.com REJECT
+ marketing@ REJECT
+ theboss@ OK
+ deals.marketing.com REJECT
+ somedomain.com OK
+ See http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions for more help]]> +
+ textarea + 83 + 15 + base64 +
MIME mime_maps -- cgit v1.2.3