[Dovecot] automatic un-subscribe ?
Is there a way for an unsubscribe from a previously (auto-)subscribed folder? I'm building an email archiving system, and archived mails are organized by annum. A user will have e.g. 3 years of archive available. Currently that would mean this user would be auto-subscribed to private folders named 2007, 2008, 2009 and current. Starting January 2011 though that would change to 2008, 2009, 2010 and current. Is there a way of auto-unsubscribing 2007 ?
/Per Jessen, Zürich
On Wed, 2010-11-03 at 10:23 +0100, Per Jessen wrote:
Is there a way for an unsubscribe from a previously (auto-)subscribed folder? I'm building an email archiving system, and archived mails are organized by annum. A user will have e.g. 3 years of archive available. Currently that would mean this user would be auto-subscribed to private folders named 2007, 2008, 2009 and current. Starting January 2011 though that would change to 2008, 2009, 2010 and current. Is there a way of auto-unsubscribing 2007 ?
I don't think there is any good way of doing it. If user subscribes manually to it, you probably wouldn't want to unsubscribe then, right?
This would be possible with a redesigned autocreate plugin where it didn't actually create/subscribe any mailboxes. Instead it would just hook into LIST/LSUB commands to list them if they're not already listed.
Timo Sirainen wrote:
On Wed, 2010-11-03 at 10:23 +0100, Per Jessen wrote:
Is there a way for an unsubscribe from a previously (auto-)subscribed folder? I'm building an email archiving system, and archived mails are organized by annum. A user will have e.g. 3 years of archive available. Currently that would mean this user would be auto-subscribed to private folders named 2007, 2008, 2009 and current. Starting January 2011 though that would change to 2008, 2009, 2010 and current. Is there a way of auto-unsubscribing 2007 ?
I don't think there is any good way of doing it. If user subscribes manually to it, you probably wouldn't want to unsubscribe then, right?
If the folder is removed, yes I would. I guess it is protocol-dependent - I'm thinking it would work along these lines:
user is subscribed or subscribed to (private or public) folder A. time goes by, everything is fine. folder A is removed or marked as unavailable at the time of the next access, the user is informed that the folder is no longer available, and that he has been unsubscribed.
/Per Jessen, Zürich
On Wed, 2010-11-03 at 19:26 +0100, Per Jessen wrote:
I don't think there is any good way of doing it. If user subscribes manually to it, you probably wouldn't want to unsubscribe then, right?
If the folder is removed, yes I would.
Oh, you meant something like that. How about removing the subscription at the same time as removing the mailbox? Either manually modifying the subscriptions file (hoping that the user isn't changing it at the same time) or with v2.0:
doveadm mailbox unsubscribe -u username archive/2007
Timo Sirainen wrote:
On Wed, 2010-11-03 at 19:26 +0100, Per Jessen wrote:
I don't think there is any good way of doing it. If user subscribes manually to it, you probably wouldn't want to unsubscribe then, right?
If the folder is removed, yes I would.
Oh, you meant something like that. How about removing the subscription at the same time as removing the mailbox? Either manually modifying the subscriptions file (hoping that the user isn't changing it at the same time) or with v2.0:
doveadm mailbox unsubscribe -u username archive/2007
Thanks Timo! As usual, very helpful (and fast).
/Per Jessen, Zürich
participants (2)
-
Per Jessen
-
Timo Sirainen