COntinued from previos message (why is send and attach so close in evolution?) > > Finally this was done on mimedefang.pl that comes with Debian Unstable: > 2.42-1
Attached is the patch. Regards, Stewart James
--- /usr/bin/mimedefang.pl 2004-05-04 19:46:41.000000000 +1000 +++ mimedefang.pl 2004-05-12 10:47:03.000000000 +1000 @@ -37,7 +37,7 @@ $ClamdSock $SophieSock $TrophieSock $SuspiciousCharsInHeaders $SuspiciousCharsInBody $Helo - $TerminateAndDiscard $URL $OpenAVHost $VirusName $CurrentVirusScannerMessage + $TerminateAndDiscard $URL $OpenAVHost $VirusName $VirusScanner $CurrentVirusScannerMessage $VirusScannerMessages $WarningLocation $WasMultiPart $CWD $FprotdHost $NotifySenderSubject $NotifyAdministratorSubject @@ -2084,7 +2084,7 @@ # Scans the entity using the File::Scan module. #*********************************************************************** sub entity_contains_virus_filescan ($) { - + $VirusScanner = "FileScan"; unless ($Features{"Virus:FileScan"}) { md_syslog('err', "$MsgID: Attempt to use File::Scan, but File::Scan is not installed."); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -2149,6 +2149,7 @@ # Scans the working directory using File::Scan module. #*********************************************************************** sub message_contains_virus_filescan () { + $VirusScanner = "FileScan"; unless ($Features{"Virus:FileScan"}) { md_syslog('err', '$MsgID: Attempt to use File::Scan, but File::Scan is not installed.'); @@ -2209,6 +2210,7 @@ # Runs the NAI Virus Scan program on the entity. (http://www.nai.com) #*********************************************************************** sub entity_contains_virus_nai ($) { + $VirusScanner = "NAI"; unless ($Features{'Virus:NAI'}) { md_syslog('err', "$MsgID: NAI Virus Scan not installed on this system"); @@ -2249,6 +2251,7 @@ # Runs the NAI Virus Scan program on the working directory #*********************************************************************** sub message_contains_virus_nai () { + $VirusScanner = "NAI"; unless ($Features{'Virus:NAI'}) { md_syslog('err', "$MsgID: NAI Virus Scan not installed on this system"); @@ -2330,6 +2333,7 @@ # Runs the Bitdefender program on the entity. (http://www.bitdefender.com) #*********************************************************************** sub entity_contains_virus_bdc ($) { + $VirusScanner = "BDC"; unless($Features{'Virus:BDC'}) { md_syslog('err', "$MsgID: Bitdefender not installed on this system"); @@ -2371,6 +2375,7 @@ # Runs the Bitdefender program on the working directory #*********************************************************************** sub message_contains_virus_bdc () { + $VirusScanner = "BDC"; unless($Features{'Virus:BDC'}) { md_syslog('err', "$MsgID: Bitdefender not installed on this system"); @@ -2409,6 +2414,7 @@ # Runs the F-Secure Anti-Virus program. (http://www.f-secure.com) #*********************************************************************** sub entity_contains_virus_fsav ($) { + $VirusScanner = "FSAV"; unless($Features{'Virus:FSAV'}) { md_syslog('err', "$MsgID: F-Secure Anti-Virus not installed on this system"); @@ -2449,6 +2455,7 @@ # Runs the F-Secure Anti-Virus program on the working directory #*********************************************************************** sub message_contains_virus_fsav () { + $VirusScanner = "FSAV"; unless($Features{'Virus:FSAV'}) { md_syslog('err', "$MsgID: F-Secure Anti-Virus not installed on this system"); @@ -2665,6 +2672,7 @@ # Scans the entity using Symantec CarrierScan #*********************************************************************** sub entity_contains_virus_carrier_scan ($;$) { + $VirusScanner = "Carrier"; my($entity) = shift; my($host) = $CSSHost; $host = shift if (@_ > 0); @@ -2689,6 +2697,7 @@ # Scans the entity using Symantec CarrierScan #*********************************************************************** sub message_contains_virus_carrier_scan (;$) { + $VirusScanner = "Carrier"; my($host) = $CSSHost; $host = shift if (@_ > 0); $host = '127.0.0.1:7777:local' if (!defined($host)); @@ -2906,6 +2915,7 @@ # the entity. #*********************************************************************** sub entity_contains_virus_fprotd ($;$) { + $VirusScanner = "FPROTD"; my ($entity) = shift; if (!defined($entity->bodyhandle)) { @@ -2934,6 +2944,7 @@ # the entire message. #*********************************************************************** sub message_contains_virus_fprotd (;$) { + $VirusScanner = "FProtD"; return item_contains_virus_fprotd ("$CWD/Work", $_[0]); } @@ -2949,6 +2960,7 @@ # the entity. #*********************************************************************** sub entity_contains_virus_openantivirus ($;$) { + $VirusScanner = "OpenAV"; my ($entity) = shift; my ($host) = $OpenAVHost; $host = shift if (@_ > 0); @@ -3003,6 +3015,7 @@ # the entire message. #*********************************************************************** sub message_contains_virus_openantivirus (;$) { + $VirusScanner = "OpenAV"; my ($host) = $OpenAVHost; $host = shift if (@_ > 0); $host = '127.0.0.1:8127' if (!defined($host)); @@ -3042,6 +3055,7 @@ # Runs the H+BEDV Antivir program on the entity. (http://www.hbedv.com) #*********************************************************************** sub entity_contains_virus_hbedv ($) { + $VirusScanner = "HBDEV"; unless($Features{'Virus:HBEDV'}) { md_syslog('err', "$MsgID: H+BEDV not installed on this system"); @@ -3079,6 +3093,7 @@ # Runs the H+BEDV Antivir program on the working directory #*********************************************************************** sub message_contains_virus_hbedv () { + $VirusScanner = "HBDEV"; unless($Features{'Virus:HBEDV'}) { md_syslog('err', "$MsgID: H+BEDV not installed on this system"); @@ -3121,6 +3136,7 @@ # Runs the Vexira program on the entity. (http://www.centralcommand.com) #*********************************************************************** sub entity_contains_virus_vexira ($) { + $VirusScanner = "VEXIRA"; unless($Features{'Virus:VEXIRA'}) { md_syslog('err', "$MsgID: Vexira not installed on this system"); @@ -3158,6 +3174,7 @@ # Runs the Vexira program on the working directory #*********************************************************************** sub message_contains_virus_vexira () { + $VirusScanner = "Vexira"; unless($Features{'Virus:VEXIRA'}) { md_syslog('err', "$MsgID: Vexira not installed on this system"); @@ -3201,6 +3218,7 @@ # Runs the Sophos Sweep program on the entity. #*********************************************************************** sub entity_contains_virus_sophos ($) { + $VirusScanner = "Sophos"; unless($Features{'Virus:SOPHOS'}) { md_syslog('err', "$MsgID: Sophos Sweep not installed on this system"); @@ -3237,6 +3255,7 @@ # Runs the Sophos Sweep program on the working directory #*********************************************************************** sub message_contains_virus_sophos () { + $VirusScanner = "Sophos"; unless($Features{'Virus:SOPHOS'}) { md_syslog('err', "$MsgID: Sophos Sweep not installed on this system"); @@ -3287,6 +3306,7 @@ # Runs the clamav program on the entity. #*********************************************************************** sub entity_contains_virus_clamav ($) { + $VirusScanner = "CLAMAV"; unless ($Features{'Virus:CLAMAV'}) { md_syslog('err', "$MsgID: clamav not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3324,6 +3344,7 @@ # Runs the AVP AvpLinux program on the working directory #*********************************************************************** sub message_contains_virus_clamav () { + $VirusScanner = "CLAMAV"; unless ($Features{'Virus:CLAMAV'}) { md_syslog('err', "$MsgID: clamav not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3367,6 +3388,7 @@ # Runs the Kaspersky 5.x aveclient program on the entity. #*********************************************************************** sub entity_contains_virus_avp5 ($) { + $VirusScanner = "AVP5"; unless ($Features{'Virus:AVP5'}) { md_syslog('err', "$MsgID: Kaspersky aveclient not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3404,6 +3426,7 @@ # Runs the Kaspersky 5.x aveclient program on the working directory #*********************************************************************** sub message_contains_virus_avp5 () { + $VirusScanner = "AVP5"; unless ($Features{'Virus:AVP5'}) { md_syslog('err', "$MsgID: Kaspersky aveclient not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3472,6 +3495,7 @@ # Runs the AvpLinux program on the entity. #*********************************************************************** sub entity_contains_virus_avp ($) { + $VirusScanner = "AVP"; unless ($Features{'Virus:AVP'}) { md_syslog('err', "$MsgID: AVP AvpLinux not installed on this system"); @@ -3522,6 +3546,7 @@ # Runs the AVP AvpLinux program on the working directory #*********************************************************************** sub message_contains_virus_avp () { + $VirusScanner = "AVP"; unless ($Features{'Virus:AVP'}) { md_syslog('err', "$MsgID: AVP AvpLinux not installed on this system"); @@ -3601,6 +3626,7 @@ # Runs the F-PROT program on the entity. (http://www.f-prot.com) #*********************************************************************** sub entity_contains_virus_fprot ($) { + $VirusScanner = "FPROT"; unless ($Features{'Virus:FPROT'}) { md_syslog('err', "$MsgID: F-RISK FPROT not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3640,6 +3666,7 @@ # Runs the F-RISK f-prot program on the working directory #*********************************************************************** sub message_contains_virus_fprot () { + $VirusScanner = "FPROT"; unless ($Features{'Virus:FPROT'}) { md_syslog('err', "$MsgID: F-RISK f-prot not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3707,6 +3734,7 @@ # Runs the vscan program on the entity. #*********************************************************************** sub entity_contains_virus_trend ($) { + $VirusScanner = "TREND"; unless ($Features{'Virus:TREND'}) { md_syslog('err', "$MsgID: TREND vscan not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3744,6 +3772,7 @@ # Runs the Trend vscan program on the working directory #*********************************************************************** sub message_contains_virus_trend () { + $VirusScanner = "Trend"; unless ($Features{'Virus:TREND'}) { md_syslog('err', "$MsgID: TREND Filescanner or Interscan not installed on this system"); return (wantarray ? (1, 'not-installed', 'tempfail') : 1); @@ -3788,6 +3817,7 @@ # Runs the NVCC Anti-Virus program. (http://www.norman.no/) #*********************************************************************** sub entity_contains_virus_nvcc ($) { + $VirusScanner = "NVCC"; unless($Features{'Virus:NVCC'}) { md_syslog('err', "$MsgID: Norman Virus Control (NVCC) not installed on this system"); @@ -3829,6 +3859,7 @@ # (http://www.norman.no/) #*********************************************************************** sub message_contains_virus_nvcc () { + $VirusScanner = "NVCC"; unless($Features{'Virus:NVCC'}) { md_syslog('err', "$MsgID: Norman Virus Control (NVCC) not installed on this system"); @@ -3877,6 +3908,7 @@ # on the entity. #*********************************************************************** sub entity_contains_virus_sophie ($;$) { + $VirusScanner = "Sophie"; my ($entity) = shift; my ($sophie_sock) = $SophieSock; $sophie_sock = shift if (@_ > 0); @@ -3946,6 +3978,7 @@ # on the entire message. #*********************************************************************** sub message_contains_virus_sophie (;$) { + $VirusScanner = "Sophie"; my ($sophie_sock) = $SophieSock; $sophie_sock = shift if (@_ > 0); $sophie_sock = "/var/spool/MIMEDefang/sophie" if (!defined($sophie_sock)); @@ -4005,6 +4038,7 @@ # on the entity. #*********************************************************************** sub entity_contains_virus_clamd ($;$) { + $VirusScanner = "CLAMD"; my ($entity) = shift; my ($clamd_sock) = $ClamdSock; $clamd_sock = shift if (@_ > 0); @@ -4061,6 +4095,7 @@ # on the entire message. #*********************************************************************** sub message_contains_virus_clamd (;$) { + $VirusScanner = "CLAMD"; my ($clamd_sock) = $ClamdSock; $clamd_sock = shift if (@_ > 0); $clamd_sock = "/var/spool/MIMEDefang/clamd.sock" if (!defined($clamd_sock)); @@ -4128,6 +4163,7 @@ # on the entity. #*********************************************************************** sub entity_contains_virus_trophie ($;$) { + $VirusScanner = "Trohpie"; my ($entity) = shift; my ($trophie_sock) = $TrophieSock; $trophie_sock = shift if (@_ > 0); @@ -4179,6 +4215,7 @@ # on the entire message. #*********************************************************************** sub message_contains_virus_trophie (;$) { + $VirusScanner = "Trophie"; my ($trophie_sock) = $TrophieSock; $trophie_sock = shift if (@_ > 0); $trophie_sock = "/var/spool/MIMEDefang/trophie" if (!defined($trophie_sock));
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang