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. --- t/precheck.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 't/precheck.t') diff --git a/t/precheck.t b/t/precheck.t index 974d6a38..89564097 100644 --- a/t/precheck.t +++ b/t/precheck.t @@ -12,9 +12,6 @@ sub do_checks { my $f = Email::Filter->new(data => $s->as_string); - ok(PublicInbox::MDA->precheck($f, undef), - "ORIGINAL_RECIPIENT unset is OK"); - my $recipient = 'foo@example.com'; ok(!PublicInbox::MDA->precheck($f, $recipient), "wrong ORIGINAL_RECIPIENT rejected"); @@ -26,6 +23,10 @@ sub do_checks { $recipient = 'c@example.com'; ok(PublicInbox::MDA->precheck($f, $recipient), "ORIGINAL_RECIPIENT in Cc: is OK"); + + $recipient = [ 'c@example.com', 'd@example.com' ]; + ok(PublicInbox::MDA->precheck($f, $recipient), + "alias list is OK"); } { -- cgit v1.2.3-24-ge0c7