[Mimedefang] accessing mail headers in mimedefang-filter

Jonas Eckerman jonas_lists at frukt.org
Sat Nov 22 15:07:09 EST 2008

Tilman Schmidt wrote:
> How can I do that? Is there a simple way to access the current set of
> headers of the mail I am processing?

In any callback where a MIME entity is provided to the filter, 
you can use that to access the headers of that entity. An example:

sub filter_end {
   my($entity) = @_;
   unless (defined($entity->head) &&
           lc($entity->head->get('Precedence') eq 'bulk')) {
	# add recipient.

More info in "perldoc MIME::Head" and "perldoc MIME::Entity".

Jonas Eckerman, FSDB & Fruktträdet

More information about the MIMEDefang mailing list