[Mimedefang] Code fragment works only sometimes
Mitch at 0Bits.COM
Mitch at 0Bits.COM
Sun Jul 13 14:29:01 EDT 2003
Have you got the F=T set in your milter rules in the .mc file ?
If not, then this means in the even of a MD filter transient timeout
the message will be delivered (so that you don't lose email).
See
http://www.rudolphtire.com/mimedefang-howto/
M
-------- Original Message --------
Subject: [Mimedefang] Code fragment works only sometimes
Date: Sun, 13 Jul 2003 06:34:21 EST
From: Andrea Venturoli <ml.ventu at flashnet.it>
Reply-To: mimedefang at lists.roaringpenguin.com
To: mimedefang at lists.roaringpenguin.com
Hello.
I'm quite new to MIMEDefang, and know little of perl (I'm a C++
programmer).
I installed MIMEDefang in its deafult configuration, tried it out and
then, after a while, modified
/usr/local/etc/mimedefang/mimedefang-filter by adding the following
fragment to the end of filter_begin:
if
(open(HDR,"HEADERS")&&open(BLK,"/usr/local/netfence/local/etc/spam_recipients"))
{
@lines=<HDR>; @blk=<BLK>;
foreach $line (@lines)
{
foreach $blk (@blk)
{
if (rindex($line,$blk)!=-1)
{
md_log($line);
return action_bounce("Spam is not accepted");
}
}
}
}
What I'm trying to do is look for specific strings in the headers and
bounce the message back if any is found.
This works sometimes, but sometimes not: the string is there, but I get
the message anyway.
What am I doing wrong?
I guess the problem is with action_bounce, but I'm not sure if and why.
bye & Thanks
av.
P.S. Sorry if this is a stupid question, forgive my "newby-ness" :) If I
need to provide more informations, I'm
obviously willing to do so.
More information about the MIMEDefang
mailing list