Configure Incoming Filtering with Postfix

To restrict deliveries to your Postfix server from our filtering nodes and IP addresses, complete the below steps:

  1. Create the file /etc/postfix/access with the content:
  2. OK
  3. Execute the command:
  4. postmap /etc/postfix/access

  5. Either:
    1. Add the following to /etc/postfix/
      smtpd_client_restrictions = check_client_access hash:/etc/postfix/access, 
      permit_mynetworks, reject
    2. OR

    3. If you already have smtpd_client_restrictions defined in /etc/postfix/, insert the following at the beginning of your definition and replace permit with reject at the end of definition:

      "check_client_access hash:/etc/postfix/access"

  6. Reload the Postfix configuration by executing the following command:
  7. sudo postfix reload

  8. Restart Postfix by executing the following command:
  9. /etc/init.d/postfix restart

Per domain setup

It's also possible with Postfix to configure the MTA to only allow connections from the Spam Experts servers for specific protected domains:

  1. Add the following to the
  2. smtpd_restriction_classes = Spam ExpertsSpam Experts = check_client_access hash:/etc/postfix/Spam Experts, reject
    smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  3. Create the following file:
  4. /etc/postfix/Spam Experts
    1. Add the following content:
    2. OK

      If you send or receive any internal mail, you will need to also add your domain, localhost and the local domain in the following format:
      demo-domain.invalid OK
      localhost OK
      localdomain OK

  5. Create the following file:
  6. /etc/postfix/protected_destinations

    1. Add the domains that you want to configure:
    2. demo-domain.invalid Spam Experts

  7. Postmap both files:
  8. postmap /etc/postfix/Spam Experts

    postmap /etc/postfix/protected_destinations

  9. Reload the Postfix configuration by executing the following command:
  10. sudo postfix reload

  11. Restart Postfix by executing the following command:
  12. /etc/init.d/postfix restart

Local Cloud

Replace with your servers root hostname.

Disclaimer: This documentation may contain references to third party software or websites. N-able has no control over third party software or content and is not responsible for the availability, security, or operation, of any third-party software. If you decide to utilize a release involving third-party software, you do so entirely at your own risk and subject to the applicable third party’s terms and conditions of the use of such software. No information obtained by you from N-able or this documentation shall create any warranty for such software.