Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default E-mails aren't being delivered locally

    This is my problem:

    I have PHP script to send e-mails:

    Code:
    <?
    mail("chrille@DOMAIN-A.com","testar","hejhej");
    mail("chrille@DOMAIN-B.com","testar","hejhej");
    mail("scroller@DOMAIN-C.com","testar","hejhej");
    ?>
    Domain A and C are hosted on the server I'm running the script from, and B is on an external server. The delivery works perfectly to the external domain, but internally the e-mails never gets delivered!

    In /var/log/exim_mainlog it looks correctly:
    Code:
    2007-02-11 21:57:06 1HGLlJ-0001WD-TB => halvapri <chrille@DOMAIN-A.com> R=localuser T=local_delivery
    2007-02-11 21:57:06 1HGLlJ-0001WD-TB Completed
    2007-02-11 21:57:07 1HGLlJ-0001WH-U7 => scroller <scroller@DOMAIN-C.com> R=virtual_user T=virtual_userdelivery
    2007-02-11 21:57:07 1HGLlJ-0001WH-U7 Completed
    2007-02-11 21:57:07 1HGLlJ-0001WF-Tc => chrille@DOMAIN-B.com R=lookuphost T=remote_smtp H=ensim2.XX.com [217.198.100.100] X=TLSv1:AES256-SHA:256
    2007-02-11 21:57:07 1HGLlJ-0001WF-Tc Completed
    How do I solve this? What log file should I look in to see more?

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by chrille112 View Post
    How do I solve this? What log file should I look in to see more?
    Using your favorite Linux editor such as pico or vi /etc/hosts
    and add this directive:
    localhost.localdomain localhost
    see if that helps.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  3. #3
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default

    Thanks for your reply!

    Added it:

    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost
    217.198.123.123         homer.blah.com homer cpanel.dependit.net cpanel
    localhost.localdomain   localhost
    But it did not help Did I add it correctly?

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    ummm, no. It should be:
    Code:
    127.0.0.1 localhost.localdomain localhost
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  5. #5
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default

    OK! Changed:
    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost.localdomain localhost
    217.198.123.123         homer.blah.com homer cpanel.dependit.net cpanel
    (tried to add an own line too)
    But it didn't help The external mail works fine, but not internal

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by chrille112 View Post
    (tried to add an own line too)
    But it didn't help The external mail works fine, but not internal
    You need to check /var/log/exim_* files for errors to help you troubleshoot this problem. Did you enable "Track the origin of messages sent though the mail server by adding the X-Sender headers (exim 4.34+ required)" in the WHM >> Tweak Settings? If yes, disable it and see if that works.
    Last edited by AndyReed; 02-12-2007 at 11:11 AM.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  7. #7
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default

    "Track the origin" was already disabled.

    In exim_mainlog, it looks just fine:
    Code:
    mainlog:
    2007-02-12 18:37:52 1HGf83-0006b9-Uo <= root@homer.adnic.com U=root P=local S=357
    2007-02-12 18:37:53 1HGf83-0006b9-Uo => halvapri <chrille@halvapriset.com> R=localuser T=local_delivery
    2007-02-12 18:37:53 1HGf83-0006b9-Uo Completed
    2007-02-12 18:37:53 1HGf84-0006bC-0b <= root@homer.adnic.com U=root P=local S=361
    2007-02-12 18:37:53 1HGf84-0006bH-1E <= root@homer.adnic.com U=root P=local S=347
    2007-02-12 18:37:53 1HGf84-0006bH-1E => scroller <scroller@adnic.com> R=virtual_user T=virtual_userdelivery
    2007-02-12 18:37:53 1HGf84-0006bH-1E Completed
    2007-02-12 18:37:53 1HGf84-0006bC-0b => chrille@reklambutiken.com R=lookuphost T=remote_smtp H=mail.reklambutiken.com [217.198.149.90] X=TLSv1:AES256-SHA:256
    2007-02-12 18:37:53 1HGf84-0006bC-0b Completed
    Paniclog and rejectlog says nothing about these mails




    EDIT: My misstake, I messed up... This is how it is:
    adnic.com is the server I'm running the script at. The mail is not delivered to scroller@adnic.com
    halvapriset.com and reklambutiken.com is another server. The mail is being delivered to chrille@reklambutiken.com, but not to chrille@halvapriset.com

    That is really strange?
    Last edited by chrille112; 02-12-2007 at 12:23 PM.

  8. #8
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I'd try /var/log/exim_* -- in particular /var/log/exim_mainlog.

  9. #9
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default

    Quote Originally Posted by brianoz View Post
    I'd try /var/log/exim_* -- in particular /var/log/exim_mainlog.
    But this is /var/log/exim_mainlog?

    Code:
    mainlog:
    2007-02-12 18:37:52 1HGf83-0006b9-Uo <= root@homer.adnic.com U=root P=local S=357
    2007-02-12 18:37:53 1HGf83-0006b9-Uo => halvapri <chrille@halvapriset.com> R=localuser T=local_delivery
    2007-02-12 18:37:53 1HGf83-0006b9-Uo Completed
    2007-02-12 18:37:53 1HGf84-0006bC-0b <= root@homer.adnic.com U=root P=local S=361
    2007-02-12 18:37:53 1HGf84-0006bH-1E <= root@homer.adnic.com U=root P=local S=347
    2007-02-12 18:37:53 1HGf84-0006bH-1E => scroller <scroller@adnic.com> R=virtual_user T=virtual_userdelivery
    2007-02-12 18:37:53 1HGf84-0006bH-1E Completed
    2007-02-12 18:37:53 1HGf84-0006bC-0b => chrille@reklambutiken.com R=lookuphost T=remote_smtp H=mail.reklambutiken.com [217.198.149.90] X=TLSv1:AES256-SHA:256
    2007-02-12 18:37:53 1HGf84-0006bC-0b Completed

  10. #10
    Member
    Join Date
    Sep 2003
    Posts
    64

    Default

    See if this thread helps. We had a similar problem like yours and this worked. Boxtrap got enabled and we have it disabled.
    http://forums.cpanel.net/showthread.php?t=63537
    Last edited by blkjck; 02-13-2007 at 06:00 PM. Reason: add the link...

  11. #11
    Member
    Join Date
    Apr 2006
    Posts
    13

    Default

    Thanks for your reply. The boxtrap was enabled, so I disabled it. There was no /etc/eximmailtrap tough, so I tried to run my script, but it's still the same problem


    ------------------------
    Edit: Now I know what's wrong!
    I'm planning to move halvapriset.com to the adnic.com server (from where I ran the script). Therefore, I've set up an account for it. When I send mails from the server, it delivers to the local account, alltough the DNS servers point to another server. That's whats wrong I checked the mail on the new account, and all was there Thanks for you help and support guys!
    Last edited by chrille112; 02-17-2007 at 05:58 AM. Reason: Found the solution

Similar Threads & Tags
Similar threads

  1. mails aren't received by destination
    By fradique in forum E-mail Discussions
    Replies: 3
    Last Post: 07-15-2011, 01:22 PM
  2. Mail being delivered locally
    By 10101 in forum E-mail Discussions
    Replies: 2
    Last Post: 08-13-2010, 08:23 AM
  3. Remote MX, vs. locally delivered email: still broken!
    By jols in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-07-2008, 11:44 AM
  4. HELP! mails not delivered to some domains
    By jek in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-26-2004, 09:52 AM
  5. E-mails FROM Yahoo are not getting delivered
    By cretu in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-22-2004, 11:04 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube