[Rspamd-Users] Rewrite sender/From: address before calculating DKIM?

Johann Neuhauser johann at it-neuhauser.de
Fri Feb 5 09:44:10 UTC 2021


Dear Gerben Wierda,

I'm using "header_checks = pcre:/etc/postfix/header_checks" in postfix to rewrite the message-id to end with my valid external domain.

The file /etc/postfix/header_checks looks like:
/^Message-Id:\s+<(.*?)@internal-hostname>/	REPLACE	Message-Id: <$1 at example.com>

This header rewrite happens before rspamd adds the DKIM signature.
Probably you can use this feature to rewrite your two headers.
Check out the doc: http://www.postfix.org/header_checks.5.html

Regards, Johann

-----Original message-----
> From: Gerben Wierda via Users <users at lists.rspamd.com>
> Sent: Monday 1st February 2021 23:31
> To: Gerben Wierda via Users <users at lists.rspamd.com>
> Cc: Gerben Wierda <gerben.wierda at rna.nl>
> Subject: [Rspamd-Users] Rewrite sender/From: address before calculating DKIM?
> 
> I use Rspamd to create my DKIM signatures.
> 
> I want to do the following:
> 	- For a certain receiving domain (say to someone at example.com)
> 	- For all mail from my domain mydomain.net
> 	- Rewrite the sender address (say someone at mydomain.net becomes somespecificuser at mydomain.net)
> 
> This, I can do in the postfix MTA with some trickery, changing the sender
> at the stage postfix is in breaks the DKIM signature that Rspamd has created.
> 
> So I wondered if there was a way to do this in Rspamd. Is there?
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> -- 
> Users mailing list
> Users at lists.rspamd.com
> https://lists.rspamd.com/mailman/listinfo/users
> 


More information about the Users mailing list