通过 Dovecot/Postfix 接收电子邮件时出现问题

通过 Dovecot/Postfix 接收电子邮件时出现问题

我正在尝试在我的服务器上设置 roundcube,它似乎运行良好。我已经完成了所有步骤,它允许我完美地发送外发电子邮件(使用 yahoo 测试过),电子邮件总是能通过。但是,出于某种原因,如果我回复来自 yahoo 的电子邮件到邮件服务器,它会返回错误 550(未找到收件人)。我到处寻找答案,但没有找到任何答案。有没有人遇到过这个问题并找到了解决办法?

如果我需要提供更多信息,请告诉我,我会提供。

邮件日志:(缩短)

Aug 14 16:35:03 pocketbukkit dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=23142, secured
Aug 14 16:35:03 pocketbukkit dovecot: imap([email protected]): Disconnected: Logged out bytes=50/404

故障通知:

Sorry, we were unable to deliver your message to the following address.

<[email protected]>:
Remote host said: 550 5.1.1 <[email protected]> Recipient not found.  <http://x.co/irbounce> [RCPT_TO]

--- Below this line is a copy of the message.

Received: from [66.196.81.174] by nm14.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2014 17:32:15 -0000
Received: from [98.139.212.241] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2014 17:32:15 -0000
Received: from [127.0.0.1] by omp1050.mail.bf1.yahoo.com with NNFMP; 14 Aug 2014 17:32:15 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: [email protected]
Received: (qmail 48585 invoked by uid 60001); 14 Aug 2014 17:32:15 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1408037535; bh=x0RlACzX5sVtytN6BXeDvMLGd1pVEFkT/0DVPpu/nj0=; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=k878XbIeHwBebjTlCtTMIDiq4jConh3s2/9XiC/WMt+6p3MqR2F9T5NY637MwcgeqCjzq5zaE4/Szd6Dw+bTgq2cxp7C5zYyAeJLLV6Xpia0ifHNG++5/dnLRsx/Bc+ZDzTRfT3D+c8Qi7anHX8EXDCHbnbCyn05LUfW0merG0Y=
X-YMail-OSG: HqtcMi8VM1kCguInS81hMn_yugn8daDV_XhSowgngtbDUoI
8BDAeFJvVoQ6b2YLS4oY2PF1Y_CTptPsGqWp3MTq5hAQqV.I4YHFih0wVJgx
T3IS58COMGhmNpzH1mX3SUlDz3K9k9g3C0cPcWrf7EA1DxAWZ72noqKf_wcw
sO96DikfIvWmuKeMHy_5A5613hfngbMWHoRj_6rM4AaSvl5yZk5SjdQHsIiA
atFeWbfiL6gjGtju5UyS_LZH0.pNWprVcGEkscX1EUc13S3n6oVyTNjO0dQR
k6tFBZX_eN6EGzULHNIpQP7etGLnmEMp.HL9UGKMU3vOYaAvQfhbLE.PyxuA
QLNoW9CsgrkEZm9f7_TY5YLD4fWyzfOs8tkubV.v2xqMYFy3_7.he8UzeOXG
p4NIycxTaP6A9eq8OKqhw8J0yDeYzjJb93G6u5zVbX27SvZlqrElx6lFRvuG
fqIiRLhOBdTwwgd_SIwjj6PdK0AQAb5.GhSDite8N57xVXk2JJBX3tIja14R
jkw9ytwdBb3gjgIhf_FJy_bqcDEdsByNIdg--
Received: from [71.65.70.90] by web140902.mail.bf1.yahoo.com via HTTP; Thu, 14 Aug 2014 10:32:15 PDT
X-Rocket-MIMEInfo: 002.001,VGVzdGluZyBpZiB0aGUgbWFpbCBzZXJ2ZXIgd29ya3MgY29ycmVjdGx5LgEwAQEBAQ--
X-Mailer: YahooMailWebService/0.8.201.700
Message-ID: <[email protected]>
Date: Thu, 14 Aug 2014 10:32:15 -0700
From: Comedy Man <[email protected]>
Reply-To: Comedy Man <[email protected]>
Subject: Checking mail server
To: "[email protected]" <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="-18013450-1588383846-1408037535=:80225"

---18013450-1588383846-1408037535=:80225
Content-Type: text/plain; charset=us-ascii

Testing if the mail server works correctly.
---18013450-1588383846-1408037535=:80225
Content-Type: text/html; charset=us-ascii

<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div>Testing if the mail server works correctly.</div></div></body></html>
---18013450-1588383846-1408037535=:80225--

Postfix main.cf:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps

inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost

debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

relay_domains = *
virtual_alias_maps=hash:/etc/postfix/vmail_aliases
virtual_mailbox_domains=hash:/etc/postfix/vmail_domains
virtual_mailbox_maps=hash:/etc/postfix/vmail_mailbox

virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 2222
virtual_transport = virtual
virtual_uid_maps = static:2222
virtual_gid_maps = static:2222

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = $mydomain
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

/etc/postfix/vmail_aliases

[email protected] [email protected]
[email protected] [email protected]

vmail_邮箱:

[email protected]           pocketbukkit.net/support
[email protected]    pocketbukkit.net/philipshilling

vmail_域名:

pocketbukkit.net            OK

答案1

我认为没有必要将虚拟邮箱的别名添加到它们自身,事实上这可能会阻止邮箱查找。此外,由于您使用hash:来指定虚拟邮箱(和域),因此您需要使用 postalias 或 postmap 来创建文件的哈希映射版本(在这种情况下实际使用的文件以 结尾.db并且是 BDB 数据库)。

我相信您也可以简单地删除,hash:因为您的文件很小,而且出于性能原因您可能不需要进行散列。

相关内容