MailScanner provera rada

Moje verzije sa kojima radim su :
RHEL6U2, MailScanner 4.84.5, SpamAssassin 3.3.1-2, ClamAV 0.97.4, MySQL 5.1.61

Posle svog konfigurisanja, promena i dodavanja ima još jedna, POSLEDNJA provera za rad MailScanner servisa 🙂 :
# MailScanner –lint
(Paziti ovo je – -lint, dakle dva znaka “-” jedan za drugim, bez razmaka)
Pažljivo pratiti izlaz, u kojem se mogu određene greške.
Evo nekih od mogućih grešaka, i kako ih rešiti :
Jedan
Unrar is not installed, it should be in /usr/bin/unrar.
This is required for RAR archives to be read to check
filenames and filetypes. Virus scanning is not affected.
Unrar problem – instalirati unrar RPM
Što se Fedore, CentOS-a i RHEL-a tiče ovde mogu da se nađu RPM-ovi.
Dva
# MailScanner –lint
ERROR: The “envelope_sender_header” in your spam.assassin.prefs.conf
ERROR: is not correct, it should match X-trezor-MailScanner-From
Razlika u “envelope_sender_header” odnosno “Envelope From Header” u spam.assassin.prefs.conf i MailScanner.conf fajlovima.
Staviti u spam.assassin.prefs.conf i MailScanner.conf da bude jednako za ove dve stavke.
Tri
clamscan : unrecognized option ¨–unzip
ERROR:unknown option passed
ERROR:can,t parse the command line
Pogledati fajl , i hešovati označeno :
# vi /usr/lib/MailScanner/clamav-wrapper
#ExtraScanOptions=”$ExtraScanOptions –unzip”
#ExtraScanOptions=”$ExtraScanOptions –unzip=/usr/bin/unzip”
#ExtraScanOptions=”$ExtraScanOptions –jar”
#ExtraScanOptions=”$ExtraScanOptions –jar=/path/to/unzip”
#ExtraScanOptions=”$ExtraScanOptions –tar”
#ExtraScanOptions=”$ExtraScanOptions –tar=/path/to/tar”
#ExtraScanOptions=”$ExtraScanOptions –tgz”
#ExtraScanOptions=”$ExtraScanOptions –tgz=/path/to/tar”

I pogledati fajl i hešovati označeno :
# vi /usr/lib/MailScanner/MailScanner/SweepViruses.pm
# if ($rarcmd && -x $rarcmd) {
# $Scanners{clamav}->{CommonOptions} .= ” –unrar=$rarcmd”;
# MailScanner::Log::InfoLog(“ClamAV scanner using unrar command %s”,
# $rarcmd);
# }
Četiri
Ako se pri zaustavljanju MailScanner-a javlja (ponekad) sledeće :
# service MailScanner stop
Shutting down MailScanner daemons:
MailScanner: commit ineffective with AutoCommit enabled at /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93, line 1.
Commmit ineffective while AutoCommit is on at /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 93, line 1.
[ OK ]
incoming sendmail: [ OK ]
outgoing sendmail: [ OK ]

To se rešava na sledeći način :
U fajlu /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm :
sub ExitLogging {
# Server exit – commit changes, close socket, and exit gracefully.
close(SERVER);
#$dbh->commit;
$dbh->disconnect;
exit;
}

Napomena : upis prestaje tek posle prvog sledećeg reseta MailScanner-a…
Pet
# MailScanner –lint
….
Use of “goto” to jump into a construct is deprecated at /usr/share/perl5/Mail/SpamAssassin/Plugin/Check.pm line 409.
….
Ako se javlja ovakva greška u Fedora 14, treba sa spamassassin verzije 3.3.1-5.fc14 preći na verziju 3.3.2-7.fc14
Šest
# MailScanner –lint
….
config: failed to parse line, skipping, in “/etc/mail/spamassassin/mailscanner.cf”: use_auto_whitelist 0
….
U fajlu : /etc /MailScanner/spam.assassin.prefs.conf treba hešovati liniju :
use_auto_whitelist 0
Ovime se ova opcija isključuje, što je i bolje jer daje prilično lažnih pozitiva za spam koji to nije.
Ako baš želite da vam ta opcija radi, mora se omogućiti, što u ovoj verziji SpamAssasin-a nije automatski (videti ovde)
Sedam
Kako proveriti verzije svih modula koji se vrte pod MailScanner-om :
MailScanner -v
Running on
Linux mail-2012.moj.domen 2.6.32-358.0.1.el6.i686 #1 SMP Wed Feb 20 11:05:00 EST 2013 i686 i686 i386 GNU/Linux
This is Red Hat Enterprise Linux Server release 6.4 (Santiago)
This is Perl version 5.010001 (5.10.1)

This is MailScanner version 4.84.5
Module versions are:
1.00 AnyDBM_File
1.30 Archive::Zip
0.23 bignum
1.11 Carp
…..
2.0.0 Text::Balanced
1.40 URI
0.77 version
missing YAML