First you should have a well configured dns in the system in which u are going to configure you mail server.
your forward zone should look like this
your reverse zone should look like this
Then install postfix service
[root@station1 ~]# yum install -y postfix
75 myhostname = station1.example.com
83 mydomain = example.com
99 myorigin = $mydomain
113 inet_interfaces = all
116 #inet_interfaces = localhost
164 #mydestination = $myhostname, localhost.$mydomain, localhost
165 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
419 home_mailbox = Maildir/
:wq save and quit
[root@station1 ~]# chkconfig postfix on
[root@station1 ~]# service postfix start
Starting postfix: [ OK ]
[root@station1 ~]# yum install dovecot
[root@station1 ~]# yum install fetchmail
[root@station1 ~]# yum install mutt
[root@station1 ~]# vim /etc/dovecot/dovecot.conf
20 protocols = imap pop3 lmtp
32 login_greeting = Dovecot ready.
[root@station1 ~]# vim /etc/dovecot/conf.d/10-mail.conf
24 mail_location = maildir:~/Maildir
[root@station1 ~]# vim /etc/dovecot/conf.d/20-pop3.conf
51 pop3_uidl_format = %08Xu%08Xv
85 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
[root@station1 ~]# cd /etc/pki/tls/certs/
[root@station1 certs]# make dovecot.pem
Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:Kerala
Locality Name (eg, city) [Default City]:Calicut
Organization Name (eg, company) [Default Company Ltd]:Hp
Organizational Unit Name (eg, section) []:Edms
Common Name (eg, your name or your server's hostname) []:station1.example.com
Email Address []:root@station1.example.com
[root@station1 certs]# cp dovecot.pem /etc/pki/tls/private/
[root@station1 certs]# cp dovecot.pem /etc/pki/dovecot/certs/
[root@station1 certs]# cp dovecot.pem /etc/pki/dovecot/private/
[root@station1 certs]# vim /etc/pki/dovecot/dovecot-openssl.cnf
[ req_dn ]
# country (2 letter code)
C=IN
# State or Province Name (full name)
ST=Kerala
# Locality Name (eg. city)
L=Calicut
# Organization (eg. company)
O=Hp
# Organizational Unit Name (eg. section)
OU=Edms
# Common Name (*.example.com is also possible)
CN=station1.example.com
# E-mail contact
emailAddress=root@station1.example.com
[ cert_type ]
nsCertType = server
[root@station1 certs]# chkconfig dovecot on
[root@station1 certs]# service dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
[root@station1 certs]# yum install httpd
[root@station1 certs]# vim /etc/httpd/conf/httpd.conf
262 ServerAdmin root@station1.example.com
276 ServerName station1.example.com:80
[root@station1 certs]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
To install squirrelmail download the packages form the link given below
for x86_64 epel package click here and install the rpm package epel
[root@station1 ~]# yum repolist
[root@station1 ~]# yum install squirrelmail
suppose if dependency issue occurs for php-mbstring download from here php-mbstring
[root@station1 ~]# /usr/share/squirrelmail/config/conf.pl
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >> D
Command >> dovecot
imap_server_type = dovecot
default_folder_prefix =
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = detect
delete_folder = false
Press enter to continue...
Command >> 2 for server setting and edit as shown below
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : Sendmail
A. Update IMAP Settings : station1.example.com:143 (dovecot)
B. Change Sendmail Config : /usr/sbin/sendmail
Command >> S
Command >> q
[root@station1 ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@station1 ~]# su - ranjith
[ranjith@station1 ~]$ vim .fetchmailrc
poll station1.example.com with protocol pop3:
user "ranjith"
pass "redhat"
[ranjith@station1 ~]$ chmod 710 .fetchmailrc
[ranjith@station1 ~]$ fetchmail -v
while running this look at the end of the line.. error should not come. if occurs disable your firewall and selinux and try again.
similarly create another user test and do the same steps as done for user ranjith.
open this link in your browser https://station1.example.com/webmail/src/configtest.php
SquirrelMail configtest
This script will try to check some aspects of your SquirrelMail configuration and point you to errors whereever it can find them. You need to go run conf.pl in the config/ directory first before you run this script.
SquirrelMail version: 1.4.22-2.el6
Config file version: 1.4.0
Config file last modified: 07 September 2012 13:15:44
Checking PHP configuration...
PHP version 5.3.3 OK.
Running as N/A(N/A) / N/A(N/A)
display_errors:
error_reporting: 22527
variables_order OK: GPCS.
PHP extensions OK. Dynamic loading is disabled.
ERROR: You have configured PHP not to allow short tags (short_open_tag=off). This shouldn't be a problem with SquirrelMail or any plugin coded coded according to the SquirrelMail Coding Guidelines, but if you experience problems with PHP code being displayed in some of the pages and changing setting to "on" solves the problem, please file a bug report against the failing plugin. The correct contact information is most likely to be found in the plugin documentation.
Checking paths...
Data dir OK.
Attachment dir OK.
Plugins OK.
Themes OK.
Default language OK.
Base URL detected as: https://station1.example.com/webmail/src (location base autodetected)
Checking outgoing mail service....
sendmail OK
Checking IMAP service....
IMAP server ready (* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.)
Capabilities: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN
Checking internationalization (i18n) settings...
gettext - Gettext functions are available. On some systems you must have appropriate system locales compiled.
mbstring - Mbstring functions are available.
recode - Recode functions are unavailable.
iconv - Iconv functions are available.
timezone - Webmail users can change their time zone settings.
Checking database functions...
not using database functionality.
Congratulations, your SquirrelMail setup looks fine to me!
Login Now ---click this link
now login as ranjith
i have sent a mail to test user
now logout and login as test user
test user got the mail.. hope you enjoyed seeing your result.. any doubts feel free to mail me..
your forward zone should look like this
your reverse zone should look like this
Then install postfix service
[root@station1 ~]# yum install -y postfix
75 myhostname = station1.example.com
83 mydomain = example.com
99 myorigin = $mydomain
113 inet_interfaces = all
116 #inet_interfaces = localhost
164 #mydestination = $myhostname, localhost.$mydomain, localhost
165 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
419 home_mailbox = Maildir/
:wq save and quit
[root@station1 ~]# chkconfig postfix on
[root@station1 ~]# service postfix start
Starting postfix: [ OK ]
[root@station1 ~]# yum install dovecot
[root@station1 ~]# yum install fetchmail
[root@station1 ~]# yum install mutt
[root@station1 ~]# vim /etc/dovecot/dovecot.conf
20 protocols = imap pop3 lmtp
32 login_greeting = Dovecot ready.
[root@station1 ~]# vim /etc/dovecot/conf.d/10-mail.conf
24 mail_location = maildir:~/Maildir
[root@station1 ~]# vim /etc/dovecot/conf.d/20-pop3.conf
51 pop3_uidl_format = %08Xu%08Xv
85 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
[root@station1 ~]# cd /etc/pki/tls/certs/
[root@station1 certs]# make dovecot.pem
Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:Kerala
Locality Name (eg, city) [Default City]:Calicut
Organization Name (eg, company) [Default Company Ltd]:Hp
Organizational Unit Name (eg, section) []:Edms
Common Name (eg, your name or your server's hostname) []:station1.example.com
Email Address []:root@station1.example.com
[root@station1 certs]# cp dovecot.pem /etc/pki/tls/private/
[root@station1 certs]# cp dovecot.pem /etc/pki/dovecot/certs/
[root@station1 certs]# cp dovecot.pem /etc/pki/dovecot/private/
[root@station1 certs]# vim /etc/pki/dovecot/dovecot-openssl.cnf
[ req_dn ]
# country (2 letter code)
C=IN
# State or Province Name (full name)
ST=Kerala
# Locality Name (eg. city)
L=Calicut
# Organization (eg. company)
O=Hp
# Organizational Unit Name (eg. section)
OU=Edms
# Common Name (*.example.com is also possible)
CN=station1.example.com
# E-mail contact
emailAddress=root@station1.example.com
[ cert_type ]
nsCertType = server
[root@station1 certs]# chkconfig dovecot on
[root@station1 certs]# service dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
[root@station1 certs]# yum install httpd
[root@station1 certs]# vim /etc/httpd/conf/httpd.conf
262 ServerAdmin root@station1.example.com
276 ServerName station1.example.com:80
[root@station1 certs]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
To install squirrelmail download the packages form the link given below
for x86_64 epel package click here and install the rpm package epel
[root@station1 ~]# yum repolist
[root@station1 ~]# yum install squirrelmail
suppose if dependency issue occurs for php-mbstring download from here php-mbstring
[root@station1 ~]# /usr/share/squirrelmail/config/conf.pl
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit
Command >> D
Command >> dovecot
imap_server_type = dovecot
default_folder_prefix =
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = detect
delete_folder = false
Press enter to continue...
Command >> 2 for server setting and edit as shown below
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : Sendmail
A. Update IMAP Settings : station1.example.com:143 (dovecot)
B. Change Sendmail Config : /usr/sbin/sendmail
Command >> S
Command >> q
[root@station1 ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@station1 ~]# su - ranjith
[ranjith@station1 ~]$ vim .fetchmailrc
poll station1.example.com with protocol pop3:
user "ranjith"
pass "redhat"
[ranjith@station1 ~]$ chmod 710 .fetchmailrc
[ranjith@station1 ~]$ fetchmail -v
while running this look at the end of the line.. error should not come. if occurs disable your firewall and selinux and try again.
similarly create another user test and do the same steps as done for user ranjith.
open this link in your browser https://station1.example.com/webmail/src/configtest.php
SquirrelMail configtest
This script will try to check some aspects of your SquirrelMail configuration and point you to errors whereever it can find them. You need to go run conf.pl in the config/ directory first before you run this script.
SquirrelMail version: 1.4.22-2.el6
Config file version: 1.4.0
Config file last modified: 07 September 2012 13:15:44
Checking PHP configuration...
PHP version 5.3.3 OK.
Running as N/A(N/A) / N/A(N/A)
display_errors:
error_reporting: 22527
variables_order OK: GPCS.
PHP extensions OK. Dynamic loading is disabled.
ERROR: You have configured PHP not to allow short tags (short_open_tag=off). This shouldn't be a problem with SquirrelMail or any plugin coded coded according to the SquirrelMail Coding Guidelines, but if you experience problems with PHP code being displayed in some of the pages and changing setting to "on" solves the problem, please file a bug report against the failing plugin. The correct contact information is most likely to be found in the plugin documentation.
Checking paths...
Data dir OK.
Attachment dir OK.
Plugins OK.
Themes OK.
Default language OK.
Base URL detected as: https://station1.example.com/webmail/src (location base autodetected)
Checking outgoing mail service....
sendmail OK
Checking IMAP service....
IMAP server ready (* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.)
Capabilities: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN
Checking internationalization (i18n) settings...
gettext - Gettext functions are available. On some systems you must have appropriate system locales compiled.
mbstring - Mbstring functions are available.
recode - Recode functions are unavailable.
iconv - Iconv functions are available.
timezone - Webmail users can change their time zone settings.
Checking database functions...
not using database functionality.
Congratulations, your SquirrelMail setup looks fine to me!
Login Now ---click this link
now login as ranjith
i have sent a mail to test user
now logout and login as test user
test user got the mail.. hope you enjoyed seeing your result.. any doubts feel free to mail me..
hi from where can i download squirrelmail package for rhel6
ReplyDeleteHi Anonymous
DeleteI have clearly mentioned in the post
To install squirrelmail download the packages form the link given below
for x86_64 epel package click here and install the rpm package epel
[root@station1 ~]# yum repolist
[root@station1 ~]# yum install squirrelmail
please post the step by step configuration of ldap server
ReplyDeletehow to send a mail to public domain (eg-gmail.com) from squirrelmail
ReplyDelete