Hi I have hundreds of exim filter conditions as below. each condition block has 2 white listed domain as @safedomain1.com and @safedomain2.com. I want to be able to create a file e.g /etc/whitelisteddomains and call this file from each exim conditions so I don't have to add a new safedomain.com for all conditions. How can I call a file in exim filter condition ?
/etc/whitelisteddomains file contain
"@safedomain1.com" and $sender_address does not matches
"@safedomain2.com" and $sender_address does not matches
"@safedomain3.com" and $sender_address does not matches
CURRENT FILTER
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches "@safedomain1.com" and $sender_address does not matches "@safedomain2.com" and
$message_body: contains "sxx" then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 101"
seen finish
endif
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches "@safedomain1.com" and $sender_address does not matches "@safedomain2.com" and
$message_body: contains "p0rn"
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 102"
seen finish
endif
DESIRED FILTER
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches file:/etc/whitelisteddomains and
$message_body: contains "sxx" then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 101"
seen finish
endif
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches file:/etc/whitelisteddomains and
$message_body: contains "p0rn"
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 102"
seen finish
endif
/etc/whitelisteddomains file contain
"@safedomain1.com" and $sender_address does not matches
"@safedomain2.com" and $sender_address does not matches
"@safedomain3.com" and $sender_address does not matches
CURRENT FILTER
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches "@safedomain1.com" and $sender_address does not matches "@safedomain2.com" and
$message_body: contains "sxx" then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 101"
seen finish
endif
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches "@safedomain1.com" and $sender_address does not matches "@safedomain2.com" and
$message_body: contains "p0rn"
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 102"
seen finish
endif
DESIRED FILTER
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches file:/etc/whitelisteddomains and
$message_body: contains "sxx" then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 101"
seen finish
endif
if
# body message spam
$sender_address does not end ".au" and $sender_address does not matches file:/etc/whitelisteddomains and
$message_body: contains "p0rn"
then
fail text "This message has been rejected by spam filter\n\
WARNING! THIS MESSAGE HAS NOT BEEN delivered. error code 102"
seen finish
endif