[Mimedefang] Seperate Quarantine Report Address

Lee S. Whatley lee at bcc.cba.ua.edu
Mon Nov 11 17:57:00 EST 2002


Hello,

I've been using MIMEDefang for about a month now and was tired of the 
admin email address I specified with "$AdminAddress" getting the 
quarantine reports.  Basically I only wanted to have to look at those 
reports if I needed to rescue a quarantined attachment for a user.  I 
couldn't find a way to seperate who gets the quarantine reports and who 
gets listed as the admin contact for MIMEDefang, so I wrote a patch to 
create 2 new variables: $QuarantineAdminAddress and 
$QuarantineAdminName.  I also changed mimedefang.pl to email the 
quarantine reports to this user by default, but still list $AdminAddress 
and $AdminName as the contacts for help.

If there is a way to do this already without having to patch the code 
please let me know.  Attached is a copy of the patch (or if it gets 
filtered you can view it at 
http://www.cba.ua.edu/~spaff/mimedefang.pl.quarantineadmin.patch)

Thanks,

-Lee S. Whatley
System Administrator
University of Alabama C&BA
-------------- next part --------------
--- mimedefang.pl	2002-11-04 16:51:23.000000000 -0600
+++ mimedefang.pl.new	2002-11-11 14:44:41.000000000 -0600
@@ -36,7 +36,7 @@
 	    $VirusScannerMessages $WarningLocation $WasMultiPart $WorkDir
 	    $NotifySenderSubject $NotifyAdministratorSubject
 	    $ValidateIPHeader
-	    $QuarantineSubject $SALocalTestsOnly $NotifyNoPreamble
+	    $QuarantineSubject $QuarantineAdminName $QuarantineAdminAddress $SALocalTestsOnly $NotifyNoPreamble
 	    %Actions %Stupidity @FlatParts @Recipients @Warnings %Features
 	    $SyslogFacility $MaxMIMEParts $InMessageContext
 	    %SendmailMacros);
@@ -1123,7 +1123,7 @@
     if ($QuarantineCount > 0 || $EntireMessageQuarantined) {
 	my($body);
 	$body = "From: $DaemonName <$DaemonAddress>\n";
-	$body .= "To: \"$AdminName\" <$AdminAddress>\n";
+	$body .= "To: \"$QuarantineAdminName\" <$QuarantineAdminAddress>\n";
 	$body .= "MIME-Version: 1.0\nContent-Type: text/plain\n";
 	$body .= "Subject: $QuarantineSubject\n\n";
 	if ($QuarantineCount >= 1) {
@@ -1166,7 +1166,7 @@
 	    $body .= "\n----------\nHere are the warning details:\n\n";
 	    $body .= "@Warnings";
 	}
-	send_mail($DaemonAddress, $DaemonName, $AdminAddress, $body);
+	send_mail($DaemonAddress, $DaemonName, $QuarantineAdminAddress, $body);
     }
 
     # Send notification to sender, if required


More information about the MIMEDefang mailing list