aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix
diff options
context:
space:
mode:
Diffstat (limited to 'config/postfix')
-rw-r--r--config/postfix/postfix.inc9
-rw-r--r--config/postfix/postfix_acl.xml17
2 files changed, 25 insertions, 1 deletions
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
@@ -115,6 +115,23 @@
<encoding>base64</encoding>
</field>
<field>
+ <fielddescr>Sender</fielddescr>
+ <fieldname>sender_access</fieldname>
+ <description><![CDATA[<strong>HASH filters</strong> that implements whitelisting and blacklisting of full or partial email addresses and domains as specified in the MAIL FROM field :<br>
+ myfriend@example.com OK<br>
+ junk@spam.com REJECT<br>
+ marketing@ REJECT<br>
+ theboss@ OK<br>
+ deals.marketing.com REJECT<br>
+ somedomain.com OK<br>
+ See http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions for more help]]>
+ </description>
+ <type>textarea</type>
+ <cols>83</cols>
+ <rows>15</rows>
+ <encoding>base64</encoding>
+ </field>
+ <field>
<fielddescr>MIME</fielddescr>
<fieldname>mime_maps</fieldname>
<description><![CDATA[<strong>PCRE filters</strong><a href=http://www.postfix.org/pcre_table.5.html> that are applied to MIME related message headers only.</a> Hint:<br>