aboutsummaryrefslogtreecommitdiffstats
path: root/packages/clamav.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/clamav.inc')
-rw-r--r--packages/clamav.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/clamav.inc b/packages/clamav.inc
index afbfbca3..2e83888c 100644
--- a/packages/clamav.inc
+++ b/packages/clamav.inc
@@ -229,14 +229,17 @@ function clamav_generate_rules($type) {
$ifaces = explode(',', $clamav_conf['pop3_ifaces']);
$ifaces = array_map('convert_friendly_interface_to_real_interface_name', $ifaces);
- if ($type == 'nat') {
+ switch($type) {
+ case 'nat':
foreach ($ifaces as $iface)
$rules .= "rdr on $iface proto tcp to port pop3 -> 127.0.0.1 port 8110\n";
- }
-
- else {
+ break;
+ case 'filter':
foreach ($ifaces as $iface)
$rules .= "pass quick on $iface proto tcp to port pop3 flags S/SA keep state\n";
+ break;
+ default:
+ break;
}
}