1

I am new to email servers and after some time and hard work I managed to configure a mail server, all the certs, all the ports etc... Everything is working really fine! And now I was requested to create an internal subdomain so that the email accounts from this subdomain can only send an receive internal email.

Just let me clarify:

john@example.com can send and receive emails from/to anybody, including Gmail or Outlook accounts.

mary@sales.example.com can send and receive emails from/to anybody, including Gmail and Outlook accounts.

peter@press.example.com can send and receive emails from/to anybody, including Outlook and Gmail accounts.

BUT!

thomas@internal.example.com can only send and receive emails from/to john@example.com, mary@sales.example.com, peter@marketing.example.com or even ralph@internal.example.com or whatever from the same domain/subdomain. But someone with an @internal.example.com account should not be able to send or receive emails from GMail, Outlook or @company.com.

I found the way to create Sieve Filters to automatically discard external emails sent TO internal accounts but now I need to block any email sent FROM @internal.example.com accounts to external email address.

I am using Postfix as MTA and I think this can be achieved with it but, as I said, I am new to email servers. I did my research and couldn't success. So, I guess is time to ask for some help and I hope you can help me on that.

0

You should use header_checks to achieve it, may be necessary to include some if statement on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.