diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-09-14 03:23:17 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-09-14 03:23:17 +0200 |
commit | 602306a7eb8bdddbc157130e8abe49eeab6f1ebc (patch) | |
tree | 6f4cfcd27541a4193fddcd51c1676687057780a9 /interimap | |
parent | 77753445ddc78013159a6d44301a1b342af4a2d1 (diff) | |
parent | c8fb54897f046a5a3fb4c1d45dc21fd8bcd882e3 (diff) |
Merge branch 'master' into debian
Diffstat (limited to 'interimap')
-rwxr-xr-x | interimap | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -249,7 +249,7 @@ foreach my $name (qw/local remote/) { $config{enable} = 'QRESYNC'; $config{name} = $name; $config{'logger-fd'} = $LOGGER_FD if defined $LOGGER_FD; - $config{'compress'} //= ($name eq 'local' ? 'NO' : 'YES'); + $config{'compress'} //= ($name eq 'local' ? 0 : 1); $IMAP->{$name} = { client => Net::IMAP::InterIMAP::->new(%config) }; my $client = $IMAP->{$name}->{client}; @@ -514,7 +514,7 @@ sub sync_mailbox_list() { sync_mailbox_list(); ($lIMAP, $rIMAP) = map {$IMAP->{$_}->{client}} qw/local remote/; my $ATTRS = 'MODSEQ FLAGS INTERNALDATE '. - (((!defined $CONF->{_} or uc ($CONF->{_}->{'use-binary'} // 'YES') eq 'YES') and + (((!defined $CONF->{_} or $CONF->{_}->{'use-binary'} // 1) and !$lIMAP->incapable('BINARY') and !$rIMAP->incapable('BINARY')) ? 'BINARY' : 'BODY').'.PEEK[]'; @@ -971,8 +971,8 @@ sub sync_known_messages($$) { sub callback_new_message($$$$;$$$) { my ($idx, $mailbox, $name, $mail, $UIDs, $buff, $bufflen) = @_; - my $length = defined $mail->{RFC822} ? length($mail->{RFC822}) - : defined $mail->{BINARY} ? length($mail->{BINARY}) + my $length = defined $mail->{RFC822} ? length(${$mail->{RFC822}}) + : defined $mail->{BINARY} ? length(${$mail->{BINARY}}) : return; # not for us if ($length == 0) { msg("$name($mailbox)", "WARNING: Ignoring new 0-length message (UID $mail->{UID})"); |