CentOS 8.x postfix block incoming emails from domain or address

From Notes_Wiki
Revision as of 03:04, 30 March 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > CentOS 8.x postfix block incoming emails from domain or address

To block incoming emails from sender or domain in postfix use:

  1. Use following in main.cf
    smtpd_relay_restrictions = permit_mynetworks,
    permit_sasl_authenticated,
    check_sender_access hash:/etc/postfix/access,
    reject_unauth_destination
  2. Use following in /etc/postfix/access
    user@domain.com REJECT
  3. Recreate access index:
    postmap access
  4. One time reload of postfix for accounting for main.cf changes:
    systemctl reload postfix


Refer:




Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > CentOS 8.x postfix block incoming emails from domain or address