1 |
diff -uNr e-smith-email-5.2.0/root/etc/e-smith/db/configuration/defaults/smtpd/Proxy e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/db/configuration/defaults/smtpd/Proxy |
2 |
--- e-smith-email-5.2.0/root/etc/e-smith/db/configuration/defaults/smtpd/Proxy 2005-05-05 17:17:20.000000000 +0200 |
3 |
+++ e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/db/configuration/defaults/smtpd/Proxy 2010-03-25 15:16:40.692970423 +0100 |
4 |
@@ -1 +1 @@ |
5 |
-enabled |
6 |
+blocked |
7 |
diff -uNr e-smith-email-5.2.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40AllowGSMTP e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40AllowGSMTP |
8 |
--- e-smith-email-5.2.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40AllowGSMTP 1970-01-01 01:00:00.000000000 +0100 |
9 |
+++ e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40AllowGSMTP 2010-03-25 11:01:49.459002064 +0100 |
10 |
@@ -0,0 +1,7 @@ |
11 |
+{ |
12 |
+ $OUT .= "\n # Check outbound SMTP\n"; |
13 |
+ |
14 |
+ $OUT .= " /sbin/iptables --new-chain SMTPProxy\n"; |
15 |
+ $OUT .= " /sbin/iptables --append FORWARD \\\n"; |
16 |
+ $OUT .= "\t-p tcp --dport 25 -j SMTPProxy\n"; |
17 |
+} |
18 |
diff -uNr e-smith-email-5.2.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustSMTPProxy e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustSMTPProxy |
19 |
--- e-smith-email-5.2.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustSMTPProxy 2005-05-05 17:17:21.000000000 +0200 |
20 |
+++ e-smith-email-5.2.0-blocksmtp/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustSMTPProxy 2010-03-25 15:15:19.100617190 +0100 |
21 |
@@ -12,11 +12,21 @@ |
22 |
$rule++; |
23 |
} |
24 |
|
25 |
+ $OUT .= " /sbin/iptables --flush SMTPProxy\n"; |
26 |
+ |
27 |
if (${smtpd}{'Proxy'} eq 'enabled') |
28 |
{ |
29 |
$OUT .= " /sbin/iptables --table nat --replace SMTPProxy $rule\\\n"; |
30 |
$OUT .= "\t-p TCP -j DNAT --to $LocalIP:25\n"; |
31 |
} |
32 |
+ elsif (${smtpd}{'Proxy'} eq 'blocked') |
33 |
+ { |
34 |
+ # Replace it with nothing, but keep the rule entry as a placeholder |
35 |
+ # for each re-enabling. |
36 |
+ $OUT .= " /sbin/iptables --table nat --replace SMTPProxy $rule\n"; |
37 |
+ $OUT .= " /sbin/iptables --append SMTPProxy\\\n"; |
38 |
+ $OUT .= "\t-p tcp --dport 25 -i \$INTERNALIF -j denylog\n"; |
39 |
+ } |
40 |
else |
41 |
{ |
42 |
# Replace it with nothing, but keep the rule entry as a placeholder |