syslog-ng.conf 705 B

12345678910111213141516171819202122232425262728293031
  1. @version: 3.8
  2. @include "scl.conf"
  3. options {
  4. chain_hostnames(off);
  5. flush_lines(0);
  6. use_dns(no);
  7. use_fqdn(no);
  8. owner("root"); group("adm"); perm(0640);
  9. stats_freq(0);
  10. bad_hostname("^gconfd$");
  11. };
  12. source s_src {
  13. unix-stream("/dev/log");
  14. internal();
  15. };
  16. destination d_combined { file("/var/log/combined.log"); };
  17. destination d_redis {
  18. redis(
  19. host("redis-mailcow")
  20. port(6379)
  21. command("LPUSH" "POSTFIX_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
  22. );
  23. };
  24. filter f_mail { facility(mail) and not filter(f_debug); };
  25. log {
  26. source(s_src);
  27. destination(d_combined);
  28. filter(f_mail);
  29. destination(d_redis);
  30. };