Pages

Blogger templates

Jumat, 03 Juni 2011

Setting Mail Server Pada Debian 4


> I. Install Postfix. Dgn perintah :
# apt-get install postfix

Kemudian edit&konfigurasi postfix seperti di bawah ini. Dgn perintah :
# pico /etc/postfix/main.cf
myhostname = mail.pephy.com -> isi sesuai mail.domain anda
mydomain = pephy.com -> isi sesuai domain anda
myorigin = /etc/mailname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, localhost.localdomain, , localhost
relayhost =
mynetworks = 127.0.0.0/8, 192.168.123.0/24
# mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocol = all
home_mailbox = Maildir/


> 2. Instal apache2 , php5 dan courier. Dgn cara :
# apt-get install apache2 php5 courier-imap courier-pop

Lalu edit dan tambahkan text di bawah ini:
# pico /etc/apache2/apache2.conf
Include /etc/squirrelmail/apache.conf
ServerName 192.168.123.13

> 3. Instal squirrelmail juga .
Dgn perintah :
# apt-get install squirrelmail

> 4. Kemudian buat 2 user dan password masing2 :

# adduser user1
# adduser user2

> 5. Buat direktori mail di direktori /etc/skel. Dgn perintah :
# maildirmake Maildir

> Kemudian masuk ke user masing2 dan berikan hak akses seperti contoh di bawah.

localhost:/home/user1# chmod 777 Maildir/
localhost:/home/user2# chmod 777 Maildir/

> 6. Restart postfix dan apache2 :

#/etc/init.d/postfix restart
#/etc/init.d/apache2 restart

> 7. Cek di browser anda dan coba login di squirrelmail anda .

ketik : http://domainanda/squirrelmail

# appending .domain is the MUA’s job.
append_dot_mydomain = no
# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = beckz.net
mydomain =beckz.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = beckz.net, beckz, localhost.localdomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 192.168.13.0/24
#mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
3). Edit juga file konfigurasi yang lain :
# beckz@debian:~$ pico /etc/apache2/sites-available/default
NameVirtualHost 192.168.13.13
NameVirtualHost 192.168.2.1
<VirtualHost 192.168.13.13>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2′s default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /mail/ “/usr/share/squirrelmail/”
<Directory “/usr/share/squirrelmail/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 192.168.2.1>
DocumentRoot /home/www
ServerName beckz.net
</VirtualHost>
4). Membuat folder Maildir di user tertentu :
# beckz@debian:~$ cd /home/beckz
# beckz@debian:~$ maildirmake Maildir
5). Ubah hak akses pemilik Maildir :
# beckz@debian:~$ chown beckz.beckz Maildir -Rf
6). Membuat folder Maildir otomatis ketika create user :
# cd /etc/skel
# maildirmake Maildir
7). Jalankan Mail Server :
# beckz@debian:~$ /etc/init.d/postfix restart
# beckz@debian:~$ /etc/init.d/squirrelmail restart
# beckz@debian:~$ /etc/init.d/courier-imap restart
# beckz@debian:~$ /etc/init.d/courier-pop restart
# beckz@debian:~$ /etc/init.d/cuorier-authdaemon restart

Ditulis Oleh : Jokam student // 00.31
Kategori:

0 komentar:

Poskan Komentar

Diberdayakan oleh Blogger.
 

Blogger news

Blogroll