Configuring IMAP

Now that you're able to get e-mail delivered, you can read e-mail from the local mail spool by using the mail command. In general, it is more useful to be able to retrieve your e-mail from off the box however, which typically means webmail, pop3 or IMAP. In this recipe, we're going to look at setting up a Dovecot e-mail server.

How to do it...

  1. Install the dovecot-imap package:
    sudo apt-get install dovecot-imap
    
  2. Configure the SSL cert and key:
    sed 's|^ssl_cert .*|ssl_cert = </path/to/cert|g' /etc/dovecot/conf.d/10-ssl.conf
    sed 's|^ssl_key .*|ssl_key = </path/to/key|g' /etc/dovecot/conf.d/10-ssl.conf
    
  3. Configure the mail server to require TLS by editing /etc/dovecot/conf.d/10-master.conf and set port = 0 under inet_listener imap.
  4. Restart ...

Get Linux Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.