The default mail log may not contain all the information you need. In that case, the next step is to enable verbose logging for Postfix and Dovecot, and to separate the Postfix and Dovecot logs into two separate files so they’re easier to sort through. The Postfix log will document messages that are relayed to or from outside servers, and the Dovecot log will record authorization attempts.
Dovecot
Follow these instructions to enable verbose logging for Dovecot and change the log location to/var/log/dovecot.log
:-
Open the /etc/dovecot/conf.d/10-logging.conf file for editing by entering the following command:
1
nano /etc/dovecot/conf.d/10-logging.conf
-
Add this line to set the new file path for the log:
- /etc/dovecot/conf.d/10-logging.conf
1
log_path = /var/log/dovecot.log
-
Uncomment the
auth_verbose
andmail_debug
lines, and then set them toyes
:
- /etc/dovecot/conf.d/10-logging.conf
1 2 3
auth_verbose = yes mail_debug = yes
- Save your changes.
-
Restart Dovecot by entering the following command:
1
service dovecot restart
/var/log/dovecot.log
. Remember to disable verbose logging when you’re done troubleshooting so your server doesn’t fill up with logs.Postfix
Follow these instructions to enable verbose logging for Postfix:-
Open the
/etc/postfix/master.cf
files for editing by entering the following command:
1
nano /etc/postfix/master.cf
-
Add a
-v
to thesmtp
line to enable verbose logging:
- /etc/postfix/master.cf
1 2 3 4 5
# ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd -v
- Save your changes.
-
Restart Postfix by entering the following command:
service postfix restart
/var/log/mail.log
. Remember to disable verbose logging when you’re done troubleshooting so your server doesn’t fill up with logs.