Oops, due to an old mistake , List-ID was set incorrectly
in the MDA. This could cause some breakage w.r.t. mail filters.
my ($class, $simple, $dst) = @_;
unless (defined $simple->header('List-Id')) {
my $pa = $dst->{-primary_address};
my ($class, $simple, $dst) = @_;
unless (defined $simple->header('List-Id')) {
my $pa = $dst->{-primary_address};
- $simple->header_set("List-Id", "<$pa>"); # RFC2919
+ $pa =~ tr/@/./; # RFC2919
+ $simple->header_set("List-Id", "<$pa>");
}
$simple->header_set($_) foreach @BAD_HEADERS;
}
$simple->header_set($_) foreach @BAD_HEADERS;
my $list_id = $header_obj->header('List-Id');
my ($archive_url, $user, $domain);
if (defined $list_id) {
my $list_id = $header_obj->header('List-Id');
my ($archive_url, $user, $domain);
if (defined $list_id) {
- ($user, $domain) = ($list_id =~ /<(.+)\@(.+)>/g);
+ # due to a bug in old versions of public-inbox, <user@domain> was used
+ # as the list-Id instead of <user.domain> as recommended in RFC2919
+ ($user, $domain) = ($list_id =~ /<([^\.@]+)[\.@](.+)>/g);
if (defined $domain) {
$archive_url = "https://$domain/$user/";
if (defined $domain) {
$archive_url = "https://$domain/$user/";
- $mime->header_set('List-Id', "<$addr>");
my $git = PublicInbox::Git->new($maindir);
my $im = PublicInbox::Import->new($git, 'test', $addr);
$im->add($mime);
my $git = PublicInbox::Git->new($maindir);
my $im = PublicInbox::Import->new($git, 'test', $addr);
$im->add($mime);
This is a test message for El\xc3\xa9anor
EOF
This is a test message for El\xc3\xa9anor
EOF
- $mime->header_set('List-Id', "<$addr>");
+ my $list_id = $addr;
+ $list_id =~ s/@/./;
+ $mime->header_set('List-Id', "<$list_id>");
$len = length($mime->as_string);
my $git = PublicInbox::Git->new($maindir);
my $im = PublicInbox::Import->new($git, 'test', $addr);
$len = length($mime->as_string);
my $git = PublicInbox::Git->new($maindir);
my $im = PublicInbox::Import->new($git, 'test', $addr);