$OpenBSD: patch-bin_MailScanner,v 1.8 2009/05/23 21:30:05 sthen Exp $ --- bin/MailScanner.orig Tue May 12 06:23:39 2009 +++ bin/MailScanner Sun May 17 06:52:31 2009 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -I/opt/MailScanner/lib +#!/usr/bin/perl -I%PREFIX%/lib/MailScanner # # MailScanner - SMTP E-Mail Virus Scanner # Copyright (C) 2002 Julian Field @@ -72,7 +72,7 @@ BEGIN { # of each element foreach $path (reverse @oldinc) { next unless $path =~ /\//; - $path =~ s/^\/usr/\/usr\/lib\/MailScanner\/utils/; + $path =~ s/^\/usr/\/usr\/local\/lib\/MailScanner\/utils/; unshift @INC, $path; } @@ -208,8 +208,6 @@ if ($Versions) { my($module, $s, $v, $m); printf("Running on\n%s", `uname -a`); - printf("This is %s", `cat /etc/redhat-release`) if -f "/etc/redhat-release"; - printf("This is %s", `head -1 /etc/SuSE-release`) if -f "/etc/SuSE-release"; printf("This is Perl version %f (%vd)\n", $], $^V); print "\nThis is MailScanner version " . $MailScanner::Config::MailScannerVersion . "\n"; print "Module versions are:\n"; @@ -279,7 +277,7 @@ if ($WantLintOnly || $WantLintLiteOnly) { # Find the mailscanner.conf file, with a default just in case. my $ConfFile = $ARGV[0]; # Use the default if we couldn't find theirs. Will save a lot of grief. -$ConfFile = '/opt/MailScanner/etc/MailScanner.conf' if $ConfFile eq "" || +$ConfFile = '%SYSCONFDIR%/MailScanner/MailScanner.conf' if $ConfFile eq "" || !(-f $ConfFile); # Do they just want a dump of the processing-database table? @@ -334,7 +332,7 @@ if (MailScanner::Config::QuickPeek($ConfFile, 'virussc Currently you are using no virus scanners. This is probably not what you want. -In your /opt/MailScanner/etc/MailScanner.conf file, set +In your %SYSCONFDIR%/MailScanner/MailScanner.conf file, set Virus Scanners = clamav Then download http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz @@ -421,7 +419,7 @@ if ($WantLintOnly || $WantLintLiteOnly) { } my $cluid = MailScanner::Config::QuickPeek($ConfFile, 'runasuser'); my $clgid = MailScanner::Config::QuickPeek($ConfFile, 'runasgroup'); - my $clr = system("/opt/MailScanner/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\""); + my $clr = system("%PREFIX%/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\""); print STDERR "Error: Attempt to create locks in $lockdir failed!\n" if ($clr>>8) != 0; @@ -716,7 +714,7 @@ if ($locksdir eq "" || $locksdir =~ /tmp$/i) { print STDERR "Please move your \"Lockfile Dir\" setting in MailScanner.conf.\n"; print STDERR "It should point outside /tmp, preferably /var/spool/MailScanner/incoming/Locks\n"; } -my $cl = system("/opt/MailScanner/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\""); +my $cl = system("%PREFIX%/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\""); print STDERR "Error: Attempt to create locks in $locksdir failed!\n" if ($cl>>8) != 0;