[Dovecot] Extremely custom mailbox locations
I'm in the position where I'd like to offer IMAP access to a collection of email accounts which are stored in a very odd manner.
Files are stored as:
/blah/$dd-$mm-$yy/$domain/1234/1234
For example:
/reject/12-3-2009/cvsrepository.org/35199/35199639
There is a single file for each mail, which I guess technically probably counts as an mbox folder, but only just.
I can handle the custom login requirements I have, but I see no obvious way to create a mailstore from this information unless I build up a parallel symlink farm, such as:
/imap/cvsrepository.org/{new cur tmp}
I suspect if I fill cur/ with symlinks to each of the individual messages things will mostly work out OK, but I wonder if that is the best solution, or if there is a slim chance that I could serve this hierarchy without the intermediate step?
Steve
Debian GNU/Linux System Administration http://www.debian-administration.org/
On Thu, 2009-03-12 at 20:07 +0000, Steve Kemp wrote:
I suspect if I fill cur/ with symlinks to each of the individual messages things will mostly work out OK, but I wonder if that is the best solution, or if there is a slim chance that I could serve this hierarchy without the intermediate step?
The main problem I see with symlinks is that if message is deleted, it's only the symlink that gets deleted. Anyway I don't see other choices than symlinking or moving the messages.
What would happen if you specify the same mailbox location for multiple users?
User1 = /mailbox/user1 User2 = /mailbox/user1 User3 = /mailbox/user3 User4 = /mailbox/user4 etc
-----Original Message----- From: dovecot-bounces+jkrejci=usinternet.com@dovecot.org [mailto:dovecot-bounces+jkrejci=usinternet.com@dovecot.org] On Behalf Of Timo Sirainen Sent: Thursday, March 12, 2009 5:08 PM To: Steve Kemp Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Extremely custom mailbox locations
On Thu, 2009-03-12 at 20:07 +0000, Steve Kemp wrote:
I suspect if I fill cur/ with symlinks to each of the individual messages things will mostly work out OK, but I wonder if that is the best solution, or if there is a slim chance that I could serve this hierarchy without the intermediate step?
The main problem I see with symlinks is that if message is deleted, it's only the symlink that gets deleted. Anyway I don't see other choices than symlinking or moving the messages.
Why? Nothing special. Those users would then just share the same mailboxes.
On Thu, 2009-03-12 at 17:21 -0500, Justin Krejci wrote:
What would happen if you specify the same mailbox location for multiple users?
User1 = /mailbox/user1 User2 = /mailbox/user1 User3 = /mailbox/user3 User4 = /mailbox/user4 etc
-----Original Message----- From: dovecot-bounces+jkrejci=usinternet.com@dovecot.org [mailto:dovecot-bounces+jkrejci=usinternet.com@dovecot.org] On Behalf Of Timo Sirainen Sent: Thursday, March 12, 2009 5:08 PM To: Steve Kemp Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Extremely custom mailbox locations
On Thu, 2009-03-12 at 20:07 +0000, Steve Kemp wrote:
I suspect if I fill cur/ with symlinks to each of the individual messages things will mostly work out OK, but I wonder if that is the best solution, or if there is a slim chance that I could serve this hierarchy without the intermediate step?
The main problem I see with symlinks is that if message is deleted, it's only the symlink that gets deleted. Anyway I don't see other choices than symlinking or moving the messages.
I see I misunderstood the full extent of what the OP was trying to accomplish. If the assumption of "control where these message files get written to" is inaccurate then my idea would not apply. I was thinking it would save on the whole symlink business if it were possible to move/copy all of these messages into a single location. If you are making the symlinks by hand or thru some external script you have it may be better to pool all of these files together for cleanliness.
Am I way off base here?
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: Thursday, March 12, 2009 5:37 PM To: Justin Krejci Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] Extremely custom mailbox locations
Why? Nothing special. Those users would then just share the same mailboxes.
On Thu, 2009-03-12 at 17:21 -0500, Justin Krejci wrote:
What would happen if you specify the same mailbox location for multiple users?
User1 = /mailbox/user1 User2 = /mailbox/user1 User3 = /mailbox/user3 User4 = /mailbox/user4 etc
-----Original Message----- From: dovecot-bounces+jkrejci=usinternet.com@dovecot.org [mailto:dovecot-bounces+jkrejci=usinternet.com@dovecot.org] On Behalf Of Timo Sirainen Sent: Thursday, March 12, 2009 5:08 PM To: Steve Kemp Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Extremely custom mailbox locations
On Thu, 2009-03-12 at 20:07 +0000, Steve Kemp wrote:
I suspect if I fill cur/ with symlinks to each of the individual messages things will mostly work out OK, but I wonder if that is the best solution, or if there is a slim chance that I could serve this hierarchy without the intermediate step?
The main problem I see with symlinks is that if message is deleted, it's only the symlink that gets deleted. Anyway I don't see other choices than symlinking or moving the messages.
On Thu Mar 12, 2009 at 18:07:53 -0400, Timo Sirainen wrote:
The main problem I see with symlinks is that if message is deleted, it's only the symlink that gets deleted. Anyway I don't see other choices than symlinking or moving the messages.
The failure to delete isn't a problem in this case, as the mail is automatically deleted after a period of time anyway.
People seeing mails remain that they thought they'd deleted might be disconcerting in a usual setup, but for this use I don't imagine it will be a problem.
(Essentially I wish to allow users to browse an archive of the mail which has been reject as SPAM via IMAP. The current storage path makes that a little complex, but I'm hoping I can leave it as-is so that no other part of the system needs to change.)
Steve
Managed Anti-Spam Service http://mail-scanning.com/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 12 Mar 2009, Steve Kemp wrote:
I'm in the position where I'd like to offer IMAP access to a collection of email accounts which are stored in a very odd manner.
Files are stored as:
/blah/$dd-$mm-$yy/$domain/1234/1234
For example:
/reject/12-3-2009/cvsrepository.org/35199/35199639
There is a single file for each mail, which I guess technically probably counts as an mbox folder, but only just.
If you make the files "real" mboxes, it should be possible to create a namespace with location = mbox:/reject/:CONTROL=/ramdisk/reject:INDEX=MEMORY or am I mistaken?
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSboetXWSIuGy1ktrAQIxywf9G6So1oppNnhnK4nHnmh+/e+evbLr2epR SMo4AVL5ch3smQvTXlx95Gvg7f02Y8fKjgaAP4B/QJCORgjHfii35NCqBHzWN5+D ehKKocWpgVWp2OMb/uBKYLGRlhnahA5IXLFSVcoJiIitJ/89QvayKGtw7zg8dQo5 mW1vJQyvygtK0rMu4kPdAzAfdNeF5Yt6spVKrsNMLyLXWvQylJVIvkULL2x5ZbQV WELshFeks3DIeqEJUALognIoit8Qbl5Jg0hDYxELmvTCQL2gBFmd1wmJCPWEDdot ZYH2YyvMxMO5OSu0lyb+ZJoQSp39hrxmJgzUJ7ri/B9rIwUNkoZnMw== =B1Af -----END PGP SIGNATURE-----
participants (4)
-
Justin Krejci
-
Steffen Kaiser
-
Steve Kemp
-
Timo Sirainen