我什么都试过,我读在线测试和我不能让电子邮件出去后缀的安装,但如何测试
telnet <IP> 25
EHLO
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
. <Enter>
=>
我甚至尝试这样做,当我键入期间,我得到什么? ..但后缀安装
我什么都试过,我读在线测试和我不能让电子邮件出去后缀的安装,但如何测试
telnet <IP> 25
EHLO
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
. <Enter>
=>
我甚至尝试这样做,当我键入期间,我得到什么? ..但后缀安装
(我刚刚得到这个工作,我的主要问题是,我没有一个真正的互联网主机名,在这样的情况下回答这个问题,它可以帮助别人)
您需要用HELO指定一个主机名。即使如此,你应该得到一个错误,所以Postfix可能没有运行。
另外,=>不是命令。 '。'在没有任何文本的单行上,告诉Postfix该条目已完成。下面是我使用的条目:
telnet localhost 25
(says connected)
EHLO howdy.com
(returns a bunch of 250 codes)
MAIL FROM: [email protected]
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确定:排队的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)
[email protected] [email protected]
[email protected] [email protected]
@localdomain.local [email protected]
then run:
postmap /etc/postfix/generic (this needs to be run whenever you change the
generic file)
快乐创新
要检查后缀是否正在运行或不
sudo postfix status
如果它没有运行,启动它。
sudo postfix start
然后远程登录到本地主机端口25来测试电子邮件ID
ehlo localhost
mail from: [email protected]
rcpt to: your_email_id
data
Subject: My first mail on Postfix
Hi,
Are you there?
regards,
Admin
.
不要忘记。在末尾,表示行结束
@PJBrunet是的,您仍然可以使用状态命令检查后缀的状态,如在答案中给出的 – 2017-02-12 09:15:56