我想启用系统范围的过滤,这样我就可以定义一些自定义垃圾邮件过滤。我正在使用 Exim 的拆分配置,但看不到在哪里定义系统过滤器。
这些配置会放在这里吗?
system_filter = /etc/mail/exim.filter
system_filter_user = Debian-exim
system_filter_group = Debian-exim
system_filter_file_transport = address_file
system_filter_pipe_transport = address_pipe
答案1
创建一个名为的文件30_exim4-config_system_filter
,其中/etc/exim4/conf.d/main
包含以下内容:
# System wide filter:
# http://exim.org/exim-html-current/doc/html/spec_html/ch-systemwide_message_filtering.html
system_filter = /etc/mail/exim.filter
system_filter_user = Debian-exim
system_filter_group = Debian-exim
system_filter_file_transport = address_file
system_filter_pipe_transport = address_pipe
# System wide filter end.
然后运行以下命令:
sudo exim -bF /etc/mail/exim.filter < /etc/mail/spam-test
sudo update-exim4.conf
sudo service exim4 restart
您的新过滤器应该可以正常工作...