56f09cbf4d
From Brad.
64 lines
3.0 KiB
Plaintext
64 lines
3.0 KiB
Plaintext
$OpenBSD: patch-bin_MailScanner,v 1.10 2010/06/18 21:48:23 sthen Exp $
|
|
--- bin/MailScanner.orig Wed Jun 2 04:17:25 2010
|
|
+++ bin/MailScanner Tue Jun 15 18:46:32 2010
|
|
@@ -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;
|
|
}
|
|
|
|
@@ -209,8 +209,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";
|
|
@@ -280,7 +278,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);
|
|
# Tell ConfigSQL where the configuration file is.
|
|
$MailScanner::ConfigSQL::ConfFile = $ConfFile;
|
|
@@ -337,7 +335,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
|
|
@@ -424,7 +422,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;
|
|
|
|
@@ -721,7 +719,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;
|
|
|