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

Mailcow doesn't allow dots in DKIM selectors

Open wblondel opened this issue 2 years ago • 2 comments

Contribution guidelines

I've found a bug and checked that ...

  • [X] ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • [x] ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • [X] ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • [X] ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

Hi,

Mailcow doesn't allow dots in DKIM selectors. However, this is very useful if you want, for instance, to regenerate new key pairs every month and use the month as part of the selector string.

cf. RFC 6376 and this page

I think this is just a matter of modifying the regex to validate the selector name.

On another hand, it would be great if we could add multiple keys for the same domain (ie. one for each month), and could switch between these keys.

Regards William Blondel

Logs

no logs

Steps to reproduce

  1. Add a new domain with a dot in the DKIM selector
  2. or add a new DKIM key with a dot in the selector

System information

.

wblondel avatar Mar 22 '22 15:03 wblondel

Sorry misread info about periods, yes they allowed. https://www.ietf.org/rfc/rfc6376.txt

Periods are allowed in selectors and are component separators.  When
   keys are retrieved from the DNS, periods in selectors define DNS
   label boundaries in a manner similar to the conventional use in
   domain names.  Selector components might be used to combine dates
   with locations, for example, "march2005.reykjavik".  In a DNS
   implementation, this can be used to allow delegation of a portion of
   the selector namespace.

   ABNF:

   selector =   sub-domain *( "." sub-domain )

dragoangel avatar May 05 '22 15:05 dragoangel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Jul 05 '22 00:07 milkmaker