10-logging.conf.erb 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ##
  2. ## Log destination.
  3. ##
  4. # Log file to use for error messages. "syslog" logs to syslog,
  5. # /dev/stderr logs to stderr.
  6. <%= Dovecot::Conf.attribute(@conf, 'log_path', 'syslog') %>
  7. # Log file to use for informational messages. Defaults to log_path.
  8. <%= Dovecot::Conf.attribute(@conf, 'info_log_path') %>
  9. # Log file to use for debug messages. Defaults to info_log_path.
  10. <%= Dovecot::Conf.attribute(@conf, 'debug_log_path') %>
  11. # Syslog facility to use if you're logging to syslog. Usually if you don't
  12. # want to use "mail", you'll use local0..local7. Also other standard
  13. # facilities are supported.
  14. <%= Dovecot::Conf.attribute(@conf, 'syslog_facility', 'mail') %>
  15. ##
  16. ## Logging verbosity and debugging.
  17. ##
  18. # Log unsuccessful authentication attempts and the reasons why they failed.
  19. <%= Dovecot::Conf.attribute(@conf, 'auth_verbose', false) %>
  20. # In case of password mismatches, log the attempted password. Valid values are
  21. # no, plain and sha1. sha1 can be useful for detecting brute force password
  22. # attempts vs. user simply trying the same password over and over again.
  23. <%= Dovecot::Conf.attribute(@conf, 'auth_verbose_passwords', false) %>
  24. # Even more verbose logging for debugging purposes. Shows for example SQL
  25. # queries.
  26. <%= Dovecot::Conf.attribute(@conf, 'auth_debug', false) %>
  27. # In case of password mismatches, log the passwords and used scheme so the
  28. # problem can be debugged. Enabling this also enables auth_debug.
  29. <%= Dovecot::Conf.attribute(@conf, 'auth_debug_passwords', false) %>
  30. # Enable mail process debugging. This can help you figure out why Dovecot
  31. # isn't finding your mails.
  32. <%= Dovecot::Conf.attribute(@conf, 'mail_debug', false) %>
  33. # Show protocol level SSL errors.
  34. <%= Dovecot::Conf.attribute(@conf, 'verbose_ssl', false) %>
  35. <% if @plugins.has_key?('mail_log') and @plugins['mail_log'].kind_of?(Hash) -%>
  36. <%= Dovecot::Conf.plugin('mail_log', @plugins['mail_log']) %>
  37. <% else -%>
  38. plugin {
  39. # mail_log plugin provides more event logging for mail processes.
  40. # Events to log. Also available: flag_change append
  41. #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  42. # Available fields: uid, box, msgid, from, subject, size, vsize, flags
  43. # size and vsize are available only for expunge and copy events.
  44. #mail_log_fields = uid box msgid size
  45. }
  46. <% end -%>
  47. ##
  48. ## Log formatting.
  49. ##
  50. # Prefix for each line written to log file. % codes are in strftime(3)
  51. # format.
  52. <%= Dovecot::Conf.attribute(@conf, 'log_timestamp', '"%b %d %H:%M:%S "') %>
  53. # Space-separated list of elements we want to log. The elements which have
  54. # a non-empty variable value are joined together to form a comma-separated
  55. # string.
  56. <%= Dovecot::Conf.attribute(@conf, 'login_log_format_elements', 'user=<%u> method=%m rip=%r lip=%l mpid=%e %c') %>
  57. # Login log format. %$ contains login_log_format_elements string, %s contains
  58. # the data we want to log.
  59. <%= Dovecot::Conf.attribute(@conf, 'login_log_format', '%$: %s') %>
  60. # Log prefix for mail processes. See doc/wiki/Variables.txt for list of
  61. # possible variables you can use.
  62. <%= Dovecot::Conf.attribute(@conf, 'mail_log_prefix', '"%s(%u): "') %>
  63. # Format to use for logging mail deliveries. You can use variables:
  64. # %$ - Delivery status message (e.g. "saved to INBOX")
  65. # %m - Message-ID
  66. # %s - Subject
  67. # %f - From address
  68. # %p - Physical size
  69. # %w - Virtual size
  70. <%= Dovecot::Conf.attribute(@conf, 'deliver_log_format', 'msgid=%m: %$') %>