The easiest approach is to configure ONE Postfix instance with
multiple SMTP server IP addresses in
master.cf:
-
Two SMTP server IP addresses for mail from inside users only,
with content filtering turned off.
/etc/postfix.
master.cf:
# ==================================================================
# service type private unpriv chroot wakeup maxproc command
# (yes) (yes) (yes) (never) (100)
# ==================================================================
1.2.3.4:smtp inet n - n - - smtpd
-o
smtpd_client_restrictions=
permit_mynetworks,reject
127.0.0.1:smtp inet n - n - - smtpd
-o
smtpd_client_restrictions=
permit_mynetworks,reject
-
One SMTP server address for mail from outside users with
content filtering turned on.
/etc/postfix.
master.cf:
# =================================================================
# service type private unpriv chroot wakeup maxproc command
# (yes) (yes) (yes) (never) (100)
# =================================================================
1.2.3.5:smtp inet n - n - - smtpd
-o
content_filter=filter-service:filter-destination
-o
receive_override_options=
no_address_mappings
After this, you can follow the same procedure as outlined in
the "advanced" or "simple" content filtering examples above, except
that you must not specify "
content_filter" or "
receive_override_options"
in the
main.cf file.