Postingan kali ini adalah bagaimana cara membuat email server dengan OS yang digunakan adalah linux ubuntu 9.10 karmic. Email server yang akan dibuat nanti dapat melakukan kirim-terima email secara LAN maupun internet melalui dua PC yang sudah saling memiliki fiture yang sama. Saya mencobanya untuk menyelesaikan tugas mata kuliah Jaringan Komputer di kampus saya. Setelah berkutat kurang lebih 3 minggu, dengan mencari tutorial2 melalui internet, akhirnya kang Craig Ballinger mampu membantu saya menjawab tantangan tugas tersebut. Thank you very much for Mr.Craig..
Yaudah kita lanjut aja kepada langkah2nya, harap diikuti dengan baik yaa..^
Pertama-tama kita update terlebih dahulu dengan mengetikkan pada terminal:
sudo apt-get update
Setelah itu kita install package,
sudo apt-get install dovecot-postfix
General Type of Mail Configuration: Internet Site
System mail name: yourcompany.com (mis:d3ny_mut4nt_coker@yahoo.com)
Selanjutnya kita download MYSQL dan Postfix MYSQL,
sudo apt-get install mysql-server postfix-mysql
Setelah terinstall kita isikan database,
sudo apt-get install apache2 php5 php5-mysql php5-imap
sudo /etc/init.d/apache2 restart
Setelah lengkap, buka direktori,
cd /var/www
dan download file,
sudo wget http://downloads.sourceforge.net/sourceforge/postfixadmin/postfixadmin_2.3.tar.gz
(kalau tidak terbuka, anda dapat mendownloadnya pada http://sourceforge.net/projects/postfixadmin/files/)
Extract, move, rename file tersebut
sudo tar -zxvf postfixadmin_2.3.tar.gz
sudo mv postfixadmin-2.3 postfixadmin
sudo rm postfixadmin_2.3.tar.gz
Lalu kita rubah sedikit pada salah satu file config.inc.php yang berada dalam folder postfixadmin,
cd postfixadmin
sudo nano config.inc.php
$CONF['configured'] = true;
$CONF['postfix_admin_url'] = $_SERVER['HTTP_HOST'].'/postfixadmin';
$CONF['database_password'] = 'yourdbpasswdhere'; (mis : tobing)
Juga kita update, (mis isi : http://d3ny_mut4nt_coker@yahoo.com)
sudo nano /etc/php5/apache2/php.ini
Rubah,
magic_quotes_gpc = Off
save and close (CTRL + X)
sudo /etc/init.d/apache2 restart
Refresh kembali address bar anda, kemudian kita lakukan perubahan kembali pada file:
Update $CONF['setup_password'] (Tabel yang telah diisi > enter > pindahkan nilai Hashnya ke dalam sini)
cd /etc/postfix
sudo nano my_alias_maps.cf
Kita rubah,
user = postfix
password = yourdbpasswd
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address = '%s' AND active = 1
Save and close (CTRL+x)
Selanjutnya, sudo nano my_domains_maps.cf
Rubah,
user = postfix
password = yourdbpasswd
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = 0 AND active = 1
Save and close (CTRL+x)
sudo nano my_mailbox_limits.cf
Rubah,
user = postfix
password = yourdbpasswd
hosts = localhost
dbname = postfix
query = SELECT quota FROM mailbox WHERE username = '%s' AND active = 1
Save and close (CTRL+x)
sudo nano my_mailbox_maps.cf
Rubah,
user = postfix
password = yourdbpasswd
hosts = localhost
dbname = postfix
query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username = '%s' AND active = 1
Save and close (CTRL+x)
sudo nano main.cf
Ketikkan pada bagian paling bawah :
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_mailbox_base = /var/vmail
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
virtual_alias_maps = proxy:mysql:/etc/postfix/my_alias_maps.cf
virtual_mailbox_limit = proxy:mysql:/etc/postfix/my_mailbox_limits.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/my_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/my_mailbox_maps.cf
Cari dan diganti menjadi:
#home_mailbox = Maildir/
#mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot-postfix.conf -n -m "${EXTENSION}"
Hapus d3ny_mut4nt_coker@yahoo.com from mydestination.
save and exit (CTRL+X)
sudo nano master.cf
Ketikkan pada bagian paling bawah,
dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -c /etc/dovecot/dovecot-postfix.conf -f ${sender} -d $(recipient)
save and exit (CTRL+X)
Buat direktori untuk mail dan user,
sudo useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin vmail
sudo mkdir /var/vmail
sudo chmod 770 /var/vmail
sudo chown vmail:mail /var/vmail/
Terakhir kita lakukan sedikit perubahan pada dovecote untuk mengirim dan menerima email,
cd /etc/dovecot
sudo nano dovecot-sql.conf
Rubah,
driver = mysql
connect = host=localhost dbname=postfix user=postfix password=yourdbpassword
default_pass_scheme = MD5-CRYPT
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = 1
password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid FROM mailbox WHERE username = '%u' AND active = 1
save and exit (CTRL+X)
sudo nano dovecot-postfix.conf
Rubah,
mail_location = maildir:/var/vmail/%d/%n
first_valid_uid = 150
last_valid_uid = 150
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = vmail
group = mail
}
save and exit (CTRL+X)
Terakhir dari terakhir kita restart reboot service,
sudo /etc/init.d/postfix restart
sudo /etc/init.d/dovecot restart
1 komentar:
My partner and I stumbled over here by a different website and thought I might
as well check things out. I like what I see so now i'm following you. Look forward to looking at your web page yet again.
Here is my web page; cardiac sonography salary
Posting Komentar
Terima kasih atas komentar Anda :)