我尝试了在线阅读的所有内容进行测试,但我无法收到电子邮件出去
telnet <IP> 25
EHLO
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
. <Enter>
=>
我甚至试过这个,当我输入句号时我什么都没得到.....但是后缀已经安装了
答案 0 :(得分:50)
检查后缀是否正在运行
sudo postfix status
如果它没有运行,请启动它。
sudo postfix start
然后telnet到localhost端口25以测试电子邮件ID
ehlo localhost
mail from: root@localhost
rcpt to: your_email_id
data
Subject: My first mail on Postfix
Hi,
Are you there?
regards,
Admin
.
别忘了。最后,表示行尾
答案 1 :(得分:16)
(我刚刚开始工作,我的主要问题是我没有真正的互联网主机名,所以回答这个问题,以防有人帮忙)
您需要使用HELO指定主机名。即便如此,您应该收到错误,因此Postfix可能没有运行。
此外,=&gt;不是命令。 '。'在没有任何文本的单行上是告诉Postfix条目是完整的。以下是我使用的条目:
telnet localhost 25
(says connected)
EHLO howdy.com
(returns a bunch of 250 codes)
MAIL FROM: somebody@blah.com
RCPT TO: (use a real email address you want to send to)
DATA (type whatever you want on muliple lines)
. (this on a single line tells Postfix that the DATA is complete)
您应该得到如下回复:
250 2.0.0 Ok:排队为6E414C4643A
电子邮件可能会以垃圾文件夹结尾。如果没有显示,那么您可能需要设置“Postfix on hosts without a real Internet hostname”。以下是我在Ubuntu框中完成该步骤的细分:
sudo vim /etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic (add this line somewhere)
(edit or create the file 'generic' if it doesn't exist)
sudo vim /etc/postfix/generic
(add these lines, I don't think it matters what names you use, at least to test)
his@localdomain.local hisaccount@hisisp.example
her@localdomain.local heraccount@herisp.example
@localdomain.local hisaccount+local@hisisp.example
then run:
postmap /etc/postfix/generic (this needs to be run whenever you change the
generic file)
快乐小径