[Mimedefang] Deleting Multiple Headers

Tom gpmac at proshells.com
Mon Oct 14 22:36:01 EDT 2002


David,

  I need to do the same thing as this explains.  I have a couple of
questions, however:

1.  Where does this go, in filter begin, filter or filter end?
2.  What restrictions are there on deleting headers?  Can I delete the
"Received" headers.  I want to mask my internal network from the world.

  Thanks!
T. Halter

----- Original Message -----
From: "David F. Skoll" <dfs at roaringpenguin.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Friday, October 04, 2002 10:06 AM
Subject: Re: [Mimedefang] Deleting Multiple Headers


> On Fri, 4 Oct 2002, Schuster, Dan wrote:
>
> > how many there are.  For instance, if there were four "X-Spam-Level:" in
a
> > header already I want to remove them all so that I could add my own.
>
> > The only thing I could think of is having a return value for
> > action_delete_header if it did remove something and then putting that
> > function in a loop???
>
> That doesn't work, because you can't get that information from the
> milter API.
>
> About the only way to do it is to open the HEADERS file, count the number
> of headers, and then delete them all.  Something like:
>
> open(HDRS, "<HEADERS");
> $count = 0;
> while(<HDRS>) {
> $count++ if /^X-Spam-Level:/;
> }
> close(HDRS);
> for ($i=1; $i <= $count; $i++) {
> action_delete_header("X-Spam-Level", $i);
> }
>
> --
> David.
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list