Mail loops back to myself : how to fix it ?

  • Hi,


    On my server, I have the domain mydomain.com
    But the MX of this domain is elsewhere, on another server.


    On a website on this server, I have a form which send a mail to [email protected]


    But the mail never go out the server because it thinks than the mail is sent to itself.


    On the mydomain.com config, I have disabled the mail, but it's not enought to fix the problem.


    How can I do ?

  • You change mx ip in bind //


    Line -> mail -> new ip


    vi /etc/imscp/bind/working/domain.tld.db
    vi /var/cache/bind/domain.tld.db


    And restart bind

  • I'm not sure to understand everything.


    In the 2 files, I have uncommented the following line and adapted the IP address of the real mail.domain.tld :

    Code
    1. mail IN A 217.170.14.9


    But I still have the error "mail for domain.tld loops back to myself"


    Otherwise, if the IP of the real MX server change, I will have to change all the bind zone.
    Is there a way to use a canonical address instead of address IP (like mail.otherdomain.tld) ?
    Or best, just disable the loop back if there is not any mail active on this domain ?


  • Hello ;


    Before any answer, I would to know what i-MSCP version you are using.


    Thanks for using i-MSCP.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I'm using the Latest STABLE Version: 1.0.3.0

    Edited once, last by Spheerys ().

  • Re ;



    External mail feature is not implemented in stable.. Read http://forum.i-mscp.net/Thread…eature-New-implementation carefully and you will surely understand how to solve your problem.


    In order you have to:


    1. Replace default MX entry set by imscp by your external MX (in your bind zone file)
    2. Remove the domain entry from the postfix virtual_mailbox_domains map
    3. Add the domain into to the Postfix relay_domains map (see the postfix doc about that)


    restart all.


    The main problem is that the change are volatile... I suggest to upgrade to master and use new external mail feature.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • OK thank you Nuxwin !


    The git master branch version is it stable enought to use it in production ?
    If yes, is there a (safe) way to switch from stable 1.0.3.0 to git master branch version ?

    Edited once, last by Spheerys ().