diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-06-12 22:18:43 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-06-12 22:19:20 +0200 |
commit | 320a4da020952e3a8b926535d03d49a28dea20d0 (patch) | |
tree | 1cc802f8da904e70e4ddcf5431278ee57a2c81d4 /pullimap | |
parent | f2f4d314990f67ad1ad842951f724f6bda678cfd (diff) |
pullimap: enable locally unsetting the 'purge-after' option.
Diffstat (limited to 'pullimap')
-rwxr-xr-x | pullimap | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -66,7 +66,7 @@ my $CONF = read_config( delete $CONFIG{config} // $NAME, , 'deliver-method' => qr/\A([ls]mtp:\[.*\]:\d+)\z/ , 'deliver-ehlo' => qr/\A(\P{Control}+)\z/ , 'deliver-rcpt' => qr/\A(\P{Control}+)\z/ - , 'purge-after' => qr/\A(\d+)\z/ + , 'purge-after' => qr/\A(\d*)\z/ )->{$ARGV[0]}; my ($MAILBOX, $STATE); @@ -238,7 +238,7 @@ my $LAST_PURGED; sub purge() { my $days = $CONF->{'purge-after'} // return; my ($uidnext) = $IMAP->get_cache('UIDNEXT'); - return unless 1<$uidnext; + return unless $days ne '' and 1<$uidnext; my $set = "1:".($uidnext-1); unless ($days == 0) { |