In your smtpd_recipient_restrictions, rather at the top of the restriction list, add
check_sender_access hash:/etc/postfix/access-sender-local_mail_only,where the file /etc/postfix/access-sender-local_mail_only contains a list of senders which are restricted:
usera@example.com localmailonly userb@example.com localmailonly userc@example.com localmailonlySo here we have defined that these users are subject to the restriction class "localmailonly", which we will have to define:
smtpd_restriction_classes = localmailonly localmailonly = permit_auth_destination,rejectHere we have defined a new restriction class, and have assinged rules to this class. Namely, we only permit authorized destinations (thats the destinations we accept mail for), and otherwise reject the message. In order for this configuration to take effect, we need to convert /etc/postfix/access-sender-local_mail_only to a .db file, and reload postfix (to read the changes to main.cf):
postmap /etc/postfix/access-sender-local_mail_only service postfix reload