Zentyal Forum, Linux Small Business Server
Zentyal Server => Email and Groupware => Topic started by: futuraservice on May 31, 2019, 05:30:02 pm
-
Hello everyone :D :D :D :D
I am using Zentyal 6.0
In /usr/share/zentyal/stubs/mail/dovecot.conf.mas i modified in this way for share some mailbox:
<%args>
$uid
$gid
%protocols
$firstValidUid
$firstValidGid
$mailboxesDir
$postmasterAddress
$keytabPath
$gssapiHostname
</%args>
<%init>
my @protocolsReduced;
if ($protocols{pop3} or $protocols{pop3s}) {
push @protocolsReduced, 'pop3';
}
if ($protocols{imap} or $protocols{imaps}) {
push @protocolsReduced, 'imap';
}
if ($protocols{managesieve}) {
push @protocolsReduced, 'sieve';
}
</%init>
# Generated by Zentyal
listen = *
% if (@protocolsReduced) {
protocols = <% "@protocolsReduced" %>
% } else {
protocols = none
% }
##
## Authentication processes
##
auth_mechanisms = gssapi plain
auth_krb5_keytab = <% $keytabPath %>
auth_gssapi_hostname = <% $gssapiHostname %>
auth_debug = no
auth_verbose = no
service auth {
executable = /usr/lib/dovecot/auth
unix_listener /var/spool/postfix/private/auth {
mode = 0660
# Assuming the default Postfix user and group
user = postfix
group = postfix
}
unix_listener auth-master {
group = ebox
mode = 0600
user = ebox
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0666
user = postfix
}
}
userdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf
default_fields=uid=<% $uid %> gid=<% $gid %>
}
passdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf
}
disable_plaintext_auth = yes
##
## Logging
##
log_timestamp = "%Y-%m-%d %H:%M:%S "
##
## SSL settings
##
ssl = yes
ssl_cert =</etc/dovecot/private/dovecot.pem
ssl_key =</etc/dovecot/private/dovecot.pem
verbose_ssl = no
##
## Login processes
##
##
## Mailbox locations and namespaces
##
mail_uid=<% $uid %>
mail_gid=<% $gid %>
## MODIFICA GIOVANNI
namespace {
type = private
separator = /
prefix =
#location defaults to mail_location.
inbox = yes
}
mail_plugins = acl
namespace {
type = shared
separator = /
prefix = Shared/%%u/
location = maildir:%%Lh/Maildir/:INDEX=%%Lh/Maildir/Shared/%%u
# this namespace should handle its own subscriptions or not.
subscriptions = yes
list = children
}
##
## Mail processes
##
mail_debug = no
mail_uid = ebox
mail_gid = ebox
first_valid_uid = <% $firstValidUid %>
first_valid_gid = <% $firstValidGid %>
##
## Mailbox handling optimizations
##
##
## Maildir-specific settings
##
# bef mail_location = maildir:<% $mailboxesDir %>/%$
mail_location = maildir:<% $mailboxesDir %>/%d/%u/Maildir
mail_home = <% $mailboxesDir %>/%d/%u
##
## mbox-specific settings
##
##
## dbox-specific settings
##
% if ($protocols{'imap'} or $protocols{'imaps'}) {
<& .imap,
imap => $protocols{'imap'},
imaps => $protocols{'imaps'},
&>
% }
% if ($protocols{'pop3'} or $protocols{'pop3s'}) {
<& .pop3,
pop3 => $protocols{'pop3'},
pop3s => $protocols{'pop3s'},
&>
% }
<& .managesieve,
enabled => $protocols{'managesieve'}
&>
##
## LDA specific settings
##
protocol lda {
# Address to use when sending rejection mails.
postmaster_address = <% $postmasterAddress %>
# UNIX socket path to master authentication server to find users.
auth_socket_path = /var/run/dovecot/auth-master
# Enabling Sieve plugin for server-side mail filtering and quota for quota
# support
mail_plugins = sieve quota
}
##
## Dictionary server settings
##
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-quota.conf
#expire = db:/var/lib/dovecot/expire.db
}
##
## Plugin settings
##
plugin {
acl = vfile
acl_shared_dict = proxy::acl
acl_defaults_from_inbox = yes
quota = maildir:User quota
quota_rule = *:storage=0
sieve = <% $mailboxesDir %>/%Ld/%Ln/sieve-script
sieve_global_path = <% $mailboxesDir %>/default.sieve
sieve_storage = <% $mailboxesDir %>/%Ld/%Ln
sieve_dir = <% $mailboxesDir %>/%Ld/%Ln
}
!include_try /etc/dovecot/extra.conf
<%def .imap>
<%args>
$imap
$imaps
</%args>
<%init>
my $imapAddress = $imap ? '*' : '127.0.0.1';
my $imapPort = $imap ? 143: 0;
my $imapsAddress = $imaps ? '*' : '127.0.0.1';
my $imapsPort = $imaps ? 993: 0;
</%init>
##
## IMAP specific settings
##
service imap-login {
inet_listener imap {
address = <% $imapAddress %>
port = <% $imapPort %>
}
inet_listener imaps {
address = <% $imapsAddress %>
port = <% $imapsPort %>
}
}
service imap {
}
protocol imap {
mail_plugins = $mail_plugins imap_acl
imap_client_workarounds = tb-extra-mailbox-sep
mail_max_userip_connections = 20
}
</%def>
<%def .pop3>
<%args>
$pop3
$pop3s
</%args>
<%init>
my $pop3Port = $pop3 ? 110: 0;
my $pop3sPort = $pop3s ? 995: 0;
</%init>
service pop3-login {
inet_listener pop3 {
port = <% $pop3Port %>
}
inet_listener pop3s {
port = <% $pop3sPort %>
}
}
service pop3 {
}
protocol pop3 {
mail_plugins = quota
}
</%def>
<%def .managesieve >
<%args>
$enabled
</%args>
<%init>
my $port = $enabled ? 4190 : 0;
</%init>
##
## ManageSieve specific settings
##
service managesieve-login {
inet_listener sieve {
port = <% $port %>
}
}
service managesieve {
}
protocol sieve {
}
</%def>
I can share the mailbox (see the image)
https://ibb.co/c8CcRLs (https://ibb.co/c8CcRLs)
But if i go inside the user profile for work, i don't see the shared folder (I would expect to see this https://ibb.co/mT1LPZ4 (https://ibb.co/mT1LPZ4))
-
You should create a file type shared dictionary in your plugin area :
acl_shared_dict= file:/var/lib/dovecot/db/shared-mailboxes.db
and create this file:
sudo mkdir -p /var/lib/dovecot/db
sudo touch /var/lib/dovecot/shared-mailboxes.db
sudo chown -R ebox:ebox /var/lib/dovecot/db
Afterwards restart Zentyal mail module and use the doveadm acl tool in order to prepare you shared folders.
Cheers!
-
Doncamilo, thank you for your reply :D :D :D :D
now inside /var/lib/dovecot/db/shared-mailboxes.db I have this record:
shared/shared-boxes/user/info@futura.local/paolo@futura.local
1
shared/shared-boxes/user/info@futuraservice.it/paolo@futura.local
1
shared/shared-boxes/user/fgiovanni@futura.local/paolo@futura.local
1
With sogo interface i sharing the folder
But in another user i can not view the shared folder
-
doveadm acl set -u user@lab.lan INBOX user=otheruser@lab.lan admin create delete expunge insert lookup post read write write-deleted write-seen
This way you grants these privileges to the otheruser.
In Thunderbird use the 'Manage Folder subscriptions' for adding the shared mailbox.
Cheers!
-
Oh man, you are the best!!!!!!!!!
I tried with clear configuration and now it is working fine !!!!
:) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
-
Oh man, you are the best!!!!!!!!!
I tried with clear configuration and now it is working fine !!!!
:) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
If you have fixed this problem, please consider to mark this thread as SOLVED.
Thank you!
-
I'm basically having the same issue but even when reading the dovecot wiki I'm still not sure how to fix this.
When I try to add a certain user to a folder (to share it) and save it the permissions are gone right after that. This is done through the SOGo webmail.
Could someone please advise on what excactly has to be added/changed in the dovecot configuration to get this to work?
Since the option is available in SOGo I was kind of expecting it to work out of the box..
Thanks in advance.