I'm working on a 'front-end' Postfix server to receive and relay mail,
forwarding it only to one, specific 'back-end' Postfix server.
It works using the following simple configurations
cat ./master.cf
...
local_transport = error:5.1.1 no local delivery
relay_domains = MYDOMAIN1.com MYDOMAIN2.com
relay_recipient_maps =
transport_maps = lmdb:/etc/postfix/transport
...
cat ./transport
MYDOMAIN1.com relayTEST:[10.2.0.17]:10015
MYDOMAIN2.com relayTEST:[10.2.0.17]:10015
cat ./main.cf
smtp inet n - n - 1
postscreen
-o smtpd_tls_security_level=may
smtpd pass - - n - -
smtpd
relayTEST unix - - n - -
smtp
-o smtpd_tls_loglevel=1
-o smtp_tls_cert_file=/etc/postfix/ssl/relay.crt
-o smtp_tls_key_file=/etc/postfix/ssl/relay.key
Since I will always and only relay to a single server, [10.2.0.17]:10015, for
all domains, per-domain ./transport seems unncessary.
I want to use a simpler, general, !per-domain form, and tie it only to the
relay-of-inbound-mail process since I'll be adding other, outbound process
later.
So reading
http://www.postfix.org/postconf.5.html#relay_transport
relay_transport (default: relay)
The default mail delivery transport and next-hop
destination for remote delivery to domains listed with $relay_domains. In order
of decreasing precedence, the nexthop destination is taken from
$relay_transport, $sender_dependent_relayhost_maps, $relayhost, or from the
recipient domain. This information can be overruled with the transport(5)
table.
I tried instead
cat ./master.cf
...
- transport_maps = lmdb:/etc/postfix/transport
+ #transport_maps = lmdb:/etc/postfix/transport
...
cat ./main.cf
...
smtpd pass - - n - -
smtpd
+ -o relay_transport=relayTEST:[10.2.0.17]:10015
relayTEST unix - - n - -
smtp
...
but on mail receipt it now fails with
May 18 05:14:22 yoda postfix/smtpd[20977]: NOQUEUE: reject: RCPT from
d.mail.sonic.net[64.142.111.50]: 550 5.1.1 <[email protected]>:
Recipient address rejected: local delivery is disabled; from=<[email protected]>
to=<[email protected]> proto=ESMTP helo=<d.mail.sonic.net>
I'm not sure if I'm using the wrong parameter, or the wrong location for it :-/
What's the right parameter & location in main.cf to do this override?