You can do

passdb {
  driver = passwd-file
  args =  /path/to/some/file
  skip = unauthenticated
}

and put in this file

alice@example.com::::::noauthenticate userdb_namespace/inbox/mailbox/INBOX/autoexpunge=31d

or nopassword instead of noauthenticate.

Please keep replies in-list.

Aki

On 23.01.2018 12:31, Alexey Murz Korepov wrote:
So, with using `passwd` driver as userdb - there are no ways to set some dovecot single per-user setting? Change passwd to real user database is too hard on working system.
Maybe exists some other ways to do auto expunge function for separate mailbox folder on single user?

As workaround, can I use command like `doveadm expunge` in cron job for do this task?
---
doveadm expunge -u alice@example.com mailbox INBOX savedbefore 31d
---

On 23 January 2018 at 13:20, Aki Tuomi <aki.tuomi@dovecot.fi> wrote:

Well, to have per-user settings, you need a userdb, that can provide per-user settings.

Aki


On 23.01.2018 12:19, Alexey Murz Korepov wrote:
I can't understand what you mean in `return from userdb` - in which place of dovecot config files I can set this rule? I don't use separate userdb for dovecot users.
Or maybe this must be set somewhere in user home folder?

On 23 January 2018 at 13:17, Aki Tuomi <aki.tuomi@dovecot.fi> wrote:

No.

The namespace name is irrelevant, it just has to be there. Assuming you have no other namespace config around,

namespace inbox {
  inbox = yes
  mailbox INBOX {
  }
}

Then return from userdb, namespace/inbox/mailbox/INBOX/autoexpunge=31d

The namespace config will be global (affects all users), but autoexpunge setting will be for alice only.

Aki

On 23.01.2018 12:08, Alexey Murz Korepov wrote:
Thanks, Aki, for quick answer! But can you give me please a real example with user alice@example.com and mailbox INBOX? In my setup I have no user database, I use real linux users, managed via Webmin/Virtualmin.
So I must set in `/etc/dovecot/conf.d/15-mailboxes.conf` file something this?
------
namespace alice@example.com {
   mailbox INBOX {
   }
}
Or I must fill last string not in `mailboxes.conf` file, but in some other place?

On 23 January 2018 at 12:58, Aki Tuomi <aki.tuomi@dovecot.fi> wrote:

Configure

namespace <name> {
   mailbox <name> {
   }
}

and return from userdb

namespace/<name>/mailbox/<name>/autoexpunge=value

Ak


On 23.01.2018 11:57, Alexey Murz Korepov wrote:
I need to set autoexpunge rule only for one single user and one mailbox (mail folder), so apply it only for user alice@example.com mailbox INBOX. How can I set namespace in dovecot config, that will apply only to single user?

--
Best regards,
Alexey Murz Korepov.
Email, Jabber: murznn@gmail.com




--
Best regards,
Alexey Murz Korepov.
Email, Jabber: murznn@gmail.com




--
Best regards,
Alexey Murz Korepov.
Email, Jabber: murznn@gmail.com




--
Best regards,
Alexey Murz Korepov.
Email, Jabber: murznn@gmail.com