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

From Notes_Wiki
Revision as of 06:06, 12 January 2021 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb self="Postfix block incoming emails from domain or addres">CentOS 8.x postfix|postfix</yambe:breadcrumb> =CentOS 8.x postfix block incoming emails from domai...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb self="Postfix block incoming emails from domain or addres">CentOS 8.x postfix|postfix</yambe:breadcrumb>

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:



<yambe:breadcrumb self="Postfix block incoming emails from domain or addres">CentOS 8.x postfix|postfix</yambe:breadcrumb>