1

Topic: Shared Folders not working - Iredmail 8.0

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
==== Hi,

I'm using 8.0 + iredmail iredadmin-LDAP, but I can not make shared folders work.
I am using thunderbird

The following settings



# Listen addresses.
#   - '*' means all available IPv4 addresses.
#   - '[::]' means all available IPv6 addresses.
# Use below setting to listen on all available addresses:
#listen = *, [::]
listen = *

#base_dir = /var/run/dovecot

# Enabled mail protocols.
protocols = pop3 imap sieve

# User/group who owns the message files:
mail_uid = 500
mail_gid = 500

# Assign uid to virtual users.
first_valid_uid = 500
last_valid_uid = 500

# Logging. Reference: http://wiki2.dovecot.org/Logging
log_path = /var/log/dovecot.log
mail_debug = yes
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
# Possible values: no, plain, sha1.
auth_verbose_passwords = plain

# SSL: Global settings.
# Refer to wiki site for per protocol, ip, server name SSL settings:
# http://wiki2.dovecot.org/SSL/DovecotConfiguration
ssl = required
verbose_ssl = no
ssl_cert = </etc/pki/tls/certs/iRedMail_CA.pem
ssl_key = </etc/pki/tls/private/iRedMail.key

# With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
# Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
# insecurely.
disable_plaintext_auth = yes
# Allow plain text password per IP address/net
#remote 192.168.0.0/24 {
#   disable_plaintext_auth = no
#}

# Mail location and mailbox format.
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/

#namespace {
#   prefix = .EXPUNGED/
#   separator = /
#   hidden = yes
#   list = no
#   location = maildir:/%Lh/Maildir/expunged
#}
#namespace {
#   prefix = .DELETED/
#   separator = /
#   hidden = yes
#   list = no
#   location = maildir:/%Lh/Maildir/deleted
#}
#namespace {
#   prefix = .DELETED/.EXPUNGED/
#   separator = /
#   hidden = yes
#   list = no
#   location = maildir:/%Lh/Maildir/deleted/expunged
#}
#   mail_plugins = $mail_plugins lazy_expunge
#   plugin {
#  lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
#}


# Authentication related settings.
# Append this domain name if client gives empty realm.
auth_default_realm =

# Authentication mechanisms.
auth_mechanisms = PLAIN LOGIN

service auth {
    unix_listener /var/spool/postfix/dovecot-auth {
        user = postfix
        group = postfix
        mode = 0666
    }
    unix_listener auth-master {
        user = vmail
        group = vmail
        mode = 0666
    }
}

# Virtual mail accounts.
userdb {
    args = /etc/dovecot/dovecot-ldap.conf
    driver = ldap
}
passdb {
    args = /etc/dovecot/dovecot-ldap.conf
    driver = ldap
}

