Friday, February 6, 2009

Mailserver Postfix, Dovecot, Mysql dan Roundcube in Ubuntu

Mail virtual domain & virtual user : Postfix , Dovecot, Mysql , Postfix admin and Webmail Roundcube

Installing LAMP

Install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.

  • Install Apache -> Qoute : apt-get install apache2

  • Install PHP -> Quote : apt-get install php5 libapache2-mod-php5

  • Installing MYSQL with PHP 5 -> Qoute : mysql-server libapache2-mod-auth-mysql php5-mysql

Install Postfix Dovecot:
Quote : apt-get install postfix postfix-mysql dovecot dovecot-common dovecot-imapd dovecot-pop3d libsasl2-modules-sql libsasl2-modules

Install postfixadmin:
Qoute : wget http://high5.net/postfixadmin/download.php?file=postfixadmin-2.1.0.tgz
Qoute : tar xvzf postfixadmin-2.1.0.tgz

Import database postfixadmin:
Qoute : cd postfixadmin-2.1.0
Qoute : mysql -u root -p < style="font-weight: bold;">
Configure
Postfixadmin:
1. Config file, create new file
Qoute : cp config.inc.php.sample config.inc.php
2. Edit config.inc.php
Qoute : gksu gedit config.inc.php
$CONF['postfix_admin_url'] = 'http://www.kunkun.com.my/postfixadmin';
$CONF['postfix_admin_path'] = '/var/www/postfixadmin';

$CONF
['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfix';
$CONF['database_password'] = 'postfix';
$CONF['database_name'] = 'postfix';
$CONF['database_prefix'] = '';
$CONF['encrypt'] = 'cleartext';

$CONF['domain_path'] = 'YES';

$CONF['domain_in_mailbox'] = 'NO';

Postfix:
Qoute : gksu gedit /etc/postfix/main.cf

myhostname = localhost
smtpd_banner = $myhostname ESMTP ready

alias_maps = hash:/etc/aliases
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:106
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_minimum_uid = 106
virtual_transport = virtual
virtual_uid_maps = static:106


broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous

No comments:

kunkun-laptop .... ;)