mailcow-dockerized icon indicating copy to clipboard operation
mailcow-dockerized copied to clipboard

Regex support in sender/recipient_canonical maps

Open dsonck92 opened this issue 2 years ago • 0 comments

Summary

Allow using regex in sender_canonical and recipient_canonical maps. Currently it seems like there's just a 1:1 lookup from a mysql table: either it matches something, or it doesn't.

Motivation

In my old setup, I used the sender_canonical and recipient_canonical maps to remap some public support email addresses to internally used gitlab support email addresses:

/support\+reply-(.*)\@domain\.com/ gitlab-incoming+${1}@domain.com

This as I prefer to abstract away the fact that there's gitlab behind it, and to allow regular use of the [email protected] for other purposes. (Besides finding it neater to have a [email protected] reply-to address which clearly shows intent).

I rather not fall back to having Gitlab use "support" as source account due to the possibility of me using support as well.

This does require both to be set, so gitlab can send out as gitlab-incoming which is rewritten as support+reply-xyz, and receive it as well.

Additional context

No response

dsonck92 avatar Aug 14 '22 15:08 dsonck92