The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help about exim

Discussion in 'General Discussion' started by kamanwu, Aug 17, 2009.

  1. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have several domains hosted on a VPS.(ex: travelmoth.com)

    This VPS is only used for web server. I use godaddy's name server. The MX record points to godaddy's mail server. I created a email address(admin@travelmoth.com) on godaddy.

    When I send emails to this address by gmail/hotmail/whatever, I do can receive the emails.

    But when I use php code on my VPS to send emails to admin@travelmoth.com, it fails. I check the logs of exim. It seems that exim think "travelmoth.com" is a local domain, so it do NOT deliver the email.

    How can I do now? Just remove all domains in file /etc/localdomains ? I treated all my domains as same as travelmoth.com

    Thanks.
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Yes, you will need to remove the domains from /etc/localdomains and please make sure that the domain is added on /etc/remotedomains.
     
  3. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much!
    Should I do it by editing these 2 files manually(SSH login and vi edit)? Or I can do it through WHM/cPanel?

    After I edit these 2 files, how to restart exim? Or it's not necessary to restart exim?
     
  4. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1

    Because I find another file: localdomains,v

    And I see this line in the file:
    "Modified by /usr/local/cpanel/whostmgr/bin/whostmgr5 "

    So should I modify manually, or use do it through WHM/cPanel??
     
  5. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Yes, you will need to edit these two lines through SSH. You cannot do it through WHM/cPanel.

    Once you edit the lines you will need to save the file localdomains and need to restart the exim server by executing below command:

    /scripts/restartsrv_exim

    or

    /etc/rc.d/init.d/exim restart
     
  6. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1

    I understand. So I just ignore the /etc/localdomains,v and /etc/remotedomains,v ??
     
  7. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    You just need to remove the domain from /etc/localdomains and need to add the domain on /etc/remotedomains. Moreover, you also need to remove the MX record of your server from DNS Zone through WHM.
     
  8. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1

    I do not understand that "Moreover, you also need to remove the MX record of your server from DNS Zone through WHM."

    I did not use my server as the name server. I use godaddy's name server. I still need do this step??
     
  9. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    If you are using godaddy's nameservers then no need to change the DNS zone file. You just need to change edit the localdomains file and remotedomains file.
     
  10. kamanwu

    kamanwu Member

    Joined:
    Aug 17, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks...It works for me.

    I just confuse that if I do some other settings through WHM/cPanel, the changes I made in localdomains file and remotedomains file will be reset by WHM/cPanel, or not??

    Last time, I change the apache configure file manually, but all my changes was reset by WHM/cPanel when I did other changes(about deleting domain log after stat running) through WHM/cPanel......
     
  11. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    The "comma v" files are basically just activity logs for the main files ...

    No, you do not need to edit anything ending in ",v" ....

    /etc/localdomains = domains with mail handled by server

    /etc/remotedomains = domains where mail is handled elsewhere

    (Side FYI - Using Go Daddy's DNS and Email is likely to give you a lot more
    headaches than just having both managed directly by your server)
     
Loading...

Share This Page