我不是邮件服务器配置方面的专家
我成功设置了服务器来发送邮件,但我找不到在客户端收件箱中接收电子邮件的解决方案,但我可以在我的 Maildir 中找到。
邮件日志的回复:
Feb 20 18:56:36 businesshark postfix/smtpd[5153]: connect from unknown[109.227.62.192]
Feb 20 18:56:37 businesshark postfix/smtpd[5153]: Anonymous TLS connection established from unknown[109.227.62.192]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Feb 20 18:56:38 businesshark postfix/trivial-rewrite[5160]: warning: do not list domain proenergy.club in BOTH mydestination and virtual_mailbox_domains
Feb 20 18:56:38 businesshark postfix/smtpd[5153]: 4DB46142D82: client=unknown[109.227.62.192], sasl_method=PLAIN, [email protected]
Feb 20 18:56:38 businesshark postfix/cleanup[5163]: 4DB46142D82: message-id=<[email protected]>
Feb 20 18:56:38 businesshark postfix/qmgr[4981]: 4DB46142D82: from=<[email protected]>, size=676, nrcpt=1 (queue active)
Feb 20 18:56:38 businesshark postfix/local[5165]: 4DB46142D82: to=<[email protected]>, relay=local, delay=0.51, delays=0.5/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Feb 20 18:56:38 businesshark postfix/qmgr[4981]: 4DB46142D82: removed
Feb 20 18:56:39 businesshark postfix/smtpd[5153]: disconnect from unknown[109.227.62.192]
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
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#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_cert_file=/etc/ssl/certs/dovecot.pem
#smtpd_tls_key_file=/etc/ssl/private/dovecot.pem
smtpd_use_tls=yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
#smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom
#smtpd_use_tls=yes
#smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
# 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 = server.businesshark.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.businesshark.com, mail.proenergy.club, localhost.localdomain, localhost, businesshark.com, proenergy.club
#mydestination = localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
mailbox_command =
virtual_alias_domains =
virtual_transport = dovecot
#virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
我被这个问题困扰了好几天,我会很感激任何帮助
谢谢
答案1
我找到了问题所在,不需要更改配置
我在别名表中添加了两个地址,一个是要转发的地址,另一个是本地地址,用逗号分隔。第二个地址与源地址相同
答案2
我解决了这个问题:
/etc/dovecot/dovecot.conf
protocols = imap lmtp
我修改了 /etc/postfix/main.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
现在我还有另一个问题
我需要将邮件转发到虚拟别名,但我也需要收件箱中的邮件。
我需要如何更改配置才能实现这一点?