[Mimedefang] Re: MIMEDefang Digest, Vol 9, Issue 34

Jeff Rife mimedefang at nabs.net
Fri Jun 18 21:57:18 EDT 2004


> I have not tested this, but it is where I would start.  I'd test something
> like the following line:
> 
> action_add_header("To:", "$Recipients, SpammyMail");

This is close, but, here's what I came up with after testing:

action_change_header("To", "$Recipients, SpammyMail");

This will end up with just one "To:" header.

Unfortunately, "$Recipients" is undefined, thus it always ends up looking 
like:

To: , SpammyMail at myhost.mydomain.tld

Even if $Recipients was defined, though, I don't think it's what I want, 
since the @Recipients array has *all* envelope recipients, which 
generally includes things that were in any of "To:", "Cc:", "Bcc:", and 
"Resent-To:" headers.

I also tried using $entity->head->get('To') in both filter() and 
filter_multipart(), which the MIME::Tools docs seem to indicate would 
return a header, but I get nothing when I do this.

So, does anybody know of a way to extract the contents just one header 
from the message and stay within mimedefang-filter/Perl?  I could use 
formail, but that's a major hack.


--
Jeff Rife        |  
SPAM bait:       | 
http://www.nabs.net/Cartoons/OverTheHedge/VelveetaAndRotel.gif 
AskDOJ at usdoj.gov |  
uce at ftc.gov      |  




More information about the MIMEDefang mailing list