[Dovecot] Overriding Default Subscription Behavior

Timo Sirainen tss at iki.fi
Thu Dec 10 20:18:29 EET 2009


On Thu, 2009-12-10 at 10:15 -0500, Tony Rutherford wrote:
> The subscription files we're migrating from have a "." for folder
> separation.  We will be using Dovecot's maildir with LAYOUT=fs.  It's
> looking for "/" as the separator in the subscription file.  So, obviously we
> could simply write a script to swap the two characters.  However, just
> curious if there are any options for doing this within a plugin (since we're
> already doing some things in a plugin) by overriding some of the
> subscription code.something like the "next_line()" in subscriptions.c.  I
> don't see any vfuncs in this area, aside from set_subscribed() I believe.but
> maybe there's a better spot I'm not thinking of?  One thing I've learned
> with Dovecot is that it somehow supports things I didn't believe it
> could/would, so I thought I'd ask.

Once you've moved to '/' separator, it's possible that users create
mailboxes with '.' characters. So you can't just always keep converting
all '.' to '/', you need to do it only once for each user.

You could create a plugin that simply:

1) Check if subscriptions.converted file exists, if not continue:
2) Convert '.' to '/' in subscriptions and recreate it
3) Create subscriptions.converted file

Or something like that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20091210/5526ba97/attachment.bin 


More information about the dovecot mailing list