Mat*_*iby 25 ubuntu postfix-mta
我尝试了在线阅读的所有内容进行测试,但我无法收到电子邮件
telnet <IP> 25
EHLO
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
. <Enter>
=>
Run Code Online (Sandbox Code Playgroud)
我甚至试过这个,当我输入句号时我什么都没得到.....但是安装了postfix
小智 51
检查postfix是否正在运行
sudo postfix status
Run Code Online (Sandbox Code Playgroud)
如果它没有运行,请启动它.
sudo postfix start
Run Code Online (Sandbox Code Playgroud)
然后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
.
Run Code Online (Sandbox Code Playgroud)
别忘了.最后,表示行尾
Mat*_*ttC 17
(我刚刚开始工作,我的主要问题是我没有真正的互联网主机名,所以回答这个问题,以防有人帮忙)
您需要使用HELO指定主机名.即便如此,您应该收到错误,因此Postfix可能没有运行.
此外,=>不是命令.'.' 在没有任何文本的单行上是告诉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)
Run Code Online (Sandbox Code Playgroud)
您应该收到如下回复:
250 2.0.0好的:排队为6E414C4643A
电子邮件可能会以垃圾文件夹结尾.如果它没有显示,那么您可能需要在没有真正的Internet主机名的主机上设置" Postfix ".以下是我在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)
Run Code Online (Sandbox Code Playgroud)
快乐的小道
| 归档时间: |
|
| 查看次数: |
105472 次 |
| 最近记录: |