2

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?

  • This is interesting because some systems that detect open relays think that allowing mail to root is equivalent to allowing relaying. This may be because Postfix used to combine the concepts of relay and recipient restrictions: postfix.org/SMTPD_ACCESS_README.html – sventechie Sep 12 '13 at 19:51
2

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:

root@domain REJECT

followed by the usual:

postmap /etc/postfix/recipient_access
  • This is interesting because some systems that detect open relays think that allowing mail to root is equivalent to allowing relaying. This may be because Postfix used to combine the concepts of relay and recipient restrictions: – sventechie Sep 12 '13 at 19:51
1

I think if you edit /etc/postfix/sender_access and add:

root@$mydomain REJECT

I'm not entirely sure though.

EDIT: Try using /etc/postfix/header_checks with the "To" header.

  • That seems to be useful for rejecting sender addresses and not destination addresses. – devius Feb 5 '11 at 23:09
  • 1
    There is a recipient_access file that can be used though. – devius Feb 5 '11 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.