我用这个演练http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix但仍然存在一个问题,不允许我登录。
/var/log/dovecot.log
Jan 13 10:25:49 imap-login: Info: Disconnected (auth failed, 1 attempts): user=<[email protected]>, method=PLAIN, rip=10.180.34.84, lip=10.180.33.42
Jan 13 10:49:14 imap-login: Info: Disconnected (auth failed, 2 attempts): user=<[email protected]>, method=PLAIN, rip=10.180.34.84, lip=10.180.33.42
Jan 13 10:49:19 imap-login: Info: Disconnected (auth failed, 1 attempts): user=<[email protected]>, method=PLAIN, rip=10.180.34.84, lip=10.180.33.42
我已经禁用了 selinux 并且启用了 debuggin 但仍然无法登录
dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.11.2.el6.x86_64 x86_64 CentOS release 6.5 (Final)
auth_mechanisms = plain login
disable_plaintext_auth = no
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:~/Maildir
mail_plugins = acl quota
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
mbox_write_locks = fcntl
namespace {
inbox = yes
location =
prefix =
separator = /
type = private
}
namespace {
list = yes
location = maildir:/var/vmail/prodmail:INDEX=~/Maildir/public:LAYOUT=fs:INDEX=~/public
prefix = prodmail/
separator = /
subscriptions = no
type = public
}
passdb {
args = username_format=%u /var/vmail/auth.d/%d/passwd
driver = passwd-file
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
sieve_global_dir = /var/vmail/conf.d/%d/sieve
}
protocols = imap lmtp
service auth-worker {
user = dovecot
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
user = dovecot
}
service imap-login {
inet_listener imap {
address = 10.180.33.42
port = 143
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
}
}
ssl = no
ssl_cert = </etc/ssl/certs/crt.pem
ssl_key = </etc/ssl/certs/key.pem
userdb {
args = username_format=%u /var/vmail/auth.d/%d/passwd
driver = passwd-file
}
verbose_proctitle = yes
protocol lmtp {
mail_plugins = acl quota sieve
postmaster_address = [email protected]
}
protocol imap {
mail_plugins = acl quota imap_acl imap_quota mail_log notify
}
cat /var/vmail/auth.d/domain.com/passwd
[email protected]:{SSHA}f/u4RU+tYRQL3dhQcw3FHnscxcABOg8D:999:999:/var/vmail/domain.com/test/
test:{SSHA}f/u4RU+tYRQL3dhQcw3FHnscxcABOg8D:999:999:/var/vmail/domain.com/test/
指南中使用不存在的用户 doveauth 存在问题,因此我将其切换为使用 dovecot 用户。
[root@ vmail]# ls -al
total 16
drwxrwxrwx. 4 vmail vmail 4096 Jan 12 15:10 .
drwxr-xr-x. 19 root root 4096 Jan 12 11:13 ..
drwxr-xr-x. 3 dovecot dovecot 4096 Jan 12 11:16 auth.d
drwxr-xr-x. 3 vmail vmail 4096 Jan 12 15:09 domain.com
[root@ vmail]#