plugin {
    auth_socket_path = /var/run/dovecot/auth-master

    quota = dict:user::proxy::quotadict
    quota_rule = *:storage=1G
    #quota_rule2 = *:messages=0
    #quota_rule3 = Trash:storage=1G
    #quota_rule4 = Junk:ignore

    # Quota warning.
    # If user suddenly receives a huge mail and the quota jumps from
    # 85% to 95%, only the 95% script is executed.
    quota_warning = storage=85%% quota-warning 85 %u
    quota_warning2 = storage=90%% quota-warning 90 %u
    quota_warning3 = storage=95%% quota-warning 95 %u

    # Plugin: autocreate. Create and subscribe to default IMAP folders.
    autocreate = INBOX
    autocreate2 = Sent
    autocreate3 = Trash
    autocreate4 = Drafts
    autocreate5 = Junk
   # autocreate6 = shared
    autosubscribe = INBOX
    autosubscribe2 = Sent
    autosubscribe3 = Trash
    autosubscribe4 = Drafts
    autosubscribe5 = Junk
   # autosubscribe5 = shared

    # Plugin: expire.
    expire = Trash 7 Trash/* 7 Junk 30
    expire_dict = proxy::expire

    # ACL and share folder
    acl = vfile
    acl_shared_dict = proxy::acl

    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    sieve_dir = /%Lh/sieve
    sieve = /%Lh/sieve/dovecot.sieve

    # Global sieve settings.
    sieve_global_dir = /opt/vmail/sieve
    sieve_global_path = /opt/vmail/sieve/dovecot.sieve
    #sieve_before =
    #sieve_after =
}
#plugin {
#  acl_anyone = allow
#}
service managesieve-login {
  inet_listener sieve {
  port = 2000
  }
}




service quota-warning {
    executable = script /usr/local/bin/dovecot-quota-warning.sh
    unix_listener quota-warning {
        user = vmail
        group = vmail
        mode = 0660
    }
}

service dict {
    unix_listener dict {
        mode = 0660
        user = vmail
        group = vmail
    }
}

dict {
    expire = db:/var/lib/dovecot/expire/expire.db
    quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
    acl = mysql:/etc/dovecot/dovecot-share-folder.conf
}

protocol lda {
    # Reference: http://wiki2.dovecot.org/LDA
    mail_plugins = quota sieve autocreate lazy_expunge acl
    auth_socket_path = /var/run/dovecot/auth-master
    log_path = /var/log/sieve.log
    lda_mailbox_autocreate = yes
    postmaster_address = root
}
protocol imap {
    imap_client_workarounds = tb-extra-mailbox-sep
    mail_plugins = quota imap_quota autocreate lazy_expunge acl imap_acl
}
protocol pop3 {
    mail_plugins = quota lazy_expunge
    pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
    pop3_uidl_format = %08Xu%08Xv
}
namespace {
    type =  private
    separator = /
    prefix =
    #location defaults to mail_location.
    inbox = yes
}

namespace {
    type = shared
    separator = /
    prefix = Shared/%%u/
    location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
#    location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
    # this namespace should handle its own subscriptions or not.
    subscriptions = yes
    #list = children
}


MSG ERROR

May 17 16:46:04 auth: Info: ldap(Shared): unknown user
May 17 16:46:04 auth: Debug: master out: NOTFOUND       6
May 17 16:46:04 imap(fmoreni@simtrack.com.br): Debug: auth input:
May 17 16:46:04 imap(fmoreni@simtrack.com.br): Error: Couldn't create namespace 'Shared/' for user Shared: userdb didn't return a home directory, but plugin setting sieve_dir used it (%h): /%Lh/sieve
May 17 16:46:35 dict: Info: mysql(127.0.0.1): Connected to database iredadmin
May 17 16:46:36 auth: Debug: master in: USER    7       Shared  service=lib-storage
May 17 16:46:36 auth: Debug: ldap(Shared): user search: base=o=domains,dc=simtrack,dc=com,dc=br scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lib-storage)(|(mail=Shared)(&(enabledService=shadowaddress)(shadowAddress=Shared)))) fields=mail,homeDirectory,mailQuota
May 17 16:46:36 auth: Info: ldap(Shared): unknown user
May 17 16:46:36 auth: Debug: master out: NOTFOUND       7
May 17 16:46:36 imap(fmoreni@simtrack.com.br): Debug: auth input:
May 17 16:46:36 imap(fmoreni@simtrack.com.br): Error: Couldn't create namespace 'Shared/' for user Shared: userdb didn't return a home directory, but plugin setting sieve_dir used it (%h): /%Lh/siev


May 17 16:43:39 imap(fmoreni@simtrack.com.br): Debug: Namespace : Using permissions from /opt/vmailvmail1/simtrack.com.br/f/m/o/fmoreni-2012.03.16.16.54.25//Maildir: mode=0700 gid=-1
May 17 16:43:39 imap(fmoreni@simtrack.com.br): Debug: acl vfile: file /opt/vmailvmail1/simtrack.com.br/f/m/o/fmoreni-2012.03.16.16.54.25//Maildir/.Sent/dovecot-acl not found
May 17 16:43:39 imap(fmoreni@simtrack.com.br): Debug: acl vfile: file /opt/vmailvmail1/simtrack.com.br/f/m/o/fmoreni-2012.03.16.16.54.25//Maildir/.Sent/dovecot-acl not found
May 17 16:43:39 imap(fmoreni@simtrack.com.br): Debug: acl vfile: file /opt/vmailvmail1/simtrack.com.br/f/m/o/fmoreni-2012.03.16.16.54.25//Maildir/.Trash/dovecot-acl not found
May 17 16:43:40 imap(fmoreni@simtrack.com.br): Debug: acl vfile: reading file /opt/vmailvmail1/simtrack.com.br/f/m/o/fmoreni-2012.03.16.16.54.25//Maildir/.TESTE/dovecot-acl

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Shared Folders not working - Iredmail 8.0

moreni wrote:

May 17 16:46:36 auth: Debug: ldap(Shared): user search: base=o=domains,dc=simtrack,dc=com,dc=br scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lib-storage)(|(mail=Shared)(&(enabledService=shadowaddress)(shadowAddress=Shared)))) fields=mail,homeDirectory,mailQuota

Bug in iRedMail, LDAP user should contains attribute/value which required by Dovecot-2:

enabledService=lib-storage

You can apply below two steps to fix it:

1) Add missing config in Dovecot: http://www.iredmail.org/wiki/index.php? … _Dovecot-2
2) Add missing LDAP attribute/value in LDAP: http://www.iredmail.org/wiki/index.php? … ib-storage

WARNING: The upgrade tutorial for 0.8.0 is still a DRAFT, so please just apply this step, don't apply steps in other sections.

3

Re: Shared Folders not working - Iredmail 8.0

Zhang,

Thanks Problem is solved!
100% working !