Step 1

#yum install sendmail sendmail-cf

#yum install dovecot

Step 2

 #vim /etc/mail/sendmail.mc
Addr=0.0.0.0
TRUST_AUTH_MECH
define('confAUTH_MECHANISMS','EXTERNAL GSSAPI DIGEST-MD3 LOGIN PLAIN')

#vim /etc/mail/access
0.0.0.0      RELAY

#makemap hash /etc/mail/access.db < /etc/mail/access

#vim /etc/mail/local-hosts-names
contoso.msft

#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

#vim /etc/dovecot.conf
protocols = imap imaps pop3 pop3s

#service dovecot restart
#service saslauthd restart

#vim /etc/sysconfig/selinux
SELINUX=disabled

#vim /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext          .db
dbmopen_ext       .db
dbmopen_haslock   .db

#/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init