These probably make sense even though we do not handle
delivery ourselves. It can aid in searching/filtering/tagging
of messages.
# run spamc again on the HTML-free message
if (do_spamc($simple, \$filtered)) {
$simple = Email::Simple->new($filtered);
# run spamc again on the HTML-free message
if (do_spamc($simple, \$filtered)) {
$simple = Email::Simple->new($filtered);
+ set_list_headers($simple, $dst);
$filter->simple($simple);
my $from = $filter->from;
$filter->simple($simple);
my $from = $filter->from;
return ($@ || $? || !defined($$out) || length($$out) == 0) ? 0 : 1;
}
return ($@ || $? || !defined($$out) || length($$out) == 0) ? 0 : 1;
}
+
+# RFC2919 and RFC2369
+sub set_list_headers {
+ my ($simple, $dst) = @_;
+ my $pa = "<$dst->{-primary_address}>";
+ $simple->header_set("List-Id", $pa);
+ $simple->header_set("List-Post", $pa);
+
+ my $url = $dst->{url};
+ if (defined $url) {
+ $simple->header_set("List-Archive", "<$url>");
+ $simple->header_set("List-Help", "<${url}help>");
+ }
+}