我想启用系统范围的过滤,以便我可以定义一些自定义垃圾邮件过滤。我正在为 Exim 使用 Ubuntu/Debian 拆分配置,但看不到在哪里定义系统过滤器。
在正常配置中,我只需将以下内容添加到主配置中:
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
创建一个名为 in 的文件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
您的新过滤器应该可以工作...