aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2011-12-16 19:26:02 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-12-16 19:26:02 -0200
commitdc7396faf3a2cfe947413959cc67c1f4fb30e8fb (patch)
tree66cc270456cd9953efff1d98f0e1c843cad518c4 /config/postfix
parent930c43490397f021dfbe5e3d8840e3079d5b1513 (diff)
downloadpfsense-packages-dc7396faf3a2cfe947413959cc67c1f4fb30e8fb.tar.gz
pfsense-packages-dc7396faf3a2cfe947413959cc67c1f4fb30e8fb.tar.bz2
pfsense-packages-dc7396faf3a2cfe947413959cc67c1f4fb30e8fb.zip
mailscanner - version 0.2 with many improvements and sync gui
postfix - package version 2.3.2 with sender acl
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>