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.

MX entry problem

Discussion in 'General Discussion' started by tris, Aug 6, 2004.

  1. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    I have an MX entry in for the domain powerbelt.hu (hungary). He wants his mail sent somewhere else.

    This problem has been bugging us for a few weeks now beacause it is no actually forwarding.

    The MX entry is "mail.powerbelt.hu". It is obvious that it doesnt do anything.

    Log extract

    So how can I fix this?

    Any help is appreciated
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    MX records appear to be set correctly, but hte receiving mail server doesn't seem to be responding properly.

    It's probably an issue on their side, not yours.
     
  3. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Thank You for that,

    That is what I have guessed it was. I have told my client but he insists its nothing to do with his server!
     
  4. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    If the account is hosted on your server and you want mail to be delieverd off server to a 3rd party mail server, rather than yours, heres what you do.

    Modify the dns zone:

    Change the MX record to

    mail.domain.com.

    Modify

    mail CNAME domain.com.

    to

    mail IN A 123.123.123.123 (being the 3rd party provider mail server IP)


    Now to make mail route off server, remove the domain.com from /etc/localdomains

    Add domain.com to /etc/remotedomains (create the file if it doesn't exist.)

    rndc reload

    Check mail routing

    exim -bt anyone@domain.com

    That will tell you where exim will send mail to.

    Hope this helps :)
     
  5. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    LOG: MAIN
    remote host address is the local host: powerbelt.hu (while routing <e.attila@powerbelt.hu>)
    e.attila@powerbelt.hu cannot be resolved at this time:
    remote host address is the local host


    Didnt work
     
  6. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Your configuration somewhere doesn't seem correct as it looks as though your server still sees the mail routing being local to your server

    If you can paste the results of the following, it may help to further diagnose

    cat /etc/resolv.conf
    cat /var/named/powerbelt.hu.db

    dig mail.powerbelt.hu

    grep powerbelt.hu /etc/localdomains
    grep powerbelt.hu /etc/remotedomains
     
  7. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    This is what I see

    # exim -bt e.attila@powerbelt.hu
    e.attila@powerbelt.hu
    router = lookuphost, transport = remote_smtp
    host mail.powerbelt.hu [195.56.97.211] MX=10

    Is that the correct IP of the server running the mail for that domain?
     
  8. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    That is the correct IP for the site.


    cat /etc/resolv.conf
    nameserver 127.0.0.1


    cat /var/named/powerbelt.hu.db
    ; Modified by Web Host Manager
    ; Zone File for powerbelt.hu
    @ 14400 IN SOA ns3.frogeedns.com. galaxy.frogee.com. (
    2004080502
    28800
    7200
    3600000
    86400
    )

    powerbelt.hu. 14400 IN NS ns3.frogeedns.com.
    powerbelt.hu. 14400 IN NS ns4.frogeedns.com.
    powerbelt.hu. 14400 IN A 216.67.243.86

    localhost.powerbelt.hu. 14400 IN A 127.0.0.1

    mail.powerbelt.hu 14400 IN MX 0 mail.powerbelt.hu.









    mx 14400 IN A 195.56.97.211
    mail 14400 IN CNAME mail.powerbelt.hu.
    www 14400 IN CNAME powerbelt.hu.
    ftp 14400 IN CNAME powerbelt.hu.

    dig mail.powerbelt.hu

    ; <<>> DiG 9.2.1 <<>> mail.powerbelt.hu
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62019
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mail.powerbelt.hu. IN A

    ;; ANSWER SECTION:
    mail.powerbelt.hu. 14400 IN CNAME mail.powerbelt.hu.

    ;; Query time: 62 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Aug 6 10:12:30 2004
    ;; MSG SIZE rcvd: 49

    # grep powerbelt.hu /etc/localdomains
    # grep powerbelt.hu /etc/remotedomains
    powerbelt.hu
     
  9. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Your dns zone is incorrectly configured for the MX record

    The changes needed are as follows

    mail.powerbelt.hu 14400 IN MX 0 mail.powerbelt.hu.

    change to

    powerbelt.hu. 14400 IN MX 0 mail.powerbelt.hu.



    mail 14400 IN CNAME mail.powerbelt.hu.

    change to

    mail 14400 IN A 195.56.97.211

    type

    rndc reload

    That should fix it.
     
  10. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Did that but

    exim -bt e.attila@powerbelt.hu


    LOG: MAIN
    remote host address is the local host: powerbelt.hu (while routing <e.attila@powerbelt.hu>)
    e.attila@powerbelt.hu cannot be resolved at this time:
    remote host address is the local host
     
  11. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Your dns zone is the problem by the look, please

    cat /var/named/powerbelt.hu.db
    again and let me see that after the changes you have made.
     
  12. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    cat /var/named/powerbelt.hu.db
    ; Modified by Web Host Manager
    ; Zone File for powerbelt.hu
    @ 14400 IN SOA ns3.frogeedns.com. galaxy.frogee.com. (
    2004080503
    28800
    7200
    3600000
    86400
    )

    powerbelt.hu. 14400 IN NS ns3.frogeedns.com.
    powerbelt.hu. 14400 IN NS ns4.frogeedns.com.
    powerbelt.hu. 14400 IN A 216.67.243.86

    localhost.powerbelt.hu. 14400 IN A 127.0.0.1

    powerbelt.hu 14400 IN MX 0 mail.powerbelt.hu.









    mx 14400 IN A 195.56.97.211
    mail 14400 IN A 195.56.97.211
    www 14400 IN CNAME powerbelt.hu.
    ftp 14400 IN CNAME powerbelt.hu.
     
  13. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    You have a missing . in the dns zone

    powerbelt.hu 14400 IN MX 0 mail.powerbelt.hu.

    should be

    powerbelt.hu. 14400 IN MX 0 mail.powerbelt.hu.

    Correct that and type

    rndc reload

    tail -100 /var/log/messages


    Then try the exim routing, paste the /var/log/messages output if that doesn't correct the issue as its likley your named config isn't being reloaded due to errors.
     
  14. tris

    tris Active Member

    Joined:
    Apr 11, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Thank you so much that fixed it :)
     
  15. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    No worries, glad we got there :)
     
  16. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi Zentity,

    Can you tell me if it is neccesary to remove mail.domain.com from local domains and add it to remote domains? I see an entry for it in local domains. I have:

    domain.com
    mail.domain.com both in localdomains.

    Not sure why mail.domain.com is in there but I assume it should either be removed or added to remote domains.

    Thoughts?
     
    #16 myusername, Aug 23, 2004
    Last edited: Sep 13, 2004
  17. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    If you wanted to send mail to anyone@mail.domain.com (This is a subdomain account) then yes you'd need to remove that from /etc/localdomains and add it to /etc/remotedomains (Adding to /etc/remotedomains stops cPanel re adding that domain back into /etc/localdomains if you run /scripts/mailperm or /scripts/updateuserdomains)

    Rule is simple, anything in /etc/localdomains is local as far as exim is concerned and a dns lookup won't be performed in order to route mail.
     
Loading...

Share This Page