张工,还是不行。好像dovecot 2.0.8 不支持这样设置。然后我接照官方的文档,做了如下设置。
更改dovecot.conf,如下:
plugin {
...
acl = vfile
acl_shared_dict = proxy::acl
}
dict {
....
acl = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
protocol imap {
.....
mail_plugins = ... acl imap_acl
}
namespace {
type = private
separator = /
prefix =
inbox = yes
# location defaults to mail_location.
}
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 = no
list = children
}
新建dovecot-dict-sql.conf.ext
connect = host=127.0.0.1 dbname=vmail user=vmailadmin password=BG4synv3KJLV0OMq9lgjMkHEx0UW9R
map {
pattern = shared/shared-boxes/user/$to/$from
table = share_folder
value_field = dummy
fields {
from_user = $from
to_user = $to
}
}
在用命令setacl Sent to@damin.org rli 时,它显视成功,但是在vmail 的share_folder
表中,没有记录。查看dovecot.log,有如下错误。
Jan 04 11:25:16 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:16 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:16 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:17 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:17 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:17 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:17 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:17 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:17 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:17 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:17 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:17 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:22 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:22 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:22 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:22 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:22 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:22 dict: Error: TCP/IP connections on port 5432?
Jan 04 11:25:22 dict: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Jan 04 11:25:22 dict: Error: Is the server running on host "127.0.0.1" and accepting
Jan 04 11:25:22 dict: Error: TCP/IP connections on port 5432?
请问是什么原因,是我那里设置不对吗?我是完全按官网上的文档来的啊,张老大帮帮忙,给看看。