set parameter per user

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

set parameter per user

A. Schulze

Hello,

My dovecot server (2.2.33.2) work with "lmtp_save_to_detail_mailbox = no"
Now I would like to enable the feature for /some/ users.

Is that an option that could be set from an LDAP entry?

I tried the following:

    modify my ldap schema to allow an optional attribute  
"lmtp-save-to-detail-mailbox"

    in /etc/dovecot/ldap.conf
       user_attrs  = ...
                   
=lmtp_save_to_detail_mailbox=%{ldap:lmtp-save-to-detail-mailbox:no},
                   =...

Now I set an ldapattribute "lmtp-save-to-detail-mailbox" with value  
"yes" for some users.

Unfortunately messages to user+extension@domain are still delivered to INBOX/
while they should be delivered to INBOX/extension.

I also tried to make the attribute accessible vi pass_attr and  
userdb_foo = ...
because I use prefetch driver as userdb. I also disabled prefetching  
at all but no luck :-/

any Ideas?
Andreas
Reply | Threaded
Open this post in threaded view
|

Re: set parameter per user

Steffen Kaiser-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 21 Nov 2017, A. Schulze wrote:

>  in /etc/dovecot/ldap.conf
>     user_attrs  = ...
>                 =lmtp_save_to_detail_mailbox=%{ldap:lmtp-save-to-detail-mailbox:no},
>                 =...

> Unfortunately messages to user+extension@domain are still delivered to INBOX/
> while they should be delivered to INBOX/extension.
>
> I also tried to make the attribute accessible vi pass_attr and userdb_foo =
> ...
> because I use prefetch driver as userdb. I also disabled prefetching at all
> but no luck :-/

Is the detail delived to Dovecot by the MTA at all?

- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWhayysQnQQNheMxiAQKZlAgAwbgQHs46y/g79WjuDN3I5FTxSULOr1c6
hyNmYKC4h+2ZEwyVrOzGZx9debh+idw8iGaCpyqj2mJnBfuJ31ZwXXVjKV6Nvq8C
SCntpHW/38vjEKHDiPz9z8O0GE6kPU+nNrqHtaw3RGNygZWH3ZDvMe52HARmGLlz
MFqg2s3Uwxx9/bdcfRKjbu98flU9TOv710ZSY5fihWmLYW0u9txoQra1FN+O2cmW
sPWomXkJjHHHQi5C9jIp1bvAAFRPzmTKhwdWxlUwlO2iOYcgmFoJ/T+A5UtLOG83
5xLGuVNQBXoui/PixpQn+kBqvw8mpqoY858u0ot2iHFqz8GcVD4JsA==
=vpQM
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: set parameter per user

A. Schulze

Steffen Kaiser:

> Is the detail delived to Dovecot by the MTA at all?
sure!

have to say: I faked that example. In reality I tested the inverse way:
My lab setup actually *do* deliver to folders and
I saw, setting lmtp_save_to_detail_mailbox to 'no' still deliver to folder
while INBOX was expected.

so, correct hint: I should really try on an other system ...

But from my debug logs it really should not matter if

   doveconf.conf: lmtp_save_to_detail_mailbox = yes
   set to 'no' per user from ldap

vs.

   doveconf.conf: lmtp_save_to_detail_mailbox = no
   set to 'yes' per user from ldap

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: set parameter per user

Sami Ketola

> On 23 Nov 2017, at 15.32, A. Schulze <[hidden email]> wrote:
>
>
> Steffen Kaiser:
>
>> Is the detail delived to Dovecot by the MTA at all?
> sure!
>
> have to say: I faked that example. In reality I tested the inverse way:
> My lab setup actually *do* deliver to folders and
> I saw, setting lmtp_save_to_detail_mailbox to 'no' still deliver to folder
> while INBOX was expected.
>
> so, correct hint: I should really try on an other system ...
>
> But from my debug logs it really should not matter if
>
>  doveconf.conf: lmtp_save_to_detail_mailbox = yes
>  set to 'no' per user from ldap
>
> vs.
>
>  doveconf.conf: lmtp_save_to_detail_mailbox = no
>  set to 'yes' per user from ldap


can you verify if the value is correctly formed in userdb. Ie. is it visible in output:

doveadm -o service=lmtp user <uid>

Sami
Reply | Threaded
Open this post in threaded view
|

Re: set parameter per user

A. Schulze


Am 23.11.2017 um 14:40 schrieb Sami Ketola:
> can you verify if the value is correctly formed in userdb. Ie. is it visible in output:
>
> doveadm -o service=lmtp user <uid>
# doveadm -o service=lmtp user [hidden email]
field   value
uid     8
gid     8
home    /mail/user1
mail    maildir:~/Maildir
lmtp_save_to_detail_mailbox     no
master_user     [hidden email]

# doveadm -o service=lmtp user [hidden email]
field   value
uid     8
gid     8
home    /mail/user2
mail    maildir:~/Maildir
lmtp_save_to_detail_mailbox     yes
master_user     [hidden email]

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: set parameter per user

Steffen Kaiser-2
In reply to this post by A. Schulze
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 23 Nov 2017, A. Schulze wrote:

> Steffen Kaiser:
>
>> Is the detail delived to Dovecot by the MTA at all?
> sure!
>
> have to say: I faked that example. In reality I tested the inverse way:
> My lab setup actually *do* deliver to folders and
> I saw, setting lmtp_save_to_detail_mailbox to 'no' still deliver to folder
> while INBOX was expected.

> so, correct hint: I should really try on an other system ...
>
> But from my debug logs it really should not matter if
>
> doveconf.conf: lmtp_save_to_detail_mailbox = yes
> set to 'no' per user from ldap
>
> vs.
>
> doveconf.conf: lmtp_save_to_detail_mailbox = no
> set to 'yes' per user from ldap

maybe you need:

lda_mailbox_autocreate = yes


- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWhgO8MQnQQNheMxiAQIVxwf+OGigRWAj/EjOl6psAUxFf3EtRi3oWg4A
lnF0u3990fqkLZmFF18KUKsnoIKIYkK5Gegp0keHbEZTydULCYozgi7Zks61kiRT
tkDq+m9O++89bu6QZkhac2uJrAZx+hNvNFrOSm5htVSZy+IDP1mXfvJlq5vziV62
uQRqigv3OSUukzzhaPCjK8b8bPrqKodW5WKvP2mohX2LQdWsjbIWkY+NY1lkpM5v
GTkxab8nZhYBcmEP0bx36aOeB5hgVJMsa+YBcaTTLQKJg560CIE/3YjYqlh5Fcl6
CwmPKf/PXtdMbyD8fWFp5K6g+PaYLMrExi/GS3dup+RnT9VemLqGLg==
=9rWz
-----END PGP SIGNATURE-----