Learn about Centmin Mod LEMP Stack today
Become a Member

Email Domains DNS DKIM setup

Discussion in 'Domains, DNS, Email & SSL Certificates' started by dce, Feb 16, 2024.

  1. dce

    dce Member

    49
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    12:58 PM
    I am setting up dkim for my server - which sends emails from hosted websites (postfix). Just want to get some input before I attempt to deploy.

    Example server host name is xxxx.yyyy.com

    Let say I have 4 domains hosted on the server
    aaa.com
    bbb.com
    ccc.com
    ddd.com


    I have SPF records (xxx.yyy.com included) setup for each domain in their DNS

    I also have DMARC and DKIM records setup for the domains for the main outside mail servers (some are google and some are business 365).

    Do I just use the centminmod script to create a DKIM key / record for server xxx.yyy.com and then setup the created DKIM record in the DNS of each of the domains? Nothing else to do?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    51,987
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:58 AM
    Nginx 1.25.x
    MariaDB 10.x
  3. dce

    dce Member

    49
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    12:58 PM
    Thanks eva2000

    I followed the instructions and ran ./opendkim.sh and I got two errors:
    • cp: cannot stat ‘/etc/opendkim.conf’: No such file or directory
    Looks like I also have to fix a repository problem.

    What do I need to do to get this script to run?

    I am on centos 7 and cmupdate shows latest version.
    MariaDB version: 10.1.48-MariaDB
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,987
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:58 AM
    Nginx 1.25.x
    MariaDB 10.x
    What version of Centmin Mod are you running? 124.00stable or 130.00beta01? MariaDB repo update fix was added to 130.00beta01 already
     
  5. dce

    dce Member

    49
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    12:58 PM
    124.00stable
     
  6. eva2000

    eva2000 Administrator Staff Member

    51,987
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:58 AM
    Nginx 1.25.x
    MariaDB 10.x
    what does the contents of your /etc/yum.repos.d/mariadb.repo repo file look like via cat output for the file
    Code (Text):
    cat /etc/yum.repos.d/mariadb.repo


    IIRC, 124.00stable should also have the fix. Try running cmupdate, and then run centmin.sh menu once and exit and try addons/opendkim.sh again

    If that doesn't work, try switching to 130.00beta01 see https://community.centminmod.com/threads/centmin-mod-124-00stable-130-00beta01-releases.22673/

    to switch from 124.00stable to 130.00beta01 run
    Code (Text):
    cmupdate update-beta
    

    then run centmin.sh menu once and exit and try addons/opendkim.sh again
     
    Last edited: Feb 17, 2024
  7. dce

    dce Member

    49
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    12:58 PM
    Code:
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.1/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    exclude=MariaDB-Galera-server
    
    Regarding "centmin.sh menu once and exit", do you mean run centmin.sh and then just enter "24" to immediately exit out of the script?

    If so I tried that and the same error.

    Updated to 130.00beta01 and ran centmin.sh and then exited with option 24.

    Still the same problem when I run addons/opendkim.sh again.
    Code:
    http://yum.mariadb.org/10.1/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
     
    Last edited: Feb 17, 2024
  8. eva2000

    eva2000 Administrator Staff Member

    51,987
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:58 AM
    Nginx 1.25.x
    MariaDB 10.x
    yes

    I just updated 130.00beta01 with another fix, run cmupdate an run and exit centmin.sh once and try one more time opendkim.sh
     
  9. dce

    dce Member

    49
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    12:58 PM
    yes, it works now!
    Thanks a lot eva2000, much appreciated.