/[smecontribs]/rpms/smeserver-wbl/contribs9/smeserver-wbl-0.3.0.bz9092.RBL_Menu.patch
ViewVC logotype

Annotation of /rpms/smeserver-wbl/contribs9/smeserver-wbl-0.3.0.bz9092.RBL_Menu.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Thu Oct 15 20:48:22 2015 UTC (8 years, 7 months ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-wbl-0_3_0-10_el6_sme, smeserver-wbl-0_3_0-13_el6_sme, smeserver-wbl-0_3_0-18_el6_sme, smeserver-wbl-0_3_0-15_el6_sme, smeserver-wbl-0_3_0-14_el6_sme, smeserver-wbl-0_3_0-11_el6_sme, smeserver-wbl-0_3_0-17_el6_sme, smeserver-wbl-0_3_0-16_el6_sme, smeserver-wbl-0_3_0-9_el6_sme, smeserver-wbl-0_3_0-19_el6_sme, smeserver-wbl-0_3_0-12_el6_sme, HEAD
Changes since 1.2: +114 -37 lines
* Thu Oct 15 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 0.3.0-9.sme
- The html strings of the main page has been removed of translations

1 stephdl 1.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 stephdl 1.3 +++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-10-15 22:34:01.631604797 +0200
4     @@ -29,22 +29,40 @@
5     </entry>
6    
7     <entry>
8     - <base>FORM_DESCRIPTION</base>
9     - <trans>
10     - <![CDATA[
11     - <p>E-mail traffic is scanned and may be blocked due to the various screening methods enabled.
12     - You may use this panel to define e-mail white/black lists.</p>
13     + <base>WBL_DESCRIPTION</base>
14     + <trans>E-mail traffic is scanned and may be blocked due to the various screening methods enabled.
15     + You may use this panel to define e-mail white/black lists.</trans>
16     + </entry>
17    
18     - <p>Black lists are used for rejecting e-mail traffic.</p>
19     - <p><a class="button-like"
20     - href="wbl?page=0&page_stack=&Next=Next&wherenext=WBL_PAGE_BLACK">Black List</a></p>
21     + <entry>
22     + <base>RBL_LIST_DESCRIPTION</base>
23     + <trans>RBL's List is used to adjust DNSBL and RHSBL.</trans>
24     + </entry>
25 stephdl 1.1
26     - <p><br>White lists are used for accepting e-mail traffic.</p>
27 stephdl 1.3 - <p><a class="button-like"
28     - href="wbl?page=0&page_stack=&Next=Next&wherenext=WBL_PAGE_WHITE">White List</a></p>
29    
30     - ]]>
31     - </trans>
32     + <entry>
33     + <base>RBL_LIST</base>
34     + <trans>RBL's List</trans>
35     + </entry>
36     +
37     + <entry>
38     + <base>BLACK_LIST_DESCRIPTION</base>
39     + <trans>Black lists are used for rejecting e-mail traffic.</trans>
40     + </entry>
41     +
42     + <entry>
43     + <base>BLACK_LIST</base>
44     + <trans>Black List</trans>
45     + </entry>
46     +
47     + <entry>
48     + <base>WHITE_LIST_DESCRIPTION</base>
49     + <trans>White lists are used for accepting e-mail traffic.</trans>
50     + </entry>
51     +
52     + <entry>
53     + <base>WHITE_LIST</base>
54     + <trans>White List</trans>
55     </entry>
56 stephdl 1.1
57 stephdl 1.3 # WBL_PAGE_BLACK
58     @@ -52,18 +70,15 @@
59     <entry>
60 stephdl 1.1 <base>BLACK_TITLE</base>
61     <trans>
62 stephdl 1.3 - <![CDATA[
63 stephdl 1.1 - <p>This server includes built-in support for using two external black list methods,
64     - DNSBL and RHSBL. It also supports the admin defined black lists, badhelo and
65 stephdl 1.3 - badmailfrom.</p>
66     - ]]>
67     + This server includes built-in support for using the admin defined black lists, badhelo and
68     + badmailfrom.
69 stephdl 1.1 </trans>
70 stephdl 1.3 </entry>
71    
72 stephdl 1.2 <entry>
73     <base>DNSBL_DESCRIPTION</base>
74     <trans>
75     - DNSBL is an abbreviation for "DNS blacklist". It is a list of IP addresses known to be spammers.
76     + DNSBL is an abbreviation for "DNS blacklist".
77     </trans>
78     </entry>
79    
80 stephdl 1.3 @@ -75,8 +90,7 @@
81 stephdl 1.2 <entry>
82     <base>RHSBL_DESCRIPTION</base>
83     <trans>
84     - RHSBL is an abbreviation for "Right Hand Side Blacklist".
85     - It is a list of domain names known to be spammers.
86     + RHSBL is an abbreviation for "Right Hand Side Blacklist".
87     </trans>
88     </entry>
89    
90 stephdl 1.3 @@ -115,7 +129,7 @@
91 stephdl 1.1
92     <entry>
93     <base>WHITE_TITLE</base>
94     - <trans>Use this panel to modify your servers White List settings.</trans>
95     + <trans>Use this panel to modify your servers White List settings. All entries will be enabled by default</trans>
96     </entry>
97    
98     <entry>
99 stephdl 1.3 @@ -185,4 +199,24 @@
100 stephdl 1.1 will be rejected by spamassassin.
101     </trans>
102     </entry>
103     + <entry>
104     + <base>SBLLIST_LABEL</base>
105 stephdl 1.2 + <trans>RHSBL (qpsmtpd SBLList)</trans>
106 stephdl 1.1 + </entry>
107     + <entry>
108     + <base>SBLLIST_DESCRIPTION</base>
109     + <trans>RHS block list - 'right hand side' of senders host/domain will be checked against the following servers</trans>
110     + </entry>
111     + <entry>
112     + <base>RBLLIST_LABEL</base>
113     + <trans>DNSBL Zones (qpsmtpd RBLList)</trans>
114     + </entry>
115     + <entry>
116     + <base>RBLLIST_DESCRIPTION</base>
117     + <trans>DNS Block List - senders IP address will be checked against the following servers</trans>
118     + </entry>
119     + <entry>
120     + <base>RBL_TITLE</base>
121 stephdl 1.2 + <trans>Real-time Blackhole Lists are disabled by default. To help reduce spam you can enable RBLs here.</trans>
122 stephdl 1.1 + </entry>
123     </lexicon>
124     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
125     --- smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/web/functions/wbl 2015-10-13 00:30:41.316390108 +0200
126 stephdl 1.3 +++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/web/functions/wbl 2015-10-15 22:36:42.341219048 +0200
127     @@ -23,15 +23,35 @@
128    
129     <page name="First" pre-event="print_status_message()">
130    
131     - <description>FORM_DESCRIPTION</description>
132     + <field type="literal" id="client_label" value="">
133     + <description>WBL_DESCRIPTION</description>
134     + </field>
135    
136     - </page>
137 stephdl 1.1
138     - <page name="WBL_PAGE_BLACK"
139 stephdl 1.3 - pre-event="turn_off_buttons()"
140 stephdl 1.1 - post-event="create_modify_black" >
141 stephdl 1.3 + <field type="literal" id="client_label" value="">
142     + <description>RBL_LIST_DESCRIPTION</description>
143     + </field>
144    
145 stephdl 1.1 - <description>BLACK_TITLE</description>
146 stephdl 1.3 + <subroutine src="print_custom_button('RBL_LIST', 'WBL_PAGE_RBL')"/>
147     +
148     + <field type="literal" id="client_label" value="">
149     + <description>BLACK_LIST_DESCRIPTION</description>
150     + </field>
151     +
152     + <subroutine src="print_custom_button('BLACK_LIST', 'WBL_PAGE_BLACK')"/>
153     +
154     + <field type="literal" id="client_label" value="">
155     + <description>WHITE_LIST_DESCRIPTION</description>
156     + </field>
157     +
158     + <subroutine src="print_custom_button('WHITE_LIST', 'WBL_PAGE_WHITE')"/>
159     +
160     +
161     + </page>
162     + <page name="WBL_PAGE_RBL"
163     + pre-event="turn_off_buttons()"
164 stephdl 1.1 + post-event="create_modify_rbl" >
165     + <description>RBL_TITLE</description>
166    
167     <field
168     type="select"
169 stephdl 1.3 @@ -43,7 +63,15 @@
170 stephdl 1.1 <label>DNSBL_LABEL</label>
171     <description>DNSBL_DESCRIPTION</description>
172     </field>
173     -
174     + <field
175     + type="textarea"
176     + id="rbllist"
177     + size="80"
178     + value="get_rbllist()"
179     + validation="">
180     + <label>RBLLIST_LABEL</label>
181     + <description>RBLLIST_DESCRIPTION</description>
182     + </field>
183     <field
184     type="select"
185     id="rhsbl"
186 stephdl 1.3 @@ -54,6 +82,24 @@
187 stephdl 1.1 <label>RHSBL_LABEL</label>
188     <description>RHSBL_DESCRIPTION</description>
189     </field>
190     + <field
191     + type="textarea"
192     + id="sbllist"
193     + size="80"
194     + value="get_sbllist()"
195     + validation="">
196     + <label>SBLLIST_LABEL</label>
197     + <description>SBLLIST_DESCRIPTION</description>
198     + </field>
199     +
200     + <subroutine src="print_button('SAVE')" />
201     + </page>
202     +
203     + <page name="WBL_PAGE_BLACK"
204     + pre-event="turn_off_buttons()"
205     + post-event="create_modify_black" >
206     +
207     + <description>BLACK_TITLE</description>
208    
209     <field
210     type="textarea"
211 stephdl 1.3 @@ -92,16 +138,6 @@
212 stephdl 1.1 <description>WHITE_TITLE</description>
213    
214     <field
215     - type="select"
216     - id="rrfh"
217     - options="'yes' => 'ENABLED',
218     - 'no' => 'DISABLED'"
219     - value="get_rrfh()"
220     - validation="nonblank">
221     - <label>RRFH_LABEL</label>
222     - </field>
223     -
224     - <field
225     type="textarea"
226     id="whitelisthosts"
227     value="get_whitelisthosts()"
228     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
229     --- 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
230 stephdl 1.3 +++ smeserver-wbl-0.3.0.bz9092.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm 2015-10-15 22:40:24.211253297 +0200
231 stephdl 1.1 @@ -31,6 +31,20 @@
232     return ($db->get_prop('qpsmtpd', 'RHSBL') || 'disabled');
233     }
234    
235     +sub get_sbllist
236     +{
237     +my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || '';
238     +$sbllistform =~ s/:/\n/g;
239     +return $sbllistform;
240     +}
241     +
242     +sub get_rbllist
243     +{
244     +my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || '';
245     +$rbllistform =~ s/:/\n/g;
246     +return $rbllistform;
247     +}
248     +
249     sub get_badhelo
250     {
251     my %list = $wdb->get('badhelo')->props;
252     @@ -71,13 +85,6 @@
253     return join "\n", sort(@badmailfrom);
254     }
255    
256     -sub get_rrfh
257     -{
258     - return 'yes';
259     - # always yes for SME8
260     - #return ($db->get_prop('qpsmtpd', 'RequireResolvableFromHost') || 'no');
261     -}
262     -
263     sub get_whitelisthosts
264     {
265     my %list = $wdb->get('whitelisthosts')->props;
266     @@ -163,12 +170,6 @@
267     my $fm = shift;
268     my $q = $fm->{'cgi'};
269    
270     - my $dnsbl = $q->param('dnsbl');
271     - $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
272     -
273     - my $rhsbl = $q->param('rhsbl');
274     - $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
275     -
276     # qmail badhelo
277     my %list = $wdb->get('badhelo')->props;
278     my $parameter = "";
279     @@ -240,10 +241,6 @@
280     my $fm = shift;
281     my $q = $fm->{'cgi'};
282    
283     - my $rrfh = $q->param("rrfh");
284     - # SME8 no longer use this key, always on
285     - #$db->set_prop('qpsmtpd', 'RequireResolvableFromHost', "$rrfh");
286     -
287     # qpsmtpd whitelisthosts
288     my %list = $wdb->get('whitelisthosts')->props;
289     my $parameter = "";
290 stephdl 1.3 @@ -366,5 +363,53 @@
291 stephdl 1.1
292     return join "\n", sort(@blacklistfrom);
293     }
294     +sub create_modify_rbl
295     +{
296     + my $fm = shift;
297     + my $q = $fm->{'cgi'};
298    
299     + my $dnsbl = $q->param('dnsbl');
300     + $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
301     +
302     + my $rhsbl = $q->param('rhsbl');
303     + $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
304     +
305     +
306     + my $sbllistcgi = $q->param('sbllist');
307     + my @sbllistcgi = split /\s+/, $sbllistcgi;
308     + my $sbllistdb = '';
309     + foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ':' . $_; }
310     + $sbllistdb =~ s/^://;
311     +
312     + $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb");
313     +
314     +
315     + my $rbllistcgi = $q->param('rbllist');
316     + my @rbllistcgi = split /\s+/, $rbllistcgi;
317     + my $rbllistdb = '';
318     + foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ':' . $_; }
319     + $rbllistdb =~ s/^://;
320     +
321     + $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb");
322     +
323     + ##Update email settings
324     +
325     + unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){
326     + $fm->error('ERROR_UPDATING');
327     + return undef;
328     + }
329     +
330     + $fm->success('SUCCESS');
331     +}
332 stephdl 1.3 +
333     +#Subroutine to display buttons
334     +sub print_custom_button{
335     + my ($fm,$desc,$url) = @_;
336     + my $q = $fm->{cgi};
337     + $url="wbl?page=0&page_stack=&Next=Next&wherenext=".$url;
338     + print " <tr>\n <td colspan='2'>\n";
339     + print $q->p($q->a({href => $url, -class => "button-like"},$fm->localise($desc)));
340     + print qq(</tr>\n);
341     + return undef;
342     +}
343 stephdl 1.1 1;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed