我有一台装有 Ubuntu 13.04 的计算机,该计算机带有本地 IMAP 服务器,我使用它通过 LAN 共享电子邮件。我将这台计算机设置为加密 /home,但这意味着除非本地用户也登录,否则登录服务器的任何人都无法查看 IMAP 文件夹。因此,我想将邮件移动到/var/mail/Maildir/%u
。
我有以下内容/etc/dovecot/conf.d/01-mail-stack-delivery.conf
mail_location = maildir:/var/mail/Maildir/%u
我的/etc/postfix/main.cf
有:
home_mailbox = Maildir/
但是,当我使用 IMAP 上的邮件客户端本地登录时,它会重新创建~/Maildir
目录,而不是使用/var/mail/
。我错过了什么?
编辑:
这是我postconf -n
应用shutupsquare的答案之后的结果:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m "${EXTENSION}"
mailbox_size_limit = 0
mailbox_transport = dovecot
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, localhost.localdomain, ubuntu
myhostname = host
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = hash:/etc/postfix/virtual
编辑2:我的 /var/log/mail.log 包含以下内容:
May 4 02:10:01 servername postfix/local[469]: warning: connect #7 to subsystem private/dovecot: No such file or directory
May 4 02:10:11 servername postfix/local[469]: warning: connect #8 to subsystem private/dovecot: No such file or directory
May 4 02:10:21 servername postfix/local[469]: warning: connect #9 to subsystem private/dovecot: No such file or directory
May 4 02:10:31 servername postfix/local[469]: warning: connect #10 to subsystem private/dovecot: No such file or directory
May 4 02:10:41 servername postfix/local[469]: fatal: connect #11 to subsystem private/dovecot: No such file or directory
May 4 02:10:42 servername postfix/qmgr[30763]: warning: private/local socket: malformed response
May 4 02:10:42 servername postfix/qmgr[30763]: warning: transport local failure -- see a previous warning/fatal/panic logfile record for the problem description
May 4 02:10:42 servername postfix/master[30759]: warning: process /usr/lib/postfix/local pid 469 exit status 1
May 4 02:10:42 servername postfix/master[30759]: warning: /usr/lib/postfix/local: bad command startup -- throttling
答案1
在/etc/postfix/main.cf
消除:
home_mailbox = Maildir/
并添加此行:
mailbox_transport = dovecot
你还应该/etc/dovecot/conf.d/15-lda.conf
lda_mailbox_autocreate = yes