Problem with Custom DNS record and external mail server

  • After upgrading all 3 small vps from 1.2.11 or 1.2.9 to 1.2.17 I had to recall all external mail server config for each domain (i used all vps,only for website hosting) only 2 or 3 with email.


    This morning I had some error with mail because all domains mail goes to wrong destination (localhost and not to external server. I already had configured all MX record, and they works correctly).


    Problem is that some custom dns config cant be deleted or edited. I have to change and remove custom dns config in customer panel, then open customer, then redit the config.
    For some customer it's ok, for other now I have 3 mx record and 2 of them I cant edit.
    Plus I had this error by email:



    Quote from server

    Dear admin,An exception has been thrown in file/var/www/imscp/gui/library/Functions/Shared.php at line 2699:=================================================================SQLSTATE[42000]: Syntax error or access violation: 1064 You have anerror in your SQL syntax; check the manual that corresponds to yourMySQL server version for the right syntax to use near ')' at line 6Query was: SELECT * FROM domain_dns WHERE domain_dns_id IN() =================================================================Debug backtrace:---------------File: /var/www/imscp/gui/public/client/mail_external_edit.php at line361Function: execute_query()File: /var/www/imscp/gui/public/client/mail_external_edit.php at line551Function: client_editExternalMailServerEntries()Additional information:----------------------Http User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0)Gecko/20100101 Firefox/44.0Request Uri: /client/mail_external_edit.php?item=6;normalHttp Referer: https://my.server.it:4443/client/domains_manage.php Remote Addr: 93.50.91.107Server Addr: 5.249.158.14____________________________________________________________i-MSCP Exception Mail WriterNote: You will not receive further emails for this exception in thenext 24 hours.


    So my question is ,may i disable all dns in the server and setup the original dns ? so server read the right config.
    Or, what is the table with wrong config ?
    Any suggestion is great


    Thx ;(;(

  • You deleted some entry manually in the domain_dns table which explain the error. To resume here, you database is corrupted. You must fix your database. Eg, for domain on which external mail feature is enabled, you must ensure that related DNS records are present in the domain_dns table, else, you must disable external mail feature for them and reconfigure the whole once done.


    If you don't figure out alone, add my SSH key to your server and give me the list of domain which must be fixed.

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

  • First of all thx for reply and explanation.


    I'm pretty sure I didnt edit file domain_dns table manually but only via control panel, but maybe I did some mistake there


    To understand where is the error I just only ask to server where is the MX for each domain.


    host -t MX example.com


    When I see more then 1 record, I think there is error.


    About ssh key, maybe I can give you root access directly o teamvewver ? I didnt setup access with key.
    root pass is ok for me and I already work with mrpink without problem.


    Right now server has 2 or 3 MX record for each domain but it works.
    Now question:
    1-There is no hurry about fix and there will be 2 server with about a total of 20 domains to check or fix. I can write to your email pass, server and domains ?
    2 - in another local test server, I disabled to do some test and understand how it works, the bind service with perl imscp-autoinstall -dar named
    The question is with no bind working, server reads all record of domain from which dns ? I just make some ping and all IP were right. This is just to know.



    Thx for this help



    just make some other test, I find the vi /etc/bind/named.conf.local
    it contains all link for each domain on server like:


    Code
    1. // imscp [xxxxxx.it] entry BEGINzone "xxxxxx.it" { type master; file "/var/cache/bind/xxxxxx.it.db"; allow-transfer { localhost; }; notify yes;};



    IF I open /var/cache/bind/xxxxxx.it.db there are all dns record:





    it this the file I have to edit ?
    I just edit it on test local server with 1.2.17 and I restart server. Edit are still there. So please only need to know if I can edit them or I will crash the server by myself =O=O
    Just to know


    last question then I go to sleep, IF I want to setup a different DNS to read the record direclty from autoritative dns, where I setup it , if it's possible ?


    thx thx and thx again for suggestion and help
    Umberto

    Edited 2 times, last by bubaweb ().

  • Editing any file will not help you. You must fix your database which is corrupted.

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