/[smecontribs]/rpms/smeserver-fetchmail/contribs10/smeserver-fetchmail-1.6-bz11058-fixpanel.patch
ViewVC logotype

Contents of /rpms/smeserver-fetchmail/contribs10/smeserver-fetchmail-1.6-bz11058-fixpanel.patch

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


Revision 1.1 - (show annotations) (download)
Wed Nov 17 19:26:07 2021 UTC (3 years ago) by jpp
Branch: MAIN
CVS Tags: smeserver-fetchmail-1_6-24_el7_sme, smeserver-fetchmail-1_6-27_el7_sme, smeserver-fetchmail-1_6-22_el7_sme, smeserver-fetchmail-1_6-26_el7_sme, smeserver-fetchmail-1_6-25_el7_sme, smeserver-fetchmail-1_6-23_el7_sme, HEAD
Error occurred while calculating annotation data.
* Wed Nov 17 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-22.sme
- fix panel [SME: 11058]
  removed SMTP proxy and blocking option and redirect to Proxy panel
  TODO: module cleanup and cleanup of unused properties

1 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/fetchmail smeserver-fetchmail-1.6/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/fetchmail
2 --- smeserver-fetchmail-1.6.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/fetchmail 2021-11-17 14:18:15.236000000 -0500
3 +++ smeserver-fetchmail-1.6/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/fetchmail 2021-11-17 14:22:44.155000000 -0500
4 @@ -459,4 +459,18 @@
5 ]]>
6 </trans>
7 </entry>
8 + <entry>
9 + <base>SET_FETCHMAIL_SATUS</base>
10 + <trans>Confirm you want to change Fetchmail status</trans>
11 + </entry>
12 + <entry>
13 + <base>RoutingIMPAPPOP</base>
14 + <trans>Confirm you want to change IMAP and POP external traffic filtering status</trans>
15 + </entry>
16 +
17 + <entry>
18 + <base>RoutingNNTP</base>
19 + <trans>Confirm you want to change NNTP external traffic filtering status</trans>
20 + </entry>
21 +
22 </lexicon>
23 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy-fetchmail smeserver-fetchmail-1.6/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy-fetchmail
24 --- smeserver-fetchmail-1.6.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy-fetchmail 2021-11-17 14:18:15.224000000 -0500
25 +++ smeserver-fetchmail-1.6/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy-fetchmail 2021-11-17 14:19:49.527000000 -0500
26 @@ -24,19 +24,6 @@
27 $OUT .= "\t-i \$INTERNALIF -p tcp ! --dst \$LOCALIP --dport 143 --jump DROP\n";
28
29 }
30 - my $routingSMTP = $FetchMails{ "RoutingSMTP" } || "YES" ;
31 - if ( $routingSMTP eq "NO" ) {
32 -
33 - # Users on LAN are not allowed to access to SMTP
34 - # servers on Internet.
35 -
36 - $OUT .= " /sbin/iptables --append FORWARD\\\n";
37 - $OUT .= "\t-i \$INTERNALIF -p tcp ! --dst \$LOCALIP --dport 25\\\n";
38 - $OUT .= "\t--jump LOG --log-prefix \"denylogfetchmail: \"\n";
39 - $OUT .= " /sbin/iptables --append FORWARD\\\n";
40 - $OUT .= "\t-i \$INTERNALIF -p tcp ! --dst \$LOCALIP --dport 25 --jump DROP\n";
41 -
42 - }
43 my $routingNNTP = $FetchMails{ "RoutingNNTP" } || "YES" ;
44 if ( $routingNNTP eq "NO" ) {
45
46 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/web/functions/fetchmail smeserver-fetchmail-1.6/root/etc/e-smith/web/functions/fetchmail
47 --- smeserver-fetchmail-1.6.old/root/etc/e-smith/web/functions/fetchmail 2021-11-17 14:18:15.246000000 -0500
48 +++ smeserver-fetchmail-1.6/root/etc/e-smith/web/functions/fetchmail 2021-11-17 14:19:49.021000000 -0500
49 @@ -182,8 +182,9 @@
50 to the front page.
51 -->
52 <page
53 - name="Service1"
54 + name="FetchmailStatus"
55 post-event="fetchmail_enable_disable">
56 + <title>SET_FETCHMAIL_SATUS</title>
57 </page>
58
59 <!-- page 6
60 @@ -191,8 +192,9 @@
61 to the front page.
62 -->
63 <page
64 - name="Service2"
65 + name="Routing"
66 post-event="fetchmail_routing">
67 + <title>RoutingIMPAPPOP</title>
68 </page>
69
70 <!-- page 7
71 @@ -200,8 +202,9 @@
72 to the front page.
73 -->
74 <page
75 - name="Service3"
76 + name="RoutingSMTP"
77 post-event="fetchmail_routingSMTP">
78 + <title>RoutingSMTP</title>
79 </page>
80
81 <!-- page 8
82 @@ -209,8 +212,9 @@
83 to the front page.
84 -->
85 <page
86 - name="Service4"
87 + name="RoutingNNTP"
88 post-event="fetchmail_routingNNTP">
89 + <title>RoutingNNTP</title>
90 </page>
91
92 <!-- page 9
93 @@ -218,8 +222,14 @@
94 to the front page.
95 -->
96 <page
97 - name="Service5"
98 + name="SMTPProxy"
99 post-event="fetchmail_SMTPProxy">
100 </page>
101 + <!-- keep this one so next button display on previous one
102 + -->
103 + <page
104 + name="Dummy">
105 + </page>
106 +
107
108 </form>
109 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fetchmail.pm smeserver-fetchmail-1.6/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fetchmail.pm
110 --- smeserver-fetchmail-1.6.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fetchmail.pm 2021-11-17 14:18:15.271000000 -0500
111 +++ smeserver-fetchmail-1.6/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fetchmail.pm 2021-11-17 14:19:49.279000000 -0500
112 @@ -78,7 +78,7 @@
113 my $self = esmith::FormMagick->new();
114 bless $self, $class;
115 # Uncomment the following line for debugging.
116 - #$self->debug(TRUE);
117 + # $self->debug(TRUE);
118 return $self;
119 }
120
121 @@ -177,12 +177,14 @@
122
123 my $FM = $db->get('FetchMails')
124 or ($self->error('ERR_NO_FETCHMAIL_RECORD') and return undef) ;
125 + my $QP = $db->get('qpsmtpd')
126 + or ($self->error('ERR_NO_QPSMTPD_RECORD') and return undef) ;
127 my $FMStatus = 0 ;
128 $FMStatus = 1 if ( ( $FM->prop('status') || 'disabled' ) eq 'enabled' ) ;
129 my $FMRouting = 0 ;
130 $FMRouting = 1 if ( ( $FM->prop('Routing') || 'NO' ) eq 'YES' ) ;
131 my $FMRoutingSMTP = 0 ;
132 - $FMRoutingSMTP = 1 if ( ( $FM->prop('RoutingSMTP') || 'NO' ) eq 'YES' ) ;
133 + $FMRoutingSMTP = 1 if ( ( $QP->prop('Proxy') || 'disabled' ) eq 'disabled' ) ;
134 my $FMRoutingNNTP = 0 ;
135 $FMRoutingNNTP = 1 if ( ( $FM->prop('RoutingNNTP') || 'NO' ) eq 'YES' ) ;
136 # we need also information about smtpfront-qmail
137 @@ -197,7 +199,7 @@
138 my $SmtpProxy = $db->get($MailSystem)
139 or ($self->error('ERR_NO_SMTPFRONT-QMAIL_RECORD') and return undef) ;
140 my $FMRoutingSMTPProxy = 0 ;
141 - $FMRoutingSMTPProxy = 1 if ( ( $SmtpProxy->prop('Proxy') || 'disabled' ) eq 'enabled' ) ;
142 + $FMRoutingSMTPProxy = 1 if ( ( $SmtpProxy->prop('Proxy') || 'disabled' ) eq 'transparent' ) ;
143 print $q->start_table({-class => 'sme-noborder'}), "\n";
144 print $q->Tr(
145 esmith::cgi::genCell( $q,
146 @@ -206,7 +208,7 @@
147 esmith::cgi::genCell( $q,
148 $self->localise('SERVICE_' . $FMStatus) , "sme-noborders-label" ),
149 esmith::cgi::genCell( $q, "<a class=\"button-like\""
150 - . "href=\"fetchmail?page=5&Next=First&Current=" . $FMStatus . "\">"
151 + . "href=\"fetchmail?page=0&wherenext=FetchmailStatus&Next=First&Current=" . $FMStatus . "\">"
152 . $self->localise('BUTTON_LABEL_SERVICE_' . $FMStatus )
153 . "</a>", "sme-noborders-content" ),"\n",
154 ),"\n" ;
155 @@ -218,7 +220,7 @@
156 $self->localise('ROUTING_' . $FMRouting) , "sme-noborders-label" ),
157 esmith::cgi::genCell( $q,
158 "<a class=\"button-like\""
159 - . "href=\"fetchmail?page=6&Next=First&CurrentPOP=" . $FMRouting . "\">"
160 + . "href=\"fetchmail?page=0&wherenext=Routing&Next=First&CurrentPOP=" . $FMRouting . "\">"
161 . $self->localise('BUTTON_LABEL_ROUTING_' . $FMRouting)
162 . "</a>" , "sme-noborders-content" ),"\n",
163 ),"\n" ;
164 @@ -230,7 +232,7 @@
165 $self->localise('ROUTINGNNTP_' . $FMRoutingNNTP) , "sme-noborders-label" ),
166 esmith::cgi::genCell( $q,
167 "<a class=\"button-like\""
168 - . "href=\"fetchmail?page=8&Next=First&CurrentNNTP=" . $FMRoutingNNTP . "\">"
169 + . "href=\"fetchmail?page=0&wherenext=RoutingNNTP&Next=First&CurrentNNTP=" . $FMRoutingNNTP . "\">"
170 . $self->localise('BUTTON_LABEL_ROUTINGNNTP_' . $FMRoutingNNTP)
171 . "</a>" , "sme-noborders-content" ),"\n",
172 ),"\n" ;
173 @@ -242,8 +244,8 @@
174 $self->localise('ROUTINGSMTP_' . $FMRoutingSMTP) , "sme-noborders-label" ),
175 esmith::cgi::genCell( $q,
176 "<a class=\"button-like\""
177 - . "href=\"fetchmail?page=7&Next=First&CurrentSMTP=" . $FMRoutingSMTP . "\">"
178 - . $self->localise('BUTTON_LABEL_ROUTINGSMTP_' . $FMRoutingSMTP)
179 + . "href=\"proxy\">"
180 + . $self->localise('MODIFY')
181 . "</a>" , "sme-noborders-content" ),"\n",
182 ),"\n" ;
183 print $q->Tr(
184 @@ -254,10 +256,10 @@
185 $self->localise('ROUTINGSMTPPROXY_' . $FMRoutingSMTPProxy) , "sme-noborders-label" ),
186 esmith::cgi::genCell( $q,
187 "<a class=\"button-like\""
188 - . "href=\"fetchmail?page=9&Next=First&CurrentSMTPProxy=" . $FMRoutingSMTPProxy . "\">"
189 - . $self->localise('BUTTON_LABEL_ROUTINGSMTPPROXY_' . $FMRoutingSMTPProxy)
190 + . "href=\"proxy\">"
191 + . $self->localise('MODIFY')
192 . "</a>" , "sme-noborders-content" ),"\n",
193 - ),"\n" ;
194 + ),"\n" unless $SmtpProxy->prop('Proxy') eq "blocked" ;
195 print $q->end_table(),"\n";
196 return undef ;
197 }
198 @@ -561,11 +563,12 @@
199 sub fetchmail_enable_disable {
200 my $self = shift ;
201 $self->debug_msg("Start of sub 'fetchmail_enable_disable'.") ;
202 - my $current = $self->{cgi}->param('Current') ;
203 - $self->debug_msg("'fetchmail_enable_disable' : \$current = $current") ;
204 + #my $current = $self->{cgi}->param('Current') ;
205 + #$self->debug_msg("'fetchmail_enable_disable' : \$current = $current") ;
206 my $FM = $db->get('FetchMails')
207 || ($self->error('ERR_NO_FETCHMAIL_RECORD') and return undef);
208 - if ( $current ) {
209 + my $current = $FM->prop("status") || "disabled";
210 + if ( $current eq "enabled" ) {
211 $FM->set_prop("status", "disabled") ;
212 $self->debug_msg("'fetchmail_enable_disable' : fetchmail disabled.") ;
213 } else {
214 @@ -850,10 +853,12 @@
215 =head2 fetchmail_routingSMTP
216
217 This method change the 'SMTP routing' mode of Fetchmail
218 +to be removed, not used anymore on SME 10
219
220 =cut
221
222 sub fetchmail_routingSMTP {
223 + return undef ;
224 my $self = shift ;
225 $self->debug_msg("Start of sub 'fetchmail_routingSMTP'.") ;
226 my $current = $self->{cgi}->param('CurrentSMTP') ;
227 @@ -880,10 +885,12 @@
228 =head2 fetchmail_SMTPProxy
229
230 This method change the state of the SME SMTP Proxy
231 +to be removed, not used anymore on SME 10
232
233 =cut
234
235 sub fetchmail_SMTPProxy {
236 + return undef ;
237 my $self = shift ;
238 $self->debug_msg("Start of sub 'fetchmail_SMTPProxy'.") ;
239 my $current = $self->{cgi}->param('CurrentSMTPProxy') ;

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