[Dovecot] Splitting up mail_location setting?
mail_location setting has started becoming a bit bloaty. I'm not actually even sure why I've kept adding more parameters to it rather than just adding new settings. It's also caused confusion, because people try things like:
mail_location = mbox:/var/mail/%u mail_location = mbox:INBOX=/var/mail/%u
Although the first one has been giving ok enough error message for a long time now and the second one also will give in v2.0.10, it still would be nicer if there wasn't any need for such confusion at all. The settings could instead be:
mail_format = mbox mail_inbox_path = /var/mail/%u
Then Dovecot could complain about mail_root_path being empty, which would be more understandable..
The mail_location setting itself would keep working probably forever for backwards compatibility (and also in some setups it would be difficult to split it when it comes from LDAP/SQL), although some of its parameters could maybe be dropped after a while (SUBSCRIPTIONS, DIRNAME, MAILBOXDIR). So if you did e.g.:
mail_location = mbox:~/mail:INBOX=/var/mail/%u mail_root_path = ~/mail2
The result would be same as mbox:~/mail2:INBOX=/var/mail/%u. Although this can also result in probably unwanted situation:
mail_location = mbox:~/mail:INBOX=/var/mail/%u mail_format = maildir mail_root_path = ~/Maildir
Now the result would be maildir:~/Maildir:INBOX=/var/mail/%u. This can be avoided by setting mail_inbox_path="" explicitly. Or the other way around:
mail_inbox_path = /var/mail/%u mail_location = maildir:~/Maildir:INBOX=
Without the INBOX= the mail_inbox_path would be in use.
Below are the setting names I thought about using:
a) mail_location = maildir:~/Maildir:INBOX=~/Maildir/.INBOX:INDEX=~/indexes:CONTROL=~/control:LAYOUT=fs:SUBSCRIPTIONS=courier-subscriptions
mail_format = maildir mail_root_path = ~/Maildir mail_inbox_path = ~/Maildir/.INBOX mail_index_path = ~/indexes mail_control_path = ~/control mail_directory_layout = fs mail_subscriptions_fname = courier-subscriptions
b) mail_location = mdbox:~/mdbox:ALT=/alt/%u:LAYOUT=fs:DIRNAME=dbox-Mails:MAILBOXDIR=mailboxes
mail_format = mdbox mail_root_path = ~/mdbox mail_alt_path = /alt/%u mail_dir_name = dbox-Mails mail_mailboxes_dir_name = mailboxes
Thoughts?
El Tuesday 01 February 2011, Timo Sirainen tss@iki.fi dijo:
Below are the setting names I thought about using:
a) mail_location = maildir:~/Maildir:INBOX=~/Maildir/.INBOX:INDEX=~/indexes:CONTROL=~/control :LAYOUT=fs:SUBSCRIPTIONS=courier-subscriptions
mail_format = maildir mail_root_path = ~/Maildir mail_inbox_path = ~/Maildir/.INBOX mail_index_path = ~/indexes mail_control_path = ~/control mail_directory_layout = fs mail_subscriptions_fname = courier-subscriptions
b) mail_location = mdbox:~/mdbox:ALT=/alt/%u:LAYOUT=fs:DIRNAME=dbox-Mails:MAILBOXDIR=mailboxe s
mail_format = mdbox mail_root_path = ~/mdbox mail_alt_path = /alt/%u mail_dir_name = dbox-Mails mail_mailboxes_dir_name = mailboxes
Thoughts?
Personally, I like the current setting. For me, if the current setting is misunderstood sometimes, the proposed one with two overlapping settings for the same attribute, with values sometimes read from external BBDD sounds pretty error prone.
Maybe call mail_location "advanced setup" and the other ones "basic setup", and make them mutually exclusive (I mean something like: if mail_format is used only mail_* attributes are used, and if it's not only mail_location). Otherwise very strange problems may appear.
Bye.
Joseba Torre. Vicegerencia de TICs, área de Explotación
Am 01.02.2011 um 17:35 schrieb Timo Sirainen:
Below are the setting names I thought about using:
a) mail_location = maildir:~/Maildir:INBOX=~/Maildir/.INBOX:INDEX=~/indexes:CONTROL=~/control:LAYOUT=fs:SUBSCRIPTIONS=courier-subscriptions
mail_format = maildir mail_root_path = ~/Maildir mail_inbox_path = ~/Maildir/.INBOX mail_index_path = ~/indexes mail_control_path = ~/control mail_directory_layout = fs mail_subscriptions_fname = courier-subscriptions
Looks promising (no-brainer). Not quite sure about the parameter's names though. It would seem more reasonable if they would all start with 'mail_location_' or another clustered name, indicating they modify the same set of parameters..
Thomas
participants (3)
-
Joseba Torre
-
Thomas Leuxner
-
Timo Sirainen