No dkim key in IDN- Domains

Discussion in 'Installation/Configuration' started by nopanic, Jun 30, 2023.

  1. nopanic

    nopanic Member

    Hello all,
    Im having here a fresh installed ubuntu 22 with latest ispconfig.
    I have an IDN- mail-domain created and want also dkim.
    The private key isnt generated.
    Can not find any log entries.
    Its a bug, isnt it?

    Can someone help?
    tia
    Stefan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Quite unlikely. What's more likely is that you changed PHP settings and disallowed exec function which prevents openssl commandto be executed to create the dkim key.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    I just made a short test, creating dkim keys for IDN domains in ISPConfig 3.2.10p1 on Ubuntu 22.04 works perfectly fine, so there is definitely no bug.
     
  4. nopanic

    nopanic Member

    I dont chaned anything, on php settings its a fresh installation. Its a domain with a "ä" that doesnt work. Normal domains works as expected..
    I searched and can not see a disabled exec funtion:


    Thanks!!
    Stefan
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I used a domain with ä as well for testing. The DKIm key gets generated fine. Have you checked the global apache or nginx error.log for errors?
     
  6. nopanic

    nopanic Member

    I checked the apache error.log. Nothing is created. I delete the domain and create it again. Same behavior.
    When I open the dkim config there is a DNS- record:
    klicking generate, changed to:
    when I try to enable dkim there is a message on top:
    and nothing is generated.

    How to debug this?

    tia
    Stefan
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The code is in /usr/local/ispconfig/interface/web/mail/ajax_get_json.php
    The DKIM key gets loaded from that file via Javascript json request directly from the HTML form.
     
  8. Matthias R.

    Matthias R. New Member

    Hi,
    I don't know if you already fixed the issue, but I had the same issue with an IDN domain. The issue happens in the given file ajax_get_json.php on line 48 where the script tries to read the domain record from the database. With my email domain the ajax request was sent with the utf8 encoded domain name (as it was created in ISPConfig) e.g. äöü.de but in the database the domain is saved in IDN format. Hence the database query is not finding a record and the script cannot run successful.
    I changed line 38 from:
    PHP:
    $domain_id $_GET['domain_id'];
    to:
    PHP:
    $domain_id idn_to_ascii($_GET['domain_id']);
    Now the script works like a charm for both IDN and non-IDN domains.

    I hope this fixes the issue on your side, a short reply would be nice.

    Kind Regards
    Matthias
     
    ahrasis likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    ahrasis likes this.
  10. nopanic

    nopanic Member

    Hello Mathias,

    xes its working now. I changed 2 times
    its the latest ubuntu22-ispconfig version.

    thanks for help!
    great!

    Stefan
     

Share This Page