免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7602 | 回复: 5
打印 上一主题 下一主题

请教postfix 发不出邮件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-03-20 11:53 |只看该作者 |倒序浏览
本帖最后由 gh520 于 2012-03-20 16:32 编辑

发现postfix check 如下。

  1. superadmin@ubuntu-svr:~$ postfix check
  2. postfix: error: to submit mail, use the Postfix sendmail command
  3. postfix: fatal: the postfix command is reserved for the superuser
复制代码
但用sudo ,又没有信息。

  1. superadmin@ubuntu-svr:~$ sudo postfix check
复制代码

  1. superadmin@ubuntu-svr:/etc/postfix$ telnet localhost 25
  2. Trying ::1...
  3. Trying 127.0.0.1...
  4. Connected to localhost.
  5. Escape character is '^]'.
  6. 220 ubuntu-svr ESMTP Postfix (Ubuntu)
复制代码
然后

  1. ehlo localhost
  2. mail from:  noreply@localhost
  3. rcpt to: gh520@hotmail.com
  4. data
  5. Subject: My first mail on Postfix
  6. Hi,
  7. Are you there?
  8. regards,
  9. Admin
  10. . (Type the .[dot] in a new Line and press Enter )
  11. quit
复制代码
显示是

  1. 250-ubuntu-svr
  2. 250-PIPELINING
  3. 250-SIZE 10240000
  4. 250-VRFY
  5. 250-ETRN
  6. 250-STARTTLS
  7. 250-ENHANCEDSTATUSCODES
  8. 250-8BITMIME
  9. 250 DSN
  10. 250 2.1.0 Ok
  11. 250 2.1.5 Ok
  12. 354 End data with <CR><LF>.<CR><LF>
复制代码
这算正确发出去吗,但我邮箱里收不到这封信咯

各位知道怎么回事吗?

论坛徽章:
0
2 [报告]
发表于 2012-03-20 17:55 |只看该作者
日志发上来看下,发完这封邮件时候的日志

论坛徽章:
0
3 [报告]
发表于 2012-03-20 18:55 |只看该作者
本帖最后由 gh520 于 2012-03-20 19:01 编辑

日志是这样的

  1. Mar 19 05:07:21 ubuntu-svr postfix/smtpd[11411]: connect from unknown[77.232.1.125]
  2. Mar 19 05:07:22 ubuntu-svr postfix/smtpd[11411]: NOQUEUE: reject: RCPT from unknown[77.232.1.125]: 554 5.7.1 <new56@freemailhost.ru>: Relay access denied; from=<smtp2001soho@yahoo.com> to=<new56@freemailhost.ru> proto=SMTP helo=<202.181.237.23>
  3. Mar 19 05:07:23 ubuntu-svr postfix/smtpd[11411]: disconnect from unknown[77.232.1.125]
  4. Mar 19 05:10:43 ubuntu-svr postfix/anvil[11413]: statistics: max connection rate 1/60s for (smtp:77.232.1.125) at Mar 19 05:07:21
  5. Mar 19 05:10:43 ubuntu-svr postfix/anvil[11413]: statistics: max connection count 1 for (smtp:77.232.1.125) at Mar 19 05:07:21
  6. Mar 19 05:10:43 ubuntu-svr postfix/anvil[11413]: statistics: max cache size 1 at Mar 19 05:07:21
  7. Mar 19 16:50:05 ubuntu-svr postfix/smtpd[15292]: connect from unknown[202.105.84.34]
  8. Mar 19 16:54:16 ubuntu-svr postfix/smtpd[15292]: NOQUEUE: reject: RCPT from unknown[202.105.84.34]: 554 5.7.1 <229108400@qq.com>: Relay access denied; from=<noreply@ienjoy.hk> to=<229108400@qq.com> proto=ESMTP helo=<ienjoy.hk>
  9. Mar 19 16:54:16 ubuntu-svr postfix/smtpd[15292]: improper command pipelining after DATA from unknown[202.105.84.34]
  10. Mar 19 16:54:16 ubuntu-svr postfix/smtpd[15292]: warning: non-SMTP command from unknown[202.105.84.34]: Subject: My first mail for my domain
  11. Mar 19 16:54:16 ubuntu-svr postfix/smtpd[15292]: disconnect from unknown[202.105.84.34]
  12. Mar 19 16:57:36 ubuntu-svr postfix/anvil[15295]: statistics: max connection rate 1/60s for (smtp:202.105.84.34) at Mar 19 16:50:05
  13. Mar 19 16:57:36 ubuntu-svr postfix/anvil[15295]: statistics: max connection count 1 for (smtp:202.105.84.34) at Mar 19 16:50:05
  14. Mar 19 16:57:36 ubuntu-svr postfix/anvil[15295]: statistics: max cache size 1 at Mar 19 16:50:05
  15. Mar 19 17:40:33 ubuntu-svr postfix/smtpd[15416]: connect from localhost[127.0.0.1]
  16. Mar 19 17:43:37 ubuntu-svr postfix/smtpd[15416]: disconnect from localhost[127.0.0.1]
  17. Mar 19 17:52:55 ubuntu-svr postfix/master[32064]: terminating on signal 15
  18. Mar 19 17:52:55 ubuntu-svr postfix/master[15651]: daemon started -- version 2.7.0, configuration /etc/postfix
  19. Mar 19 18:07:26 ubuntu-svr postfix/smtpd[15657]: connect from localhost[127.0.0.1]
  20. Mar 19 18:08:36 ubuntu-svr postfix/smtpd[15657]: improper command pipelining after EHLO from localhost[127.0.0.1]
  21. Mar 19 18:08:37 ubuntu-svr postfix/smtpd[15657]: 0060C240C3D: client=localhost[127.0.0.1]
  22. Mar 19 18:13:37 ubuntu-svr postfix/smtpd[15657]: timeout after DATA (124 bytes) from localhost[127.0.0.1]
  23. Mar 19 18:13:37 ubuntu-svr postfix/smtpd[15657]: disconnect from localhost[127.0.0.1]
  24. Mar 19 18:13:37 ubuntu-svr postfix/cleanup[15663]: 0060C240C3D: message-id=<20120319100837.0060C240C3D@ubuntu-svr>
复制代码

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
4 [报告]
发表于 2012-03-22 12:29 |只看该作者
Mar 19 18:08:36 ubuntu-svr postfix/smtpd[15657]: improper command pipelining after EHLO from localhost[127.0.0.1]
Mar 19 18:08:37 ubuntu-svr postfix/smtpd[15657]: 0060C240C3D: client=localhost[127.0.0.1]
Mar 19 18:13:37 ubuntu-svr postfix/smtpd[15657]: timeout after DATA (124 bytes) from localhost[127.0.0.1]
Mar 19 18:13:37 ubuntu-svr postfix/smtpd[15657]: disconnect from localhost[127.0.0.1]

肯定沒發送出去~~

论坛徽章:
0
5 [报告]
发表于 2012-03-22 15:45 |只看该作者
mail from: noreply@localhost


Mar 19 05:07:22 ubuntu-svr postfix/smtpd[11411]: NOQUEUE: reject: RCPT from unknown[77.232.1.125]: 554 5.7.1 <new56@freemailhost.ru>: Relay access denied; from=<smtp2001soho@yahoo.com> to=<new56@freemailhost.ru> proto=SMTP helo=<202.181.237.23>
这里出错了吧?
ehlo localhost?--》helo localhost

论坛徽章:
0
6 [报告]
发表于 2012-03-22 16:32 |只看该作者
谢谢各位,后来改装sendmail了,然后在etc/hosts里,加了一行ip 域名,就可以发送了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP