Hi,
I 'm new to Dovecot and we are trying to do some tests in a
production environment. We use mysql to authenticate and dovecot imap only. But our structure directory is something special.
All of ours accounts are stored in maildir and the path is the
following:
For example the account pepe@inter.net
/export/maildir/inter.net/p/e/pepe and into pepe we have cur, tmp, new.
This is a problem because we cannot modify the database adding home
for all users, so in the other side I played with the default_mail_env
default_mail_env =
maildir:/export/maildir/%d/%1u/%2u/%n:INBOX=/export/maildir/%d/%1u/%2u/%n
but didn't wok out. Because
imap(pepe@inter.net): Aug 01 18:26:04 Fatal: Failed to create storage with data: INBOX=/export/maildir/inter.net/p/pe/pepe
I need only export / maildir / domain / first letter of the username
/ second letter / and last username
Is there any way to do this ?, thanks in advance
-- Guillermo Llenas Tecnología Inter.net Argentina
+54 011 6328-1500 fax 0054 11 6328-1530 www.ar.inter.net guillermo.llenas@team.ar.inter.net
Guillermo Llenas wrote:
Hi,
I 'm new to Dovecot and we are trying to do some tests in a
production environment. We use mysql to authenticate and dovecot imap only. But our structure directory is something special.
All of ours accounts are stored in maildir and the path is the following:
For example the account pepe@inter.net
/export/maildir/inter.net/p/e/pepe and into pepe we have cur, tmp, new.
This is a problem because we cannot modify the database adding home for all users, so in the other side I played with the default_mail_env
default_mail_env = maildir:/export/maildir/%d/%1u/%2u/%n:INBOX=/export/maildir/%d/%1u/%2u/%n but didn't wok out. Because
imap(pepe@inter.net): Aug 01 18:26:04 Fatal: Failed to create storage with data: INBOX=/export/maildir/inter.net/p/pe/pepe
I need only export / maildir / domain / first letter of the username / second letter / and last username
Is there any way to do this ?, thanks in advance
I think ... /%d/%1u/%1.1u/%n ... should work.
From docs/variables.txt :-
You can take a substring of the variable by giving optional offset followed by '.' and width after the '%' character. For example %2u gives first two characters of the username. %2.1u gives third character of the username. If offset points outside the value, empty string is returned.
So by my reading, "%1u" is the same as "%0.1u", "%2u" is "%0.2u" and you want "%1.1u"!
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@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
Chris Wakelin wrote:
I think ... /%d/%1u/%1.1u/%n ... should work.
From docs/variables.txt :-
You can take a substring of the variable by giving optional offset followed by '.' and width after the '%' character. For example %2u gives first two characters of the username. %2.1u gives third character of the username. If offset points outside the value, empty string is returned.
So by my reading, "%1u" is the same as "%0.1u", "%2u" is "%0.2u" and you want "%1.1u"!
Best Wishes, Chris
Thanks for your help Chris,
I was testing dovecot-0.99.14 and didn't work out. Now I
'll try dovecot-1.0-test79 in order to see what happens.
Best Regards,
-- Guillermo Llenas Tecnología Inter.net Argentina
+54 011 6328-1500 fax 0054 11 6328-1530 www.ar.inter.net guillermo.llenas@team.ar.inter.net
participants (2)
-
Chris Wakelin
-
Guillermo Llenas