I am trying to create an "internal only email". Ideally it should only send and receive email from and to my domain and subdomains.
I don't have any idea on how to prevent outgoing email to other email services.
For the incoming emails I am trying to create a Sieve Filter to block all external emails. This is what I am trying but for some reason is not working, I receive the emails in my inbox from any address, example, Gmail accounts:
Code:
# rule:[Block External Messages]
if allof (not address :domain :is "from" "example.com", not header :regex "from" ".*\\.example\\.com$")
{
fileinto "Trash";
}