Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | Powered by Blogger.

Explore the world of seamless email management with Zimbra Mail on Linux! Our blog delves into a step-by-step guide on harnessing the potential of Linux commands, providing easy-to-follow how-tos, and unlocking the magic of Bash scripting. Simplify your email administration journey and enhance your skills with our insightful tips and tricks.

Postfix only allow whitelisted Recipient Domain

In this tutorial, How to Configure "Postfix only allow whitelisted Recipient Domain". We test environment with user data. To minimize the risk of sending to unwanted email recipients.

Postfix only allow whitelisted Recipient Domain

Step 1: Add line into file as below
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_domains, reject
Note: Warring /etc/postfix/recipient_domains, reject , Allow receive email in recipient_domain, and REJECT All domain not in whitelisted domain.

Step 2: To create recipient domain is the whitelist file OK OK
Note: only two domain and receive mail

Step 3: To generate hash file:
$ sudo postmap /etc/postfix/recipient_domains

Step 4: To restart postfix service
$ sudo /etc/init.d/postfix restart
Now to try sending an email to a another domain not in whitelist.
You will find error something like that as below:
NOQUEUE: reject: RCPT from …: 554 5.7.1 <[email protected]>: Recipient address rejected: Access denied


Thought the article, To help you configure Postfix server only allow whitelisted domain. You have any question to comment below.

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command |


how to configure in zimbra multi server

sudo postmap /etc/postfix/recipient_domains

postmap not found


This Blog is protected by