1

We run a postfix mail server which receives mail from a issue tracking system.

We do sender based routing, and only 4 next hops are configured.

I want to restrict this postfix, so that it never tries to connect to internet for sending mails.

The sender based routing works since several months.

But sometimes there are errors (wrong sender information) and postfix does not take one of our defined 4 next hops, but tries to send this mail via internet (mx record lookup, ...).

How to restrict postfix to not send via internet?

Next question would be: What should postfix do, if none of our sender based rules match?

3

By default Postfix will use smtp as transport method when none of the sender based rules is matched.

See: http://www.postfix.org/postconf.5.html#default_transport

default_transport (default: smtp)

The default mail delivery transport and next-hop destination for destinations that do not match $mydestination, $inet_interfaces, $proxy_interfaces, $virtual_alias_domains, $virtual_mailbox_domains, or $relay_domains. This information can be overruled with the sender_dependent_default_transport_maps parameter and with the transport(5) table.

In order of decreasing precedence, the nexthop destination is taken from $sender_dependent_default_transport_maps, $default_transport, $sender_dependent_relayhost_maps, $relayhost, or from the recipient domain.

Specify a string of the form transport:nexthop, where transport is the name of a mail delivery transport defined in master.cf. The :nexthop destination is optional; its syntax is documented in the manual page of the corresponding delivery agent.

Example:

default_transport = uucp:relayhostname

To override this, as mentioned above, you can set default_transport parameter directly in main.cf. All the available options you can see under Example in http://www.postfix.org/transport.5.html.

For your sender based routing or transport rule you can put an wildcard entry (*) at the end which will be matched for "all other sender domains that not defined explicitly" and point it to any of your available next hop or something else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.