Dies ist eine alte Version des Dokuments!


Dovecot, Shared Folder und Shared Namespace

… coming soon! :-)

Als erstes Datenbankverzeichnis anlegen:

 # mkdir /var/lib/dovecot/db

Berechtigungen für unseren virtuellen Mailbox-User vmail setzen.

 # chown vmail.vmail /var/lib/dovecot/db/
 # vim /etc/dovecot/conf.d/10-master.conf
... 
 
service auth {
  # auth_socket_path points to this userdb socket by default. It's typically
  # used by dovecot-lda, doveadm, possibly imap process, etc. Users that have
  # full permissions to this socket are able to get a list of all usernames and
  # get the results of everyone's userdb lookups.
  #
  # The default 0666 mode allows anyone to connect to the socket, but the
  # userdb lookups will succeed only if the userdb returns an "uid" field that
  # matches the caller process's UID. Also if caller's uid or gid matches the
  # socket's uid or gid the lookup succeeds. Anything else causes a failure.
  #
  # To give the caller full permissions to lookup all users, set the mode to
  # something else than 0666 and Dovecot lets the kernel enforce the
  # permissions (e.g. 0777 allows everyone full permissions).
  unix_listener auth-userdb {
    # Django : 2014-08-08
    # Authentication Socket für userdb-Anfragen bei Nutzung von shared folders
    # default: #mode = 0666
    #          #user = 
    #          #group =
    user = vmail
    group = vmail
  }
 
  # Postfix smtp-auth
  #unix_listener /var/spool/postfix/private/auth {
  #  mode = 0666
  #}
 
  # Auth process is run as this user.
  #user = $default_internal_user
}
 
...
 # vim /etc/dovecot/conf.d/10-mail.conf
...
 
# Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files.
# Django : 2014-08-05
# default: #mail_plugins =
#mail_plugins = zlib
# Django : 2014-08-06 - Quotaregelung aktiviert
# last   : mail_plugins = zlib
mail_plugins = zlib quota
# Django : 2014-08-08 - ACL-Plugin für Shared Folders
mail_plugins = zlib quota acl
 
...
 # vim /etc/dovecot/conf.d/20-imap.conf
...
 
protocol imap {
  # Space separated list of plugins to load (default is global mail_plugins).
  #mail_plugins = $mail_plugins
  # Django : 2014-08-06 Quota-Informationen via IMAP zur Verfügung stellen
  #mail_plugins = $mail_plugins imap_quota
  # Django : 2014-08-08 ACL-Verwaltung via IMAP zur Verfügung stellen
  mail_plugins = $mail_plugins imap_quota imap_acl
 
  # Maximum number of IMAP connections allowed for a user from each IP address.
  # NOTE: The username is compared case-sensitively.
  #mail_max_userip_connections = 10
}
 
...
 # vim /etc/dovecot/conf.d/90-acl.conf
/etc/dovecot/conf.d/90-acl.conf
##
## Mailbox access control lists.
##
 
# vfile backend reads ACLs from "dovecot-acl" file from mail directory.
# You can also optionally give a global ACL directory path where ACLs are
# applied to all users' mailboxes. The global ACL directory contains
# one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
# specifies how many seconds to wait between stat()ing dovecot-acl file
# to see if it changed.
plugin {
  # Django : 2014-08-08
  # default: #acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl = vfile
}
 
# To let users LIST mailboxes shared by other users, Dovecot needs a
# shared mailbox dictionary. For example:
plugin {
  # Django : 2014-08-08
  # default: #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes
}
 # vim /etc/dovecot/conf.d/10-mail.conf
...
 
# Django : 2014-08-08
# default: unset
# Example shared namespace configuration
#namespace {
  #type = shared
  #separator = /
 
  # Mailboxes are visible under "shared/user@domain/"
  # %%n, %%d and %%u are expanded to the destination user.
  #prefix = shared/%%u/
 
  # Mail location for other users' mailboxes. Note that %variables and ~/
  # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
  # destination user's data.
  #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
 
  # Use the default namespace for saving subscriptions.
  #subscriptions = no
 
  # List the shared/ namespace only if there are visible shared mailboxes.
  #list = children
#}
# Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
#mail_shared_explicit_inbox = no
 
namespace {
  type = shared
  separator = /
  prefix = shared/%%u/
  location = maildir:%%h/Maildir:INDEX=%h/shared/%%u:CONTROL=%h/shared/%%u
  inbox = no
  hidden = no
  list = children
  subscriptions = yes
}
 
...
 # systemctl reload dovecot
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
  • centos/mail_c7/dovecot_7.1407522610.txt.gz
  • Zuletzt geändert: 08.08.2014 18:30.
  • von django