How can I configure postfix that it only accepts emails from specific domains?
I added entries to /etc/postfix/sender_access, e.g. "domain.xyz permit_auth_destination", did a postmap on the file and added the line
"smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access"
to main.cf
The whole smtpd_recipient_restrictions looks like this:
smtpd_recipient_restrictions =
reject_unauth_pipelining,
check_sender_access hash:/etc/postfix/sender_access
p.s.: I know that mail addresses can be easily faked, but that's not the point :)