我正在尝试使用 dovecot 作为 MDA 设置 postfix 邮件服务器。根据此链接设置 dovecot 以使用 LMTP 我已经完成了以下配置。
后缀
主文件
virtual_transport = lmtp:unix:private/dovecot-lmtp
大师.cf
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${user}
鸽舍
dovecot.conf
protocols = imap lmtp
10-mail.conf
mail_privileged_group = mail
10-master.conf
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0600
user = postfix
group = postfix
}
# Create inet listener only if you can't use the above UNIX socket
#inet_listener lmtp {
# Avoid making LMTP visible for the entire internet
#address =
#port =
#}
}
邮箱将出现在用户的主目录中/users/<username>
如链接所述,/users
是vmail
用户的主目录。但是,当我尝试发送邮件时,使用此配置:
mail -s "subj" username
邮件退回说
warning: maildir access problem for UID/GID=<uid>/<gid>: create maildir file ~username/Maildir/tmp/<tmp file>: Permission denied
的所有权~username
是vmail:vmail
但是,当所有权更改<user>:<group>
为每个用户时,邮件成功发送。我怎样才能让这个东西与保存为的邮件目录所有权一起工作vmail:vmail
?
注意:我目前还没有尝试设置 SASL。我只是在尝试