OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
unable to resolve localhost for relayhost?

From: Albrecht Dreß (albrecht.dressarcor.de)
Date: Wed Oct 04 2006 - 11:04:07 CDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I used postfix 2.1 on a FC 3 box without any problem. The configuration
is a little weird, as the relayhost is localhost listening on port 587
which is actually the end of a ssh tunnel to an other machine running
postfix. This setup is necessary to "work around" a firewall which I
cannot control and where the admin is unwilling to open port 25 or 587
directly...

This setup worked perfectly until I upgraded to FC 4 which ships with
postfix-2.2.2-2. Now the relayhost connect attempts always fail with
the following messages:

<snip>
postfix/smtp[2677]: warning: relayhost configuration problem
postfix/smtp[2677]: 6AC8F795F: to=<albrecht.dressarcor.de>, relay=none,
delay=0, status=deferred (Host or domain name not found. Name service
error for name=localhost type=A: Host not found)
</snip>

localhost /is/ in /etc/hosts (i.e. 'ping localhost' works), and I don't
use postfix in a chroot jail (/var/spool/postfix/etc doesn't even
exist). Changing the relayhost definition to relayhost=127.0.0.1:587
properly transmits messages through the ssh tunnel, but I don't think
this is a real "resolution" of the problem. Any ideas where I should
look? My "postconf -n" output is below.

Thanks in advance,
Cheers,
Albrecht.

<snip>
[rootantares ~]# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = $myhostname, localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 20971520
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES
relayhost = [localhost]:587
sample_directory = /usr/share/doc/postfix-2.2.2/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/scan_rcpt check_client_access
hash:/etc/postfix/access reject
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450
</snip>

- --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)
       Phone (+49) 228 6199571 - mailto:albrecht.dressarcor.de
   GnuPG public key: http://home.arcor.de/dralbrecht.dress/pubkey.asc
_________________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFI9t3n/9unNAn/9ERAjixAKDI+yjLBWf5rOw1EunFDYqSKJ0u2wCghrPU
dywSpFSKITbbSH3LkoDkpjA=
=+aUo
-----END PGP SIGNATURE-----