DKIM & ISPConfig

Discussion in 'Installation/Configuration' started by pssadm, Feb 8, 2024.

Tags:
  1. pssadm

    pssadm Member

    Does anyone know if OpenDKIM needs to be installed in order to get outgoing email signed? I've added the DKIM through the ISPConfig Email, Domain, DKIM section. Then added the key to my DNS. If I test it directly using mxtoolbox or other by entering "Domain.com:selector" it comes back with the key. Now when I run a test on DKIM through appmaildev.com that checks the raw information it outputs:

    Code:
    DKIM: none
    DKIM-Result: none (no signature)
    I'm also wondering if the default Ubuntu18/Postfix/Dovecot/Apache install looks for SPF/DKIM records and denotes the PASS/FAIL into the message header. In reading a bit more, I don't have Amavis installed in my implementation because i use a relayhost to send mail. Should I be installing Amavis in order to make this work? Nervous to install anything in a working environment that may break the machine. o_O:)

    Okay, I'm fairly certain I need to get Amavis installed to make DKIM sign outgoing emails. Is there anyway to reconfigure ISPconfig at this stage in the game without messing up the whole thing? I remember once running an ISPConfig_Update.sh script and it asked if I wanted to enable items... would that be safe at this point?

    As always, thank you for taking the time to reply in advance.
    Ben
     
    Last edited: Feb 8, 2024
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is not using amavis anymore, it uses Rspamd for DKIM signing on any recent installation. Amavis was used in the past. So please do not try to install Amavis on a system that uses Rspamd as it will completely mess up your system. Yo do not need Amavis when Rspamd is installed and vice versa.

    And do not install OpenDkim, it is not used on ISPConfig systems and it should not be installed on your server.

    I do not know that software but I've seen that such test websites show wrong results. So instead of relying on such a test site, better take a look at the email headers yourself. You must check an email that was sent with a normal email client that properly authenticated itself on your system.

    And you should run the test script and post its output: https://forum.howtoforge.com/threads/please-read-before-posting.58408/

    Please run the test script and post the result:

    https://forum.howtoforge.com/threads/please-read-before-posting.58408/
     
  3. Yawo

    Yawo New Member

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 22.04.5 LTS
     
    [INFO] uptime:  13:11:53 up 21 days, 16:55,  3 users,  load average: 0.16, 0.14, 0.10
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:            62Gi       2.4Gi        58Gi       710Mi       1.7Gi        59Gi
    Swap:             0B          0B          0B
     
    [INFO] systemd failed services status:
      UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.
    
    [INFO] ISPConfig is installed.
    [WARN] /usr/local/ispconfig/server/lib/config.inc.php is missing.
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.1.30
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.1.30
    
    ##### PORT CHECK #####
    
    [WARN] Port 21 (FTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [WARN] I could not determine which web server is running.
    [WARN] I could not determine which mail server is running.
    [WARN] I could not determine which pop3 server is running.
    [WARN] I could not determine which imap server is running.
    [WARN] I could not determine which ftp server is running.
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [localhost]:6379                (-)
    [localhost]:783         (-)
    [localhost]:11334               (-)
    [localhost]:11333               (-)
    [localhost]:11332               (-)
    [localhost]:11211               (-)
    [anywhere]:4190         (-)
    [anywhere]:587          (-)
    ***.***.***.***:53              (-)
    [anywhere]:995          (-)
    [anywhere]:993          (-)
    [anywhere]:22           (-)
    [anywhere]:25           (-)
    [anywhere]:110          (-)
    [anywhere]:143          (-)
    [anywhere]:465          (-)
    [anywhere]:3306         (-)
    *:*:*:*::*:4190         (-)
    *:*:*:*::*:8081         (-)
    *:*:*:*::*:8080         (-)
    *:*:*:*::*:587          (-)
    *:*:*:*::*:995          (-)
    *:*:*:*::*:993          (-)
    *:*:*:*::*:22           (-)
    *:*:*:*::*:25           (-)
    *:*:*:*::*:80           (-)
    [localhost]10           (-)
    [localhost]43           (-)
    *:*:*:*::*:443          (-)
    *:*:*:*::*:465          (-)
    *:*:*:*::*:3306         (-)
    
    
    
    
    ##### IPTABLES #####
    
    
    
    
    ##### LET'S ENCRYPT #####
    
    
    Can you please help on this. Outgoing Emails are not DKIM signed
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the test script as the root user.
     
  5. Yawo

    Yawo New Member

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 22.04.5 LTS
     
    [INFO] uptime:  13:50:53 up 4 min,  2 users,  load average: 0.09, 0.17, 0.09
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:            62Gi       1.9Gi        59Gi        72Mi       1.2Gi        60Gi
    Swap:             0B          0B          0B
     
    [INFO] systemd failed services status:
      UNIT                       LOAD   ACTIVE SUB    DESCRIPTION
    ● unbound-resolvconf.service loaded failed failed Unbound DNS server via resolvconf
    ● unbound.service            loaded failed failed Unbound DNS server
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    2 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.1.30
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.1.30
    
    ##### PORT CHECK #####
    
    [WARN] Port 21 (FTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 1153)
    [INFO] I found the following mail server(s):
            Postfix (PID 2278)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 1642)
    [INFO] I found the following imap server(s):
            Dovecot (PID 1642)
    [WARN] I could not determine which ftp server is running.
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    ***.***.***.***:53              (722/systemd-resolve)
    [anywhere]:4190         (1642/dovecot)
    [localhost]:6379                (750/redis-server)
    [anywhere]:3306         (839/mariadbd)
    [anywhere]:110          (1642/dovecot)
    [anywhere]:25           (2278/master)
    [anywhere]:22           (796/sshd:)
    [anywhere]:143          (1642/dovecot)
    [anywhere]:465          (2278/master)
    [anywhere]:587          (2278/master)
    [anywhere]:993          (1642/dovecot)
    [anywhere]:995          (1642/dovecot)
    [localhost]:11211               (731/memcached)
    [localhost]:11334               (1647/rspamd:)
    [localhost]:11332               (1647/rspamd:)
    [localhost]:11333               (1647/rspamd:)
    *:*:*:*::*:8081         (1153/apache2)
    *:*:*:*::*:8080         (1153/apache2)
    *:*:*:*::*:4190         (1642/dovecot)
    *:*:*:*::*:3306         (839/mariadbd)
    *:*:*:*::*:80           (1153/apache2)
    [localhost]10           (1642/dovecot)
    *:*:*:*::*:25           (2278/master)
    *:*:*:*::*:22           (796/sshd:)
    [localhost]43           (1642/dovecot)
    *:*:*:*::*:465          (2278/master)
    *:*:*:*::*:443          (1153/apache2)
    *:*:*:*::*:587          (2278/master)
    *:*:*:*::*:993          (1642/dovecot)
    *:*:*:*::*:995          (1642/dovecot)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    ufw-before-logging-input  all  --  [anywhere]/0            [anywhere]/0           
    ufw-before-input  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-input  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-input  all  --  [anywhere]/0            [anywhere]/0           
    ufw-reject-input  all  --  [anywhere]/0            [anywhere]/0           
    ufw-track-input  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination         
    ufw-before-logging-forward  all  --  [anywhere]/0            [anywhere]/0           
    ufw-before-forward  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-forward  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-forward  all  --  [anywhere]/0            [anywhere]/0           
    ufw-reject-forward  all  --  [anywhere]/0            [anywhere]/0           
    ufw-track-forward  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    ufw-before-logging-output  all  --  [anywhere]/0            [anywhere]/0           
    ufw-before-output  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-output  all  --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-output  all  --  [anywhere]/0            [anywhere]/0           
    ufw-reject-output  all  --  [anywhere]/0            [anywhere]/0           
    ufw-track-output  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination         
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-after-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-after-input (1 references)
    target     prot opt source               destination         
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:137
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:138
    ufw-skip-to-policy-input  tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:139
    ufw-skip-to-policy-input  tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:445
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:67
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:68
    ufw-skip-to-policy-input  all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    
    Chain ufw-after-logging-forward (1 references)
    target     prot opt source               destination         
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-after-logging-input (1 references)
    target     prot opt source               destination         
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-after-logging-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-after-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-forward (1 references)
    target     prot opt source               destination         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 8
    ufw-user-forward  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-before-input (1 references)
    target     prot opt source               destination         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0           
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-logging-deny  all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    DROP       all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 8
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp spt:67 dpt:68
    ufw-not-local  all  --  [anywhere]/0            [anywhere]/0           
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***          udp dpt:5353
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***      udp dpt:1900
    ufw-user-input  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-before-logging-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-logging-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-logging-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-output (1 references)
    target     prot opt source               destination         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0           
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-user-output  all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-logging-allow (0 references)
    target     prot opt source               destination         
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "
    
    Chain ufw-logging-deny (2 references)
    target     prot opt source               destination         
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID limit: avg 3/min burst 10
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-not-local (1 references)
    target     prot opt source               destination         
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type LOCAL
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type MULTICAST
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    ufw-logging-deny  all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10
    DROP       all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-reject-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-reject-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-reject-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-skip-to-policy-forward (0 references)
    target     prot opt source               destination         
    DROP       all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-skip-to-policy-input (7 references)
    target     prot opt source               destination         
    DROP       all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-skip-to-policy-output (0 references)
    target     prot opt source               destination         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-track-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-track-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-track-output (1 references)
    target     prot opt source               destination         
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            ctstate NEW
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            ctstate NEW
    
    Chain ufw-user-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-user-input (1 references)
    target     prot opt source               destination         
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:20
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:21
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:22
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:25
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:53
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:80
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:110
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:143
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:443
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:465
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:587
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:993
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:995
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:8080
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:8081
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 40110:40210
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:53
    
    Chain ufw-user-limit (0 references)
    target     prot opt source               destination         
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
    REJECT     all  --  [anywhere]/0            [anywhere]/0            reject-with icmp-port-unreachable
    
    Chain ufw-user-limit-accept (0 references)
    target     prot opt source               destination         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-user-logging-forward (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-logging-input (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-logging-output (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-output (1 references)
    target     prot opt source               destination         
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
    



    Outgoing emails are not DKIM Signed. Thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Mail system is running. Go to email in ISPConfig, open email domain settings, click on "generate dkim key" button to create a dkim key. Then enable the "enable DKIM" checkbox and press save.
     
  7. Yawo

    Yawo New Member

    Did that. Shall i update my dns records now with the new generated key ?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. Yawo

    Yawo New Member

    That's perfect
    Everything good now. Emails are DKIM signed and validated. Thanks so much
     
    ahrasis likes this.

Share This Page