use Email::Filter;
use Email::MIME;
-use Email::Address;
-use File::Path::Expand qw/expand_filename/;
+use Email::MIME::ContentType;
+$Email::MIME::ContentType::STRICT_PARAMS = 0; # user input is imperfect
use IPC::Run qw(run);
use PublicInbox::MDA;
use PublicInbox::Filter;
# n.b: hopefully we can setup the emergency path without bailing due to
# user error, we really want to setup the emergency destination ASAP
# in case there's bugs in our code or user error.
-my $emergency = $ENV{PI_EMERGENCY} || '~/.public-inbox/emergency/';
-$emergency = expand_filename($emergency);
+my $emergency = $ENV{PI_EMERGENCY} || "$ENV{HOME}/.public-inbox/emergency/";
# this reads the message from stdin
my $filter = Email::Filter->new(emergency => $emergency);
} elsif ($fcfg eq 'scrub') {
$filter_arg = undef; # the default for legacy versions
} else {
- warn "publicinbox.$dst->{inbox}.filter=$fcfg invalid\n";
+ warn "publicinbox.$dst->{name}.filter=$fcfg invalid\n";
warn "must be either 'scrub' or 'reject' (the default)\n";
}
};
my $git = PublicInbox::Git->new($main_repo);
my $im = PublicInbox::Import->new($git,
- $dst->{inbox}, $recipient);
+ $dst->{name}, $recipient);
if (defined $im->add($msg)) {
$im->done;
$filter->ignore; # exits