content/blog/mail_server_alpine_postfix_dovecot_tutorial.md: dovecot.logging section
This commit is contained in:
parent
54f2e52bbc
commit
c6d8eb817c
1 changed files with 35 additions and 1 deletions
|
@ -493,7 +493,41 @@ Now let's enable IMAP by editing `/etc/dovecot/dovecot.conf`. Find a `protocols
|
||||||
protocols = imap
|
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
|
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).
|
can be set to another location if desired).
|
||||||
|
|
Loading…
Reference in a new issue