Type=AAAA: Host not found (...)

Discussion in 'Installation/Configuration' started by farao, Nov 6, 2006.

  1. falko

    falko Super Moderator ISPConfig Developer

    Please post your /etc/postfix/main.cf.
    What's in /etc/hosts and /etc/resolv.conf?
     
  2. farao

    farao New Member

    Here's the files...
    main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = atlas.manaxa.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = atlas.manaxa.com, localhost.manaxa.com, , localhost
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    #home_mailbox = Maildir/
    #mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    #inet_protocols = all
    inet_protocols = ipv4
    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,check_policy_service inet:127.0.0.1:60000
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination, permit
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    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
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    transport_maps = hash:/etc/postfix/transport
    mailman_destination_recipient_limit = 1
    local_recipient_maps = 
    #relay_domains = $mydestination
    inet_interfaces = all
    
    hosts
    Code:
    127.0.0.1 localhost.localdomain localhost atlas.manaxa.com
    10.0.0.33 atlas.manaxa.com atlas www.manaxa.com mail.manaxa.com manaxa.com www.stecher.org mail.stecher.org stecher.org
    
    # The following lines are desirable for IPv6 capable hosts
    ::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
    
    and resolv.conf
    Code:
    domain manaxa.com
    nameserver 10.0.0.138
    #nameserver 194.109.6.66
    #nameserver 194.109.9.99
    
    10.0.0.138 is my speedtouch router to the adsl connection.

    I've found one odd thing: If I do a dig on my server (from that server), I get the external IP returned, instead of the internal one. I tell the machine to use the hosts-file first (in hosts.conf), but it just goes straight out, finds the external IP, and doesn't come back in again.
    The same goes for nslookups, it returns the external IP, and says the nameserver used is 10.0.0.138. How can I make my server check its hostsfile first?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you use the command syntax:

    dig @localhost yourdomain.com

    executed on your server?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Also, what's in your /etc/host.conf?
     
  5. farao

    farao New Member

    Hi Till,
    Yes, I did: it just goes straight out on the net... (compare hosts-file posted earlier)
    Code:
    ; <<>> DiG 9.3.2 <<>> @localhost stecher.org
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21001
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;stecher.org.                   IN      A
    
    ;; ANSWER SECTION:
    stecher.org.            86400   IN      A       194.109.228.119
    
    ;; AUTHORITY SECTION:
    stecher.org.            86399   IN      NS      ns2.transip.net.
    stecher.org.            86399   IN      NS      ns0.transip.net.
    stecher.org.            86399   IN      NS      ns1.transip.net.
    
    ;; ADDITIONAL SECTION:
    ns0.transip.net.        161686  IN      A       80.69.67.67
    ns1.transip.net.        161686  IN      A       80.69.69.69
    ns2.transip.net.        161686  IN      A       84.246.22.10
    
    ;; Query time: 1055 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Sat Feb 10 20:02:58 2007
    ;; MSG SIZE  rcvd: 158
    
    Maybe Courier IMAP broke? I can send out mails now again, but incoming still goes nowhere. In my mail.log I get errors like 10.0.0.33 address not listed for hostname atlas.manaxa.com, but it still connects (from unknown 10.0.0.33, which is my server on its internal ip-address), and then it connects and sends out the mail.
    Mail sent to external mail address:
    Code:
    Feb 10 20:08:27 atlas postfix/smtpd[19264]: warning: 10.0.0.33: address not listed for hostname atlas.manaxa.com
    Feb 10 20:08:27 atlas postfix/smtpd[19264]: connect from unknown[10.0.0.33]
    Feb 10 20:08:27 atlas postfix/smtpd[19264]: 259B81D41A3: client=unknown[10.0.0.33], sasl_method=PLAIN, sasl_username=sto_mendel
    Feb 10 20:08:27 atlas postfix/cleanup[19304]: 259B81D41A3: message-id=<[email protected]>
    Feb 10 20:08:27 atlas postfix/qmgr[6172]: 259B81D41A3: from=<[email protected]>, size=493, nrcpt=1 (queue active)
    Feb 10 20:08:27 atlas postfix/smtpd[19264]: disconnect from unknown[10.0.0.33]
    Feb 10 20:08:27 atlas postfix/smtp[19438]: 259B81D41A3: to=<[email protected]>, relay=stecher.nl[83.160.215.82], delay=0, status=sent (250 Message queued)
    Feb 10 20:08:27 atlas postfix/qmgr[6172]: 259B81D41A3: removed
    Feb 10 20:08:40 atlas postfix/smtp[19239]: connect to manaxa.com[194.109.228.119]: Connection timed out (port 25)
    Feb 10 20:08:41 atlas postfix/smtp[19239]: 12D581D4193: to=<[email protected]>, relay=relay.transip.nl[80.69.67.21], delay=31, status=sent (250 Ok: queued as E86EC87D2A4)
    Feb 10 20:08:41 atlas postfix/qmgr[6172]: 12D581D4193: removed
    Feb 10 20:08:41 atlas postfix/smtpd[19312]: connect from relay0.transip.nl[80.69.67.21]
    Feb 10 20:08:41 atlas postfix/smtpd[19312]: 46D991D4193: client=relay0.transip.nl[80.69.67.21]
    Feb 10 20:08:41 atlas postfix/smtp[16096]: connect to manaxa.com[194.109.228.119]: Connection timed out (port 25)
    Feb 10 20:08:41 atlas postfix/cleanup[19236]: 46D991D4193: message-id=<[email protected]>
    Feb 10 20:08:41 atlas postfix/qmgr[6172]: 46D991D4193: from=<[email protected]>, size=16028, nrcpt=1 (queue active)
    Feb 10 20:08:41 atlas postfix/smtpd[19312]: disconnect from relay0.transip.nl[80.69.67.21]
    Feb 10 20:08:42 atlas postfix/smtp[14644]: connect to manaxa.com[194.109.228.119]: Connection timed out (port 25)
    Feb 10 20:08:42 atlas postfix/smtp[16096]: 8A5F71D4194: to=<[email protected]>, relay=relay.transip.nl[80.69.67.21], delay=32, status=sent (250 Ok: queued as 4D8D987D2B6)
    Feb 10 20:08:42 atlas postfix/qmgr[6172]: 8A5F71D4194: removed
    
    Mail sent to another domain on the same server:
    Code:
    Feb 10 20:22:04 atlas postfix/smtp[19980]: connect to manaxa.com[194.109.228.119]: Connection timed out (port 25)
    Feb 10 20:22:05 atlas postfix/smtp[19980]: C3B301D4194: to=<[email protected]>, orig_to=<[email protected]>, relay=relay.transip.nl[80.69.67.19], delay=31, status=sent (250 Ok: queued as 39B973C1CC0)
    Feb 10 20:22:05 atlas postfix/qmgr[6172]: C3B301D4194: removed
    Feb 10 20:22:05 atlas postfix/smtpd[19856]: connect from relayout1.transip.nl[80.69.67.35]
    Feb 10 20:22:05 atlas postfix/smtpd[19856]: 6022C1D4194: client=relayout1.transip.nl[80.69.67.35]
    Feb 10 20:22:05 atlas postfix/cleanup[19866]: 6022C1D4194: message-id=<[email protected]>
    Feb 10 20:22:05 atlas postfix/qmgr[6172]: 6022C1D4194: from=<[email protected]>, size=4071, nrcpt=1 (queue active)
    Feb 10 20:22:05 atlas postfix/smtpd[19856]: disconnect from relayout1.transip.nl[80.69.67.35]
    
    First mail arrives, second doesn't...
     
    Last edited: Feb 10, 2007
  6. falko

    falko Super Moderator ISPConfig Developer

    I think the problem is that you listed atlas.manaxa.com for two IP addresses in /etc/hosts. Please remove atlas.manaxa.com from the 127.0.0.1 line.
     
  7. farao

    farao New Member

    Nope, doesn't change anything. It looks like there's a loop somewhere:
    mail comes in, sender does dns-lookup and gets external IP, mail gets delivered here, my mailserver goes looking for correct domain and looks up its own ip-address through an external server, so mail gets held up and passed to secondary mailserver. That mailserver does a lookup, finds my external ip, delivers the mail, and the proces starts again...
    how do I break the loop?
     
  8. falko

    falko Super Moderator ISPConfig Developer

  9. farao

    farao New Member

    Falko, you're the man! I can't figure out for the life of me why I need this switch all of a sudden, but it works.
    Thanks a million guys, for sticking with me and for making me an even stronger believer in Linux and ISPConfig (ok, so I'm just really, really glad).
     

Share This Page