Support

Guides, Articles and Frequently Asked Questions






  Index | Installation

How do I set up PostFix to accept incoming messages only from the EuropeanMX servers?


To limit the delivery of incoming messages in PostFix to EuropeanMX servers, please follow the steps below.

Variant 1: Limit delivery of messages for all domains of the server to EuropeanMX

1

Create a file /etc/postfix/access and add the following content:

185.201.16.200 OK
185.201.17.200 OK
185.201.18.200 OK
185.201.19.200 OK
antispamcloud.com OK

2

Execute the following command:

postmap /etc/postfix/access

3

Add the following content to the /etc/postfix/main.cf file

smtpd_client_restrictions = check_client_access hash:/etc/postfix/access, permit_mynetworks, reject

Or if you have already defined "smtpd_client_restrictions", add the following at the beginning of your definition and replace "permit" with "reject" at the end: 

"check_client_access hash:/etc/postfix/access"

4

Restart PostFix.

/etc/init.d/postfix restart

Variant 2: Limit delivery of messages for certain domains to EuropeanMX

1

Add the following content to the /etc/postfix/main.cf file:

smtpd_restriction_classes = EuropeanMX
EuropeanMX = check_client_access hash:/etc/postfix/EuropeanMX, reject
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

2

Create the file /etc/postfix/EuropeanMX with the following content:

antispamcloud.com OK

If you also send and receive internal messages, then you must also add the localhost and localdomain to the file in the following format

domain.example OK
localhost OK
localdomain OK

3

Create the file /etc/postfix/protected_destinations and add the domain(s) you want to restrict in the following format:

example.com EuropeanMX

example.net EuropeanMX

4

Postmap both files.

postmap /etc/postfix/EuropeanMX

postmap /etc/postfix/protected_destinations

5

Restart PostFix in order to apply the changes.


Was this article helpful?




We use cookies for the technical functionality of this website. With your consent, we also collect page views and other statistical data in anonymized form.

Accept all cookies Select individually
Cookie Settings
Read Privacy Statement