* [pmg-devel] [PATCH pmg-api 1/1] fix #3712: strip trailing dot from searchdomain
@ 2021-11-22 19:49 Stoiko Ivanov
2021-11-23 11:52 ` [pmg-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2021-11-22 19:49 UTC (permalink / raw)
To: pmg-devel
having a trailing '.' in the search domain is perfectly legal syntax
(for domain names in general). postfix refuses to use a fqdn with
trailing dot as hostname[0].
The restriction might be due to section 2.3.5 (Domain Names) of
RFC5321 (a top-level domain is a single string without any dots) [1]
[0] src/util/valid_hostname.c in the postfix source
[1] https://datatracker.ietf.org/doc/html/rfc5321#section-2.3.5
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/Config.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index cbcda6e..31f9c6f 100755
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -1278,6 +1278,8 @@ sub get_host_dns_info {
my $resolv = PVE::INotify::read_file('resolvconf');
my $domain = $resolv->{search} // 'localdomain';
+ # postfix will not parse a hostname with trailing '.'
+ $domain =~ s/^(.*)\.$/$1/;
$dnsinfo->{domain} = $domain;
$dnsinfo->{fqdn} = "$nodename.$domain";
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pmg-devel] applied: [PATCH pmg-api 1/1] fix #3712: strip trailing dot from searchdomain
2021-11-22 19:49 [pmg-devel] [PATCH pmg-api 1/1] fix #3712: strip trailing dot from searchdomain Stoiko Ivanov
@ 2021-11-23 11:52 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-23 11:52 UTC (permalink / raw)
To: Stoiko Ivanov, pmg-devel
On 22.11.21 20:49, Stoiko Ivanov wrote:
> having a trailing '.' in the search domain is perfectly legal syntax
> (for domain names in general). postfix refuses to use a fqdn with
> trailing dot as hostname[0].
>
> The restriction might be due to section 2.3.5 (Domain Names) of
> RFC5321 (a top-level domain is a single string without any dots) [1]
>
> [0] src/util/valid_hostname.c in the postfix source
> [1] https://datatracker.ietf.org/doc/html/rfc5321#section-2.3.5
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> src/PMG/Config.pm | 2 ++
> 1 file changed, 2 insertions(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-23 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 19:49 [pmg-devel] [PATCH pmg-api 1/1] fix #3712: strip trailing dot from searchdomain Stoiko Ivanov
2021-11-23 11:52 ` [pmg-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal