[PATCH/FEATURE] Per-user XLIST support for cyrus-imapd
Bron Gondwana
brong at fastmail.fm
Mon Apr 29 18:53:24 EDT 2013
On Mon, Apr 29, 2013, at 07:50 PM, Eduardo Robles Elvira wrote:
> Hello everyone,
>
> As a contractor for Intra2net, we have developed in Wadobo per-user
> xlist support for cyrus-imapd 2.4.17 and backported it to 2.3.16. We
> are sharing it here to know what do you think about it and if there's
> some interest we'd be glad to contribute this code into master.
>
> To use this new feature, you create a new file with the name
> USERNAME.xlist in the cyrus-imapd per-user settings directory
> (/var/imap/user/X/, where X is the first letter of the username) which
> contains the magic "xlist-XXXX: some-folder" notation known from
> the main cyrus config file. The folder names would be in the following
> format:
> INBOX
> INBOX/Outbox
> INBOX/Entw&APw-rfe
> user/someother_user/shared-folder
>
> That is, if using the unix hierarchy separator; if you use the default
> dot separator, then those example would use the dot ('.') instead the
> slash ('/') in the paths: then INBOX/Archives would become
> INBOX.Archives, etc.
>
> The per-user config strings are loaded on demand on the first request
> of the X-List command and stay in memory as long as the imapd process
> handles this particular LOGIN session (lazy loading).
>
> Some other details/trivia:
>
> * The patch for 2.3.16 contains some modifications to the file
> perl/imap/IMAP.xs file that we found were needed to be able to
> successfully compile cyrus in our machines. This is probably not
> needed if you are using/compiling with older version of the libraries
> cyrus uses. In that case, you can just not apply those changes to
> compile the patched 2.3.16.
>
> * To test the per-user xlist support for an user "foobar", here's an
> example foobar.xlist file equivalent to the one referred in [0]:
>
> $ cat /var/imap/user/f/foobar.xlist
> xlist-archive: INBOX/Archives
> xlist-drafts: INBOX/Drafts
> xlist-sent: INBOX/Sent
> xlist-spam: INBOX/Spam
> xlist-trash: INBOX/Trash
>
> * We have developed this xlist implementation to be 100% compatible
> with the global xlist support already present in 2.4 branch. This
> means that you can both set some global configuration in
> /etc/imapd.conf and also set per-user xlist configuration. And the
> xlist settings format for the imapd.conf file remains as it is already
> in 2.4 branch. The global xlist support is also included and
> backported in the 2.3.16 patch (this was trivial to do).
>
> If you find issue or have any feedback, we are glad to hear back from you =)
Hi - have you looked at all at the special-use support in mainline Cyrus?
The xlist-* behaviour is planned to be removed, in favour of using the RFC
6154 mandated annotation.
The implementation in git at the moment doesn't quite match the standard,
because I wrote it before the RFC was released, but I have a branch which
makes it fully compatible. I wrote to this list just the other day asking
about it!
...
Do you have any other interesting patches you're working on that would be
good to include? I don't want to get people too hooked on the xlist-* hack,
because it was only a stopgap before the RFC came out.
Regards,
Bron.
More information about the Cyrus-devel
mailing list