Block a specific email address in postfix:(debian)
Block a specific email address in postfix: (incoming)
Sometimes
we need to block a specific email address in postfix. Here is how to do that.
Step 1. Add the following line in main.cf
Step 1. Add the following line in main.cf
# vim /etc/postfix/main.cf
smtpd_sender_restrictions
= reject_unknown_sender_domain,check_sender_access hash:/etc/postfix/access
Step 2. Now add the address you want to block in access file like following.
noreply@test.com REJECT
Step 3. After adding the address postmap the access file.
# postmap /etc/postfix/access
Step 2. Now add the address you want to block in access file like following.
noreply@test.com REJECT
Step 3. After adding the address postmap the access file.
# postmap /etc/postfix/access
Now your MX will not
receive any mail from the address "noreply@test.com"
Comments
Post a Comment