Postfix, Dovecot with Squirellmail webmail step by step configuration on centos in just 5 minutes.
Now we are going to setup Postfix, Dovecot with Squirellmail webmail Server in quickest & Shortest method.
1. Yum install postfix
After the installing postfix open the main.cf file as below and use these lines.
1.1 vim /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = linuxjust4u.com
myhostname = mail.linuxjust4u.com
mynetworks = 111.118.187.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks,
check_relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
1.2 vim /etc/postfix/master.cf
Uncomment the below line in above file
smtp inet n – n – – smtpd
smtps inet n – n – – smtpd
2.0 yum install dovecot
After installing dovecot, we have to change four files:
vim /etc/dovecot/dovecot.conf
vim /etc/dovecot/conf.d/10-auth.conf
vim /etc/dovecot/conf.d/10-master.conf
vim /etc/dovecot/conf.d/10-mail.conf
2.1 vim /etc/dovecot/dovecot.conf
Uncomment the line 22th as below:
protocols = imap pop3 lmtp
2.2 vim /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
2.3 /etc/dovecot/conf.d/10-master.conf
Add below line at line 81th
unix_listener auth-userdb {
mode = 0600
user = postfix
group = postfix
}
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
2.4 vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
3.0 yum install squirrelmail
4.0 yum install httpd
4.1 vim /etc/httpd/conf/httpd.conf
Add the below line at the end of this file:
Alias /squirrelmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options Indexes FollowSymLinks
RewriteEngine On
AllowOverride All
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
Final step: start all the services
Service postfix restart
Chkconfig postfix on
Service dovecot restart
Chkconfig dovecot on
Service httpd restart
Chkconfig httpd on
Add Mail User
[root@mail ~]# useradd humtum
[root@mail ~]# passwd humtum
Changing password for user humtum.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Now everything is done, your mail server is ready with webmail browser
http://yourIP/webmail
nice tutorial…..problem solved yeah……..
Thanks Dinesh, For your appriciation. 🙂