Blob


1 version=pmwiki-2.3.20 ordered=1 urlencoded=1
2 agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
3 author=izzyb
4 charset=UTF-8
5 csum=
6 ctime=1675145036
7 host=2001:56a:fb72:6400:d042:d1ce:5186:19af
8 name=Dovecot.SharedMailboxes
9 rev=17
10 targets=Dovecot.Install
11 text=%25define=code block bgcolor=black color=white margin-right=5em margin-left=5em padding=1em overflow=auto %25%0aThere are 3 ways to share mailboxes in dovecot as outlined [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/#shared-mailboxes | here]]. %0a%0aThis document explains how IRCNOW teams can configure this feature to share the mailboxes for support@ with all members of your server team. It is assumed you already have a working [[Dovecot.Install]]. %0a%0a!! Symlink Method%0aThe simplest way to do this is using the symlink method as described [[ https://doc.dovecot.org/configuration_manual/shared_mailboxes/sharing_with_symlinks/#sharing-with-symlinks | here]]. The advantage this has is there is no need to change your dovecot config. The disadvantage is you need to manually manage the symlinks and each folder to be shared has to be specified individually. %0a%0aConsider the following example for sharing the support@planetofnix.com INBOX and a sub folder .INBOX.cron with user izzyb.%0a%0a%25code%25[@%0aln -s /var/vmail/planetofnix.com/support/Maildir /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support%0aln -s /var/vmail/planetofnix.com/support/Maildir/.INBOX.cron /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support.cron%0a@]%0a%0a%0aIn your email client, you'll need to subscribe to these new mailboxes if you don't see them automatically. %0a%0a!! Public Mailboxes%0a%0aThis method uses a public namespace as described in [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/public_shared/#public-shared-mailboxes | this document]]. The idea being that each user will have a Public Mailbox they can create sub-Mailboxes in that will be shared to all users on the system. You'd need to run something like procmail to auto sort incoming mail to the public folders for the support@ account, and it would be visible to all users. As such, this isn't a recommended solution to for sharing support@ emails as there is no way to limit who has access.%0a%0aWIP - example to follow%0a%0a!! Shared Mailboxes%0a%0aThis is the recommended method, but also most complicated to setup. It uses shared mailboxes as described in [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/ | this document]].%0a%0aThere are two ways this can be done; Global ACL Method, or Per User ACL Method.%0a!!! Global ACL Method%0a%0aThis method isn't recommended for the same reasons as the public share method. There is no way to limit which users shared folders are accessible to the users grated access. Sharing INBOX this way would grant access to the inbox of all users, not just support@planetofnix.com. This is more useful for creating a default PUBLIC mailbox that all users can put publicly shared mailboxes into. Again, this is global so it grants access to the PUBLIC mailboxes of all users.%0a%0aWIP...%0a%0a!!! Per User ACL Method%0a%0aThis is broken ATM - WIP%0a%0aThis document follows this guide in part %0a%0aThe first step is to enable the shared namespace. Edit the file /etc/dovecot/conf.d/10-mail.conf. You'll see a commented out section that looks something like this. Remove the comments to enable it as shown here:%0a%0a%25code%25[@%0a# Example shared namespace configuration%0anamespace {%0a type = shared%0a separator = /%0a%0a # Mailboxes are visible under "shared/user@domain/"%0a # %25%25n, %25%25d and %25%25u are expanded to the destination user.%0a prefix = shared/%25%25u/%0a%0a # Mail location for other users' mailboxes. Note that %25variables and ~/%0a # expands to the logged in user's data. %25%25n, %25%25d, %25%25u and %25%25h expand to the%0a # destination user's data.%0a location = maildir:%25%25h/Maildir:INDEX=~/Maildir/shared/%25%25u%0a%0a # Use the default namespace for saving subscriptions.%0a subscriptions = no%0a%0a # List the shared/ namespace only if there are visible shared mailboxes.%0a list = children%0a}%0a%0a# (...) scroll down to the mail_plugins section and edit like this:%0a%0a# Space separated list of plugins to load for all services. Plugins specific to%0a# IMAP, LDA, etc. are added to this list in their own .conf files.%0amail_plugins = acl%0a@]%0a%0aNext you need to enable imap_acl by editing /etc/dovecot/conf.d/20-imap.conf to look something like this:%0a%0a%25code%25[@%0aprotocol imap {%0a # Space separated list of plugins to load (default is global mail_plugins).%0a mail_plugins = $mail_plugins imap_acl%0a%0a # Maximum number of IMAP connections allowed for a user from each IP address.%0a # NOTE: The username is compared case-sensitively.%0a mail_max_userip_connections = 10%0a}@]%0a%0aNow you need to provide some configuration parameters for the acl plugin by removing the comments in%0a/etc/dovecot/conf.d/90-acl.conf so it looks like this:%0a%0a%25code%25[@%0aplugin {%0a # using /etc/mail/ instead of /etc/dovecot/ since this is where user config details are stored%0a acl = vfile:/etc/mail/global-acls:cache_secs=300%0a}%0a %0a# To let users LIST mailboxes shared by other users, Dovecot needs a%0a# shared mailbox dictionary. For example:%0aplugin {%0a acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes%0a}@]%0a%0aFinally, enter the following to restart Dovecot and you should have mailbox sharing enabled.%0a%0a%25code%25[@%0adoas rcctl reload dovecot%0a@]%0a%0a!! Sharing Mailboxes%0a%0aNow that you have mailbox sharing enabled, we need to share some mailboxes. These instructions cover using doveadm acl (see man doveadm-acl) for sharing mailboxes from the support@ email account. %0a%0aTo be continued...
12 time=1678457817
13 author:1678457817=izzyb
14 diff:1678457817:1678418716:=1c1%0a%3c %25define=code block bgcolor=black color=white margin-right=5em margin-left=5em padding=1em overflow=auto %25%0a---%0a> %25define=code block bgcolor=black color=white margin-right=5em margin-left=5em overflow=auto %25%0a
15 host:1678457817=2001:56a:fb72:6400:d042:d1ce:5186:19af
16 author:1678418716=izzyb
17 csum:1678418716=anded overflow scrollbars
18 diff:1678418716:1678417696:minor=1c1%0a%3c %25define=code block bgcolor=black color=white margin-right=5em margin-left=5em overflow=auto %25%0a---%0a> %25define=code block bgcolor=black color=white margin-right=10em margin-left=10em %25%0a
19 host:1678418716=2001:56a:fb72:6400:d042:d1ce:5186:19af
20 author:1678417696=izzyb
21 csum:1678417696=added margins to code blocks
22 diff:1678417696:1678416505:minor=1c1%0a%3c %25define=code block bgcolor=black color=white margin-right=10em margin-left=10em %25%0a---%0a> %25define=code block bgcolor=black color=white%25%0a
23 host:1678417696=2001:56a:fb72:6400:d042:d1ce:5186:19af
24 author:1678416505=izzyb
25 csum:1678416505=found a simpler way to do code blocks that works as expected
26 diff:1678416505:1678412698:=1d0%0a%3c %25define=code block bgcolor=black color=white%25%0a11c10%0a%3c %25code%25[@%0a---%0a> (:div style='background:#c0ffee; color:#000000':)[@%0a15,16c14,15%0a%3c %0a%3c %0a---%0a> (:divend:)%0a> %0a44c43%0a%3c %25code%25[@%0a---%0a> (:div style='background:#c0ffee;color:black':)[@%0a72c71,72%0a%3c %0a---%0a> (:divend:)%0a> %0a75c75%0a%3c %25code%25[@%0a---%0a> (:div style='background:#c0ffee;color:black':)[@%0a84c84,85%0a%3c %0a---%0a> (:divend:)%0a> %0a88c89%0a%3c %25code%25[@%0a---%0a> (:div style='background:#c0ffee;color:black':)[@%0a99c100,101%0a%3c %0a---%0a> (:divend:)%0a> %0a102c104%0a%3c %25code%25[@%0a---%0a> (:div style='background: #c0ffee;color: black':)%0a104c106%0a%3c @]%0a---%0a> (:divend:)%0a
27 host:1678416505=2001:56a:fb72:6400:d042:d1ce:5186:19af
28 author:1678412698=izzyb
29 diff:1678412698:1678411703:=10c10%0a%3c (:div style='background:#c0ffee; color:#000000':)[@%0a---%0a> (:div style='background:#red; color:#000000':)[@%0a
30 host:1678412698=2001:56a:fb72:6400:d042:d1ce:5186:19af
31 author:1678411703=izzyb
32 diff:1678411703:1678411637:minor=43c43%0a%3c (:div style='background:#c0ffee;color:black':)[@%0a---%0a> (:div style='background: #000000;color: #ffffff':)[@%0a
33 host:1678411703=2001:56a:fb72:6400:d042:d1ce:5186:19af
34 author:1678411637=izzyb
35 csum:1678411637=fixed colour of background screens so its readable
36 diff:1678411637:1678410879:minor=10c10%0a%3c (:div style='background:#red; color:#000000':)[@%0a---%0a> (:div style='background: black; color: white':)[@%0a75c75%0a%3c (:div style='background:#c0ffee;color:black':)[@%0a---%0a> (:div style='background: #000000;color: #ffffff':)[@%0a89c89%0a%3c (:div style='background:#c0ffee;color:black':)[@%0a---%0a> (:div style='background: #000000;color: #ffffff':)[@%0a104c104%0a%3c (:div style='background: #c0ffee;color: black':)%0a---%0a> (:div style='background: #000000;color: #ffffff':)%0a
37 host:1678411637=2001:56a:fb72:6400:d042:d1ce:5186:19af
38 author:1678410879=izzyb
39 csum:1678410879=Trying to fix color of command divs
40 diff:1678410879:1678410168:minor=10c10%0a%3c (:div style='background: black; color: white':)[@%0a---%0a> (:div style='background: #000000; color: #ffffff':)[@%0a
41 host:1678410879=2001:56a:fb72:6400:d042:d1ce:5186:19af
42 author:1678410168=izzyb
43 diff:1678410168:1675196941:minor=10c10%0a%3c (:div style='background: #000000; color: #ffffff':)[@%0a---%0a> (:div style='background: #000000;color: #ffffff':)[@%0a
44 host:1678410168=2001:56a:fb72:6400:d042:d1ce:5186:19af
45 author:1675196941=izzyb
46 diff:1675196941:1675195209:=18,32c18,21%0a%3c !! Public Mailboxes%0a%3c %0a%3c This method uses a public namespace as described in [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/public_shared/#public-shared-mailboxes | this document]]. The idea being that each user will have a Public Mailbox they can create sub-Mailboxes in that will be shared to all users on the system. You'd need to run something like procmail to auto sort incoming mail to the public folders for the support@ account, and it would be visible to all users. As such, this isn't a recommended solution to for sharing support@ emails as there is no way to limit who has access.%0a%3c %0a%3c WIP - example to follow%0a%3c %0a%3c !! Shared Mailboxes%0a%3c %0a%3c This is the recommended method, but also most complicated to setup. It uses shared mailboxes as described in [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/ | this document]].%0a%3c %0a%3c There are two ways this can be done; Global ACL Method, or Per User ACL Method.%0a%3c !!! Global ACL Method%0a%3c %0a%3c This method isn't recommended for the same reasons as the public share method. There is no way to limit which users shared folders are accessible to the users grated access. Sharing INBOX this way would grant access to the inbox of all users, not just support@planetofnix.com. This is more useful for creating a default PUBLIC mailbox that all users can put publicly shared mailboxes into. Again, this is global so it grants access to the PUBLIC mailboxes of all users.%0a%3c %0a---%0a> !! Global ACL Method%0a> %0a> This method isn't recommended for sharing the INBOX as it grants access to the INBOX of all users. There is no way to specify just specific users should have their INBOX shared. This is more useful for creating a default PUBLIC mailbox that all users can put publicly shared mailboxes into. Again, this is global so it grants access to the PUBLIC mailboxes of all users.%0a> %0a35,36c24,25%0a%3c !!! Per User ACL Method%0a%3c %0a---%0a> !! User Specific Mailbox Sharing%0a> %0a39c28%0a%3c This document follows this guide in part %0a---%0a> This document follows this guide in part https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/%0a
47 host:1675196941=2001:56a:f8ee:bb00:5530:453a:9e38:822a
48 author:1675195209=izzyb
49 csum:1675195209=Started work on using Global ACL
50 diff:1675195209:1675193902:=18,22c18%0a%3c !! Global ACL Method%0a%3c %0a%3c This method isn't recommended for sharing the INBOX as it grants access to the INBOX of all users. There is no way to specify just specific users should have their INBOX shared. This is more useful for creating a default PUBLIC mailbox that all users can put publicly shared mailboxes into. Again, this is global so it grants access to the PUBLIC mailboxes of all users.%0a%3c %0a%3c WIP...%0a---%0a> !! Global Mailbox Sharing%0a
51 host:1675195209=2001:56a:f8ee:bb00:5530:453a:9e38:822a
52 author:1675193902=izzyb
53 diff:1675193902:1675193821:minor=10c10%0a%3c (:div style='background: #000000;color: #ffffff':)[@%0a---%0a> (:div style='background: #000000;color: #ffffff':)%0a12,13c12%0a%3c ln -s /var/vmail/planetofnix.com/support/Maildir/.INBOX.cron /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support.cron%0a%3c @]%0a---%0a> ln -s /var/vmail/planetofnix.com/support/Maildir/.INBOX.cron /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support.cron %0a
54 host:1675193902=2001:56a:f8ee:bb00:5530:453a:9e38:822a
55 author:1675193821=izzyb
56 diff:1675193821:1675193778:minor=13c13%0a%3c (:divend:)%0a---%0a> (:enddiv:)%0a
57 host:1675193821=2001:56a:f8ee:bb00:5530:453a:9e38:822a
58 author:1675193778=izzyb
59 csum:1675193778= WIP - Added instructions for using the symlink method. Found bugs in original config
60 diff:1675193778:1675147001:=1,22c1,2%0a%3c There are 3 ways to share mailboxes in dovecot as outlined [[https://doc.dovecot.org/configuration_manual/shared_mailboxes/#shared-mailboxes | here]]. %0a%3c %0a%3c This document explains how IRCNOW teams can configure this feature to share the mailboxes for support@ with all members of your server team. It is assumed you already have a working [[Dovecot.Install]]. %0a%3c %0a%3c !! Symlink Method%0a%3c The simplest way to do this is using the symlink method as described [[ https://doc.dovecot.org/configuration_manual/shared_mailboxes/sharing_with_symlinks/#sharing-with-symlinks | here]]. The advantage this has is there is no need to change your dovecot config. The disadvantage is you need to manually manage the symlinks and each folder to be shared has to be specified individually. %0a%3c %0a%3c Consider the following example for sharing the support@planetofnix.com INBOX and a sub folder .INBOX.cron with user izzyb.%0a%3c %0a%3c (:div style='background: #000000;color: #ffffff':)%0a%3c ln -s /var/vmail/planetofnix.com/support/Maildir /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support%0a%3c ln -s /var/vmail/planetofnix.com/support/Maildir/.INBOX.cron /var/vmail/planetofnix.com/izzyb/Maildir/.shared.support.cron %0a%3c (:enddiv:)%0a%3c %0a%3c In your email client, you'll need to subscribe to these new mailboxes if you don't see them automatically. %0a%3c %0a%3c !! Global Mailbox Sharing%0a%3c %0a%3c !! User Specific Mailbox Sharing%0a%3c %0a%3c This is broken ATM - WIP%0a%3c %0a---%0a> It is possible to enable sharing of mailboxes between users. This document explains how IRCNOW teams can configure this feature to share the mailboxes for support@ with all members of your server team. It is assumed you already have a working [[Dovecot.Install]]. %0a> %0a75,76c55%0a%3c # using /etc/mail/ instead of /etc/dovecot/ since this is where user config details are stored%0a%3c acl = vfile:/etc/mail/global-acls:cache_secs=300%0a---%0a> acl = vfile:/etc/dovecot/global-acls:cache_secs=300%0a78c57%0a%3c %0a---%0a> %0a
61 host:1675193778=2001:56a:f8ee:bb00:5530:453a:9e38:822a
62 author:1675147001=izzyb
63 diff:1675147001:1675146904:minor=3,4c3,4%0a%3c This document follows this guide in part https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/%0a%3c %0a---%0a> This document follows this guide https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/%0a> %0a68c68%0a%3c doas rcctl reload dovecot%0a---%0a> doas rcctl restart dovecot%0a
64 host:1675147001=75.158.138.249
65 author:1675146904=izzyb
66 csum:1675146904=Instructions for enabling mailbox sharing complete. Need to finish docs on sharing mailboxes
67 diff:1675146904:1675145036:=65,75d64%0a%3c Finally, enter the following to restart Dovecot and you should have mailbox sharing enabled.%0a%3c %0a%3c (:div style='background: #000000;color: #ffffff':)%0a%3c doas rcctl restart dovecot%0a%3c (:divend:)%0a%3c %0a%3c !! Sharing Mailboxes%0a%3c %0a%3c Now that you have mailbox sharing enabled, we need to share some mailboxes. These instructions cover using doveadm acl (see man doveadm-acl) for sharing mailboxes from the support@ email account. %0a%3c %0a%3c To be continued...%0a\ No newline at end of file%0a
68 host:1675146904=75.158.138.249
69 author:1675145036=izzyb
70 diff:1675145036:1675145036:=1,64d0%0a%3c It is possible to enable sharing of mailboxes between users. This document explains how IRCNOW teams can configure this feature to share the mailboxes for support@ with all members of your server team. It is assumed you already have a working [[Dovecot.Install]]. %0a%3c %0a%3c This document follows this guide https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/%0a%3c %0a%3c The first step is to enable the shared namespace. Edit the file /etc/dovecot/conf.d/10-mail.conf. You'll see a commented out section that looks something like this. Remove the comments to enable it as shown here:%0a%3c %0a%3c (:div style='background: #000000;color: #ffffff':)[@%0a%3c # Example shared namespace configuration%0a%3c namespace {%0a%3c type = shared%0a%3c separator = /%0a%3c %0a%3c # Mailboxes are visible under "shared/user@domain/"%0a%3c # %25%25n, %25%25d and %25%25u are expanded to the destination user.%0a%3c prefix = shared/%25%25u/%0a%3c %0a%3c # Mail location for other users' mailboxes. Note that %25variables and ~/%0a%3c # expands to the logged in user's data. %25%25n, %25%25d, %25%25u and %25%25h expand to the%0a%3c # destination user's data.%0a%3c location = maildir:%25%25h/Maildir:INDEX=~/Maildir/shared/%25%25u%0a%3c %0a%3c # Use the default namespace for saving subscriptions.%0a%3c subscriptions = no%0a%3c %0a%3c # List the shared/ namespace only if there are visible shared mailboxes.%0a%3c list = children%0a%3c }%0a%3c %0a%3c # (...) scroll down to the mail_plugins section and edit like this:%0a%3c %0a%3c # Space separated list of plugins to load for all services. Plugins specific to%0a%3c # IMAP, LDA, etc. are added to this list in their own .conf files.%0a%3c mail_plugins = acl%0a%3c @]%0a%3c (:divend:)%0a%3c %0a%3c Next you need to enable imap_acl by editing /etc/dovecot/conf.d/20-imap.conf to look something like this:%0a%3c %0a%3c (:div style='background: #000000;color: #ffffff':)[@%0a%3c protocol imap {%0a%3c # Space separated list of plugins to load (default is global mail_plugins).%0a%3c mail_plugins = $mail_plugins imap_acl%0a%3c %0a%3c # Maximum number of IMAP connections allowed for a user from each IP address.%0a%3c # NOTE: The username is compared case-sensitively.%0a%3c mail_max_userip_connections = 10%0a%3c }@]%0a%3c (:divend:)%0a%3c %0a%3c Now you need to provide some configuration parameters for the acl plugin by removing the comments in%0a%3c /etc/dovecot/conf.d/90-acl.conf so it looks like this:%0a%3c %0a%3c (:div style='background: #000000;color: #ffffff':)[@%0a%3c plugin {%0a%3c acl = vfile:/etc/dovecot/global-acls:cache_secs=300%0a%3c }%0a%3c %0a%3c # To let users LIST mailboxes shared by other users, Dovecot needs a%0a%3c # shared mailbox dictionary. For example:%0a%3c plugin {%0a%3c acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes%0a%3c }@]%0a%3c (:divend:)%0a%3c %0a
71 host:1675145036=75.158.138.249