Extra domain name added to DNS queries

Dears,

I am doing something fundamental fundamentally wrong with the configuration of name resolution in my FreeBSD 14.1-RELEASE-p5 box. In /etc/rc.conf, I have tried setting hostname to both a single string and to a FQDN string. In /etc/resolv.conf, I have told to use the local computer as the nameserver, and there are no other directives in resolv.conf. In /etc/hosts, I have told that 127.0.0.1 and ::1 are localhost localhost.thenameofmydomain and the short name for my server.

When I then send mail from a cron job using biabam, I can see in dnsmasq log (/var/log/dnsmasq.log), which has query logging enabled, that the computer is querying for the external mail server, mxavas.forpsi.com, but is adding an extra string to the end, and the extra string is the name of my domain. EDIT: However, my mail is sent out as it should, and I don't see an error message anywhere, including in root's local mailbox.

Dnsmasq has expand-hosts not on.

What am I doing wrong? How should I do it right?

Thank you.
 
Hello!
it's like that first attempt is to find remote host in your local domain, witch failed and logged.
Second attempt goes normally.
Can you show string "hosts" in /etc/nsswitch.conf ?
 
Hello!
it's like that first attempt is to find remote host in your local domain, witch failed and logged.
Second attempt goes normally.
Can you show string "hosts" in /etc/nsswitch.conf ?
Code:
#
# nsswitch.conf(5) - name service switch configuration file
#
group: compat
group_compat: nis
hosts: files dns
netgroup: compat
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
 
Code:
#
# nsswitch.conf(5) - name service switch configuration file
#
group: compat
group_compat: nis
hosts: files dns
netgroup: compat
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files

I'm not sure, but try to change order
hosts: files dns
to
hosts: dns files
 
I'm not sure, but try to change order
hosts: files dns
to
hosts: dns files
Thank you. I did try that, and it does not fix the issue. Now it seems to be restricted to the MTA producing the extra domain for the query, while connected clients no longer produce the extra domain.
 
Try adding domain thenameofmydomain to resolv.conf.

Code:
     domain      Local domain name.  Most queries for names within this domain
                 can use short names relative to the local domain.  If no
                 domain entry is present, the domain is determined from the
                 local host name returned by gethostname(3); the domain part
                 is taken to be everything after the first ‘.’.  Finally, if
                 the host name does not contain a domain part, the root domain
                 is assumed.

And hostname= in rc.conf should have the FQDN.
 
Try adding domain thenameofmydomain to resolv.conf.

Code:
     domain      Local domain name.  Most queries for names within this domain
                 can use short names relative to the local domain.  If no
                 domain entry is present, the domain is determined from the
                 local host name returned by gethostname(3); the domain part
                 is taken to be everything after the first ‘.’.  Finally, if
                 the host name does not contain a domain part, the root domain
                 is assumed.

And hostname= in rc.conf should have the FQDN.
Thank you. Trying now and rebooting to be on the safer side. I did not have the domain directive in resolv.conf, while the hostname was the FQDN. Will let you all know.
 
Thank you. Trying now and rebooting to be on the safer side. I did not have the domain directive in resolv.conf, while the hostname was the FQDN. Will let you all know.
Nope. That did not work. I still get, using either biabam or mutt, this
Code:
query[AAAA] mxavas.forpsi.com.tarmo.cz from 10.168.0.32
in the dnsmasq log. It does not affect the actual success of the mailing, but it does get logged. Here, 10.168.0.32 is the FreeBSD server that also runs dnsmasq, and it is the computer that sends out the attachment. The suffix in the query is the domain associated with me.
 
Back
Top