So the idea here is to have an email address that you would only like a select few to have access to email to, for example, a everyone or all address. In this example we will be locking down the email address email@example.com and only allow the address firstname.lastname@example.org to send to it.
In /etc/postfix/main.cf add the following:
smtpd_restrictions_classes = restricted_recipient
- note: This is in smtpd_SENDER_restrictions to avoid becoming an open relay because of the “OK” below.
smtpd_sender_restrictions = check_recipient_access hash:/etc/postfix/restricted_recipientrestricted_recipient = check_sender_access hash:/etc/postfix/privileged_sender reject