ZhangHuangbin wrote:tikonur wrote:Thanks for your answer. But what can we do with public folders? It seems some new object, not "mail user", has to be created in the LDAP database. Or how can we configure public folder correctly?
Confused.
Let's back to your original question:
tikonur wrote:We created public folder in iRedMail server and it works good. But we want to assign e-mail to this public folder to deliver mail to it directly. How can we do it? What is object in LDAP we have to create for it?
What does your "public folder" mean? Is it a shared IMAP folder? Or a directory created with command 'mkdir' directly? If it's a shared IMAP folder, maildir path with "Maildir/" is fine. Reference:
How do you "deliver mail to it directly"? Sending an email to this public folder with Outlook/Thunderbird or Roundcube webmail? Then "Maildir/" in maildir path is fine. Otherwise you have to deliver email with command "dovecot-lda" or "deliver" (usually a symbol link to "dovecot-lda"), they're installed in Dovecot directory, not /usr/bin/. Try /usr/libexec/dovecot/ or /usr/local/libexec/dovecot/ instead.
I mean "public folder" in this sense http://wiki2.dovecot.org/SharedMailboxes/Public
Here is part of my dovecot.conf
namespace {
type = private
separator = /
prefix =
#location defaults to mail_location.
location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
inbox = yes
}
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
}
namespace {
type = public
separator = /
prefix = Shared folders/
location = maildir:/home/mail/vmail1/public-folders
subscriptions = no
inbox = no
hidden = no
}
I created folder /home/mail/vmail1/public-folders/.bkzi1 manually.
And I subscribed to bkzi1 without any problem via thunderbird, when I subscribed to bkzi1 I saw following:
ls -l /home/mail/vmail1/public-folders/.bkzi1
total 24K
drwxr-xr-x 2 vmail vmail 4.0K Sep 3 21:46 cur
-rw-r--r-- 1 vmail vmail 49 Sep 3 21:44 dovecot-acl
-rw-r--r-- 1 vmail vmail 248 Sep 3 21:46 dovecot.index.log
-rw-r--r-- 1 vmail vmail 51 Sep 3 21:46 dovecot-uidlist
drwxr-xr-x 2 vmail vmail 4.0K Sep 3 21:46 new
drwxr-xr-x 2 vmail vmail 4.0K Sep 3 21:46 tmp
You can see that /new, /cur and /tmp subfolders are created and I can put some e-mail to bkzi1 manually via thunderbird.
And then I want to do that e-mails addressed to bkzi1@dengabank.ru are putted to the /home/mail/vmail1/public-folders/.bkzi1/new folder.
As you advised I created user bkzi1@dengabank.ru and set in LDAP:
homeDirectory = /home/mail/vmail1/public-folders/.bkzi1
mailMessageStore = vmail1/public-folders/.bkzi1
When I sent e-mail to the bkzi1@dengabank.ru "/home/mail/vmail1/public-folders/.bkzi1/Maildir" folder is created and the e-mail is putted to "/home/mail/vmail1/public-folders/.bkzi1/Maildir/new" folder. But I saw in thunderbird the e-mails that are placed in /home/mail/vmail1/public-folders/.bkzi1/cur folder.
Please, advise, how should I configure dovecot that e-mails are delivered correctly and I could see this e-mails in subscribed folder?
Thank you so much.