Custom sql queries in acl-plugin

Matthias Kneer matze at roterruler.de
Tue Mar 23 11:07:09 EET 2021


Hi,

I would like to allow users to use any known "alias" of another user to 
grant permissions to their mailboxes.

Here's the scenario:

A user, with an internal name "example at 12345" and an alias 
"test at example.org". The domain "12345" is only used internally to 
separate the customers into different directories, therefore 
"anotheruser" only knows the address "test at example.org" grants folder 
permissions to "test at example.org". This results in the following:

+-------------------------+--------------------------------------------+-------+
| from_user               | to_user                                    | 
dummy |
+-------------------------+--------------------------------------------+-------+
| anotheruser at 12345       | test at example.org                           | 
1     |
+-------------------------+--------------------------------------------+-------+

But since the actual username is "example at 12345" the proper directory 
can't be found.

I would like to achieve the following outcome, with the same user 
inputs:

+-------------------------+--------------------------------------------+-------+
| from_user               | to_user                                    | 
dummy |
+-------------------------+--------------------------------------------+-------+
| anotheruser at 12345       | example at 12345                              | 
1     |
+-------------------------+--------------------------------------------+-------+

Is it possible to populate the to_user column with a more dynamic sql 
lookup instead of the dict lookup?

Thanks in advance,
Matthias


More information about the dovecot mailing list