bind, dns, and sendmail

Kevin Darcy kcd at daimlerchrysler.com
Wed Aug 6 23:55:19 UTC 2003


"Murphy B. S. Dee." wrote:

> 1) freebsd 4.8, bind 8.3.4, sendmail v 8.12.8, apache 2.044
>
> 2) web server works great, can resolve from inside ok, can also send and
> receive email with the following unresolved issue.
>
> 3) I am trying to resolve an issue with sendmail. Regardless of the account
> from which I want to send my email, the source address is always:
> account at ns.domain.com. As an example, suppose I have a virtual site
> domain1.com with a user account called luser. If I were to send an email
> form this account it would appear in mutt or mail as: luser at ns.domain.com,
> not luser at domain1.com. The hostname of my server from rc.conf is
> ns.domain.com. Here are my files, with real names changed to generic for
> simplicity.
>
> /etc/resolv.conf
> domain    domain.com
> nameserver 127.0.0.1
> nameserver x.x.x.x (my public IP address of the server)
> nameserver y.y.y.y (dns server of my ISP)
>
> /etc/hosts
> ::1        localhost localhost.domain.com
> 127.0.0.1     localhost
> x.x.x.x     ns     ns.domain.com
> x.x.x.x     ns.domain.com.
>
> Virtusertable:
> sa at domain.com  sa
> @domain.com  error:nouser The User Does Not Exist
> luser at domain1.com luser
> @domain1.com error:nouser The User Does Not Exist
>
> senmail.cw
> domain.com
> domain1.com
>
> domain.com.fwd
> $TTL 3600
> @ IN SOA domain.com. sa.domain.com.  (
>     20030726302 ; Serial
>     21600  ; Refresh
>     1800  ; Retry
>     1209600  ; Expire
>     432000 ) ; Minimum
>  IN NS ns.domain.com.
>  IN NS clgrps01.agt.net.
>  IN MX 10 ns.domain.com.
>  IN MX 20 smtp.telus.com.
>  IN MX 30 smtp1.telus.com.
> www IN A x.x.x.x
> ftp IN CNAME www
>
> domain1.com.fwd
> $TTL 3600
> @ IN SOA domain1.com. sa.domain.com.  (
>     20030726302 ; Serial
>     21600  ; Refresh
>     1800  ; Retry
>     1209600  ; Expire
>     432000 ) ; Minimum
>  IN NS ns.domain.com.
>  IN NS clgrps01.agt.net.
>  IN MX 10 ns.domain.com.
>  IN MX 20 smtp.telus.com.
>  IN MX 30 smtp1.telus.com.
> www IN A x.x.x.x
> ftp IN CNAME www
>
> If I issue the command hostname, I get ns.domain.com.
> If I issue the command host ns.domain.com, I get Host not found.
> If I issue the command nslookup ns.domain.com, I get Server: ns.domain.com,
> Address: 127.0.0.1, ns.domain.com can't find ns.domain.com. Non-existent
> host/domain.
> If I dig domain.com or domain1.com, I get appropriate responses.
> If I issue the netstat command, I get:
> tcp  localhost.domain LISTEN
> tcp  ns.domain LISTEN
> Note: the output of the two tcp statements are actual values, that is, it
> does say localhost.domain and ns.domain, not the actual values of my virtual
> host/server.
>
> I am thinking that my sendmail issues are related to bind/dns. Can anyone
> offer suggestions as where to look to help resolve this issue?

Have you defined an A record for ns.domain.com?

Is your machine even configured to use DNS for name resolution (see
/etc/nsswitch.conf)?

Why is ns.domain.com in your /etc/hosts file twice (once with a terminating dot
and once without)?


- Kevin

P.S. Genericizing the names doesn't making troubleshooting any *simpler*. In
fact, quite the opposite...



More information about the bind-users mailing list