当我向自己发送电子邮件时,我收到以下日志消息:
Aug 24 20:10:40 google-way postfix/trivial-rewrite[3251]: warning: do not list domain mwdesenvolvimento.com.br in BOTH mydestination and virtual_mailbox_domains
Aug 24 20:10:40 google-way postfix/cleanup[3252]: warning: /etc/postfix/main.cf, line 39: overriding earlier entry: myhostname=mx.$mydomain
Aug 24 20:10:40 google-way postfix/cleanup[3252]: warning: /etc/postfix/main.cf, line 42: overriding earlier entry: myorigin=$mydomain
Aug 24 20:10:40 google-way postfix/cleanup[3252]: warning: /etc/postfix/main.cf, line 43: overriding earlier entry: mydestination=localhost
Aug 24 20:10:40 google-way postfix/smtpd[3249]: A09B560A1F: client=mail-it0-f53.google.com[209.85.214.53]
Aug 24 20:10:40 google-way postfix/cleanup[3252]: A09B560A1F: message-id=<CAH54gK3BMy=NWMjF3dXhqmnXBdufjS+BgQQMBj2MzviNn-ewCQ@mail.gmail.com>
Aug 24 20:10:40 google-way postfix/qmgr[3078]: A09B560A1F: from=<[email protected]>, size=2697, nrcpt=1 (queue active)
Aug 24 20:10:40 google-way postfix/trivial-rewrite[3251]: warning: do not list domain mwdesenvolvimento.com.br in BOTH mydestination and virtual_mailbox_domains
Aug 24 20:10:40 google-way postfix/local[3253]: warning: /etc/postfix/main.cf, line 39: overriding earlier entry: myhostname=mx.$mydomain
Aug 24 20:10:40 google-way postfix/smtpd[3249]: disconnect from mail-it0-f53.google.com[209.85.214.53]
Aug 24 20:10:40 google-way postfix/local[3253]: warning: /etc/postfix/main.cf, line 42: overriding earlier entry: myorigin=$mydomain
Aug 24 20:10:40 google-way postfix/local[3253]: warning: /etc/postfix/main.cf, line 43: overriding earlier entry: mydestination=localhost
Aug 24 20:10:40 google-way postfix/local[3253]: A09B560A1F: to=<[email protected]>, relay=local, delay=0.08, delays=0.07/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Aug 24 20:10:40 google-way postfix/qmgr[3078]: A09B560A1F: removed
我在某处读到我应该尝试解决这个问题do not list domain mwdesenvolvimento.com.br in BOTH mydestination and virtual_mailbox_domains
,因为它可能会将我的电子邮件放在不同的地方......
这是我main.cf
的Postfix
:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
mydomain = mwdesenvolvimento.com.br
myhostname = mx.$mydomain
myorigin = $mydomain
mydestination = localhost
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_CAfile = /etc/ssl/certs/root.mwdesenvolvimento.com.br.crt
smtpd_tls_cert_file = /etc/ssl/certs/mwdesenvolvimento.com.br.crt
smtpd_tls_key_file = /etc/ssl/private/mwdesenvolvimento.com.br.dec.key
smtpd_tls_security_level = may
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_loglevel = 1
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = google-way.c.innate-temple-137823.internal
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mwdesenvolvimento.com.br, google-way.c.innate-temple-137823.internal, localhost.c.innate-temple-137823.internal, localhost
mynetworks = 127.0.0.0/8 104.197.230.12 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
relayhost = [smtp.sendgrid.net]:2525
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
header_size_limit = 4096000
smtp_sasl_security_options = noanonymous
# smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
# The path is relative to $queue_directory:
# $postconf |grep queue_directory
# queue_directory = /var/spool/postfix
smtpd_sasl_path = private/auth
# Do not accept SASL authentication over unencrypted connections
smtpd_tls_auth_only = yes
# Handing off local delivery to Dovecot's LMTP
# http://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
#
# The path relative to $queue_directory, that is:
# /var/spool/postfix/private/dovecot-lmtp
virtual_transport = lmtp:unix:private/dovecot-lmtp
# Check domains only, query users and aliases in Dovecot
#
# IMPORTANT: Don't overlap with $mydestination
#virtual_mailbox_domains = example1.com, example2.com
virtual_mailbox_domains = $mydomain
#virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual_aliases
dovecot.conf
:
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = maildir:/var/vmail/%d/%n
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
# passdb {
# driver = pam
# }
passdb {
driver = passwd-file
# The entire email address will be used as the username for email client.
# Don't bother about the scheme here, will be overwritten by a strong scheme from file.
# (http://wiki2.dovecot.org/AuthDatabase/PasswdFile)
args = scheme=CRYPT username_format=%u /etc/dovecot/users
}
protocols = " imap lmtp"
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 993
}
}
ssl = required
ssl_ca = </etc/ssl/certs/root.mwdesenvolvimento.com.br.crt
ssl_cert = </etc/ssl/certs/mwdesenvolvimento.com.br.crt
ssl_key = </etc/ssl/private/mwdesenvolvimento.com.br.dec.key
# userdb {
# driver = passwd
# }
userdb {
# For static type, LDA verify the user's existence by lookup passdb
# ( http://wiki2.dovecot.org/UserDatabase/Static )
driver = static
args = uid=vmail gid=vmail home=/var/vmail/%d/%n
}
# Allows plaintext authentication only when SSL/TLS is used first.
# http://wiki2.dovecot.org/Authentication
auth_mechanisms = plain login
disable_plaintext_auth = yes
service auth-worker {
# Forbid to access /etc/shadow
user = $default_internal_user
}
service auth {
# IMPORTANT: Match the path to smtpd_sasl_path of Postfix
unix_listener /var/spool/postfix/private/auth {
group = postfix
user = postfix
mode = 0666
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0666
user = postfix
group = postfix
}
}
输出ls -l /var/spool/postfix/private/dovecot-lmtp
:(用户1700494询问)
srw-rw-rw- 1 postfix postfix 0 Aug 24 19:23 /var/spool/postfix/private/dovecot-lmtp
顺便说一句,我既无法阅读也无法发送电子邮件...非常欢迎任何帮助!