LinuxSay - A Discussion Forum for Linux Enthusiasts

Problem run an email server with postfix and dovecote

hello friends, i want to run an email server with postfix and dovecote in centos 6.8.
i set my domain ( on ip public of my vps and i did below configs and i can send emails correctly but i cant recieve email and cant register my email account on any mail client like outlook.
can you help me to solve the problem.
whats the problem and where did i wrong ?

vi /etc/postfix/

smtpd_banner = $myhostname ESMTP $mail_name
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
myhostname =
mydestination =
mynetworks =
inet_interfaces = all
inet_protocols = ipv4
append_dot_mydomain = no
relayhost =
mailbox_size_limit = 0
mailbox_command =


smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth


smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
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
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
data_directory = /var/lib/postfix

creating a mail box

useradd -m -s /bin/bash mina

passwd mina

mkdir /home/mina/Maildir/{new,cur,tmp}

vi /etc/postfix/

smtp inet n - n - - smtpd -o content_filter=spamassassin
-o smtpd_sasl_auth_enable=yes
-o smtpd_reject_unlisted_sender=yes
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_unauth_destination
-o broken_sasl_auth_clients=yes

submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_wrappermode=no
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
-o milter_macro_daemon_name=ORIGINATING
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth

mkdir /etc/postfix/ssl

and make ssl files with open-ssh command:
cacert.pem ,smtpd.crt , smtpd.key

service postfix restart

vi /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain login cram-md5

vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir

vi /etc/dovecot/conf.d/10-master.conf
service imap-login {
inet_listener imap {
#port = 143
inet_listener imaps {
port = 993
ssl = yes

Number of connections to handle before starting a new process. Typically

the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0

is faster. <doc/wiki/LoginProcess.txt>

#service_count = 1

Number of processes to always keep waiting for more connections.

#process_min_avail = 0

If you set service_count=0, you probably need to grow this.

#vsz_limit = 64M

service pop3-login {
inet_listener pop3 {
#port = 110
inet_listener pop3s {
port = 995
ssl = yes

service lmtp {
unix_listener lmtp {
#mode = 0666

Create inet listener only if you can’t use the above UNIX socket

#inet_listener lmtp {
# Avoid making LMTP visible for the entire internet
#address =
#port =

service imap {

Most of the memory goes to mmap()ing files. You may need to increase this

limit if you have huge mailboxes.

#vsz_limit = 256M

Max. number of IMAP processes (connections)

#process_limit = 1024

service pop3 {

Max. number of POP3 processes (connections)

#process_limit = 1024

service auth {

auth_socket_path points to this userdb socket by default. It’s typically

used by dovecot-lda, doveadm, possibly imap process, etc. Its default

permissions make it readable only by root, but you may need to relax these

permissions. Users that have access to this socket are able to get a list

of all usernames and get results of everyone’s userdb lookups.

unix_listener auth-userdb {
mode = 0600
user = postfix
group = postfix

Postfix smtp-auth

unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix

Auth process is run as this user.

#user = $default_internal_user

service auth-worker {

Auth worker process is run as root by default, so that it can access

/etc/shadow. If this isn’t necessary, the user should be changed to


#user = root

service dict {

If dict proxy is used, mail processes should have access to its socket.

For example: mode=0660, group=vmail and global mail_access_groups=vmail

unix_listener dict {
#mode = 0600
#user =
#group =

vi /etc/dovecot/conf.d/10-ssl.conf
ssl = yes

service dovecote restart

Hello underzero,
Here, you can look:
Best Regards.