[Mimedefang] Re: Problem on attachment name
David F. Skoll
dfs at roaringpenguin.com
Wed Jan 17 09:25:46 EST 2007
Ing. Andrea Vettori wrote:
> if this is an acceptable solution to the company where the
> mimedefang/f-secure installation is, how can I check the condition and
> how can I send the email to the sender ?
I would work around it as follows: If the virus-scanner returns a tempfail,
then re-run the scanner only on the unpacked MIME parts and not the original
message. The code would go something like this:
# ==========================================
# Copy original message into work directory
md_copy_orig_msg_to_work_dir_as_mbox_file();
# Scan
($code, $category, $action) = message_contains_virus();
if ($action eq 'tempfail') { # Oops... scanner choked
# Remove original message from work dir - it might be causing trouble
unlink('./Work/INPUTMSG');
# And try again
($code, $category, $action) = message_contains_virus();
}
# Now deal with $code, $category, $action as usual.
# ==========================================
Meanwhile, I'd also file a bug with the virus-scanner company. It
should handle the situation more gracefully.
Regards,
David.
More information about the MIMEDefang
mailing list