mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[GH-ISSUE #2208] Domain DKIM don't sign mail #1544
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1544
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Orminor77 on GitHub (Mar 29, 2021).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2208
Hello everyone,
I don't think i'm the only one to have this issue.
When I do all the configuration for domain and the DKIM box it's green, my mail don't pass dkim on gmail or other webmail, can someone help me to fix that please, i read some articles about openDKIM on mobodoa website or github but don't work for me, or I fail somewhere.
Thanks in advance for your answer.
@ghost commented on GitHub (Apr 1, 2021):
Same issue for me, DKIM configuration is fine but all of my mails are not signed..
@Orminor77 commented on GitHub (Apr 1, 2021):
I could see that Modoboa uses Amavis to sign mails but only locally, I don't understand the interest, there is surely a configuration to do with openDKIM which is also provided with the Modoboa installer. I also tried to install via CentOS 7, Debian 9-10 and Ubuntu 18.04-20.04 but still the same problem. I'm out of ideas.
@tonioo commented on GitHub (Apr 2, 2021):
If you used the installer, then OpenDKIM should be installed to sign emails. If you did a manual setup, then you need to install either OpenDKIM or configure amavis to sign emails.
@yigitkerem commented on GitHub (Apr 5, 2021):
I did use the installer and yet, still does not sign emails.
@tonioo commented on GitHub (Apr 6, 2021):
@yigitkeremoktay Do you see something in logs?
@Orminor77 commented on GitHub (Apr 6, 2021):
Personally I just used the quick installer and I also followed the tutorials of "Linuxbabe" on Debian, Ubuntu and Centos but on all three the mails do not sign
@yigitkerem commented on GitHub (Apr 6, 2021):
Is there a specific log that I should check?
@tonioo commented on GitHub (Apr 6, 2021):
/var/log/mail.log
@Orminor77 commented on GitHub (Apr 7, 2021):
@tonioo Hello, do you have an idea of the issue?
@yigitkerem commented on GitHub (Apr 8, 2021):
I don't see anything suspcious but there is this
but there is nothing for our accounts, the ones hosted on our mail server
@tonioo commented on GitHub (Apr 9, 2021):
Can you check the content of the
dkimview in your database?@Orminor77 commented on GitHub (Apr 9, 2021):
How to do that? please
@yigitkerem commented on GitHub (Apr 10, 2021):
@mattg66 commented on GitHub (Apr 11, 2021):
Same issue here, installer installed, version 1.17.0
@rheinon commented on GitHub (Apr 11, 2021):
Same here. Fresh install on Debian 10.9. Dkim key is installed in DNS. SPF all looks good. Email test score: 9/10. 1 point loss is from DKIM not signing.
Postfix version:
root@mail:~# postconf mail_version
mail_version = 3.4.14
Opendkim is running:
~# systemctl status opendkim
Apr 10 18:29:22 mail.domain.com systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter...
Apr 10 18:29:22 mail.domain.com systemd[1]: Started OpenDKIM DomainKeys Identified Mail (DKIM) Milter.
Apr 10 18:29:22 mail.domain.com opendkim[14258]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)
/var/lib/dkim/domain.com.pem
Permission = 600, Owner =opendkim, private key looks good
/etc/default/opendkim:
RUNDIR=/var/run/opendkim
USER=opendkim
GROUP=opendkim
PIDFILE=$RUNDIR/$NAME.pid
EXTRAAFTER=
SOCKET="inet:12345@localhost" # no effect if taking out the quotes or making it 127.0.0.1
/etc/postfix/main.cf:
smtpd_milters = inet:127.0.0.1:12345
non_smtpd_milters = inet:127.0.0.1:12345
milter_default_action = accept
milter_content_timeout = 30s
/etc/opendkim.conf:
KeyTable dsn:mysql://opendkim:vdRdiOWDEY9fjoFG@127.0.0.1/modoboa/table=dkim?keycol=id?datacol=domain_name,selector,private_key_path
SigningTable dsn:mysql://opendkim:vdRdiOWDEY9fjoFG@127.0.0.1/modoboa/table=dkim?keycol=domain_name?datacol=id
Socket inet:12345@localhost
PidFile /var/run/opendkim/opendkim.pid
ExternalIgnoreList /etc/opendkim.hosts
InternalHosts /etc/opendkim.hosts
/etc/opendkim.hosts:
127.0.0.1
::1
localhost
/run/opendkim/opendkim.pid
Owner is root:root. No effect if changing it to opendkim:opendkim
MariaDB [modoboa]> select * from dkim;

