/[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.3 - (hide annotations) (download)
Fri Jul 29 03:45:23 2022 UTC (2 years, 3 months ago) by jpp
Branch: MAIN
Changes since 1.2: +32 -15 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 jpp 1.3 +++ smeserver-fetchmail-1.6/createlinks 2022-07-28 11:23:38.931000000 -0400
4     @@ -2,24 +2,21 @@
5     use esmith::Build::CreateLinks qw(:all);
6     # our event specific for updating with yum without reboot
7     $event = 'smeserver-fetchmail-update';
8     -#add here the path to your templates needed to expand
9     -#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
10    
11     foreach my $file (qw(
12     - /etc/systemd/system-preset/49-koozali.preset
13     + /etc/fetchmail
14     + /etc/startmail
15     + /etc/crontab
16     ))
17     {
18 jpp 1.1 templates2events( $file, $event );
19     }
20     #action needed in case we have a systemd unit
21     -event_link('systemd-default', $event, '10');
22     -event_link('systemd-reload', $event, '50');
23     +event_link('systemd-default', $event, '88');
24     +event_link('systemd-reload', $event, '89');
25 jpp 1.3 +event_link('fetchmail-migrate-fetchids', $event, '89');
26 jpp 1.1 #action specific to this package
27 jpp 1.3 -#event_link('action', $event, '30');
28     -#services we need to restart
29     #safe_symlink('restart',root/etc/e-smith/events/$event/services2adjust/service);
30     -#and Server Manager panel link
31     -#panel_link('somefunction', 'manager');
32    
33     #--------------------------------------------------
34     # functions for manager panel
35 jpp 1.1 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
36     --- smeserver-fetchmail-1.6.old/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 1969-12-31 19:00:00.000000000 -0500
37 jpp 1.3 +++ smeserver-fetchmail-1.6/root/etc/e-smith/events/actions/fetchmail-migrate-fetchids 2022-07-28 23:44:33.009000000 -0400
38     @@ -0,0 +1,13 @@
39 jpp 1.1 +#!/usr/bin/perl
40     +
41     +my $original_file = "/run/lock/fetchmail/.fetchids";
42     +my $new_file = "/var/lib/fetchmail/.fetchids";
43     +
44     +exit 0 if ( -f $new_file ) ;
45     +exit 0 unless ( -f $original_file ) ;
46 jpp 1.3 +while ( -f /run/lock/fetchmail/fetchmail.pid ) {
47     + print "waiting for fetchmail to finish";
48     + sleep 10;
49     +}
50     +# ideally suspend fetchmail of wait for it to stop
51     +system("/usr/bin/mv $original_file $new_file") == 0 or warn "The move $original_file $new_file operation failed: $!";
52 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
53     --- smeserver-fetchmail-1.6.old/root/etc/e-smith/templates/etc/fetchmail/90fetchmail 2022-07-28 10:33:25.177000000 -0400
54     +++ smeserver-fetchmail-1.6/root/etc/e-smith/templates/etc/fetchmail/90fetchmail 2022-07-28 11:17:18.575000000 -0400
55     @@ -322,6 +322,7 @@
56     my $size = $db->get_prop('qmail','MaxMessageSize') || '0';
57     my $mdbg='-l' . $size . ' -d0 --silent --syslog';
58     if($Debug eq "YES") { $mdbg='-l' . $size . ' -d0 --verbose --syslog'; }
59     + $mdbg .= " -i /var/lib/fetchmail/.fetchids "; # fix SME: 11979
60    
61     my $staticvalue = "/usr/bin/fetchmail $mdbg --fetchmailrc - <<EOF\n" ;
62     $staticvalue .= "set postmaster \"postmaster\@$dom\"\n" ;

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