mx records different than website record - error loops back to myself

Discussion in 'Server Operation' started by ariban99, Feb 6, 2020.

  1. ariban99

    ariban99 Member

    Hi
    i have a sever running ispconfig 3.1
    it hosts a few sites and some emails.
    i have one domain that i host only the website part, but i do NOT host the emails. that is hosted by g suite
    everything works fine, until i send an email from any domain that is hosting my emails on my server, then in that case, i get an error of a bounced email saying the domain loops back to myself

    any help would greatly be appreciated.
    Thank you
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    In topic you wrote
    I think your diagnosis is correct. However, you did not show what the MX record is. Sending e-mail server looks up MX record and sends e-mail to server in MX record. Check on your server what is MX record for the domain you send e-mails to, for example with
    Code:
    host domain.tld
    https://www.howtoforge.com/community/forums/installation-configuration.27/
    Note also that there is a forum for ISPConfig questions.
     
  3. ariban99

    ariban99 Member

    My dns records are on godaddy.com
    My A record is my ip x.x.x.x
    My mx records are g suites mx records
    However my other website that i host the email server, meaning my mx records is the same ip as the a record, if i email from my hosted emails to the g suite mx records, i get the error of looping back
     
  4. ariban99

    ariban99 Member

  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That is all fine and dandy, but what is important here is where your e-mail server tries to send the messages. If it sent them to GMail there should not be looping back. So I ask again:
    Find this out by going to your e-mail server host and issue on command line this:
    Code:
    host midtowndist.com
     
  6. ariban99

    ariban99 Member

    sorry didnt understand what you meant, here are the results of host midtowndist.com
    midtowndist.com has address 192.168.1.23
    what do i do to fix that?
     
  7. ariban99

    ariban99 Member

    i figured it out. it was my pfsense firewall, i put the dns resolver to my internal IP so i can reach the site internally.
    i removed that and now its working fine.
     
  8. Hello,
    I'm on IspConfig 3.1.15p2
    I have the same problem. Sorry but i'm french and my english is so bad.
    I don't understand why i can resolve this problem.
    In my dns i have put the mx from google like as "aspmx.l.google.com" "alt1.aspmx.l.google.com" alt2,alt3,alt4. This DNS record are the same that on the domain registrar (WIX).
    If y want to send a mail with my domain who is on the same host server i have this error "mail for mysite.com loops back to myself"
    If I use an adress on an other server, i haven't this problem.
    My dns are correct, i have change only ip of "mysite.com" and "www"
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not add an email domain in ISPConfig when you are using Google as mail server for that domain. Remove the email domain in ISPConfig, just leave the website in ISPConfig.
     
    ariban99 likes this.
  10. I haven't create email domain, just website. I have just erase my zone DNS. it's good now.
    But i don't unterstand why i have this error after i have put the records mx google in my DNS zone and my server DNS are good.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    If you added a DNS zone locally which contains the wrong details, then this will affect local mail delivery.
     

Share This Page