We're using sieve with LMTP. We want to have lda_mailbox_autocreate and lmtp_save_to_detail_mailbox. Is there a way to make the "detail" case-insensitive? If so I have not found it yet. I suppose we could lowercase the input string for the SQL userdb query, but that's not what is wanted. The idea being that if a user makes a mailbox called "Test" is that user+test at example.com and user+TEST at example.com should both go to that "Test" mailbox. If it was lowercased, a mailbox called "Test" would be ignored and "test" used. With autocreate, this could be a problem if mail is delivered to autocreated case-sensitive mailboxes that the user won't see. Hmmm, maybe a global sieve script? -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
On 25.7.2013, at 19.29, /dev/rob0 <rob0 at gmx.co.uk> wrote:> We're using sieve with LMTP. We want to have lda_mailbox_autocreate > and lmtp_save_to_detail_mailbox. Is there a way to make the "detail" > case-insensitive? If so I have not found it yet. > > I suppose we could lowercase the input string for the SQL userdb > query, but that's not what is wanted. The idea being that if a user > makes a mailbox called "Test" is that user+test at example.com and > user+TEST at example.com should both go to that "Test" mailbox. If it > was lowercased, a mailbox called "Test" would be ignored and "test" > used. > > With autocreate, this could be a problem if mail is delivered to > autocreated case-sensitive mailboxes that the user won't see.If you used case-insensitive filesystem, it would already work like that. Maybe a new setting to make mailboxes case-insensitive also with case-sensitive filesystems..
On Thu, Jul 25, 2013 at 11:29:56AM -0500, /dev/rob0 wrote:> We're using sieve with LMTP. We want to have lda_mailbox_autocreate > and lmtp_save_to_detail_mailbox. Is there a way to make the "detail" > case-insensitive? If so I have not found it yet. > > I suppose we could lowercase the input string for the SQL userdb > query, but that's not what is wanted. The idea being that if a user > makes a mailbox called "Test" is that user+test at example.com and > user+TEST at example.com should both go to that "Test" mailbox. If it > was lowercased, a mailbox called "Test" would be ignored and "test" > used. > > With autocreate, this could be a problem if mail is delivered to > autocreated case-sensitive mailboxes that the user won't see. > > Hmmm, maybe a global sieve script?I use the following sieve snippet rather than lmtp_save_to_detail_mailbox: if envelope :detail :regex "to" "(.+)" { set :upperfirst :lower "detail" "${1}"; fileinto :create "Tagged/${detail}"; stop; } So, if the detail portion of the TO address exists, set a variable "detail" to be the first-letter-uppercased version of that portion (test -> Test, TEST -> Test and so on) and file the message into "Tagged/Test", creating that if necessary. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20130726/246365a2/attachment.bin>