CentOS 8.x Control Web panel Whitelist or Blacklist IP or email or domain in postfix

From Notes_Wiki
Revision as of 17:58, 15 May 2022 by Saurabh (talk | contribs) (Created page with "Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x Control Web panel > Whitelist or Blacklist IP or email or domain in postfix Normally logwatch emails might be sent to root@localhost and via /etc/aliases and combination of CentOS 8.x postfix send email through relay or smarthost with smtp authentication might get delivered to intend...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x Control Web panel > Whitelist or Blacklist IP or email or domain in postfix

Normally logwatch emails might be sent to root@localhost and via /etc/aliases and combination of CentOS 8.x postfix send email through relay or smarthost with smtp authentication might get delivered to intended recipient. But the email server reject such emails due to:

Diagnostic-Code: smtp; 504 5.5.2 <root@localhost>: Sender address rejected:
    need fully-qualified address

To solve this

  1. We can try adding following in /etc/postfix/sender_whitelist
    root@localhost OK
  2. Re-hash the file for changes to take effect:
    cd /etc/postfix
    postmap sender_whitelist
  3. The above does not works. Hence, further had to edit /etc/postfix/main.cf and use correct values for
    myhostname = commonhosting.sbarjatiya.com
    myorigin = $myhostname
  4. Further, In a few cases fix outgoing email ID from <user> to <user>@<domain> due to use of email virtualhosting requiring full domain name while logging in.
  5. Whitelist sending email server IP in sender_whitelist and map using postmap as explained above
  6. Also whitelist sending email server IP in CSF firewall using:
    1. Login into CWP admin account
    2. Go to Security -> CSF Firewall
    3. Mention IP and comment near "Quick Allow" button. Then click "Quick Allow"


Refer:



Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x Control Web panel > Whitelist or Blacklist IP or email or domain in postfix