How to installing MailScanner on SUSE Enterprise Server

MailScanner เป็นโปรแกรมที่ได้รับความนิยมเป็นอย่างยิ่งบน Postfix หรือ Qmail สำหรับรักษาความปลอดภัยโดยทำหน้าที่สแกนเมล์ทั้งหมด
ตามที่เราคอนฟิก เพื่อป้องกันไวรัส และการป้องกันอีเมล์ขยะ ซึ่งการคอนฟิกจะต้องคอนฟิกร่วมกับโปรแกรมสแกนไวรัส เช่น ClamAV เป็นต้น.

1. Download source files

 wget //
tar zxvf MailScanner-4.78.17-1.suse.tar.gz
cd MailScanner-4.78.17-1

2. Build module & Installing


3. Configuration MailScanner.conf

vi /etc/MailScanner/MailScanner.conf

Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix
%org-long-name% = Your Organisation Name Here
%web-site% =

4. Change owner to postfix

chown postfix:postfix /var/spool/MailScanner/incoming
chown postfix:postfix /var/spool/MailScanner/quarantine

5. Edit file MailScanner.conf

 vi /etc/MailScanner/MailScanner.conf
Virus Scanners = vscan

6. Edit file virus.scanners.conf

 vi /etc/MailScanner/virus.scanners.conf
clamav /usr/lib/MailScanner/clamav-wrapper /var/lib/clamav

7. Edit file

 vi /etc/postfix/
header_checks = regexp:/etc/postfix/header_checks

8. Edit file header_checks

 vi /etc/postfix/header_checks

Add line:
/^Received:/ HOLD

9. Seting MailScanner & Clamd run on startup

chkconfig MailScanner on
chkconfig clamd on

10. Start MailScanner

 /etc/init.d/postfix restart
/etc/init.d/clamd start
/etc/init.d/Mailscanner start


rcpostfix restart
rcclamd start
rcMailscanner start

11. Edit file

 vi /usr/lib/MailScanner/clamav-wrapper


12. Using MailScanner

 /usr/lib/MailScanner/clamav-wrapper /var/lib/clamav /tmp

/tmp/mailstat.old: OK
/tmp/stats.db: OK
/tmp/5NQNUn4eKe: Empty file

———– SCAN SUMMARY ———–
Known viruses: 692220
Engine version: 0.95.3
Scanned directories: 1
Scanned files: 2
Infected files: 0
Data scanned: 0.01 MB
Data read: 0.01 MB (ratio 1.00:1)
Time: 2.235 sec (0 m 2 s)

Problems or Errors
Could not read directory /var/spool/incoming at /usr/lib/MailScanner/MailScanner/ line 2784
Error in configuration file line 171, directory /var/spool/incoming for outqueuedir does not exist (or is not readable) at /usr/lib/MailScanner/MailScanner/ line 3144


mkdir /var/spool/incoming
mkdir /var/spool/quarantine
chown postfix.postfix /var/spool/incoming
chown postfix.postfix /var/spool/quarantine

Reference – //

Leave a Reply

Your email address will not be published. Required fields are marked *

Please validate : * Time limit is exhausted. Please reload CAPTCHA.