Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Postfix adds the sender to the blacklist

Shulou Source: shulou.com Published: 2022-06-01 03:22:22 10月04日 Update

1. Edit configuration file

# vi / etc/postfix/main.cf add the following line smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

two。 Create a blacklist list

# vi / etc/postfix/sender_accesstest@example.com REJECT # reject the sender exmaple.com REJECT # reject the domain name 1.2.3.4 REJECT # reject IP

3. Generate blacklist database

# postmap / etc/postfix/sender_access# ll / etc/postfix/sender_access.db

4. Restart the postfix service

# / etc/init.d/postfix reload

5. If you remove the sender from the blacklist, you need to delete the sender

# postmap / etc/postfix/sender_access# / etc/init.d/postfix reload

Once the result has been tested, the test content will not be posted.

Tags: Sender blacklist blackname test line content domain name data database file result service generation configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft macOS Xiaomi OPPO Reno