Here's the /var/log/mail.log when opendkim is restarted:
Apr 10 18:53:06 mail opendkim[14258]: OpenDKIM Filter: mi_stop=1
Apr 10 18:53:06 mail opendkim[14258]: OpenDKIM Filter v2.11.0 terminating with status 0, errno = 0
Apr 10 18:53:06 mail opendkim[17449]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)
@jefffryfry commented on GitHub (Apr 15, 2021):
I can confirm same behavior. emails not signing. ran quick installer.
I did find this in the log...
Apr 15 14:00:08 mail opendkim[1307]: 53ED7121C0C: no signing table match for 'root@mail.replacedomain.tech'
Apr 15 14:00:08 mail opendkim[1307]: 53ED7121C0C: no signature data
but not sure where to remedy this
@camodebw commented on GitHub (Apr 16, 2021):
I can confirm the same issue. Outgoing Emails are not DKIM signed.
Auto Installer on Debian 10 runs fine, DKIM Key is generated.
In the mail.log I can't see any opendkim error.
#postconf mail_version
mail_version = 3.4.14
#ls -l /var/lib/dkim/
total 9
-rw------- 1 opendkim opendkim 1679 Apr 15 16:44 mydomain.tld.pem
-rw------- 1 opendkim opendkim 1679 Apr 15 19:51 mydomain2.tld.de.pem
#postconf mail_version
mail_version = 3.4.14
#cat /etc/default/opendkim
RUNDIR=/var/run/opendkim
USER=opendkim
GROUP=opendkim
PIDFILE=$RUNDIR/$NAME.pid
EXTRAAFTER=
SOCKET="inet:12345@localhost"
#cat /etc/postfix/main.cf
smtpd_milters = inet:127.0.0.1:12345
non_smtpd_milters = inet:127.0.0.1:12345
milter_default_action = accept
milter_content_timeout = 30s
milter_protocol = 6
#cat /etc/opendkim.conf
Syslog yes
SyslogSuccess Yes
LogWhy Yes
LogResults Yes
UMask 007
KeyTable dsn:pgsql://opendkim:PaSSword@127.0.0.1/modoboa/table=dkim?keycol=id?datacol=domain_name,selector,private_key_path
SigningTable dsn:pgsql://opendkim:PaSSword@127.0.0.1/modoboa/table=dkim?keycol=domain_name?datacol=id
SubDomains yes
Canonicalization relaxed/relaxed
Socket inet:12345@localhost
PidFile /var/run/opendkim/opendkim.pid
OversignHeaders From
TrustAnchorFile /usr/share/dns/root.key
UserID opendkim
ExternalIgnoreList /etc/opendkim.hosts
InternalHosts /etc/opendkim.hosts
#cat /etc/opendkim.hosts
127.0.0.1
::1
localhost
#ls -l /run/opendkim/opendkim.pid
-rw-rw---- 1 root root 4 Apr 16 11:14 /run/opendkim/opendkim.pid
#modoboa=> postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+--------------+-----------+---------+-------+-----------------------
amavis | amavis | SQL_ASCII | C | C | =Tc/amavis +
| | | | | amavis=CTc/amavis +
| | | | | modoboa=CTc/amavis
modoboa | modoboa | SQL_ASCII | C | C |
postgres | postgres | SQL_ASCII | C | C |
spamassassin | spamassassin | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
(6 rows)
#modoboa-> postgres=#\dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------------------+-------+---------
public | admin_alarm | table | modoboa
public | admin_alias | table | modoboa
public | admin_dnsblresult | table | modoboa
public | admin_domain | table | modoboa
public | admin_domainalias | table | modoboa
public | admin_mailbox | table | modoboa
public | admin_mailboxoperation | table | modoboa
public | admin_mxrecord | table | modoboa
public | admin_quota | table | modoboa
public | admin_senderaddress | table | modoboa
public | auth_group | table | modoboa
public | auth_group_permissions | table | modoboa
public | auth_permission | table | modoboa
public | authtoken_token | table | modoboa
public | core_extensionupdatehistory | table | modoboa
public | core_localconfig | table | modoboa
public | core_log | table | modoboa
public | core_objectaccess | table | modoboa
public | core_user | table | modoboa
public | core_user_groups | table | modoboa
public | core_user_user_permissions | table | modoboa
public | django_content_type | table | modoboa
public | django_migrations | table | modoboa
public | django_session | table | modoboa
public | django_site | table | modoboa
public | dnstools_dnsrecord | table | modoboa
public | limits_domainobjectlimit | table | modoboa
public | limits_userobjectlimit | table | modoboa
public | maillog_maillog | table | modoboa
public | modoboa_admin_aliasrecipient | table | modoboa
public | modoboa_contacts_addressbook | table | modoboa
public | modoboa_contacts_category | table | modoboa
public | modoboa_contacts_contact | table | modoboa
public | modoboa_contacts_contact_categories | table | modoboa
public | modoboa_contacts_emailaddress | table | modoboa
public | modoboa_contacts_phonenumber | table | modoboa
public | otp_static_staticdevice | table | modoboa
public | otp_static_statictoken | table | modoboa
public | otp_totp_totpdevice | table | modoboa
public | postfix_autoreply_arhistoric | table | modoboa
public | postfix_autoreply_armessage | table | modoboa
public | radicale_accessrule | table | modoboa
public | radicale_sharedcalendar | table | modoboa
public | radicale_usercalendar | table | modoboa
public | relaydomains_recipientaccess | table | modoboa
public | reversion_revision | table | modoboa
public | reversion_version | table | modoboa
public | transport_transport | table | modoboa
(48 rows)
#modoboa-> postgres=#\dv
List of relations
Schema | Name | Type | Owner
--------+------+------+---------
public | dkim | view | modoboa
(1 row)
#modoboa=> select * from dkim;
-[ RECORD 1 ]----+----------------------------------------
id | 3
domain_name | mydomain.tld
private_key_path | /var/lib/dkim/mydomain.tld.pem
selector | myd
-[ RECORD 2 ]----+----------------------------------------
id | 2
domain_name | mydomain2.tld
private_key_path | /var/lib/dkim/mydomain2.tld.pem
selector | myd2
@walfloresh commented on GitHub (Apr 20, 2021):
Same exact issue, fresh modoboa 1.17 install on Debian 10, DKIM is generated correctly from GUI, configured on DNS, DKIM Key is present on mysql db but opendkim is not signing any outgoing email. No dkim errors on mail.log whatsoever.
Any advice?
@dev-mg commented on GitHub (Apr 20, 2021):
I just had the same problem on Ubuntu 20.4 and fixed it that way:
Works fine now :)
@rheinon commented on GitHub (Apr 20, 2021):
I can confirm this works with Debian 10 as well. Great work!
@ghost commented on GitHub (Apr 20, 2021):
I will try this
@Orminor77 commented on GitHub (Apr 20, 2021):
Thanks for your time all, its worked for me !
@mattg66 commented on GitHub (Apr 20, 2021):
Please reopen this issue to ensure it is resolved in the installer @Orminor77
@Orminor77 commented on GitHub (Apr 21, 2021):
Ok no problem ;)
@mattg66 commented on GitHub (Apr 22, 2021):
This fix does not work on Debian 10, Postfix refuses to send mail after the change. Postfix repsonds with a 451 4.7.1
@rheinon commented on GitHub (Apr 22, 2021):
Is that a fresh install? I got 2 Debian 10.9 setups, fresh install, both working perfectly after the fix. You might want to post your /etc/postfix/main.cf and check settings against the default setups posted above.
@tonioo commented on GitHub (Apr 23, 2021):
I've just fixed the installer:
github.com/modoboa/modoboa-installer@c9d67250ba.Thank you for the analysis!
@rodrigoslayertech commented on GitHub (Apr 30, 2021):
Thanks!
You saved me!
@mattg66 commented on GitHub (May 21, 2021):
This was due to a permissions error on the DKIM keys from server migration.