diff --git a/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md b/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md index 729bb9f..067bbe5 100644 --- a/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md +++ b/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md @@ -493,7 +493,41 @@ Now let's enable IMAP by editing `/etc/dovecot/dovecot.conf`. Find a `protocols protocols = imap ``` -## Configure how to store emails +## Logging + +By default, Dovecot logs to the syslog (`/var/log/messages`). It would be easier to monitor Dovecot if it logged to its +own log file, so we'll configure that at `/etc/dovecot/conf.d/10-logging.conf`: + +```conf +log_path = /var/log/dovecot.log +``` + +The file also has various settings on logging verbosity you can configure. I set: + +```conf +auth_verbose = yes +auth_debug = yes +mail_debug = yes +``` + +You should already have an `/etc/logrotate.d/dovecot` file. If not, create it with the following contents: + +```logrotate +/var/log/dovecot*.log { + daily + missingok + copytruncate + rotate 7 + compress + notifempty + sharedscripts + postrotate + /etc/init.d/dovecot --quiet --ifstarted reopen + endscript +} +``` + +## Configure IMAP and email storage You probably want to use the Maildir format for storing emails, where each user's mail is stored at `~/Maildir` (this can be set to another location if desired).