[PATCH/FEATURE] Per-user XLIST support for cyrus-imapd

Eduardo Robles Elvira edulix at wadobo.com
Mon Apr 29 05:50:56 EDT 2013


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 =)

Kind regards,
--
[0] http://blog.chase.net.au/index.php/2013/01/cyrus-imap-and-outlook-2013/
--
Eduardo Robles Elvira     +34 668 824 393            skype: edulix2
http://www.wadobo.com    it's not magic, it's wadobo!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xlist_2.3.16.patch
Type: application/octet-stream
Size: 14035 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20130429/1f7b60fd/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xlist_2.4.17.patch
Type: application/octet-stream
Size: 7406 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20130429/1f7b60fd/attachment-0003.obj 


More information about the Cyrus-devel mailing list