You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
... I have understood that answers are voluntary and community-driven, and not commercial support.
... I have verified that my issue has not been already answered in the past. I also checked previous issues.
Description
I set up Mailcow and enabled DKIM. Outgoing mails sent via SOGo or authenticated SMTPS will be successfully DKIM-signed (tested with dmarctester and MXToolbox). After enabling unauthenticated relaying as described in the docs and trying to send mail via it they will be sent as normal, but they wont be DKIM-signed (again, verified via dmarctester/MXToolbox). I was using MailU before with the same setup (unauthenticated relay) and mails were signed correctly through the unauthenticated relay. Outgoing mail is always sent via a smarthost. The smarthost is not the issue as MailU could send DKIM-signed messages through it just fine.
Logs:
Postfix logs: (Not sure whats responsible exactly for DKIM signing)
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/postscreen[376]: CONNECT from [192.168.178.39]:60689 to [172.22.1.253]:25
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/postscreen[376]: ALLOWLISTED [192.168.178.39]:60689
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/smtpd[379]: connect from unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/smtpd[379]: 603C92008D8: client=unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/cleanup[380]: 603C92008D8: message-id=<>
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/qmgr[343]: 603C92008D8: from=<[email protected]>, size=356, nrcpt=1 (queue active)
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/smtpd[379]: disconnect from unknown[192.168.178.39] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/smtp[381]: Trusted TLS connection established to 192.168.178.230[192.168.178.230]:26: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/smtp[381]: 603C92008D8: to=<[email protected]>, relay=192.168.178.230[192.168.178.230]:26, delay=0.66, delays=0.27/0.06/0.26/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as D975FA1D1)
postfix-mailcow-1 | Feb 2 16:07:16 2cd046d5fadc postfix/qmgr[343]: 603C92008D8: removed
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/postscreen[405]: CONNECT from [192.168.178.39]:61033 to [172.22.1.253]:25
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/postscreen[405]: ALLOWLISTED [192.168.178.39]:61033
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/smtpd[408]: connect from unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/smtpd[408]: 34A242008D8: client=unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/cleanup[409]: 34A242008D8: message-id=<>
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/qmgr[343]: 34A242008D8: from=<[email protected]>, size=370, nrcpt=1 (queue active)
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/smtpd[408]: disconnect from unknown[192.168.178.39] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/smtp[410]: Trusted TLS connection established to 192.168.178.230[192.168.178.230]:26: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/smtp[410]: 34A242008D8: to=<[email protected]>, relay=192.168.178.230[192.168.178.230]:26, delay=0.48, delays=0.17/0.06/0.18/0.08, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 95F0CA233)
postfix-mailcow-1 | Feb 2 16:17:51 2cd046d5fadc postfix/qmgr[343]: 34A242008D8: removed
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/postscreen[423]: CONNECT from [192.168.178.39]:61158 to [172.22.1.253]:25
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/postscreen[423]: ALLOWLISTED [192.168.178.39]:61158
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/smtpd[426]: connect from unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/smtpd[426]: 5C4092008D8: client=unknown[192.168.178.39]
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/cleanup[427]: 5C4092008D8: message-id=<>
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/qmgr[343]: 5C4092008D8: from=<[email protected]>, size=370, nrcpt=1 (queue active)
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/smtpd[426]: disconnect from unknown[192.168.178.39] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/smtp[429]: Trusted TLS connection established to 192.168.178.230[192.168.178.230]:26: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/smtp[429]: 5C4092008D8: to=<[email protected]>, relay=192.168.178.230[192.168.178.230]:26, delay=0.46, delays=0.16/0.05/0.18/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BB346A2E6)
postfix-mailcow-1 | Feb 2 16:22:36 2cd046d5fadc postfix/qmgr[343]: 5C4092008D8: removed
Steps to reproduce:
1. Enable unauthenticated relaying as described in the Docs
2. Send an email via unauthenticated SMTP port 25 (for example using Powershell's Send-MailMessage) to an external recipient (I tested with Gmail and DMarcTester/MXToolbox)
3. Check DKIM results from MXtoolBox/Dmarctester -> Result: Message not signed, no DKIM signature was provided
Which branch are you using?
master
Which architecture are you using?
x86
Operating System:
Debian 12
Server/VM specifications:
8GB RAM, 300GB NVMe, 4c/4t
Is Apparmor, SELinux or similar active?
no
Virtualization technology:
KVM
Docker version:
27.5.1
docker-compose version or docker compose version:
v2.32.4
mailcow version:
2025-01
Reverse proxy:
none
Logs of git diff:
No changes except for TLS-certificate and unauthenticated relay:
local_addrs = [127.0.0.0/8, ::ffff:127.0.0.0/104, ::1/128, fe80::/10, 172.22.1.0/24, fd4d:6169:6c63:6f77::/64, 192.168.178.0/24, 10.0.0.0/16];
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 192.168.178.0/24 10.0.0.0/16
Ok, so, after randomly playing around with all kinds of settings I finally figured this out.
I had already added my networks (192.168.178.0/24 and 10.0.0.0/16) to Mailcow's "Forwarding hosts", and had them set to "Disable Spam Filter". Apparently, rspamd (which is responsible for spam filtering), does something(?) with DKIM and having the spam filter disabled for those specific networks would result in my mails bypassing rspamd and not being DKIM signed. I have no idea why this breaks DKIM but perhaps someone with some more knowledge on that topic could step in and help here.
I'm not sure if this is actually a bug now or "intended behaviour". In the latter case it should probably be stated in the docs that hosts/networks might be needed to be added to forwarding hosts, and that it can break DKIM.
Contribution guidelines
I've found a bug and checked that ...
Description
Logs:
Steps to reproduce:
Which branch are you using?
master
Which architecture are you using?
x86
Operating System:
Debian 12
Server/VM specifications:
8GB RAM, 300GB NVMe, 4c/4t
Is Apparmor, SELinux or similar active?
no
Virtualization technology:
KVM
Docker version:
27.5.1
docker-compose version or docker compose version:
v2.32.4
mailcow version:
2025-01
Reverse proxy:
none
Logs of git diff:
Logs of iptables -L -vn:
Logs of ip6tables -L -vn:
Logs of iptables -L -vn -t nat:
Logs of ip6tables -L -vn -t nat:
DNS check:
The text was updated successfully, but these errors were encountered: