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.

Email Script

Discussion in 'E-mail Discussions' started by ceej23, Jul 18, 2007.

  1. ceej23

    ceej23 Registered

    Joined:
    May 29, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi.

    I have a script which forwards form details to an email address.

    The problem is that the email address has the same domain name as the website but is hosted on a different machine. So whenever this script runs, it thinks the email should be forwarded to a local account, looks for that account and then fails when it can't find it.

    Email Log Extract:
    cbattle@xxx.com.au R=virtual_aliases: No Such User Here

    Is there some way either in the script or via WHM config to indicate that mail is hosted on a different machine to the website?

    Thanks.
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Log into that domain's Cpanel interface (on the web server).

    If Cpanel 10:

    click on MAIL, then click on "Modify Mail Exchanger (MX Record)."

    Then add the name of the server that actually handles mail for that domain.

    If Cpanel 11:

    click on "MX Entry" under the Mail section

    Then add the name of the server that actually handles mail for that domain.

    If the mail server that handles mail for that domain is on another server and actual authoritative DNS is being performed by some other server than the server that the website is on, and if the mail server for that domain is 'mail.thatdomain.com' you may run into issues if you enter mail.thatdomain.com in as the MX for the domain - because the local webserver is performing DNS itself, mail.thatdomain.com will point to the IP address of the website and not to the IP address of the mail server. If the MX that handles mail for that domain is a host with a hostname that is not within the same domain (such as mail.someotherdomain.com), then you should be fine.

    Mike
     
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Essentially, when you are finished, if all goes well you should see the following (assuming you are the server operator and have access to view the cpanel config files on the server):

    /etc/localdomains on the web server will not have the domain listed in it

    /etc/remotedomains on the web server will have the domain listed in it

    /var/named/domainname.com.db on the web server will show the MX as pointing to the hostname of the mail server that is actually hosting mail for the domain

    But you shouldn't have to edit any of those files directly, because when you make the MX change in Cpanel it will update all of that appropriately.

    Mike
     
  4. ceej23

    ceej23 Registered

    Joined:
    May 29, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks - appreciate your time.
     
Loading...

Share This Page