Name service error for name=localhost.localdomain type=A: Host not found

Discussion in 'Server Operation' started by savago, Sep 26, 2008.

  1. savago

    savago Member

    cd /var/log
    tail -f maillog
    Sep 26 09:50:32 server1 sendmail[4481]: m8Q6oVXu004481: [email protected], ctladdr=web15_user (10020/10015), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30123, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 0C42728680D8)
    Sep 26 09:50:32 server1 postfix/smtp[2842]: 0C42728680D8: to=<[email protected]>, relay=none, delay=0.13, delays=0.13/0/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=localhost.localdomain type=A: Host not found)

    cd /etc
    cat hosts

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost www
    domain.com server1.domain.com server1
    ::1 localhost6.localdomain6 localhost6

    cd /etc/postfix
    cat local-host-names
    localhost
    server1.domain.com
    localhost.server1.domain.com
    localhost.domain.com
    localhost.localdomain
    www.domain.com

    cat main.cf

    ...smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_unlisted_recipient,
    reject_unknown_recipient_domain,
    reject_unverified_recipient,
    reject_rbl_client dsn.rfc-ignorant.org,
    reject_rbl_client zen.spamhaus.org,
    reject_rbl_client bl.spamcop.net,
    reject_rbl_client dnsbl.sorbs.net,
    reject_rbl_client cbl.abuseat.org,
    permit

    mynetworks = 127.0.0.0/8
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    home_mailbox = Maildir/
    mailbox_command =


    smtpd_etrn_restrictions = reject
    smtpd_reject_unlisted_sender = yes
    disable_vrfy_command = yes
    strict_rfc821_envelopes = yes
    #show_user_unknown_table_name = no
    address_verify_sender = <>
    smtpd_helo_required = yes
    smtp_always_send_ehlo = yes
    smtpd_hard_error_limit = 8


    #virtual_maps = hash:/etc/postfix/virtusertable
    #mydestination = /etc/postfix/local-host-names

    myhostname = server1.domain.com
    mydomain = domain.com
    myorigin = $mydomain
    mydestination = $myhostname, localhost.$mydomain, localhost


    [root@server1 log]# telnet localhost.localdomain 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 server1.domain.com ESMTP Postfix
    ehlo server1.domain.com
    250-server1.domain.com
    250-PIPELINING
    250-SIZE 10240000
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
     
    Last edited: Sep 26, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Please try this:
    Code:
    postconf -e 'smtp_host_lookup = dns, native'
    and restart Postfix.
     

Share This Page