dig and nameserver - where from dig should get anwser?

Discussion in 'General' started by tom, Nov 8, 2006.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add "localhost.localdomain" to the line that starts with 127.0.0.1 in your /etc/hosts file.
     
  2. tom

    tom Member

    localhost.localdomain is already there but still the undelivered mails after changing resolv.conf as descripted above.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/hosts, and what's the output of
    Code:
    ifconfig
    ? What's in /etc/postfix/main.cf (please strip out the comments)?
     
  4. tom

    tom Member

    127.0.0.1 localhost
    10.0.1.1 server-1.de server-1.de server01
    localhost.localdomain

    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    server01:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 00:16:3E:0A:01:11
    inet addr:10.0.1.1 Bcast:10.0.255.255 Mask:255.255.0.0
    inet6 addr: fe80::216:3eff:fe01:111/64 Scope:Link
    UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3105 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2861 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1248855 (1.1 MiB) TX bytes:503593 (491.7 KiB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1006 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1006 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:62093 (60.6 KiB) TX bytes:62093 (60.6 KiB)

    server01:~# grep ^[^#].* /etc/postfix/main.cf
    smtpd_banner = $myhostname ESMTP
    biff = no
    append_dot_mydomain = no
    myhostname = server-1.de
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.server-1.de, server-1.de, localhost.de, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    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/
    virtual_maps = hash:/etc/postfix/virtusertable
     
    Last edited: Nov 21, 2006
  5. falko

    falko Super Moderator Howtoforge Staff

    That's wrong. It must be
    Code:
    127.0.0.1 [B][COLOR="Red"]localhost.localdomain[/COLOR][/B] localhost
    10.0.1.1 server-1.de server01
    
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    instead.
     
  6. tom

    tom Member

     
    Last edited: Nov 23, 2006
  7. falko

    falko Super Moderator Howtoforge Staff

    Please run
    Code:
    postconf -e 'mydestination = /etc/postfix/local-host-names'
    and add localhost.localdomain to /etc/postfix/local-host-names at the bottom (if it's not in there already). Then restart Postfix.
     
  8. tom

    tom Member

    It seems to be ok now :)

    I've done what you had commended. Then I got an similar "loops back to myself" notice. It works whith "postconf -e 'mydestination = /etc/postfix/local-host-names'" but even it did'nt seems the best solution to point postfix to every virtualdomain. So I've tried a few setting in localhostnames and at least I only had to add "localhost.localdomain" to my destination. In /etc/postfix/local-host-names I add "localhost.localdomain" and another "loops back.." notice entry.

    Now, if I use dig, dig ist asking the local nameserver bind9 and if its does'nt know the anwser the local bind will ask one of the dns-resolvers. So the local nameserver bind9 will be able to anwser the most usual dns questions very fast be using its cache.

    Many thanks for your help, falko
     
    Last edited: Nov 24, 2006

Share This Page