Mike Brudenell
2007-Mar-09 17:35 UTC
[Dovecot] Prayer, Maildir and Folders whose names begin with "."
Greetings - I think I've just had one of my fears confirmed: not Dovecot-specific exactly, but it affects how we will use of Prayer (Webmail Software) with Dovecot... Currently our production service uses MBX-format mailboxes with the UW IMAP server; we also use the University of Cambridge "Prayer" software for Webmail. By default Prayer saves its preference settings, address book and so on in a regular IMAP folder called ".prayer" And one of the nice things about the UW IMAP server is that you can tell it not to include files whose names start "." when returning the list of folders for a LIST command. This means: * People don't see the secret ".prayer" folder when they look at the list; * But if something (eg, Prayer) knows its name it can open this folder to get at its content. The combination of these is that (a) Prayer can store its settings and (b) users don't see where, so can't open/tamper with the secret settings folder for Prayer. But I've just discovered that I can't create a folder called ".prayer" using Maildir-format mailboxes. The problem appears to be the leading "." I suspect it's because the Maildir++ specification at http://www.inter7.com/courierimap/README.maildirquota.html says this: > Folders are created as subdirectories under the main Maildir. The name of > the subdirectory always starts with a period. For example, a folder named > "Important" will be a subdirectory called ".Important". You can't have > subdirectories that start with two periods. A folder named ".prayer" would lead to a subdirectory being created called "..prayer" I think. Q. Can anyone confirm that you can't create Maildir folders called ".somename"? Q. Are there any other Prayer users out there using Dovecot and Maildir format mailboxes? What are you doing about the user-settings folder for Prayer? (And do you manage to hide it from view, so they can't tamper with its contents?) Cheers, Mike B-) -- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740 * Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
Timo Sirainen
2007-Mar-09 17:47 UTC
[Dovecot] Prayer, Maildir and Folders whose names begin with "."
On Fri, 2007-03-09 at 17:35 +0000, Mike Brudenell wrote:> Q. Can anyone confirm that you can't create Maildir folders called > ".somename"?Yep. If you want that, there's really no other way than to modify the sources for now. src/lib-storage/index/maildir/maildir-storage.h and change MAILDIR_FS_SEP and MAILDIR_FS_SEP_S to something else. Then if you also want to hide the .Prayer mailbox.. Well, you could actually use ACL plugin and create a global ACL for ".Prayer" mailbox which gives owner all the rights except "l". -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070309/61cb7b15/attachment.bin>
Chris Wakelin
2007-Mar-09 17:54 UTC
[Dovecot] Prayer, Maildir and Folders whose names begin with "."
Timo Sirainen wrote:> On Fri, 2007-03-09 at 17:35 +0000, Mike Brudenell wrote: >> Q. Can anyone confirm that you can't create Maildir folders called >> ".somename"? > > Yep. If you want that, there's really no other way than to modify the > sources for now. src/lib-storage/index/maildir/maildir-storage.h and > change MAILDIR_FS_SEP and MAILDIR_FS_SEP_S to something else. > > Then if you also want to hide the .Prayer mailbox.. Well, you could > actually use ACL plugin and create a global ACL for ".Prayer" mailbox > which gives owner all the rights except "l".We don't use maildir so this hasn't been an issue for us. You can configure the settings folder name within Prayer, of course, by editing prayer.cf. I actually wanted "dotfiles" to be allowed to be visible (i.e. decided by the client), and at one time had a patch do allow this (when Dovecot hid all dotfiles to prevent access to ".imap"). I guess you're worried that a user will delete the folder? There are rare cases where access to client configs stored in folders has been useful, e.g. things like copying and pasting address books. In any case, Timo's suggestion of a global ACL, together with renaming the folder "prayer.config" or something sounds good! Chris -- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin at reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Magnus Holmgren
2007-Mar-09 23:17 UTC
[Dovecot] Prayer, Maildir and Folders whose names begin with "."
On Friday 09 March 2007 18:35, Mike Brudenell wrote:> Greetings - > > I think I've just had one of my fears confirmed: not Dovecot-specific > exactly, but it affects how we will use of Prayer (Webmail Software) > with Dovecot...You may be interested in some of the patches I've written for Prayer. They come in the form of a Quilt patch series inside a Debian diff, so it's not completely trivial to extract the useful bits unless you have a Debian box, but it's really nothing more than a patch-patch. http://www.kibibyte.se/download/debian/prayer_1.0.18-1.diff.gz The individual patches are: 10_makefile_install_config.patch - Debian specific patches to the build 20_session_unix_bugs.patch 20_session_server_bugs.patch - these two fix small but annoying bugs. 20_hasnochildren_means_noinferiors.patch - makes at least leaf folders be treated as folders 20_pidfiles_extension.patch - simply adds the .pid extension to the pid files 25_ipv6.patch - big patch that adds IPv6 support 30_utf8.patch - big patch that adds UTF-8 and modified UTF-7 support, meaning you can have folders with unicode characters and send and read international mail decently. 35_sighandling.patch - half done, don't use. -- Magnus Holmgren holmgren at lysator.liu.se (No Cc of list mail needed, thanks) "Exim is better at being younger, whereas sendmail is better for Scrabble (50 point bonus for clearing your rack)" -- Dave Evans -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20070310/1eed35fb/attachment.bin>