Most customers enjoy using their own email client to check mail rather than a terminal. To that end, deploying a `dovecot` instance will help them check email and give you the security you need to sleep at night. This lab will help you practice setting up a `dovecot` instance to work with your `postfix` instance.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Install Dovecot
First, you need to install
dovecot
yum install dovecot -y
Now edit the required files:
vim /etc/dovecot/conf.d/10-auth.conf set up auth_mechanisms vim /etc/dovecot/conf.d/10-mail.conf set up mail_location to match postfix's home_mailbox from /etc/postfix/main.cf vim /etc/dovecot/conf.d/10-master.conf uncomment the auth-userdb unix_listener and configure the Postfix smtp-auth unix_listener
Create the test user:
useradd test_user passwd test_user mkdir /home/test_user/Maildir chown test_user.test_user /home/test_user/Maildir/ chmod -R 700 /home/test_user/Maildir/
Now you can start
dovecot
:systemctl start dovecot
- Test your Dovecot Configuration
- First, connect to the
dovecot
IMAP server:telnet localhost 143
- You’ll receive a response similar to:
OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
- Log in as
test_user
:a login test_user 1234
- If things are set up correctly, you’ll receive a response similar to:
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 SEARCHES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY SPECIAL-USE] Logged in
Congratulations – you’ve configured
dovecot
!
- First, connect to the