BUG: cannot move messages to root mailfolder in namespace "There can be only one namespace with inbox=yes"

Martin Johannes Dauser mdauser at cs.sbg.ac.at
Wed Jan 9 17:14:15 EET 2019


Hi,

"The section name in namespaces (e.g. namespace sectionname { .. } is
used only internally within configuration. It's not required at all,
but it allows you to update an existing namespace 
(like how 15-mailboxes.conf does) or have userdb override namespace
settings for specific users (namespace/sectionname/prefix=foo/)." 
(from https://wiki.dovecot.org/Namespaces)

You can call the namespace as you wish or leave it out, but it's a nice
hint telling it's purpose and if you activate debug level it's easier
to see which namespace does what.

There is no alphabetical order taken in account.

Regarding duplicate prefix: I didn't thought of that. Using prefix
Archive/ should lead to a mailbox /Archive/Archive I guess. I'm not
sure if namespace attribute "list = no" could do something about it.

Another way round would be to set the prefix of inbox as Inbox/ instead
but this would force users to create folders only as subfolders of
/INBOX/ or of /Archive/.

I'm glad I could be of some help.
Martin

On Wed, 2019-01-09 at 15:22 +0100, Marc Roos wrote:
> Hi Martin,
> 
> Thanks for the reply. I got the error below, but when I changed the 
> prefix in 4archives to Archive/ I am getting indeed something that
> is 
> looking ok, I still have to test with a few clients. Why did you
> call 
> the namespace 4archives? Because it would load before inbox? Or does 
> this not matter at all.
> 
> Error: namespace configuration error: Duplicate namespace prefix: "" 
> 
> 
> 
> -----Original Message-----
> From: Martin Johannes Dauser [mailto:mdauser at cs.sbg.ac.at> Sent: 09 January 2019 12:02
> To: dovecot at dovecot.org
> Subject: Re: BUG: cannot move messages to root mailfolder in
> namespace 
> "There can be only one namespace with inbox=yes"
> 
> Hi,
> 
> this setting might work. The default namespace "inbox" is managing
> INBOX 
> and defines Special-Use folders on the same hierarchic level as
> INBOX. 
> There is an extra namespace "4archives" which defines Archive as a 
> mailbox on the same level as INBOX but stored on a different
> location. 
> Set mailbox attribute auto to your liking.
> 
> 
> namespace inbox {
> type = private
> disabled = no
> hidden = no
> list = yes
> ignore_on_failure = no
> inbox = yes
> location =
> prefix =
> subscriptions = yes
> separator = /
> 
> mailbox Drafts {
> special_use = \Drafts
> auto = subscribe
> }
> mailbox Junk {
> special_use = \Junk
> auto = subscribe
> }
> mailbox Spam {
> special_use = \Junk
> auto = no
> }
> mailbox spam {
> special_use = \Junk
> auto = no
> }
> mailbox Deleted {
> special_use = \Trash
> auto = subscribe
> }
> mailbox Trash {
> special_use = \Trash
> auto = no
> }
> mailbox Wastebasket {
> special_use = \Trash
> auto = no
> }
>   mailbox Sent {
> special_use = \Sent
> auto = subscribe
> }
> mailbox "Sent Messages" {
> special_use = \Sent
> auto = no
> }
> mailbox "Sent Mail" {
> special_use = \Sent
> auto = no
> }
> mailbox "Tasks" {
> # This mailbox has no official RFC 6154 or RFC 8457 Special-Use entry
> auto = subscribe
> }
> }
> 
> namespace 4archives {
> type = private
> disabled = no
> hidden = no
> list = yes
> ignore_on_failure = no
> inbox = no
> location = 
> mbox:/home/mail-archive/%u/Archive/:CONTROL=/home/mail-
> archive/%u/Archiv
> e/control:INDEX=/home/mail-archive/%u/Archive/index:LAYOUT=maildir++
> prefix = 
> subscriptions = yes
> separator = /
> mailbox Archive {
> auto = create
> autoexpunge = 0
> autoexpunge_max_mails = 0
> comment =
> driver =
> special_use = \Archive
> }
> mailbox Archives {
> auto = no
> autoexpunge = 0
> autoexpunge_max_mails = 0
> comment =
> driver =
> special_use = \Archive
> }
> mailbox "Archived Messages" {
> auto = no
> autoexpunge = 0
> autoexpunge_max_mails = 0
> comment =
> driver =
> special_use = \Archive
> }
> mailbox "Archived mail" {
> auto = no
> autoexpunge = 0
> autoexpunge_max_mails = 0
> comment =
> driver =
> special_use = \Archive
> }
> }
> 
> 
> 
> On Fri, 2019-01-04 at 12:06 +0100, Marc Roos wrote:
> 
> 	 
> 
> 	Where is a manual describing how to do this? Archive tree on 
> different 
> 	storage?
> 
> 	├── Archive/Archives/Archived Messages/Archived mail <- need
> to 
> store 
> 	messages in root folder also
> 	│   ├── 2017
> 	│   │   ├── projects
> 	│   │   │   ├── project
> 	│   │   │   ├── project1
> 	│   │   │   ├── project2
> 	│   │   │   ├── project3
> 	│   │   │   ├── project4
> 	│   │   │   └── project5
> 	│   │   └── Sent Messages
> 	│   ├── 2018
> 	│   │   ├── project1
> 	│   │   ├── project2
> 	│   │   ├── project3
> 	│   │   ├── project4
> 	│   │   ├── project5
> 	│   │   └── Sent
> 	│   └── 2019
> 	│       ├── projectA
> 	│       └── projectB
> 	├── Deleted
> 	├── Inbox
> 	├── Junk
> 	├── Sent
> 	└── Tasks
> 
> 
> 	 >
> 	 >> 
> 	 >> I get this error message from apple mail when I right click
> and 
> 
> 	choose 
> 	 >> archive
> 	 >> "The IMAP command "UID COPY" (to Archive) failed for the 
> mailbox 
> 	"INBOX" 
> 	 >> with server error: Mailbox isn't selectable"
> 	 >> 
> 	 >
> 	 >Did you notice that you have a mailbox called 'Archive' and 
> namespace 
> 	called
> 	 >'Archive'? Namespace roots are not selectable, and this
> looks 
> more 
> 	like a 
> 	 >config error.
> 	 >
> 	 >
> 
> 	That is been done on the advice I got here. 
> 	Since November I am trying to get resolved, that I need my
> Archive 
> and 
> 	subfolders on different storage location as the default. 
> Furthermore 
> 	Archive folder is being used by apple mail, Archives folder eg.
> by 
> 	Thunderbird. So it would be nice to 'group' this, so
> Thunderbird is 
> not 
> 	accidentally storing this on the default storage.
> 
> 	If the aliases plugin was working properly, I could have done
> this 
> maybe 
> 
> 	via aliases
> 	https://www.mail-archive.com/dovecot@dovecot.org/msg75587.html
> 
> 
> 
> 


More information about the dovecot mailing list