diff options
Diffstat (limited to 'pullimap')
-rwxr-xr-x | pullimap | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -219,7 +219,11 @@ sub smtp_send(@) { # the remote mailbox # $CONF->{'logger-fd'} = \*STDERR if $CONFIG{debug}; -my $IMAP = Net::IMAP::InterIMAP::->new( %$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0] ); +my $IMAP = do { + my %config = (%$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0]); + $config{keepalive} = 1 if defined $CONFIG{idle} and $config{type} ne 'tunnel'; + Net::IMAP::InterIMAP::->new( %config ); +}; # Remove messages with UID < UIDNEXT and INTERNALDATE at most # $CONF->{'purge-after'} days ago. |