diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-07-26 19:52:52 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-07-26 19:52:52 +0200 |
commit | 8993a9dcb8dedb43e8f8c1b86e1f193da29bcf64 (patch) | |
tree | 58afde8a409e4e90acdfc319e9b844708c227a90 /imapsync | |
parent | 9784997b21a30a2c5a8db3742a42faebad9e169d (diff) |
Make --oneshot the default mode and disable watch mode.
Due to multiple bugs in dovecot 2.13 and 2.18's implementation of the
NOTIFY extension [RFC5465]:
http://dovecot.org/pipermail/dovecot/2015-July/101473.html
http://dovecot.org/pipermail/dovecot/2015-July/101474.html
http://dovecot.org/pipermail/dovecot/2015-July/101514.html
Diffstat (limited to 'imapsync')
-rwxr-xr-x | imapsync | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -47,7 +47,6 @@ sub usage(;$) { print STDERR "Synchronize the given MAILBOXes between two QRESYNC-capable IMAP4rev1 servers.\n" ."Options:\n" ." --config=FILE Specify an alternate configuration file\n" - ." -1, --oneshot Exit as soon as all mailboxes are synchronized\n" ." --repair List the database anomalies and try to repair them\n" ." -q, --quiet Try to be quiet\n" ." --debug Turn on debug mode\n" @@ -55,7 +54,7 @@ sub usage(;$) { } exit $rv; } -usage(1) unless GetOptions(\%CONFIG, qw/config=s quiet|q oneshot|1 repair debug help|h/); +usage(1) unless GetOptions(\%CONFIG, qw/config=s quiet|q repair debug help|h/); usage(0) if $CONFIG{help}; @@ -224,7 +223,9 @@ foreach my $name (qw/local remote/) { #my $mailboxes = $client->list((uc $config{'subscribed-only'} eq 'TRUE' ? '(SUBSCRIBED)' : '' ) # .$config{mailboxes}, 'SUBSCRIBED'); # $client->notify('SELECTED', 'MAILBOXES ('.join(' ', keys %$mailboxes).')'); - $client->notify(qw/SELECTED SUBSCRIBED/) unless $CONFIG{oneshot}; + # XXX NOTIFY doesn't work as expected for INBOX + # http://dovecot.org/pipermail/dovecot/2015-July/101514.html + #$client->notify(qw/SELECTED SUBSCRIBED/) if $CONFIG{watch}; # XXX We shouldn't need to ask for STATUS responses here, and use # NOTIFY's STATUS indicator instead. However Dovecot violates RFC # 5464: http://dovecot.org/pipermail/dovecot/2015-July/101474.html @@ -1151,7 +1152,7 @@ while(1) { } } # clean state! - exit 0 if $CONFIG{oneshot}; + exit 0 unless $CONFIG{watch}; wait_notifications(900); } |