0

I have an ArchLinux server with postfix, postfixadmin, dovecot, roundcube, quotas and spamassassin running fine.

The server is the main (not a backup or forwarding) of 3 virtual domains: domone.example, domtwo.example, and domthree.example.

The server is running perfectly, has no problems and is in production. All three domains can send and receive mail from and to the outside, and between them.

Now I need to change it so that nothing changes for domone.example and domtwo.example but domthree.example should now behave like this:

  • domthree.example can receive mails from outside and from domone.example, domtwo.example and domthree.example.
  • domthree.example can send mail only to domone.example, domtwo.example and domthree.example, but not to the outside or other domains.

I have been searching for 3 days, I know it is related to relay_domains and virtual_domains, but I can not find the solution.

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
FOP
  • 101
  • 2
  • This sounds like it would be best implemented with a [policy server](http://www.postfix.org/SMTPD_POLICY_README.html). So you would add "check_policy_service (server_address)" to smtpd_recipient_restrictions. And your policy server would return "action=OK" unless "sender=*@domthree.example" in which case it would return "action=REJECT" unless "recipient=*@domone.example | *@domtwo.example | *@domthree.example" – cburn11 Jul 22 '18 at 05:06
  • I try this way: 1- Put "smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/dominios_virtuales_access.cf" into main.cf 2- /etc/postfix/dominios_virtuales_access.cf: domthree.com.ar REJECT .domthree.com.ar REJECT domtwo.com.ar OK .domtwo.com.ar OK domone.com.ar OK .domone.com.ar OK The result is that donone and domtwo works as espected, but domthree can't send any mail. No to external (GOOD) and not to domone or domtwo (BAD) Thank you – FOP Jul 23 '18 at 19:16
  • @cburn11: I going to try that way. Thank you! – FOP Jul 24 '18 at 12:46

0 Answers0