Difference between revisions of "Instalasi MailScanner"

From OnnoWiki
Jump to navigation Jump to search
Line 2: Line 2:
 
* http://www.mailscanner.info/ubuntu.html
 
* http://www.mailscanner.info/ubuntu.html
 
* http://www.howforge.com/how-install-mailscanner-ubuntu-dapper
 
* http://www.howforge.com/how-install-mailscanner-ubuntu-dapper
 +
  
 
Setup MailScanner di Ubuntu tampaknya tidak jalan.
 
Setup MailScanner di Ubuntu tampaknya tidak jalan.
Line 8: Line 9:
 
  /etc/init.d/mailscanner stop
 
  /etc/init.d/mailscanner stop
 
  apt-get remove mailscanner
 
  apt-get remove mailscanner
 +
 +
 +
==Instalasi Postfix==
  
 
install postfix
 
install postfix
Line 24: Line 28:
  
 
  /^Received:/ HOLD
 
  /^Received:/ HOLD
 +
 +
==Instalasi MailScanner===
  
 
Install Mailscanner dan teman temannya
 
Install Mailscanner dan teman temannya
Line 58: Line 64:
 
  SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin  
 
  SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin  
  
 +
Spam Actions = deliver header "X-Spam-Status: Yes"
 +
High Scoring Spam Actions = delete
  
Spam Actions = deliver header "X-Spam-Status: Yes"
+
Syslog Facility = local0
High Scoring Spam Actions = delete
+
Log Spam = yes
 
+
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
Syslog Facility = local0
 
Log Spam = yes
 
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
 
 
 
 
 
  
Postfix settings
 
  
postconf -e "header_checks = regexp:/etc/postfix/header_checks"
+
Matikan permission check oleh MailScanner pada /var
  
Edit header_checks
+
vi /etc/rc2.d/S20mailscanner
  
vi /etc/postfix/header_checks
+
Edit agar
  
Add this line to the file, without it nothing will work:
+
# check_dir /var/spool/MailScanner      ${user:-mail} ${group:-mail}
 +
# check_dir /var/lib/MailScanner        ${user:-mail} ${group:-mail}
 +
# check_dir /var/run/MailScanner        ${user:-mail} ${group:-mail}
 +
# check_dir /var/lock/subsys/MailScanner ${user:-mail} ${group:-mail}
  
/^Received:/ HOLD
 
  
Disable permission checks on MailScanner directories
+
Set default mailscanner
  
  Comment out the lines that check directory permissions on /var/* in /etc/rc2.d/S20mailscanner
+
  vi /etc/default/mailscanner
  
Set MailScanner to start at boot time
+
pastikan
  
In the file /etc/default/mailscanner, make sure this is set to 1:
 
 
  run_mailscanner=1  
 
  run_mailscanner=1  
  

Revision as of 12:00, 5 June 2011

Sumber:


Setup MailScanner di Ubuntu tampaknya tidak jalan. Jika anda sudah menginstall-nya ada baiknya di delete terlebih dulu

/etc/init.d/mailscanner stop
apt-get remove mailscanner


Instalasi Postfix

install postfix

sudo apt-get install postfix

Masukan di akhir /etc/postfix/main.cf

vi /etc/postfix/main.cf
header_checks = regexp:/etc/postfix/header_checks

Buat file /etc/postfix/header_checks

vi /etc/postfix/header_checks
/^Received:/ HOLD

Instalasi MailScanner=

Install Mailscanner dan teman temannya

sudo apt-get install mailscanner tnef unrar unzip pyzor razor

Update ClamAV database

freshclam 

Make directory for SpamAssassin and set permissions

mkdir /var/spool/MailScanner/incoming
mkdir /var/spool/MailScanner/spamassassin
chown -Rf postfix /var/spool/MailScanner

Backup and edit MailScanner.conf

cp /etc/MailScanner/MailScanner.conf /etc/MailScanner/MailScanner.conf.bak
vi /etc/MailScanner/MailScanner.conf 

Set berikut ini di MailScanner.conf

%org-name% = ORGNAME
%org-long-name% = ORGFULLNAME
%web-site% = ORGWEBSITE
Run As User = postfix                             PERHATIKAN!
Run As Group = postfix                            PERHATIKAN!
Incoming Queue Dir = /var/spool/postfix/hold      PERHATIKAN!
Outgoing Queue Dir = /var/spool/postfix/incoming  PERHATIKAN!
MTA = postfix                                     PERHATIKAN!
Virus Scanners = clamav
Spam List = SBL+XBL
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin 
Spam Actions = deliver header "X-Spam-Status: Yes"
High Scoring Spam Actions = delete
Syslog Facility = local0
Log Spam = yes
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin


Matikan permission check oleh MailScanner pada /var

vi /etc/rc2.d/S20mailscanner 

Edit agar

# check_dir /var/spool/MailScanner       ${user:-mail} ${group:-mail}
# check_dir /var/lib/MailScanner         ${user:-mail} ${group:-mail}
# check_dir /var/run/MailScanner         ${user:-mail} ${group:-mail}
# check_dir /var/lock/subsys/MailScanner ${user:-mail} ${group:-mail}


Set default mailscanner

vi /etc/default/mailscanner

pastikan

run_mailscanner=1 

Start the system

/etc/init.d/mailscanner start
/etc/init.d/postfix start

Perbaikan untuk Ubuntu 8.04

Jika MailScanner men-delete directory-nya, tambahkan di /etc/rc.local kalimat berikut

mkdir /var/run/MailScanner
mkdir /var/lock/subsys
mkdir /var/lock/subsys/MailScanner
chown -R postfix:postfix /var/run/MailScanner
chown -R postfix:postfix /var/lock/subsys/MailScanner
/etc/init.d/postfix restart
/etc/init.d/mailscanner restart

Referensi

Pranala Menarik