Re: [Dovecot] Caseless folder delivery?

2008-06-16 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 14 Jun 2008, Jay Levitt wrote:

For instance, ideally, I wouldn't have to create the dovecot: Dovecot 
entry; mail to my [EMAIL PROTECTED] address would go into the Dovecot 
folder.


Well, Unix filesystems tned to be case-sensitive, hence, when mailing to
lists-dOvCot@ should deliver also know to use Dovecot? I do not know 
nothing about exim, but Dovecot deliver itself cannot do this, it had to 
test all combinations of case of letters otherwise.


However, deliver is programmed straight forward, there is an easy to find 
spot, where the actual deliver of the mail takes palce. You could add some 
code there, e.g.:


Check if you can open a mailbox map file in the home directory of the
user (or mailbox root dir), if so compare any line with the destination
case-insensitively; on match, use the name from the file.
To scan through the directory all the time, can be very time consuming.

Or, more easy but fixed:
Mangle the argument of -m (if it's not INBOX), e.g. by lower-caseing all 
but the first character or something like that.


The other alternative is to switch to a filesystem that does not enforce
case-senstivity, e.g. case-preserving or what it's called, e.g. NTFS,
FAT32 or Apple HFS+.  Well, you do not want to do this, I guess.
Hey, out of curiosity, I googled and found:
http://freshmeat.net/projects/ciopfs/?branch_id=74414release_id=277441

Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIVhRdVJMDrex4hCIRAjAlAJ4pc4J1aWRYUD5qw9PYiW3kSBjkWQCfSDN2
B+7z6L8UJ4ERqEv/ZNsI9VQ=
=OOgj
-END PGP SIGNATURE-


[Dovecot] Caseless folder delivery?

2008-06-14 Thread Jay Levitt
I'm using exim4 to deliver into dovecot 1.1, and using plus-addressing to 
deliver mailing lists directly to appropriate folders in my lists mailbox. 
 I created a file called /folder-map.lists that looks like


## folder-map.lists
dovecot: Dovecot
lpedge: Linux PowerEdge

... and so on.  So mail to [EMAIL PROTECTED] goes to the Linux PowerEdge 
folder.


The one annoying thing: I'd like to avoid creating explicit folder-map 
entries where the plus-address suffix is identical an existing folder name. 
 That *almost* works, but I like to name my folders with appropriate 
capitalization, and deliver doesn't seem to have a way to do caseless 
delivery.


For instance, ideally, I wouldn't have to create the dovecot: Dovecot 
entry; mail to my [EMAIL PROTECTED] address would go into the Dovecot 
folder.


I can't figure out how to do this.  Is there a way to do that using deliver? 
 Could there be?  Relevant portions of the exim configuration follow. 
(And, p.s., am I using the new -a and -m options correctly?  Are they used 
for anything yet?)


Jay Levitt



## exim.conf

...begin routers

ORIG_FOLDER = ${substr_1:$local_part_suffix}
FOLDER_MAP  = /etc/exim/folder-map.$local_part
MAPPED_FOLDER = ${lookup{ORIG_FOLDER}lsearch{FOLDER_MAP}{$value}{ORIG_FOLDER}}


# Mailboxes whose localparts are folders
foldered_mailboxes:
  driver = accept
  local_part_suffix = +* : -*
  local_part_suffix_optional
  local_parts = +foldered_mailboxes
  address_data = user=$local_part folder=MAPPED_FOLDER
  transport = dovecot_virtual_delivery

...begin transports

dovecot_virtual_delivery:
  driver = pipe
  command = /usr/local/libexec/dovecot/deliver \
-f $return_path \
-a [EMAIL PROTECTED] \
-d ${extract{user}{$address_data}} \
-m ${extract{folder}{$address_data}} -n
  message_prefix =
  message_suffix =
  log_output
  return_path_add
  user = vmail