Dovecot

為什麼 dovecot 不發送電子郵件?

  • May 23, 2013

我有問題,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 = postmaster@lars-dev.de
 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=<evolutio1994@gmx.de>, 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=<evolutio@lars-dev.de>, 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

您的本地傳遞配置錯誤。從一個簡單的 Postfix 配置開始,用於傳遞本地郵件。有一些教程,例如:

http://rimuhosting.com/support/settingupemail.jsp?mta=postfix

在您的情況下,您可以從簡單的 Postfix 配置開始,您的 dovecot 配置似乎沒問題。您可以從這個簡單的後綴配置開始。

main.cf

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/虛擬

web@lars-dev.de  web
userxy@lars-dev.de userxy

執行 postmap /etc/postfix/virtual 並重新啟動 postfix,這個簡單的配置應該適合你。如果這可行,您可以通過 mysql 為虛擬使用者添加一些東西

引用自:https://serverfault.com/questions/510131