[Mimedefang] MIMEDefang 2.42 + group directory permissions

Guido mimedefang.at.lists.roaringpenguin.com at starbase12.cjb.net
Mon Apr 5 12:13:43 EDT 2004


Hi all,

I'm not sure whether the problem is in MIMEDefang or with my settings 
somewhere, but occasionally see a message being tempfailed with the message 
"Problem running virusscanner". Among my virusscanners I have Clamd running 
under it's own userid which is also part of the defang group.
While debugging I seem to be unable to duplicate the problem. Even using the 
contents of ENTIRE_MESSAGE after having quarantined one of these problem 
emails. So far it seems that it only has happened on actual viruses.

Not being able to duplicate the problem or figuring out which of my 
virusscanners made MIMEDefang tempfail, I finally decided to have MIMEDefang 
die in such a case (and have it keep the mdefang-<id> directory).

Doing so I finally figured out that the files were created with the 0640 
permissions, but that the Work directory was created with 0700, which causes 
clamd to be unable to scan this directory. 

Going over the MIMEDefang code I made the following change, which seems to 
allow clamd to enter the directory and prevents MIMEDefang from tempfailing:


--- ./mimedefang.pl     2004-03-31 20:34:16.000000000 +0200 
+++ /usr/local/bin/mimedefang.pl        2004-04-05 13:18:16.000000000 +0200 
@@ -4856,6 +4856,7 @@ 
 
     my $parser = new MIME::Parser; 
     my $filer = new MIME::Parser::ParanoidFiler($msgdir); 
+    mkdir($msgdir, 0750); 
     $parser->filer($filer); 
 
     $parser->extract_nested_messages(1); 


Might there be anyone who has had the same kind of problem or who can tell me 
if this is the correct way to fix it? Or might the problem be related 
elsewhere? I.e. with MIME::Tools ?

Thanks,
Kind regards,

Guido

-- 
Felson's Law:
	To steal ideas from one person is plagiarism; to steal from
	many is research.



More information about the MIMEDefang mailing list