[Mimedefang] Mimedefang 2.26 and possible Syslog error

Antonello Nocchi anto at cerca.com
Sat Nov 30 08:29:00 EST 2002


We found a problem with the last version of mimedefang (2.26) and linux
perl 5.6.0

in file mimedefang.pl:
---
sub md_syslog ($$) {
    my($facility, $msg) = @_;

    if ($Features{"Unix::Syslog"}) {
	my $num_fac = 0;
	my $thing;
	foreach $thing (split(/\|/, $facility)) {
	    $num_fac |= LOG_ERR, next if ($thing eq 'err');
#            ....snip......
      	    $num_fac |= LOG_USER, next if ($thing eq 'user');

	}
	syslog($num_fac, "%s", $msg);
    } else {

==>	syslog($facility, "%s", $msg); #this line produce a subsequent error
in file log with perl 5.6.0 on a Redhat 7.3 Linux
## a possible solution:
	# use something like this to escape '%' chars? i'm not a good Perl
programmer :-(
	msg =~ s/%/%%/g; # it should work
        syslog($facility, $msg);
##

    }
}
---
this is the error in log file:
Nov 29 11:50:05 antares mimedefang-multiplexor: Slave 0 stderr: Usage:
Sys::Syslog::_PATH_LOG() at
/usr/lib/perl5/5.6.0/i386-linux/Sys/Syslog.pm line 277.

so, any call to md_syslog() generates an error that produce a sendmail
EX_TEMPFAIL
---

Other solution is installing Unix::Syslog module

hope this helps

-- 
Antonello Nocchi



More information about the MIMEDefang mailing list