1 |
diff -Nur smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl |
2 |
--- smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-10-13 00:30:41.310389712 +0200 |
3 |
+++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-10-13 23:54:00.163339658 +0200 |
4 |
@@ -35,11 +35,15 @@ |
5 |
<p>E-mail traffic is scanned and may be blocked due to the various screening methods enabled. |
6 |
You may use this panel to define e-mail white/black lists.</p> |
7 |
|
8 |
+ <p><br>RBL's List is used to adjust DNSBL and RHSBL.</p> |
9 |
+ <p><a class="button-like" |
10 |
+ href="wbl?page=0&page_stack=&Next=Next&wherenext=WBL_PAGE_RBL">RBL's List</a></p> |
11 |
+ |
12 |
<p>Black lists are used for rejecting e-mail traffic.</p> |
13 |
<p><a class="button-like" |
14 |
href="wbl?page=0&page_stack=&Next=Next&wherenext=WBL_PAGE_BLACK">Black List</a></p> |
15 |
|
16 |
- <p><br>White lists are used for accepting e-mail traffic.</p> |
17 |
+ <p>White lists are used for accepting e-mail traffic.</p> |
18 |
<p><a class="button-like" |
19 |
href="wbl?page=0&page_stack=&Next=Next&wherenext=WBL_PAGE_WHITE">White List</a></p> |
20 |
|
21 |
@@ -53,8 +57,7 @@ |
22 |
<base>BLACK_TITLE</base> |
23 |
<trans> |
24 |
<![CDATA[ |
25 |
- <p>This server includes built-in support for using two external black list methods, |
26 |
- DNSBL and RHSBL. It also supports the admin defined black lists, badhelo and |
27 |
+ <p>This server includes built-in support for using the admin defined black lists, badhelo and |
28 |
badmailfrom.</p> |
29 |
]]> |
30 |
</trans> |
31 |
@@ -115,7 +118,7 @@ |
32 |
|
33 |
<entry> |
34 |
<base>WHITE_TITLE</base> |
35 |
- <trans>Use this panel to modify your servers White List settings.</trans> |
36 |
+ <trans>Use this panel to modify your servers White List settings. All entries will be enabled by default</trans> |
37 |
</entry> |
38 |
|
39 |
<entry> |
40 |
@@ -185,4 +188,24 @@ |
41 |
will be rejected by spamassassin. |
42 |
</trans> |
43 |
</entry> |
44 |
+ <entry> |
45 |
+ <base>SBLLIST_LABEL</base> |
46 |
+ <trans>RHSBL - (qpsmtpd SBLList)</trans> |
47 |
+ </entry> |
48 |
+ <entry> |
49 |
+ <base>SBLLIST_DESCRIPTION</base> |
50 |
+ <trans>RHS block list - 'right hand side' of senders host/domain will be checked against the following servers</trans> |
51 |
+ </entry> |
52 |
+ <entry> |
53 |
+ <base>RBLLIST_LABEL</base> |
54 |
+ <trans>DNSBL Zones (qpsmtpd RBLList)</trans> |
55 |
+ </entry> |
56 |
+ <entry> |
57 |
+ <base>RBLLIST_DESCRIPTION</base> |
58 |
+ <trans>DNS Block List - senders IP address will be checked against the following servers</trans> |
59 |
+ </entry> |
60 |
+ <entry> |
61 |
+ <base>RBL_TITLE</base> |
62 |
+ <trans>Real-time Blackhole List are disabled by default to allow maximum accommodation. You can enable RBL's here.</trans> |
63 |
+ </entry> |
64 |
</lexicon> |
65 |
diff -Nur smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/web/functions/wbl |
66 |
--- smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/web/functions/wbl 2015-10-13 00:30:41.316390108 +0200 |
67 |
+++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/web/functions/wbl 2015-10-13 23:38:47.352374175 +0200 |
68 |
@@ -26,12 +26,10 @@ |
69 |
<description>FORM_DESCRIPTION</description> |
70 |
|
71 |
</page> |
72 |
- |
73 |
- <page name="WBL_PAGE_BLACK" |
74 |
+ <page name="WBL_PAGE_RBL" |
75 |
pre-event="turn_off_buttons()" |
76 |
- post-event="create_modify_black" > |
77 |
- |
78 |
- <description>BLACK_TITLE</description> |
79 |
+ post-event="create_modify_rbl" > |
80 |
+ <description>RBL_TITLE</description> |
81 |
|
82 |
<field |
83 |
type="select" |
84 |
@@ -43,7 +41,15 @@ |
85 |
<label>DNSBL_LABEL</label> |
86 |
<description>DNSBL_DESCRIPTION</description> |
87 |
</field> |
88 |
- |
89 |
+ <field |
90 |
+ type="textarea" |
91 |
+ id="rbllist" |
92 |
+ size="80" |
93 |
+ value="get_rbllist()" |
94 |
+ validation=""> |
95 |
+ <label>RBLLIST_LABEL</label> |
96 |
+ <description>RBLLIST_DESCRIPTION</description> |
97 |
+ </field> |
98 |
<field |
99 |
type="select" |
100 |
id="rhsbl" |
101 |
@@ -54,6 +60,24 @@ |
102 |
<label>RHSBL_LABEL</label> |
103 |
<description>RHSBL_DESCRIPTION</description> |
104 |
</field> |
105 |
+ <field |
106 |
+ type="textarea" |
107 |
+ id="sbllist" |
108 |
+ size="80" |
109 |
+ value="get_sbllist()" |
110 |
+ validation=""> |
111 |
+ <label>SBLLIST_LABEL</label> |
112 |
+ <description>SBLLIST_DESCRIPTION</description> |
113 |
+ </field> |
114 |
+ |
115 |
+ <subroutine src="print_button('SAVE')" /> |
116 |
+ </page> |
117 |
+ |
118 |
+ <page name="WBL_PAGE_BLACK" |
119 |
+ pre-event="turn_off_buttons()" |
120 |
+ post-event="create_modify_black" > |
121 |
+ |
122 |
+ <description>BLACK_TITLE</description> |
123 |
|
124 |
<field |
125 |
type="textarea" |
126 |
@@ -92,16 +116,6 @@ |
127 |
<description>WHITE_TITLE</description> |
128 |
|
129 |
<field |
130 |
- type="select" |
131 |
- id="rrfh" |
132 |
- options="'yes' => 'ENABLED', |
133 |
- 'no' => 'DISABLED'" |
134 |
- value="get_rrfh()" |
135 |
- validation="nonblank"> |
136 |
- <label>RRFH_LABEL</label> |
137 |
- </field> |
138 |
- |
139 |
- <field |
140 |
type="textarea" |
141 |
id="whitelisthosts" |
142 |
value="get_whitelisthosts()" |
143 |
diff -Nur smeserver-wbl-0.3.0.bz9092.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm smeserver-wbl-0.3.0.bz9092.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm |
144 |
--- smeserver-wbl-0.3.0.bz9092.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm 2015-10-13 00:30:41.317390175 +0200 |
145 |
+++ smeserver-wbl-0.3.0.bz9092.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm 2015-10-13 23:19:41.505562719 +0200 |
146 |
@@ -31,6 +31,20 @@ |
147 |
return ($db->get_prop('qpsmtpd', 'RHSBL') || 'disabled'); |
148 |
} |
149 |
|
150 |
+sub get_sbllist |
151 |
+{ |
152 |
+my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || ''; |
153 |
+$sbllistform =~ s/:/\n/g; |
154 |
+return $sbllistform; |
155 |
+} |
156 |
+ |
157 |
+sub get_rbllist |
158 |
+{ |
159 |
+my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || ''; |
160 |
+$rbllistform =~ s/:/\n/g; |
161 |
+return $rbllistform; |
162 |
+} |
163 |
+ |
164 |
sub get_badhelo |
165 |
{ |
166 |
my %list = $wdb->get('badhelo')->props; |
167 |
@@ -71,13 +85,6 @@ |
168 |
return join "\n", sort(@badmailfrom); |
169 |
} |
170 |
|
171 |
-sub get_rrfh |
172 |
-{ |
173 |
- return 'yes'; |
174 |
- # always yes for SME8 |
175 |
- #return ($db->get_prop('qpsmtpd', 'RequireResolvableFromHost') || 'no'); |
176 |
-} |
177 |
- |
178 |
sub get_whitelisthosts |
179 |
{ |
180 |
my %list = $wdb->get('whitelisthosts')->props; |
181 |
@@ -163,12 +170,6 @@ |
182 |
my $fm = shift; |
183 |
my $q = $fm->{'cgi'}; |
184 |
|
185 |
- my $dnsbl = $q->param('dnsbl'); |
186 |
- $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl"); |
187 |
- |
188 |
- my $rhsbl = $q->param('rhsbl'); |
189 |
- $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl"); |
190 |
- |
191 |
# qmail badhelo |
192 |
my %list = $wdb->get('badhelo')->props; |
193 |
my $parameter = ""; |
194 |
@@ -240,10 +241,6 @@ |
195 |
my $fm = shift; |
196 |
my $q = $fm->{'cgi'}; |
197 |
|
198 |
- my $rrfh = $q->param("rrfh"); |
199 |
- # SME8 no longer use this key, always on |
200 |
- #$db->set_prop('qpsmtpd', 'RequireResolvableFromHost', "$rrfh"); |
201 |
- |
202 |
# qpsmtpd whitelisthosts |
203 |
my %list = $wdb->get('whitelisthosts')->props; |
204 |
my $parameter = ""; |
205 |
@@ -366,5 +363,42 @@ |
206 |
|
207 |
return join "\n", sort(@blacklistfrom); |
208 |
} |
209 |
+sub create_modify_rbl |
210 |
+{ |
211 |
+ my $fm = shift; |
212 |
+ my $q = $fm->{'cgi'}; |
213 |
|
214 |
+ my $dnsbl = $q->param('dnsbl'); |
215 |
+ $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl"); |
216 |
+ |
217 |
+ my $rhsbl = $q->param('rhsbl'); |
218 |
+ $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl"); |
219 |
+ |
220 |
+ |
221 |
+ my $sbllistcgi = $q->param('sbllist'); |
222 |
+ my @sbllistcgi = split /\s+/, $sbllistcgi; |
223 |
+ my $sbllistdb = ''; |
224 |
+ foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ':' . $_; } |
225 |
+ $sbllistdb =~ s/^://; |
226 |
+ |
227 |
+ $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb"); |
228 |
+ |
229 |
+ |
230 |
+ my $rbllistcgi = $q->param('rbllist'); |
231 |
+ my @rbllistcgi = split /\s+/, $rbllistcgi; |
232 |
+ my $rbllistdb = ''; |
233 |
+ foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ':' . $_; } |
234 |
+ $rbllistdb =~ s/^://; |
235 |
+ |
236 |
+ $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb"); |
237 |
+ |
238 |
+ ##Update email settings |
239 |
+ |
240 |
+ unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){ |
241 |
+ $fm->error('ERROR_UPDATING'); |
242 |
+ return undef; |
243 |
+ } |
244 |
+ |
245 |
+ $fm->success('SUCCESS'); |
246 |
+} |
247 |
1; |