我刚刚安装了一个电子邮件服务器,使用 exim 作为 SMTP,使用 courier(-imap) 通过 IMAPv4 获取邮件,并使用 squirrelmail 作为最终用户的 Web 客户端。一切正常。但是,当我向服务器上的地址发送电子邮件时,它存储在文件中/var/mail/<UNIX-USERNAME>
,而不是存储在我创建的邮件目录中/home/<UNIX-USERNAME>/Maildir
我也可以登录 squirrelmail。发送邮件也可以。已发送电子邮件的副本存储在正确的目录中。那么,我如何告诉 exim 将收到的电子邮件发送至/home/<UNIX-USERNAME>/Maildir/INBOX
?
编辑:我的 exim 配置(删除注释以获得更好的视图)
primary_hostname = renamed-gaming.com
domainlist local_domains = @
domainlist relay_to_domains =
hostlist relay_from_hosts = localhost
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
#tls_certificate = /etc/ssl/exim.crt
#tls_privatekey = /etc/ssl/exim.pem
daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 5s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
begin acl
acl_check_rcpt:
accept hosts = :
control = dkim_disable_verify
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
accept local_parts = postmaster
domains = +local_domains
require verify = sender
accept hosts = +relay_from_hosts
control = submission
control = dkim_disable_verify
accept authenticated = *
control = submission
control = dkim_disable_verify
require message = relay not permitted
domains = +local_domains : +relay_to_domains
require verify = recipient
accept
acl_check_data:
accept
begin routers
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe
userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
# allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user
begin transports
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660
address_pipe:
driver = pipe
return_output
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_reply:
driver = autoreply
# Address or Domain Error Retries
# ----------------- ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
答案1
在 Exim 中,您必须正确配置本地传送路由器的传输。显然现在正在使用配置为传送到 的传输/var/mail/$local_part
,看看您是否有配置为传送到目录 = $home/Maildir 的传输并使用它。
目前不知道您的配置如何,无法提供更详细的信息,但是我认为通过上述提示您应该能够修复它。