Want to subscribe to topics you're interested in?
Become a Member

Opendkim wrong values generated

Discussion in 'Bug Reports' started by pamamolf, Dec 17, 2024.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,077
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    11:46 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Hello,

    Using Rocky Linux and latest Centminmod beta just installed i tried to generate opendkim keys as always and i got it as two parts splited by "


    /usr/local/src/centminmod/addons/opendkim.sh
    or
    /usr/local/src/centminmod/addons/opendkim.sh domain.com

    Code:
    v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAux3TkFWCF9IhTmC3LiEkTUKGwOki3Yrt7bLjS88NMdZwRpDco/NW06Na+7v18Xd5t83KN8Fpsfsw22E47kUTGUYc/h9q+DxwwQwZginI7KmG3s/PtvJVlLhAnpzAsRn7cYChin2AQ8Q5Ycldpde2N89DO58ujaQ//7efCparubcBB1fEuwFyiyH0X32HyL+a3udS0VcxZvbmRL"    "7a3vWBtvQ6eLZLnRwB9kQtrDw4mZ0HVe3h8QwNrYQ4rmLexarEmY0n53+rPfsGHY5+j1wDjnwhgiY7wl03GY1eCSLat7IJDzCN9Y1/q1VqjKaonzMl7f6gDXVc84wh2o8t/dvXrQIDAQAB"
    and is not accepted as invalid...

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,358
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    7:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what's output for debug run

    Code (Text):
    bash -x /usr/local/src/centminmod/addons/opendkim.sh
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,358
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    7:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Try this patch and see if it works

    Code (Text):
    cmupdate
    cmdir
    wget -O /usr/local/src/centminmod/opendkim.patch https://gist.github.com/centminmod/39d6d0cb48bf13629810fbaa4c5d5dfa/raw/opendkim.patch
    patch -p1 < opendkim.patch
    

    then run clean commands for mainhostname and your domain name to wipe the bad entries from previous runs
    Code (Text):
    /usr/local/src/centminmod/addons/opendkim.sh clean
    /usr/local/src/centminmod/addons/opendkim.sh clean domain.com
    

    then complete rest of the guide at https://community.centminmod.com/th...ver-email-doesnt-end-up-in-spam-inboxes.6999/ and test if DKIM works via mail-tester.com i.e. https://community.centminmod.com/th...oesnt-end-up-in-spam-inboxes.6999/#post-46858
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,077
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    11:46 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    I updated to latest Centminmod and i used:

    Code:
    /usr/local/src/centminmod/addons/opendkim.sh clean
    /usr/local/src/centminmod/addons/opendkim.sh clean domain.com
    Then i run:

    Code:
    /usr/local/src/centminmod/addons/opendkim.sh
    /usr/local/src/centminmod/addons/opendkim.sh domain.com
    i didn't get any output at the screen as i did in the first time so checked at /root/centminlogs/ and i found the latest entries...

    Then i use as selector in the TXT record:

    Code:
    default2024._domainkey.domain.com
    and the key v=DKIM1; k=rsa; p=MIIBIjA.....

    Cloudflare automatically remove the domain from the selector and set it as:

    Code:
    default2024._domainkey
    Then i checked on various online checkers using the domain name and both selectors and in both cases i got not found.

    It was always easy to get that in the past. Not sure what i did :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,358
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    7:46 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If you ran clean command beforehand, it repopulates the entries so you do not need to re-run it without clean command. IIRC, the non-clean command won't output anything if entries already exist - and they would exist as clean command repopulates the entries.

    what does SSH command line dig check give i.e.

    Code (Text):
    dig +short TXT default2024._domainkey.domain.com