tepatna 1 bulan yang lalu, kami sekelompok mendapat tuga untuk konfigurasiin email server pada linux, Tepatnya, ini tugas kita ber tiga. Deny binsar mangisi, Aji Setiyo Sukarno, dan saya sendiri Indra adi Putra.
ini langkah langkahnya,.
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
(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
taut : top-bing.blogspot.com
Website Security Rules.. Include Video.. :)
-
*Basic of Website Secutiry, Watch this Video.. :-)**
In 2004, online consumer spending was at a record $65.1 billion. More and
more people are attracted...
masih belum ngerti ??
BalasHapusdijelasin dong baris perbaris dari scrip nya, dan fungsi masing2 file ^_^