Marcus Schopen wrote:
Hei,

I have a text base list of email addresses (one email per line). Where
would I best filter on header "From: " (not envelope from) in
mimedefang-filter and add an additional mail header in case of a hit? At
the moment I use spamassassin rules to tag such mails in filter_end, but
spamassassin catches only mails if their "./INPUTMSG" smaller than the
global given message size, which I don't want to increase.

You should be able to use the MIME::Entity passed to filter_end to retrieve the From: header.

Unless it's fairly short, I'd recommend converting your text file into your favourite flavour of key-value hash table file, accessible from MD as a tied hash via the matching Perl *DB_File module.

Then it's just a matter of:

if ($hashfile{$fromaddr}) {
  action_add_header("SpecialHeader", "$fromaddr found in list");
}

-kgd
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to