Special Mail Folders at Nextcloud

just wondering were the settings would be to enable the drafts trash and sent folder when using autoprovision

@support_team
Can somebody help?

1 Like

I have had a look and I think you have to realize it with a custom template of dovecot settings.
Please copy 40namespaces from

/etc/e-smith/templates/etc/dovecot/dovecot.conf/

to

/etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/

and configure the folders there.
Don’t miss to expand the template after it.

4 Likes

To get mail app working in nextcloud
run

doveadm acl set -A Public authenticated lookup read

and following @m.traeumner advice
i created the folders as there was nothing after /etc/e-smith/templates-custom/ (i havent added any custom templates yet)

mkdir -p /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf

then i copied the file

cp /etc/e-smith/templates/etc/dovecot/dovecot.conf/40namespaces /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/

then edited it
nano /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/40namspaces

to add the following at the end (which i got from here https://serverfault.com/questions/277430/how-do-i-setup-a-sent-and-trash-folder-with-dovecot/847509#847509)

namespace inbox {
  type = private
  separator = .
  inbox = yes
  mailbox Drafts {
    special_use = \Drafts
    auto = subscribe
  }

  mailbox Junk {
    special_use = \Junk
    auto = create
  }

  mailbox spam {
    special_use = \Junk
    auto = no
  }

  mailbox Spam {
    special_use = \Junk
    auto = no
  }

  mailbox Trash {
    special_use = \Trash
    auto = subscribe
  }

  mailbox TRASH {
special_use = \Trash
    auto = no
  }

  mailbox Sent {
    special_use = \Sent
    auto = subscribe
  }

  mailbox "Sent Mail" {
    special_use = \Sent
    auto = no
  }

  mailbox "Sent Messages" {
    special_use = \Sent
    auto = no
  }

  mailbox Archive {
    special_use = \Archive
   auto = no
  }
}

then used this cmd

signal-event nethserver-mail-server-save

and now it works

auto provisioning still doesnt work and you still need to go into account settings to select the folders (once i find were thats templated ill fix it or try to) but auto setup works (i have the module for auto config setup from the how to’s)

4 Likes