Mail problems after following Virtual Users And Domains With Postfix, Courier

Discussion in 'HOWTO-Related Questions' started by tyliong, Jan 6, 2009.

  1. volksman

    volksman New Member

    Shouldn't but won't hurt to try, Postfix may store it's own cache of the domain. Try putting all the names on the same line:

    212.193.49.223 casper.mydomain.com capser mail.mydomain.com

    Restart postfix and try again.
     
  2. tyliong

    tyliong New Member

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    210.193.49.222 casper.mydomain.com capser mail.mydomain.com

    [root@localhost vmail]# /etc/init.d/postfix restart
    Shutting down postfix: [ OK ]
    Starting postfix: [ OK ]
    [root@localhost vmail]# mail [email protected]
    Subject: hello now x3
    .
    Cc:
    Null message body; hope that's ok
    [root@localhost vmail]# ls
    [root@localhost vmail]# tail -f /var/log/maillog error
    ==> /var/log/maillog <==
    Jan 7 02:14:23 localhost amavis[22783]: (22783-01) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: j6z0u0l-C2-e, Hits: 1.417, size: 590, queued_as: AA87A57200B9, 5431 ms
    Jan 7 02:14:23 localhost postfix/smtp[23295]: 35F9157200B1: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=5.5, delays=0.1/0/0.01/5.4, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as AA87A57200B9)
    Jan 7 02:14:23 localhost postfix/qmgr[23283]: 35F9157200B1: removed
    Jan 7 02:14:23 localhost postfix/smtp[23301]: AA87A57200B9: to=<[email protected]>, relay=none, delay=0.06, delays=0.04/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.mydomain.com type=A: Host not found)
    Jan 7 02:14:23 localhost postfix/cleanup[23294]: BE6CF57200BA: message-id=<[email protected]>
    Jan 7 02:14:23 localhost postfix/bounce[23302]: AA87A57200B9: sender non-delivery notification: BE6CF57200BA
    Jan 7 02:14:23 localhost postfix/qmgr[23283]: BE6CF57200BA: from=<>, size=3141, nrcpt=1 (queue active)
    Jan 7 02:14:23 localhost postfix/qmgr[23283]: AA87A57200B9: removed
    Jan 7 02:14:23 localhost postfix/local[23303]: BE6CF57200BA: to=<[email protected]>, relay=local, delay=0.05, delays=0.02/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
    Jan 7 02:14:23 localhost postfix/qmgr[23283]: BE6CF57200BA: removed
    tail: cannot open `error' for reading: No such file or directory
     
  3. volksman

    volksman New Member

    hrm...that's weird...if you ping mail.mydomain.com do you get the right IP?
     
  4. tyliong

    tyliong New Member

    yeah i get it from casper.mydomain.com.
    ping mail.mydomain.com

    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=51 ttl=64 time=0.014 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=52 ttl=64 time=0.013 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=53 ttl=64 time=0.017 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=54 ttl=64 time=0.016 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=55 ttl=64 time=0.013 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=56 ttl=64 time=0.014 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=57 ttl=64 time=0.016 ms
    64 bytes from casper.mydomain.com (213.193.49.223): icmp_seq=58 ttl=64 time=0.015 ms
     
  5. tyliong

    tyliong New Member

    btw when the error is
    Jan 7 02:14:23 localhost postfix/smtp[23301]: AA87A57200B9: to=<[email protected]>, relay=none, delay=0.06, delays=0.04/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.mydomain.com type=A: Host not found)

    does type A mean the dns record?
     
  6. volksman

    volksman New Member

    the IP you get back is different than the one you specified in your hosts file. although that still doesn't solve the issue here.

    Can you post the output of:

    cat /etc/resolv.conf

    and is mydomain.com the real domain here? is it public?
     
  7. tyliong

    tyliong New Member

    of course not mydomain isn't the real domain of the server nor are those ip numbers. the domain name is something else but its public, server currently is in deployment and security is a bit laxed at the moment.

    btw the ip numbers are actually matching i just forgot to put it right

    the ip number in the resolv is real though

    cat /etc/resolv.conf
    search localdomain

    nameserver 203.120.90.40
     
  8. volksman

    volksman New Member

    Yes it is referring to an A record in DNS. which is weird cause ping finds it no problems. Might be a partially busted zone file, without knowing the real zone it's impossible to test.

    Have you made any modifications to /etc/nsswitch.conf?

    Try 'dig +short @203.120.90.40 mail.mydomain.com'. That's doing a lookup off the same DNS server you configured the server to use.

    PM me the domain if you want me to dig deeper on the DNS issue.
     
  9. tyliong

    tyliong New Member

    no modifications to /etc/nsswitch.conf

    /var/named/chroot/var/named/foodspree.com.db

    i changed dns here to
    mydomain.com. IN NS ns1.mydomain.com.
    ;mydomain.com. IN NS ns2.mydomain.com.
    IN MX 20 smtp.mydomain.com.
    IN MX 10 mail.mydomain.com.
    ns1 IN A 213.193.49.223 ;primary name server
    ;ns2 IN A 213.193.49.223 ;secondary name server
    casper IN A 213.193.49.223
    ;serverB IN A 192.168.1.2
    smtp IN A 213.193.49.223 ;mail server
    mail IN A 213.193.49.223
    www IN CNAME casper ;web server
    ftp IN CNAME casper ;ftp server

    dig +short @203.120.90.40 mail.mydomain.com

    does not give anything

    what do u need for the real zone file?
     
  10. tyliong

    tyliong New Member

    oh i think i know whats the problem now my transport file

    domain transport
    foodspree.com smtp:mail.foodspree.com


    would this effect the settings? in any case i am gonna turn it off
     
  11. tyliong

    tyliong New Member

    i get this now when i send mail. althought my vmail is still empty

    Jan 7 10:19:49 localhost postfix/smtpd[31894]: connect from unknown[127.0.0.1]
    Jan 7 02:19:49 localhost postfix/smtpd[31894]: 6D99B57200E4: client=unknown[127.0.0.1]
    Jan 7 10:19:49 localhost postfix/cleanup[31887]: 6D99B57200E4: message-id=<[email protected]>
    Jan 7 02:19:49 localhost postfix/smtpd[31894]: disconnect from unknown[127.0.0.1]
    Jan 7 10:19:49 localhost postfix/qmgr[31874]: 6D99B57200E4: from=<[email protected]>, size=1062, nrcpt=1 (queue active)
    Jan 7 10:19:49 localhost amavis[29366]: (29366-02) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: cJXok4gRzGrr, Hits: 1.732, size: 583, queued_as: 6D99B57200E4, 10868 ms
    Jan 7 10:19:49 localhost postfix/smtp[31888]: 8500E57200B1: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.1/0/0.03/11, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6D99B57200E4)
    Jan 7 10:19:49 localhost postfix/qmgr[31874]: 8500E57200B1: removed
    Jan 7 10:19:49 localhost postfix/virtual[31896]: 6D99B57200E4: to=<[email protected]>, relay=virtual, delay=0.09, delays=0.05/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
    Jan 7 10:19:49 localhost postfix/qmgr[31874]: 6D99B57200E4: removed
     
  12. tyliong

    tyliong New Member

    omg your not gonna believe this but it WORKS!! yes!!
     
  13. tyliong

    tyliong New Member

    arggh maybe not i can send mail through my internal accounts in the server to my internal accounts but if i send email through gmail or anything else it doesn't work. although strangely enough no mailer daemon comes back to say the email has bounced
     
  14. tyliong

    tyliong New Member

    Gonna start a new thread for this the nature of the problem has changed significantly
     

Share This Page