From e7875ff77b4cd09831574cc4965e3f7012b81b89 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Apr 2014 10:25:58 +0000 Subject: mda: support aliased addresses This mimics functionality found in -learn. Originally the design allowed for only one address per-list, but when migrating/hijacking existing mailing lists, having multiple addresses map to the same inbox is useful. --- public-inbox-mda | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public-inbox-mda') diff --git a/public-inbox-mda b/public-inbox-mda index 50805da2..096421bb 100755 --- a/public-inbox-mda +++ b/public-inbox-mda @@ -26,12 +26,12 @@ my $config = PublicInbox::Config->new; my $recipient = $ENV{ORIGINAL_RECIPIENT}; defined $recipient or die "ORIGINAL_RECIPIENT not defined in ENV\n"; -my $dst = $config->lookup($recipient); +my $dst = $config->lookup($recipient); # first check defined $dst or exit(1); my $main_repo = $dst->{mainrepo} or exit(1); my $filtered; # string dest -if (PublicInbox::MDA->precheck($filter, $recipient) && +if (PublicInbox::MDA->precheck($filter, $dst->{address}) && do_spamc($filter->simple, \$filtered)) { # update our message with SA headers (in case our filter rejects it) my $msg = Email::Simple->new($filtered); -- cgit v1.2.3-24-ge0c7