メッセージ本文とヘッダーからスパマーを検索してフィルタリングできるように、/ etc / cpanel_exim_system_filterにこのコードがあります。 *@gmail.com、*@mail.comなど、このルールを除外するためにいくつかのドメインを追加したいと思います。これらのドメインを除外するようにifコマンドを拡張するにはどうすればよいですか?
# SPAM FILTER START
if
# Header Spam
$header_subject: contains "Pharmaceutical"
or $header_subject: contains "Viagra"
or $header_subject: contains "seo"
or $header_subject: contains "Cialis"
or $header_subject: is "The Ultimate Online Pharmaceutical"
# Body Spam
or $message_body: contains "Pharmaceutical"
or $message_body: contains "website audit"
or $message_body: contains "Pay-On-Results"
or $message_body: contains "improve your website"
or $message_body: contains "Viagra"
or $message_body: contains "sex"
or $message_body: contains "seo"
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered."
seen finish
endif
# SPAM FILTER FINISHED
答え1
Fromヘッダーの終わりをテストできます。たとえば、次のようになります。
$header_from: does not end <whitelisted domain>
結果は次のとおりです。
if
# Excluded domains
$header_from: does not end "example.com"
and $header_from: does not end "example.org"
...
and (
# Header Spam
$header_subject: contains "Pharmaceutical"
or ...
# Body Spam
or ...
)
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered."
seen finish
endif
追加情報:http://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html#SEC23