[Mimedefang] custom function - stripping attachments based on headers
David F. Skoll
dfs at roaringpenguin.com
Wed May 1 10:57:36 EDT 2002
On Wed, 1 May 2002 09:07:44 -0500 Dave Williss
<dwilliss at microimages.com> wrote:
> 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;
Yes, except you could have more than one of a given header. Multiple
Received: headers are very common, for example.
I suppose we could have a hash-of-arrays, where:
$Header{$hdr}[$n] is the "nth" instance of "$hdr". In most cases,
you'd only bother (for example) to look at $Header{"From"}[0].
(This may not be legal Perl syntax, but you get the idea...)
--
David.
More information about the MIMEDefang
mailing list