Sendmail Problem

Discussion in 'Installation/Configuration' started by hiren_patel, Dec 3, 2007.

  1. hiren_patel

    hiren_patel New Member

    Hi everybody,
    i am currently working on Ubuntu 7.04,
    in this system we are facing sendmail problem,
    we have two hosts setup on our server, like test3.test.com and test.com.
    Also we have google hosted email service for test.com.
    If we send mail to any user of test.com using sendmail then the mail returns locally but we need that it sends the mail to google hosted account.
    If we send mail to any other domain then the sendmail is working, but if we send the mail to our own domain through sendmail then the mail returns to the system itself.

    The mail log is as follows :

    Dec 3 06:08:40 test3 sendmail[21742]: lB3C8ZkK021742: from=root, size=6, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
    Dec 3 06:08:40 test3 sm-mta[21743]: lB3C8eqF021743: <[email protected]>... User unknown
    Dec 3 06:08:40 test3 sendmail[21742]: lB3C8ZkK021742: [email protected], ctladdr=root (0/0), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
    Dec 3 06:08:40 test3 sm-mta[21743]: lB3C8eqF021743: from=<[email protected]>, size=6, class=0, nrcpts=0, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1]
    Dec 3 06:08:40 test3 sendmail[21742]: lB3C8ZkK021742: lB3C8ZkL021742: DSN: User unknown
    Dec 3 06:08:40 test3 sm-mta[21743]: lB3C8eqH021743: from=<>, size=1998, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1]
    Dec 3 06:08:40 test3 sm-mta[21743]: lB3C8eqH021743: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31998, dsn=2.0.0, stat=Sent
    Dec 3 06:08:40 test3 sendmail[21742]: lB3C8ZkL021742: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31030, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (lB3C8eqH021743 Message accepted for delivery)

    thanks for any help in advance
     
  2. dexjul

    dexjul New Member

    Hi,

    Do you solve this problem? I got same problem.

    Regards
     
  3. topdog

    topdog Active Member

    You need to remove test.com from /etc/mail/local-host-names and ensure that the MX record points to google.
     
  4. dexjul

    dexjul New Member

    Hi,

    I dont have a test.com on /etc/mail/local-host-names, only localhost.localdomain and localhost.

    How to point the mx record to google?

    any example.

    Also I dont have binds running in my box, do I need to install binds?

    Thanks you,
     
  5. topdog

    topdog Active Member

    you do not need to install bind as long as you have name servers in /etc/resolv.conf

    when you run the command
    Code:
    dig mx test.com
    what MX record is returned,
     
  6. dexjul

    dexjul New Member

    Here's the result

    [root@neoserver mail]# dig mx localhost

    ; <<>> DiG 9.3.4-P1 <<>> mx localhost
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55714
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;localhost. IN MX

    ;; AUTHORITY SECTION:
    . 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009010600 1800 900 604800 86400

    ;; Query time: 730 msec
    ;; SERVER: 202.124.128.2#53(202.124.128.2)
    ;; WHEN: Tue Jan 6 17:47:18 2009
    ;; MSG SIZE rcvd: 102
     
  7. topdog

    topdog Active Member

    mail for the localhost will always go to the local machine you cannot send it else where unless you alias the accounts.
     
  8. dexjul

    dexjul New Member

    Hi,

    What should i do? I can send email in yahoo, hotmail, gmail but in our domain sending fail.

    Here's bounce mail error.

    The original message was received at Tue, 6 Jan 2009 16:47:15 +0800
    from root@localhost

    ----- The following addresses had permanent fatal errors -----
    [email protected]
    (reason: 550 5.1.1 <[email protected]>... User unknown)
    (expanded from: [email protected])

    ----- Transcript of session follows -----
    ... while talking to [127.0.0.1]:
    >>> DATA
    <<< 550 5.1.1 <[email protected]>... User unknown
    550 5.1.1 [email protected]... User unknown
    <<< 503 5.0.0 Need RCPT (recipient)
     
  9. topdog

    topdog Active Member

    From the error message the user account does not exist that is where you get that error you need to add the user to the system.
     
  10. dexjul

    dexjul New Member

    Hi,

    The account is valid in our domain. Do you have any idea on this problem?

    Regards,
     
  11. topdog

    topdog Active Member

    what is the output of

    Code:
    dig mx your_domain_name
    sendmail -bv user@your_domain_name
     
  12. dexjul

    dexjul New Member

    Here's for domain.com

    HTML:
    
    [root@neoserver init.d]# dig mx domain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> mx domain.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61968
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;domain.com.         IN      MX
    
    ;; ANSWER SECTION:
    domian.com.  172800  IN      MX      10 smtp.domian.com.
    domain.com.  172800  IN      MX      20 mail.domain.com.
    
    ;; AUTHORITY SECTION:
    domain.com.  172800  IN      NS      dns1.domain.net.
    domain.com.  172800  IN      NS      dns2.domain.net.
    
    ;; ADDITIONAL SECTION:
    smtp.domain.com. 172800 IN   A       ip address
    dns1.domain.net.  172800  IN      A       ip address
    dns2.domainh.net.  172800  IN      A       ip address
    
    ;; Query time: 9 msec
    ;; SERVER: ip address#53(ip address)
    ;; WHEN: Wed Jan  7 15:37:24 2009
    ;; MSG SIZE  rcvd: 183
    
    
    Here's for domain.net

    [root@neoserver init.d]# dig mx domain.net

    ; <<>> DiG 9.3.4-P1 <<>> mx domain.net
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46445
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3

    ;; QUESTION SECTION:
    ;domain.net. IN MX

    ;; ANSWER SECTION:
    domain.net. 172800 IN MX 20 mail.domain.net.
    domain.net. 172800 IN MX 10 smtp.domain.net.

    ;; AUTHORITY SECTION:
    domain.net. 172800 IN NS dns1.domain.net.
    domain.net. 172800 IN NS dns2.domain.net.

    ;; ADDITIONAL SECTION:
    smtp.domain.net. 172800 IN A ip address
    dns1.domain.net. 172800 IN A ip address
    dns2.domain.net. 172800 IN A ip address

    ;; Query time: 12 msec
    ;; SERVER: ip address2#53(ip address)
    ;; WHEN: Wed Jan 7 15:48:11 2009
    ;; MSG SIZE rcvd: 180

    [/HTML]



    HTML:
    
    [root@neoserver init.d]# sendmail -bv [email protected]
    [email protected]... deliverable: mailer esmtp, host domain.com., user [email protected]
    
    
    [root@neoserver init.d]# sendmail -bv [email protected]
    [email protected]... deliverable: mailer esmtp, host domain.net., user [email protected]
    
    

    If I add our domain in /etc/mail/local-host-names the mail account is invalid or user unknown.

    Thank you.
     
  13. dexjul

    dexjul New Member

    Here's for domain.com

    HTML:
    
    [root@neoserver init.d]# dig mx domain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> mx domain.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61968
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;domain.com.         IN      MX
    
    ;; ANSWER SECTION:
    domian.com.  172800  IN      MX      10 smtp.domian.com.
    domain.com.  172800  IN      MX      20 mail.domain.com.
    
    ;; AUTHORITY SECTION:
    domain.com.  172800  IN      NS      dns1.domain.net.
    domain.com.  172800  IN      NS      dns2.domain.net.
    
    ;; ADDITIONAL SECTION:
    smtp.domain.com. 172800 IN   A       ip address
    dns1.domain.net.  172800  IN      A       ip address
    dns2.domainh.net.  172800  IN      A       ip address
    
    ;; Query time: 9 msec
    ;; SERVER: ip address#53(ip address)
    ;; WHEN: Wed Jan  7 15:37:24 2009
    ;; MSG SIZE  rcvd: 183
    
    
    Here's for domain.net

    [root@neoserver init.d]# dig mx domain.net

    ; <<>> DiG 9.3.4-P1 <<>> mx domain.net
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46445
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3

    ;; QUESTION SECTION:
    ;domain.net. IN MX

    ;; ANSWER SECTION:
    domain.net. 172800 IN MX 20 mail.domain.net.
    domain.net. 172800 IN MX 10 smtp.domain.net.

    ;; AUTHORITY SECTION:
    domain.net. 172800 IN NS dns1.domain.net.
    domain.net. 172800 IN NS dns2.domain.net.

    ;; ADDITIONAL SECTION:
    smtp.domain.net. 172800 IN A ip address
    dns1.domain.net. 172800 IN A ip address
    dns2.domain.net. 172800 IN A ip address

    ;; Query time: 12 msec
    ;; SERVER: ip address2#53(ip address)
    ;; WHEN: Wed Jan 7 15:48:11 2009
    ;; MSG SIZE rcvd: 180

    [/HTML]



    HTML:
    
    [root@neoserver init.d]# sendmail -bv [email protected]
    [email protected]... deliverable: mailer esmtp, host domain.com., user [email protected]
    
    
    [root@neoserver init.d]# sendmail -bv [email protected]
    [email protected]... deliverable: mailer esmtp, host domain.net., user [email protected]
    
    

    If I add our domain in /etc/mail/local-host-names the mail account is invalid or user unknown.

    Thank you.
     
  14. topdog

    topdog Active Member

    Do the ip addresses of smtp.domian.com. and smtp.domian.net. point to the machine on which sendmail is running ?

    If so then what is the output of
    Code:
    id user_name
     

Share This Page