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
该电子邮件可能最终会进入垃圾文件夹。如果它没有显示,那么您可能需要在没有真实 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)
[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)
Happy Trails
(I just got this working, with my main issue being that I don't have a real internet hostname, so answering this question in case it helps someone)
You need to specify a hostname with HELO. Even so, you should get an error, so Postfix is probably not running.
Also, the => is not a command. The '.' on a single line without any text around it is what tells Postfix that the entry is complete. Here are the entries I used:
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)
You should get a response like:
250 2.0.0 Ok: queued as 6E414C4643A
The email will probably end up in a junk folder. If it is not showing up, then you probably need to setup the 'Postfix on hosts without a real Internet hostname'. Here is the breakdown on how I completed that step on my Ubuntu box:
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)
发布评论
评论(2)
检查 postfix 是否正在运行
如果它没有运行,请启动它。
然后 telnet 到 localhost 端口 25 来测试电子邮件 ID
不要忘记 .在末尾,表示行尾
To check whether postfix is running or not
If it is not running, start it.
Then telnet to localhost port 25 to test the email id
Do not forget the . at the end, which indicates end of line
(我刚刚开始工作,我的主要问题是我没有真正的互联网主机名,所以回答这个问题以防它对某人有帮助)
您需要使用 HELO 指定主机名。即便如此,您应该会收到一个错误,因此 Postfix 可能没有运行。
另外, =>不是命令。这 '。'在一行周围没有任何文本的情况下,告诉 Postfix 该条目已完成。以下是我使用的条目:
您应该得到如下响应:
250 2.0.0 好的:排队为 6E414C4643A
该电子邮件可能最终会进入垃圾文件夹。如果它没有显示,那么您可能需要在没有真实 Internet 主机名的主机上设置 'Postfix '。以下是我如何在 Ubuntu 盒子上完成该步骤的详细信息:
Happy Trails
(I just got this working, with my main issue being that I don't have a real internet hostname, so answering this question in case it helps someone)
You need to specify a hostname with HELO. Even so, you should get an error, so Postfix is probably not running.
Also, the => is not a command. The '.' on a single line without any text around it is what tells Postfix that the entry is complete. Here are the entries I used:
You should get a response like:
250 2.0.0 Ok: queued as 6E414C4643A
The email will probably end up in a junk folder. If it is not showing up, then you probably need to setup the 'Postfix on hosts without a real Internet hostname'. Here is the breakdown on how I completed that step on my Ubuntu box:
Happy Trails