Discussion:
Name service error for name=localhost type=A: Host not found'
(too old to reply)
Wietse Venema
2004-01-06 17:20:09 UTC
Permalink
On Tuesday, January 06, 2004 at 17:49 CET,
Here is the error message that I get for my outbound e-mail. Not sure
what to fix on this one.
Reporting-MTA: dns; odie.mojowares.com
Arrival-Date: Tue, 6 Jan 2004 11:38:39 -0500 (EST)
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; Name service error for name=localhost
type=A: Host not found
Are you running Postfix chrooted with an incorrect /etc/hosts?
add localhost to mydestination:

/etc/postfix/main.cf:
mydestination = $myhostname, localhost.$mydomain, localhost
Lee Dehmer
2004-01-06 17:56:01 UTC
Permalink
Post by Wietse Venema
Are you running Postfix chrooted with an incorrect /etc/hosts?
mydestination = $myhostname, localhost.$mydomain, localhost
Made the changes to the main.cf and restarted Postfix. Still no go :(

Postfix was setup by SuSE so I do belive that it is running chrooted. Where
do I find the info to change ofr the hosts file?

Thanks,
Lee
Wietse Venema
2004-01-06 18:18:44 UTC
Permalink
Post by Lee Dehmer
Post by Wietse Venema
Are you running Postfix chrooted with an incorrect /etc/hosts?
mydestination = $myhostname, localhost.$mydomain, localhost
Made the changes to the main.cf and restarted Postfix. Still no go :(
Postfix was setup by SuSE so I do belive that it is running chrooted. Where
do I find the info to change ofr the hosts file?
chroot operation is controlled by the master.cf file. Turn it on
only if you have special security requirements.

Wietse
Lee Dehmer
2004-01-06 21:19:12 UTC
Permalink
Post by Wietse Venema
chroot operation is controlled by the master.cf file. Turn it on
only if you have special security requirements.
Wietse
Here are my setting from master.cf
If I am looking at this right I do not think it runs as a chroot. Any still
can not see why I get the localhost error :(

Lee

# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 2 smtpd
#smtps inet n - n - 2 smtpd -o
smtpd_tls_wrappermode=yes -o content_filter=smtp:[localhost]:10024
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
localhost:10025 inet n - n - - smtpd -o
content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
vscan unix - n n - 10 pipe
user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail unix - n n - - pipe
Wietse Venema
2004-01-06 21:34:26 UTC
Permalink
Post by Lee Dehmer
Post by Wietse Venema
chroot operation is controlled by the master.cf file. Turn it on
only if you have special security requirements.
Wietse
Here are my setting from master.cf
If I am looking at this right I do not think it runs as a chroot. Any still
can not see why I get the localhost error :(
[no chroot daemons]

The name localhost is not found in the DNS, and either 1) the
Postfix SMTP client does not look in /etc/hosts (depends on Postfix
version if you can turn on /etc/hosts lookup in the Postfix SMTP
client, see: man 8 smtp) or 2) localhost is not defined in /etc/hosts,
or 3) the file directory permissions are incorrect on

(assuming Linux):
/
/etc
/etc/nsswitch.conf
/etc/hosts
/lib
/lib/libnss*

Files need chmod a+r, directories need chmod a+rx.

It's also possible that some third-party library does DNS lookups
from within Postfix without explicitly setting the DNS resolver
options. Postfix has workarounds for that in December 2003 snapshots.

Good luck.

Wietse

Loading...