Alexey Murz Korepov
2018-Jan-23  09:57 UTC
How to set autoexpunge rule for single user mailbox in dovecot conf?
I need to set autoexpunge rule only for one single user and one mailbox (mail folder), so apply it only for user alice at 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 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180123/03c557e7/attachment.html>
Aki Tuomi
2018-Jan-23  09:58 UTC
How to set autoexpunge rule for single user mailbox in dovecot conf?
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 at example.com
> <mailto:alice at 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 at gmail.com <mailto:murznn at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20180123/50b5fcb5/attachment.html>
Aki Tuomi
2018-Jan-23  10:34 UTC
How to set autoexpunge rule for single user mailbox in dovecot conf?
You can do
passdb {
? driver = passwd-file
? args =? /path/to/some/file
? skip = unauthenticated
}
and put in this file
alice at 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 at example.com <mailto:alice at example.com>
> mailbox INBOX savedbefore 31d
> ---
>
> On 23 January 2018 at 13:20, Aki Tuomi <aki.tuomi at dovecot.fi
> <mailto:aki.tuomi at 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 at dovecot.fi
>>     <mailto:aki.tuomi at 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 at example.com
>>>         <mailto:alice at 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 at example.com <mailto:alice at
example.com> {
>>>         ?? mailbox INBOX {
>>>         ?? }
>>>         }
>>>
>>>         namespace/alice at
example.com/mailbox/INBOX/autoexpunge=31d
>>>         <http://alice at
example.com/mailbox/INBOX/autoexpunge=31d>
>>>
>>>         ------
>>>         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 at
dovecot.fi
>>>         <mailto:aki.tuomi at 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 at example.com <mailto:alice at
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 at gmail.com
<mailto:murznn at gmail.com>
>>>
>>>
>>>
>>>
>>>         -- 
>>>         Best regards,
>>>         Alexey Murz Korepov.
>>>         Email, Jabber: murznn at gmail.com <mailto:murznn at
gmail.com>
>>
>>
>>
>>
>>     -- 
>>     Best regards,
>>     Alexey Murz Korepov.
>>     Email, Jabber: murznn at gmail.com <mailto:murznn at
gmail.com>
>
>
>
>
> -- 
> Best regards,
> Alexey Murz Korepov.
> Email, Jabber: murznn at gmail.com <mailto:murznn at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20180123/4bbaa7d5/attachment.html>
Steffen Kaiser
2018-Jan-23  11:33 UTC
How to set autoexpunge rule for single user mailbox in dovecot conf?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 23 Jan 2018, 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 at example.com mailbox INBOX. > How can I set namespace in dovecot config, that will apply only to single > user?https://wiki2.dovecot.org/Namespaces#From_userdb However, I don't know if you can limit the setting to mailbox INBOX. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBWmcddsQnQQNheMxiAQJo+ggAwMC4m6obuK8GHQE8b8FkGkTVlkJZhixr EyJmphdbtFwSKFTKPQsC+k64Kg8zmuBzPAgN5I513FWhiSQATy2iMSKzsIxGCdy2 pQ8P6XzaLFx+lwMWoARpEz8SS7S8H+amaF4JBYG+p0Y497vDxFVmDCt1G2ubVX68 UrZGIpvtUf+i+O3pBKJFLSYS+GQnrPV0RV9eUZuZjGcHrvP+AqTjY79Owvket9Eh 9C4QLar3GSj9kihwDarPTnPBC0tpDsl/Rzt8mU4qEni2Rv2r4N1f7cr3qDl3j4mC E2yaEkGGA+6ywflRMoSAsLhb7hg1xdR36uj6lpUEjS0DpnMVmY6khQ==ldIj -----END PGP SIGNATURE-----