Results 1 to 7 of 7
  1. #1

    Mail not resolving domains correctly

    Hi,

    I've just migrated a site onto a new dedicated server (Ubuntu), and am having a problem.

    The site's domain, call it mydomain.com, has its DNS hosted elsewhere. We've pointed A records for @ and WWW to the IP address of the new server. This works great, and the web end of things is working nicely. Email for mydomain.com is handled elsewhere.

    The website sends emails using PHP's mail() function. Some of those emails go to @mydomain.com email addresses. However, the server is not attempting to send these out externally, so they aren't reaching the mail server handling mail for mydomain.com.

    Emails sent to other addresses (not @mydomain.com) are sent fine, so there isn't a problem with sendmail.

    Any idea what I need to change on the server to allow it to send the emails for @mydomain.com externally?

  2. #2
    Join Date
    Sep 2004
    Location
    Cluj-Napoca, Romania
    Posts
    462
    You need to remove mydomain.com from you local domains.

  3. #3
    Quote Originally Posted by sheic View Post
    You need to remove mydomain.com from you local domains.
    Thanks for your response. Could you please tell me more about what that means? Where are my local domains stored? How would it have got there in the first place?

  4. #4
    Join Date
    Sep 2007
    Posts
    368

    *

    Quote Originally Posted by Grunff View Post
    Hi,

    I've just migrated a site onto a new dedicated server (Ubuntu), and am having a problem.

    The site's domain, call it mydomain.com, has its DNS hosted elsewhere. We've pointed A records for @ and WWW to the IP address of the new server. This works great, and the web end of things is working nicely. Email for mydomain.com is handled elsewhere.

    The website sends emails using PHP's mail() function. Some of those emails go to @mydomain.com email addresses. However, the server is not attempting to send these out externally, so they aren't reaching the mail server handling mail for mydomain.com.

    Emails sent to other addresses (not @mydomain.com) are sent fine, so there isn't a problem with sendmail.

    Any idea what I need to change on the server to allow it to send the emails for @mydomain.com externally?

    What SRC & DST email address in your php script? are you getting properly emails on @mydomain.com email from all over world. Do you have dedicated server or VPS?
    Last edited by nomankhn; 08-08-2009 at 11:45 AM.

  5. #5
    Quote Originally Posted by nomankhn View Post
    What SRC & DST email address in your php script? are you getting properly emails on @mydomain.com email from all over world.
    Yes, all @mydomain.com mail sent from other places is arriving fine, it's just mail sent from the new web server that isn't making it.

    From: is the PHP default "www-data", and To: is [email protected]

  6. #6
    Join Date
    Sep 2007
    Posts
    368

    *

    Quote Originally Posted by Grunff View Post
    Yes, all @mydomain.com mail sent from other places is arriving fine, it's just mail sent from the new web server that isn't making it.
    Hi,

    Your new server is used for outgoing email not for incoming email because your MX and A record both are different.

    from php you can also check

    http://www.php.net/manual/en/function.mail.php

    if you have shell access you can check.

    mail -s "SUBJECT" [email protected] < yourattach-text-file.txt

    if that email go out so it mean no problem with server, problem with your php script
    Last edited by nomankhn; 08-08-2009 at 11:51 AM.

  7. #7
    Join Date
    Apr 2009
    Posts
    839
    Try to use SMTP authentication in your php scripts - in this case your mail will be sent via remote server but not via your one.

    Or you can add your server as your MX record with priority of let us say 100 (assuming other external MX-es are 0,10, etc.) and your server will be able to sent mail but will not receive it as it is last in the 'path'.

Similar Threads

  1. I need help to get my mail running correctly
    By plainwords in forum Hosting Security and Technology
    Replies: 3
    Last Post: 08-26-2007, 06:36 AM
  2. Slow server and things not resolving correctly
    By zboyet in forum Hosting Security and Technology
    Replies: 8
    Last Post: 05-27-2006, 10:04 PM
  3. php mail() isnt working correctly
    By latheesan in forum Programming Discussion
    Replies: 3
    Last Post: 10-04-2005, 01:25 PM
  4. Mail not working correctly...
    By runes911 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 03-30-2005, 09:08 AM
  5. DNS Issue.. not resolving correctly
    By ventohost in forum Hosting Security and Technology
    Replies: 5
    Last Post: 04-03-2004, 05:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •