10-logging.conf.erb 3.4 KB

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