[Mimedefang] some perl help
Jason Englander
jason at englanders.cc
Tue Jun 18 22:26:57 EDT 2002
On Tue, 18 Jun 2002, Jason Qualkenbush wrote:
> in mimedefang-filter I have the following lines:
>
> if ($hits >= 5) {
> action_review($var);
> return action_drop();
> }
>
> I added a subroutine for action_review in mimedefang.pl.
>
> I want to pass the entire message, and $hits to action_review. How do I do
> that?
>
> Is it something like:
>
> action_review($var,$hits);
>
> How do I get the entire message into $var?
>
> my ($var) = @_;
I'd do something like this:
action_review($hits);
Then something like this:
sub action_review {
my $hits = $_[0];
my ($var);
open(MSG, "./INPUTMSG");
while (<MSG>) { $var .= $_; }
close(MSG);
...
}
...if that would fit into the way you're doing things.
Jason
--
Jason Englander
jason at englanders.cc
More information about the MIMEDefang
mailing list