[Dovecot] Force "lower case" Folder Creation?
We're exploring the use of "plus addressing" in our MTA (Exim), which
delivers "user+topic@domain.com" to a user's "topic" folder.
However, the case-sensitive nature of our ext3 filesystem means that
a message destined to "topic" won't deliver to a user's "Topic"
folder. For example, if a user creates a "Topic" folder, and gives
"user+Topic@domain.com" to a web form that lower-cases it, delivery
is deferred.
Although we're checking to see if Exim can workaround this, is there
a way Dovecot (1.0rc24) can force lowercase folder names without a
patch? We'd hate to do this but are exploring our options.
Thanks!
Rich
Rich, Whidbey Telecom wrote:
However, the case-sensitive nature of our ext3 filesystem means that a message destined to "topic" won't deliver to a user's "Topic" folder.
For example, if a user creates a "Topic" folder, and gives "user+Topic@domain.com" to a web form that lower-cases it, delivery is deferred.
While way off topic in this list, why not just do this via the Exim filtering? I'll make two assumptions:
the user has created a folder called 'Topic', knowing they will subscribe to a webform using "user+toPiC" (example)
you employ local_part_suffix options in your 'userforward' router:
local_part_suffix = +* : -* local_part_suffix_optional
Exim filtering will disregard case if the testing condition is lowercase, but regard it if it's upper case. A pseudo filter (going off the top of my head) for a user might look like:
if $local_part_suffix is "+Topic" then deliver ${home}/Maildir/.Topic/ finish endif
"is" means 'Topic' will be matched without case; "IS" will try and match with case sensitivity.
It doesn't make sense to me to patch Dovecot (which would be difficult to maintain unless it's accepted upstream) when you should probably could do what you want via Exim's super-powerful lingo.
There's a guy on the exim list who wrote a Fibonacci sequence in ACL rules. :) (*)
-te
(*) http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20050328/msg00086.h...
-- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com
On Feb 28, 2007, at 12:38 PM, Troy Engel wrote:
Rich, Whidbey Telecom wrote:
However, the case-sensitive nature of our ext3 filesystem means
that a message destined to "topic" won't deliver to a user's
"Topic" folder. For example, if a user creates a "Topic" folder,
and gives "user+Topic@domain.com" to a web form that lower-cases
it, delivery is deferred.While way off topic in this list, why not just do this via the Exim
filtering? I'll make two assumptions:
the user has created a folder called 'Topic', knowing they will
subscribe to a webform using "user+toPiC" (example)you employ local_part_suffix options in your 'userforward' router:
local_part_suffix = +* : -* local_part_suffix_optional
Exim filtering will disregard case if the testing condition is
lowercase, but regard it if it's upper case. A pseudo filter (going
off the top of my head) for a user might look like:if $local_part_suffix is "+Topic" then deliver ${home}/Maildir/.Topic/ finish endif
"is" means 'Topic' will be matched without case; "IS" will try and
match with case sensitivity.It doesn't make sense to me to patch Dovecot (which would be
difficult to maintain unless it's accepted upstream) when you
should probably could do what you want via Exim's super-powerful
lingo.
Thanks Troy. That looks like it'd work, but only if you pre-
determined which folders users could have. We don't know the folder
names, so "$local_part_suffix is $local_part_suffix" wouldn't really
work.
We posted to the Exim list as well, but so far it seems no one's
tried to do this before.
Rich
Rich, Whidbey Telecom wrote:
lowercase, but regard it if it's upper case. A pseudo filter (going off the top of my head) for a user might look like:
Thanks Troy. That looks like it'd work, but only if you pre-determined which folders users could have. We don't know the folder names, so
I guess I'm missing a step in the logic -- you're going to allow user+Topic or user+Foobar or user+Baz, yet the user has not created these folders yet? So you're basically going to have Exim create the new folders on the fly *for* the user and update 'subscriptions'? (shudder)
My logical thinking is:
- admin enables local part suffixes globally
- user creates folder Foobar
- user creates/adds filter lingo to grab Foobar and folder it
I guess your logic is that you'd do a global filter that shoves things for people and no users would edit their own filters, which seems like a whole lot of admin headache and overhead. Unless I'm missing something here...
-te
-- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com
participants (2)
-
Rich, Whidbey Telecom
-
Troy Engel