![Postfix 即使被排除,也会记录到 syslog](https://linux22.com/image/784454/Postfix%20%E5%8D%B3%E4%BD%BF%E8%A2%AB%E6%8E%92%E9%99%A4%EF%BC%8C%E4%B9%9F%E4%BC%9A%E8%AE%B0%E5%BD%95%E5%88%B0%20syslog.png)
Ubuntu 22.04 和 postfix 3.6.4
Postfix 配置设置为使用syslog_facility=mail
,并且我已修改/etc/rsyslog.d/50-default.conf
为以下内容
*.*;mail,auth,authpriv.none -/var/log/syslog
mail.warn /var/log/mail.err
警告及更高级别的消息正确地发送到 /var/log/mail.err,但是所有级别的邮件设施消息仍发送到 syslog。我遗漏了什么吗?
答案1
请尝试以下操作:
插入mail.none
/var/log/syslog
例如:
*.info;mail.none;authpriv.none;cron.none /var/log/syslog
然后将 Postfix 消息记录到单独的文件中:
# Log all the mail messages in one place.
mail.* -/var/log/mail
mail.info -/var/log/mail.info
mail.warning -/var/log/mail.warn
mail.err /var/log/mail.err