[Mimedefang] custom function - stripping attachments based on headers

Dave Williss dwilliss at microimages.com
Wed May 1 10:07:44 EDT 2002


Since mimedefang.pl already reads the HEADERS to find the $Subject,
couldn't it also do the following in the same loop...

    my($hdr, $value) = split(" ", $_, 2);
    $Header{$hdr} = $value;

Then the user-defined filter could just access $Header{"From:"}

 -- Dave Williss
------
Meddle not in the affairs of dragons,
   for you are crunchy and taste good with catsup

----- Original Message -----
From: "David F. Skoll" <dfs at roaringpenguin.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Tuesday, April 30, 2002 10:13 AM
Subject: Re: [Mimedefang] custom function - stripping attachments based on
headers


> On 30 Apr 2002 00:37:12 -0500 Terry Davis <tdavis at approbation.org> wrote:
>
> > I want strip out attachments from emails based on the TO and FROM
> > headers and run a script with the headers and attachment(s) as
> > arguments.
>
> The message headers are in "./HEADERS"
>
> So:
>
> open(HDRS, "<HEADERS");
> while(<HDRS) {
>         chomp;
>         # Do something with header
> }
> close(HDRS);
>
> Also, the HEADERS file has the headers "unfolded", so you're guaranteed
> that each line in the file is a single complete header.
>
> Regards,
>
> David.
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list