/[smecontribs]/rpms/smeserver-fetchmail/contribs10/smeserver-fetchmail-1.6-bz11979-ids.patch
ViewVC logotype

Annotation of /rpms/smeserver-fetchmail/contribs10/smeserver-fetchmail-1.6-bz11979-ids.patch

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


Revision 1.2 - (hide annotations) (download)
Thu Jul 28 15:21:50 2022 UTC (2 years, 4 months ago) by jpp
Branch: MAIN
Changes since 1.1: +11 -0 lines
* Thu Jul 28 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-24.sme
- fix fetchmail restart downloading all emails after reboot [SME: 11979]
  thanks to Stefano Zamboni for debuging and original fix.

1 jpp 1.1 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/createlinks smeserver-fetchmail-1.6/createlinks
2     --- smeserver-fetchmail-1.6.old/createlinks 2022-07-28 10:33:25.211000000 -0400
3     +++ smeserver-fetchmail-1.6/createlinks 2022-07-28 11:10:53.157000000 -0400
4     @@ -12,8 +12,9 @@
5     templates2events( $file, $event );
6     }
7     #action needed in case we have a systemd unit
8     -event_link('systemd-default', $event, '10');
9     -event_link('systemd-reload', $event, '50');
10     +event_link('systemd-default', $event, '88');
11     +event_link('systemd-reload', $event, '89');
12     +event_link('fetchmail-migrate-fetchids', $event, '91');
13     #action specific to this package
14     #event_link('action', $event, '30');
15     #services we need to restart
16     diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids smeserver-fetchmail-1.6/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids
17     --- smeserver-fetchmail-1.6.old/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 1969-12-31 19:00:00.000000000 -0500
18     +++ smeserver-fetchmail-1.6/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 2022-07-28 11:06:55.577000000 -0400
19     @@ -0,0 +1,15 @@
20     +#!/usr/bin/perl
21     +
22     +use File::Copy;
23     +
24     +my $original_file = "/run/lock/fetchmail/.fetchids";
25     +my $new_file = "/var/lib/fetchmail/.fetchids";
26     +my $status=`/usr/bin/systemctl is-active fetchmail.service`;
27     +
28     +exit 0 if ( -f $new_file ) ;
29     +exit 0 unless ( -f $original_file ) ;
30     +
31     +system("/usr/bin/systemctl stop fetchmail.service") if ( $status eq "active");
32     +#move($original_file, $new_file) or warn "The move operation failed: $!";
33     +system("/usr/bin/mv $original_file $new_file") == 0 or warn "The move operation failed: $!";
34     +system("/usr/bin/systemctl start fetchmail.service") if ( $status eq "active");
35 jpp 1.2 diff -Nur --no-dereference smeserver-fetchmail-1.6.old/root/etc/e-smith/templates/etc/fetchmail/90fetchmail smeserver-fetchmail-1.6/root/etc/e-smith/templates/etc/fetchmail/90fetchmail
36     --- smeserver-fetchmail-1.6.old/root/etc/e-smith/templates/etc/fetchmail/90fetchmail 2022-07-28 10:33:25.177000000 -0400
37     +++ smeserver-fetchmail-1.6/root/etc/e-smith/templates/etc/fetchmail/90fetchmail 2022-07-28 11:17:18.575000000 -0400
38     @@ -322,6 +322,7 @@
39     my $size = $db->get_prop('qmail','MaxMessageSize') || '0';
40     my $mdbg='-l' . $size . ' -d0 --silent --syslog';
41     if($Debug eq "YES") { $mdbg='-l' . $size . ' -d0 --verbose --syslog'; }
42     + $mdbg .= " -i /var/lib/fetchmail/.fetchids "; # fix SME: 11979
43    
44     my $staticvalue = "/usr/bin/fetchmail $mdbg --fetchmailrc - <<EOF\n" ;
45     $staticvalue .= "set postmaster \"postmaster\@$dom\"\n" ;

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