Support extra user_attributes in accounts configuration#1792
Support extra user_attributes in accounts configuration#1792georglauterbach merged 1 commit intodocker-mailserver:masterfrom
Conversation
|
This is a rebased patch from #1559 I tried adding a test, too, but "make tests" just hangs for me after doing the first test, so hopefully the CI will tell me if it worked? |
Submodules are initialized? What OS are you on. The test only support Linux, no other OS. If you're on Linux and submodules are innitialized, hanging tests indicate something is wrong. |
|
Had to cancel the workflow as it run for 42 minutes when around 10 minutes is expected. Please make it work local first. This cannot be tested in our CI as it's really broken. |
georglauterbach
left a comment
There was a problem hiding this comment.
CI completely broken with this PR. Unusable in this state. Please make it work locally first. Init submodules and run make install_linters.
Yes.
Latest CentOS 7.
Indeed! I didn't figure out what fixed it (a yum upgrade? I used a server that I don't usually use for Docker) but it's running now, albeit really really slowly. I'll get the tests fixed and submit again. |
71eae3c to
e5bfd07
Compare
|
You will need to rebase on current master to resolve merge conflicts. A file was deleted, which is now shown as a conflict. |
yeah, I submitted the PR for removing the file after finding it wasn't used when trying to use it in my tests here. 🤣 |
This allows you to add for example
|userdb_mail=mbox:~/mail:INBOX=~/inbox
to the end of an account to have a different mailbox configuration.
|
LGTM But I will request another 4 eyes to look at it, just for good measure |
|
Can you please elaborate on the following points:
I am missing a few background information / motivation about this PR. |
Dovecot supports overriding many settings per user; adding them in the "extra attributes" field is the way to do it for the authentication we use in docker-mailserver (when not using LDAP anyway). My use case is having some users use a different mailbox format (in one case because the usage pattern is weird and in some others to ease migration of some large mailboxes from an old dovecot installation). Another use case I was planning to use is to have a particular robot/system account be restricted to only connect from the network it's expected to be on. https://doc.dovecot.org/configuration_manual/authentication/user_database_extra_fields/ (the very last example is the one that applies to how docker-mailserver works).
No, we already use the field for the quotas.
Just by adding the third column in postfix-accounts.cf as I did in the test file (generated by the Makefile). I can write an example for the wiki after it's merged. I looked at if there were overrides that made sense to promote to the level of support that quotas have, but I wasn't sure where the natural cut-off point is. The feature as-is is a good "safety valve" to allow the per-user dovecot features to be used. |
|
Thanks for taking the time and explaining your motivation and changes 💡
Yes, please write down an example of this functionality in the wiki otherwise nobody knows it exists. ✍️
You are right, it's hard to find this point. Imho your change is something only a few will use (never saw it requested by an issue) but maybe you will save someones day with this feature 👍 Thanks for your contribution 🤝 |
|
Merging when the last review comes in:) |
|
@abh Thank you for this PR. As @wernerfred wrote, please add some documentary/example to the README or Wiki. |
This allows you to add for example
to the end of an account to have a different mailbox configuration.