Skip to content


Configure Postfix + DoveCot (no SSL) and RedHat 7

Install both packages

# yum –y install postfix dovecot

Changes to configuration files:

/etc/postfix/main.cf:

myhostname = yourhostname.yourdomain.xxx
mydomain = yourdomain.xxx
inet_interfaces = $myhostname, localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 10.18.0.0/16, 127.0.0.0/8
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

/etc/postfix/master.cf:

smtp      inet  n       -       n       -       -       smtpd

/etc/dovecot/dovecot.conf:

protocols = imap pop3 lmtp
listen = *, ::

/etc/dovecot/conf.d/10-auth.conf:

auth_mechanisms = plain login

/etc/dovecot/conf.d/10-ssl.conf:

ssl = no
disable_plaintext_auth = no

/etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u

Enable automatic start at reboot

# systemctl enable postfix
# systemctl restart postfix.service
# systemctl enable dovecot
# systemctl restart dovecot.service

Testing POP3

# telnet localhost pop3
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user duszyk@wmd.edu
+OK
pass ************
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.

Testing IMAP

# telnet localhost imap
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a1 LOGIN e_duszyk@wmd.edu ***********
a1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE] Logged in
a2 LIST "" "*"
* LIST (\HasNoChildren) "." INBOX
a2 OK List completed.
a3 EXAMINE INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1483642197] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
a3 OK [READ-ONLY] Examine completed (0.000 secs).
a4 LOGOUT
* BYE Logging out
a4 OK Logout completed.
Connection closed by foreign host.

Posted in LINUX.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.