[Mimedefang] Problems with "action_replace_with_url"
Jim Tanner
Jim.Tanner at edag.com.au
Thu Oct 9 15:18:00 EDT 2003
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 Telephone : +61
3 9552 8111
IT/Systems Manager Extension : x124
EDAG Future Pty Ltd Facsimile : +61 3 9552
8101
11 Planetree Avenue
Dingley, Vic. 3172
Australia.
mailto:Jim.Tanner at edag.com.au
_______________________________________________________
PLEASE NOTE:
This electronic transmission is intended only for those to
whom it is addressed. It may contain information that is
confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of
mistaken transmission of this information. If you are not
the intended recipient you must not distribute or copy this
transmission and should please notify the sender.
More information about the MIMEDefang
mailing list