[Mimedefang] Problems with "action_replace_with_url"
Jim Tanner
Jim.Tanner at edag.com.au
Thu Oct 16 21:33:10 EDT 2003
Hi again,
As I haven't received any response yet, I'm wondering if my original
question was:
a) too stupid, dumb or trivial to warrant a reply
b) lost in the recent server crash
c) ignored because it might have been answered before
d) dismissed because I obviously know little about perl
e) too hard?
Humour aside, I am a little disappointed by the lack of assistance with
this question.
Although this was my first posting to the list I have been a subscriber
for quite a long time.
I know that in the past others have had similar questions about
"action_replace_with_url" but I could not find definitive answers or
explanations in the archives.
Regards,
Jim Tanner
"Jim Tanner" <Jim.Tanner at edag.com.au>
Sent by: mimedefang-admin at lists.roaringpenguin.com
10/09/2003 06:15 PM
Please respond to mimedefang
To: mimedefang at lists.roaringpenguin.com
cc:
Subject: [Mimedefang] Problems with "action_replace_with_url"
Hi,
Another dumb question regarding "action_replace_with_url".
I copied the example from mimedefang-filter(5) and placed it at the end of
"sub filter" as shown below:
$size = (stat($entity->bodyhandle->path))[7];
if ($size > 1000000) {
action_replace_with_url($entity,
"/home/httpd/html/mail_parts",
"http://mailserver.company.com/mail_parts",
"The attachment was larger than 1,000,000 bytes.\n" .
"It was removed, but may be accessed at this
URL:\n\n" .
"\t_URL_\n");
}
return action_accept();
}
The first problem is that whilst MD creates the files in "$doc_root" it
doesn't actually remove the attachment(s) from the message. In order to
get MD to remove the oversized attachment(s) I had to change the line to:
"return action_replace_with_url($entity,"
Is this correct (ie. an error exists in the man page) or do I need
additional statements in mimedefang-filter to achieve the correct
functionality?
The second problem is that in either case MD doesn't appear to scan the
oversized attachment(s) for viruses. We would prefer infected attachments
to be quarantined/rejected rather than being placed on a web site for
someone to download :)
Is this a bug or am I missing something?
NB. I searched the archives and found similar questions regarding
"action_replace_with_url" but not many responses.
Regards,
Jim Tanner
_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
More information about the MIMEDefang
mailing list