I have a postfix mail server correctly configured (I hope) and running on openSUSE 11.3. I can send email to local users from any location, but this also means that I (or anyone else) can send remote emails to the root account. How do I reject remote emails to the root account, while allowing regular users to receive email?
The correct way to reject certain addresses is to put this directive in the main.cf file:
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access ...
Then on the /etc/postfix/recipient_access file:
followed by the usual:
I think if you edit /etc/postfix/sender_access and add:
I'm not entirely sure though.
EDIT: Try using /etc/postfix/header_checks with the "To" header.