我遇到的问题是,dovecot 没有将电子邮件发送到我的收件箱(roundcube)。
我的 dovecot.conf
base_dir = /var/run/dovecot
# Ich habe nur IMAP(S) in Verwendung, für POP3 einfach noch pop3 bzw. pop3s hinzufügen
protocols = imap imaps managesieve
# IMAP Konfiguration
protocol imap {
listen = *:143
# Quota Einstellungen
mail_plugins = quota imap_quota
}
# einkommentieren, falls POP3 benötigt
#protocol pop3 {
# listen = *:110
# # ssl_listen = *:995
# mail_plugins = quota
#}
# managesieve Dienst zum Verwalten der Sieve-Skripte
protocol managesieve {
listen = *:2000
login_executable = /usr/lib/dovecot/managesieve-login
mail_executable = /usr/lib/dovecot/managesieve
managesieve_max_line_length = 65536
managesieve_logout_format = bytes=%i/%o
managesieve_implementation_string = dovecot
}
listen = *
# erzwinge AUTH mit STARTTLS
disable_plaintext_auth = yes
# logging Optionen
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail
# mailbox Einstellungen
mail_location = maildir:/var/vmail/%d/%u
#mail_location = maildir:/var/spool/mail/%u
mail_privileged_group = mail
mail_debug = no
# gültig ist nur unser vmail-Besitzer
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
# IMAP Optionen
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_max_line_length = 65536
mail_plugin_dir = /usr/lib/dovecot/modules/imap
}
#protocol pop3 {
# pop3_uidl_format = %08Xu%08Xv
#}
# managesieve aktivieren
protocol managesieve {
}
# deliver aktivieren
protocol lda {
postmaster_address = [email protected]
mail_plugins = quota sieve
mail_plugin_dir = /usr/lib/dovecot/modules/lda
deliver_log_format = msgid=%m: %$
sendmail_path = /usr/lib/sendmail
auth_socket_path = /var/run/dovecot/auth-master
}
auth_verbose = no
auth_debug = no
# Authentifizierungs-Info aus Datenbank
auth default {
mechanisms = plain login
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
# steigert Performance mit Datenbank
userdb prefetch {
}
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
user = nobody
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = postfix
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
# Quota-Info wird in Datenbank gespeichert
dict {
quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf
mail_debug = yes
}
# Quota & Sieve Konfiguration
plugin {
quota = dict:user::proxy::quotadict
quota_rule = *:storage=500MB
sieve=~/dovecot.sieve
sieve_dir=~/sieve
}
# SSL/TLS Konfig
ssl = yes
ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
ssl_cipher_list = ALL:!LOW:!SSLv2
verbose_ssl = yes
邮件日志
May 23 08:17:17 evolutio postfix/smtpd[21372]: connect from mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/smtpd[21372]: A138C6020038: client=mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/cleanup[21376]: A138C6020038: message-id=<trinity-b504aea3-1a03-4aa1-8326-4c352fc77086-1369289842779@3capp-gmx-bs54>
May 23 08:17:17 evolutio postfix/qmgr[1130]: A138C6020038: from=<[email protected]>, size=1301, nrcpt=1 (queue active)
May 23 08:17:17 evolutio postfix/smtpd[21372]: disconnect from mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/local[21377]: A138C6020038: to=<[email protected]>, relay=local, delay=0.27, delays=0.17/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 08:17:17 evolutio postfix/qmgr[1130]: A138C6020038: removed
答案1
您的本地投递配置错误。从一个简单的 Postfix 配置开始,用于投递本地邮件。例如,这里有几个教程:
http://rimuhosting.com/support/settingupemail.jsp?mta=postfix
就你的情况而言,你可以从简单的 Postfix 配置开始,你的 dovecot 配置似乎没问题。你可以从这个简单的 postfix 配置开始。
主配置文件
config_directory = /etc/postfix
mailbox_transport = dovecot
virtual_alias_domains = /etc/postfix/virtual-domains
virtual_alias_maps = hash:/etc/postfix/virtual
myhostname = lars-dev.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
message_size_limit = 0
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_banner = postfix mailserver
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
/etc/postfix/虚拟域
lars-dev.de
/etc/postfix/虚拟
[email protected] web
[email protected] userxy
运行 postmap /etc/postfix/virtual 并重启 postfix,这个简单的配置应该可以正常工作。如果这个配置有效,你可以通过 mysql 为虚拟用户添加一些内容