Bad idea,…
For everything I will write use your common sense and consult documentation and test everything, because I did not, what I wrote is from top of mine head and will break something or is even wrong,… most-likely,..
In postfix you can define class
smtpd_restriction_classes = domain2only
domain2only = check_recipient_access hash:/etc/postfix/allowed_recipients, reject
In smtpd_recipient_restrictions
add new check_sender_access
(better sooner than later)
smtpd_recipient_restrictions =
check_sender_access hash:/etc/postfix/restricted_senders,
...
Create restricted_senders file
user@domain1.ltd domain2only
Create allowed_recipient file
domain2.ltd OK
Compile
postmap /etc/postfix/restricted_senders
postmap /etc/postfix/allowed_recipients
Restart Postfix
So what this should do? If Postfix sees an incoming SMTP MAIL FROM of sender listed in restricted_senders
= user@domain1.ltd
it will jump to domain2only
There Postfix will look up to allowed_recipients
if it find match in our case domain2.ltd OK
it permit delivery, if not it will reject to delivery this message.
Even shorter If sender is user@domain1.ltd then recipient may be only in domain2.ltd. Other senders are not affected