aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap8
1 files changed, 4 insertions, 4 deletions
diff --git a/interimap b/interimap
index 4a8bde4..e7cd6d5 100755
--- a/interimap
+++ b/interimap
@@ -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})");