aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-07 20:54:08 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-07 20:54:08 +0100
commita8c3a40c6cb3d05115c0213243edff52ba5f3dcf (patch)
tree21546e3a77eac185c614989b4c2535face1f17c2 /pullimap
parent590bf57446967d897ee8327c8b2df57b77f4744e (diff)
parenta4a371234215a7705f304875cc8af067bf3142af (diff)
Merge branch 'master' into debian
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap7
1 files changed, 4 insertions, 3 deletions
diff --git a/pullimap b/pullimap
index e1c96e8..dcbe59b 100755
--- a/pullimap
+++ b/pullimap
@@ -2,7 +2,7 @@
#----------------------------------------------------------------------
# Pull mails from an IMAP mailbox and deliver them to an SMTP session
-# Copyright © 2016-2018 Guilhem Moulin <guilhem@fripost.org>
+# Copyright © 2016-2019 Guilhem Moulin <guilhem@fripost.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ sub usage(;$) {
exit $rv;
}
-usage(1) unless GetOptions(\%CONFIG, qw/config=s quiet|q debug help|h idle:i no-delivery/);
+usage(1) unless GetOptions(\%CONFIG, qw/config=s quiet|q debug+ help|h idle:i no-delivery/);
usage(0) if $CONFIG{help};
usage(1) unless $#ARGV == 0 and $ARGV[0] ne '_';
@@ -233,7 +233,8 @@ sub smtp_send(@) {
my $IMAP = do {
my %config = (%$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0]);
$config{keepalive} = 1 if defined $CONFIG{idle};
- $config{'logger-fd'} = \*STDERR if $CONFIG{debug};
+ $config{'logger-prefix'} = "%?n?%?m?%n(%m)&%n?: ?";
+ delete $config{mailbox}; # use SELECTed mailbox in log messages
Net::IMAP::InterIMAP::->new( %config );
};