Hi everybody!
My customer is so strict, he required us so much and I need your help!
First, he want to monitor all incoming and outgoing from his email accounts. I easily have done this by following the guide to edit /etc/cpanel_exim_system_filter_custom
Like this:
But now, he want to:
- Prevent some email accounts from his domain sending outside but still sending locally
- Restrict some other email accounts sending outside to some specific address such us only @gmail or @yahoo, other addresses is forbidden
I find on Google some suggestes to disable Outgoing mail:
But i really don’t know how to do, anybody has experienced can help me?
Thanks so much!
My customer is so strict, he required us so much and I need your help!
First, he want to monitor all incoming and outgoing from his email accounts. I easily have done this by following the guide to edit /etc/cpanel_exim_system_filter_custom
Like this:
Code:
# Monitor both incoming and outgoing emails.
if first_delivery
and ("$h_to:, $h_cc:" contains "@domain.tld")
or ("$h_from:" contains "@domain.tld")
and ("$h_to:, $h_cc:, $h_from:" does not contain "[email protected]")
then
unseen deliver "[email protected]"
endif
- Prevent some email accounts from his domain sending outside but still sending locally
- Restrict some other email accounts sending outside to some specific address such us only @gmail or @yahoo, other addresses is forbidden
I find on Google some suggestes to disable Outgoing mail:
Code:
logfile /var/log/filter.log 0644
if (
$received_protocol is "local" or
$received_protocol is "esmtpa"
) and (
$header_from contains "@domain1.com" or
$header_from contains "@domain2.com"
)
then
save "/dev/null" 660
endif
Thanks so much!