diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2019-11-07 20:54:08 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-11-07 20:54:08 +0100 |
commit | a8c3a40c6cb3d05115c0213243edff52ba5f3dcf (patch) | |
tree | 21546e3a77eac185c614989b4c2535face1f17c2 /pullimap | |
parent | 590bf57446967d897ee8327c8b2df57b77f4744e (diff) | |
parent | a4a371234215a7705f304875cc8af067bf3142af (diff) |
Merge branch 'master' into debian
Diffstat (limited to 'pullimap')
-rwxr-xr-x | pullimap | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 ); }; |