Mailcow-dockerized: [Feature] Add ARC signing for inbound mails

Created on 12 May 2019  ·  10Comments  ·  Source: mailcow/mailcow-dockerized

Is there a chance to add ARC signing for inbound Emails?

You only have to add

sign_inbound = true;
use_domain_sign_inbound = "recipient";

to data/conf/rspamd/local.d/arc.conf

I already tried it and it works ;)

Thanks.

Most helpful comment

Ich switch mal auf Deutsch.

Ich hatte folgendes Problem.

Ich sende eine Email von meinem Outlook.com Account an einen Alias von der Mailcow Installation. Dieser Alias leitet die Email an einen googlemail Account weiter.

Was passiert:
Mailcow überprüft spf, dkim alles in Ordnung. -> ARC wird beim weiterleiten auf googlemail nicht gesetzt. Habe ich mehrfach geprüft.
Anschließend überprüft Google spf, dkim. SPF schlägt klarerweise fehl. ARC Header gibt's leider keinen.

Nun habe ich nach einer Lösung gesucht, wie auch ARC bei diesem Szenario gesetzt wird.
Da bin ich auf das Inbound Signing gestoßen und damit wird in diesem Fall auch ein ARC Header gesetzt.

Beim Outbound signing, wird ja nur überprüft ob der User authentifiziert ist, ob da SPF, DKIM stimmen wird nicht verifiziert.
ARC ist ja eigentlich dafür da das die SPF und DKIM Resultate dem nächsten Mailserver übergeben werden.

Der ARC Header darf ja explizit mehrfach gesetzt werden. Das "i" wird dann hochgezählt.

All 10 comments

What‘s the purpose of this? I couldn’t find these options in the rspamd documentation and it‘s not obvious to me why one would want to sign inbound messages.

It's useful for forwarded mails. Google does also inbound signing and checks for it.

See: https://github.com/rspamd/rspamd/issues/2245

What exactly do we not do now? Or what do we different with ARC right now?
We check for ARC and rate it. We sign messages when they leave us. How do we profit from signing them inbound? It is not obvious to me either. :) Let us know.

For example:
I receive a message from outlook.com and i redirect it to google. In this situation no ARC is added, because the message sender is outlook.com and i have no keys.
Inbound signing will prevent this, because it selects signing by the recipient.

But we sign forwarded mail.

Yeah but not the mails from outlook.com or google or xyz. RSpamd selects by the envelope domain -- for outlook.com i don't have any key to sign.

Inbound signing selects by the recipient and for the recipient i do have keys.

Try it.....

RSpamd selects by the envelope domain

But the envelope domain is not preserved during forwarding. It is replaced with the forwarder's domain.

Ich switch mal auf Deutsch.

Ich hatte folgendes Problem.

Ich sende eine Email von meinem Outlook.com Account an einen Alias von der Mailcow Installation. Dieser Alias leitet die Email an einen googlemail Account weiter.

Was passiert:
Mailcow überprüft spf, dkim alles in Ordnung. -> ARC wird beim weiterleiten auf googlemail nicht gesetzt. Habe ich mehrfach geprüft.
Anschließend überprüft Google spf, dkim. SPF schlägt klarerweise fehl. ARC Header gibt's leider keinen.

Nun habe ich nach einer Lösung gesucht, wie auch ARC bei diesem Szenario gesetzt wird.
Da bin ich auf das Inbound Signing gestoßen und damit wird in diesem Fall auch ein ARC Header gesetzt.

Beim Outbound signing, wird ja nur überprüft ob der User authentifiziert ist, ob da SPF, DKIM stimmen wird nicht verifiziert.
ARC ist ja eigentlich dafür da das die SPF und DKIM Resultate dem nächsten Mailserver übergeben werden.

Der ARC Header darf ja explizit mehrfach gesetzt werden. Das "i" wird dann hochgezählt.

@ntimo This may have been added in e439513, but those options don't actually exist in rspamd. -- https://github.com/rspamd/rspamd/blob/master/src/plugins/lua/arc.lua

For people who end up here looking how to enable this in rspamd, as this time of writing it only supports signing of forwarded messages and does not have the ability to sign incoming messages.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

a3li picture a3li  ·  3Comments

thannaske picture thannaske  ·  3Comments

damdinsharav picture damdinsharav  ·  3Comments

RogerSik picture RogerSik  ·  3Comments

pgollor picture pgollor  ·  3Comments