Thank you.

I implemented this and mail sourced externally comes in, postfix tries to relay and loops back on itself. Mail sourced from the server seems to be routing correctly. I've tried updating /etc/hosts and changing the /etc/postfix/transport to an IP. The issue still persists.

Any ideas?

Thanks,
Hank

On 3/31/15 7:50 PM, Noel Jones wrote:
On 3/31/2015 5:25 PM, Hank Beatty wrote:
Hello,

I'm new to postfix and I inherited a server that was already
configured with the below. I need to relay subdomain.ni.example.com
to another server. I looked at the documentation and it seemed
pretty straight forward
Yes, add the domain to relay_domains, add a transport_maps entry
pointing to where the server where the domain should be delivered.

until I ran into the fact that the
ni.example.com was already being relayed.
I see no evidence of that.  The
relay_domains = $mydestination
is a legacy default setting, and does not override normal local
delivery of domains listed in mydestination.

What I found interesting
is that it is being relayed to local (I think) and the previous
admin is using the luser_relay.
luser_relay is a catch-all delivery address for unknown local
recipients.
http://www.postfix.org/postconf.5.html#luser_relay

Catch-all addresses were widely used back in ancient days, but are
highly discouraged now.  Valid recipients should be listed in
local_recipient_maps, and unknown recipients should be rejected
during SMTP.

But this is something you can work on later...

Can you help me relay subdomain.ni.example.com to another host
(mailhost2.ni.example.com) without breaking what is already in place
and working?
In your case, you should be able to remove the legacy
relay_domains = $mydestination
and replace it with
relay_domains = subdomain.ni.example.com

Then add a transport_maps entry so postfix knows where to direct
that mail.
# main.cf
transport_maps = hash:/etc/postfix/transport

# transport
subdomain.ni.example.com  relay:some.server.example.com

If you're nervous about this, you can temporarily activate the
safety net:
# main.cf
soft_bounce = yes
http://www.postfix.org/postconf.5.html#soft_bounce
** remove the safety net once you've verified proper operation **


   -- Noel Jones


Thanks,
Hank

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = $myhostname, localhost
inet_protocols = all
local_recipient_maps =
luser_relay = $u...@ni.example.com
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = ni.example.com
myhostname = engbook.ni.example.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
recipient_delimiter = +
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_enforce_tls = no
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_loglevel = 1
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550

Reply via email to