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 firstname.lastname@example.org and only allow the address email@example.com 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