Discussion:
Postfix 2.8.1 relayhost configuration problem
(too old to reply)
Bob Proulx
2011-02-23 23:02:04 UTC
Permalink
Today I upgraded a machine from the older 2.7.x series to the latest
2.8.1 and found a difference. This is from Debian Sid.

My previous relayhost configuration was:

$ postconf relayhost
relayhost = [mail]

$ host -t a mail
mail.proulx.com has address 192.168.9.3

$ cat /etc/resolv.conf
nameserver 127.0.0.1
search proulx.com

That configuration has been working for quite a few years. But in
version 2.8.1 from Debian Sid I see that short host names without a
domain name are no longer resolved.

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
81CB02DC4D 1313 Wed Feb 23 13:22:36 ***@proulx.com
(Host or domain name not found. Name service error for name=mail type=A: Host not found)
***@example.com

Feb 23 13:22:36 hysteria postfix/smtp[18670]: warning: relayhost configuration problem

Of course changing the relayhost to be any of the following corrects
the problem. (The last one "[mail.$mydomain]" is fine for me.)

relayhost = [192.168.230.3]
relayhost = [mail.proulx.com]
relayhost = [mail.$mydomain]

I browsed the changelogs and release notes but didn't see anything
that seemed to specifically address this topic.

The documentation says:

http://www.postfix.org/postconf.5.html#relayhost

On an intranet, specify the organizational domain name. If your
internal DNS uses no MX records, specify the name of the intranet
gateway host instead.

In the case of SMTP, specify a domain name, hostname, hostname:port,
[hostname]:port, [hostaddress] or [hostaddress]:port. The form
[hostname] turns off MX lookups.

Examples:
relayhost = $mydomain
relayhost = [gateway.example.com]
relayhost = uucphost
relayhost = [an.ip.add.ress]

Of course neither of the examples are short names and the words used
in the description don't say either. It has worked before. (shrug)

Is this an intentional change? Or just something that slipped in?

I am fine with it being an intentional change. But it had always
worked previously, I didn't find any explicit documentation of the
change, and so here I am asking for a clarification of intent.

Thanks!
Bob
Wietse Venema
2011-02-23 23:47:17 UTC
Permalink
Post by Bob Proulx
Today I upgraded a machine from the older 2.7.x series to the latest
2.8.1 and found a difference. This is from Debian Sid.
Please, review the RELEASE_NOTES file and look for the
section titled "Major changes - dns lookup.

If this file is not installed please complain to the
maintainer.

I'm sure you will appreciate the great effort that goes
into documenting Postfix.

Wietse
Post by Bob Proulx
$ postconf relayhost
relayhost = [mail]
$ host -t a mail
mail.proulx.com has address 192.168.9.3
$ cat /etc/resolv.conf
nameserver 127.0.0.1
search proulx.com
That configuration has been working for quite a few years. But in
version 2.8.1 from Debian Sid I see that short host names without a
domain name are no longer resolved.
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
(Host or domain name not found. Name service error for name=mail type=A: Host not found)
Feb 23 13:22:36 hysteria postfix/smtp[18670]: warning: relayhost configuration problem
Of course changing the relayhost to be any of the following corrects
the problem. (The last one "[mail.$mydomain]" is fine for me.)
relayhost = [192.168.230.3]
relayhost = [mail.proulx.com]
relayhost = [mail.$mydomain]
I browsed the changelogs and release notes but didn't see anything
that seemed to specifically address this topic.
http://www.postfix.org/postconf.5.html#relayhost
On an intranet, specify the organizational domain name. If your
internal DNS uses no MX records, specify the name of the intranet
gateway host instead.
In the case of SMTP, specify a domain name, hostname, hostname:port,
[hostname]:port, [hostaddress] or [hostaddress]:port. The form
[hostname] turns off MX lookups.
relayhost = $mydomain
relayhost = [gateway.example.com]
relayhost = uucphost
relayhost = [an.ip.add.ress]
Of course neither of the examples are short names and the words used
in the description don't say either. It has worked before. (shrug)
Is this an intentional change? Or just something that slipped in?
I am fine with it being an intentional change. But it had always
worked previously, I didn't find any explicit documentation of the
change, and so here I am asking for a clarification of intent.
Thanks!
Bob
Bob Proulx
2011-02-24 00:07:08 UTC
Permalink
Post by Wietse Venema
Post by Bob Proulx
Today I upgraded a machine from the older 2.7.x series to the latest
2.8.1 and found a difference. This is from Debian Sid.
Please, review the RELEASE_NOTES file and look for the
section titled "Major changes - dns lookup.
Ah! I see it now. I had browsed that file but did not pick that item
out from the other changes.

http://postfix.energybeam.com/source/official/postfix-2.8.1.RELEASE_NOTES

[Incompat 20100827] The Postfix SMTP client no longer appends the
local domain when looking up a DNS name without ".". Specify
"smtp_dns_resolver_options = res_defnames" to get the old behavior,
which may produce unexpected results.

Very good. It is an intentional change. Thank you for helping me
find that item. If nothing else this message should help others
looking at search engines to find it.
Post by Wietse Venema
If this file is not installed please complain to the maintainer.
That file is included in the stock distribution package. No need for
any complaints there. However I had actually looked in the pristine
upstream distribution.
Post by Wietse Venema
I'm sure you will appreciate the great effort that goes
into documenting Postfix.
It is a very large task and one that has been accomplished amazingly
well.

Thank you for your time and effort with Postfix!

Bob

Loading...