Hello, im trying to accomplish the same result but with an additional variable. Customer needs only certain email accounts to be able to send/receive mails only from certain domains.
Customer needs:
Email account [email protected]:hosted_in_WHM.com to only be able to send/receive to and from 3 domains aaa.com, bbb.com and ccc.com, all other emails to be descarted with a fail text
Im able to create a custom filter file and get it going, were i can limit the domains or user email, but whenever y add a second variable to the rule i get a MAIN PANIC in Exim arguing "and", or "then" arent being recognized, how can i accomplish this?
---DOESNT WORK
if $header_from: contains "[email protected]:hosted_in_WHM.com"
and
$header_to: does not contain "aaa.com" or "bbb.com" or "ccc.com"
then
fail text "block text"
seen finish
endif
----DOESNT WORK EITHER
if $header_from: contains "[email protected]:hosted_in_WHM.com"
then
if $header_to: does not contain "aaa.com" or "bbb.com" or "ccc.com"
then
fail text "block text"
seen finish
endif
Every time i add a second variable EXIM stops processing ALL server emails with error :
LOG: MAIN PANIC
Error in system filter: unrecognized condition word "then" near line 242 of filter file
Thanks in advance!
Customer needs:
Email account [email protected]:hosted_in_WHM.com to only be able to send/receive to and from 3 domains aaa.com, bbb.com and ccc.com, all other emails to be descarted with a fail text
Im able to create a custom filter file and get it going, were i can limit the domains or user email, but whenever y add a second variable to the rule i get a MAIN PANIC in Exim arguing "and", or "then" arent being recognized, how can i accomplish this?
---DOESNT WORK
if $header_from: contains "[email protected]:hosted_in_WHM.com"
and
$header_to: does not contain "aaa.com" or "bbb.com" or "ccc.com"
then
fail text "block text"
seen finish
endif
----DOESNT WORK EITHER
if $header_from: contains "[email protected]:hosted_in_WHM.com"
then
if $header_to: does not contain "aaa.com" or "bbb.com" or "ccc.com"
then
fail text "block text"
seen finish
endif
Every time i add a second variable EXIM stops processing ALL server emails with error :
LOG: MAIN PANIC
Error in system filter: unrecognized condition word "then" near line 242 of filter file
Thanks in advance!