summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-27 23:57:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-27 23:57:41 +0000
commit150fa547f33ecd00a61d431151a43cd5c79376a7 (patch)
treeabca9f4031632331a7f53d1130c2c95ee86b6b3d
parent1ba8fa216bca09dc610692fe2ccc7a97e1401925 (diff)
downloadpfsense-150fa547f33ecd00a61d431151a43cd5c79376a7.zip
pfsense-150fa547f33ecd00a61d431151a43cd5c79376a7.tar.gz
Update spamd related rules
-rw-r--r--etc/inc/filter.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 59fedfd..f03519d 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -543,8 +543,14 @@ function filter_nat_rules_generate() {
$natrules .= "#SSH Lockout Table\n";
$natrules .= "table <sshlockout> persist\n\n";
- $natrules .= "\n# spam table \n";
- $natrules .= "table <spamd> persist\n\n";
+ /* is SPAMD insalled? */
+ if (is_package_installed("spamd") == 1) {
+ $natrules .= "\n# spam table \n";
+ $natrules .= "table <spamd> persist\n";
+ $natrules .= "table <spamd-white> persist\n";
+ $natrules .= "rdr pass on {$wanif} proto tcp from <spamd> to port smtp -> 127.0.0.1 port spamd\n";
+ $natrules .= "rdr pass on {$wanif} proto tcp from !<spamd-white> to port smtp -> 127.0.0.1 port spamd\n";
+ }
/* load balancer anchor */
$natrules .= "\n# Load balancing anchor - slbd updates\n";
OpenPOWER on IntegriCloud