免费注册 查看新帖 |

Chinaunix

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

[Mail] postfix+dovecot+mysql+postfixadmin 发信问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-25 14:10 |只看该作者 |倒序浏览
本帖最后由 who8383 于 2014-11-25 14:13 编辑

我现在遇到这样的问题。使用postfixadmin创建的邮件账户可以登录,可以收邮件,但是不能发送,postfix日志如下,
  1. Nov 25 13:55:36 mail postfix/smtpd[2573]: connect from unknown[10.0.0.189]
  2. Nov 25 13:55:36 mail postfix/smtpd[2573]: warning: SASL: Connect to smtpd failed: No such file or directory
  3. Nov 25 13:55:36 mail postfix/smtpd[2573]: fatal: no SASL authentication mechanisms
  4. Nov 25 13:55:37 mail postfix/master[2497]: warning: process /usr/libexec/postfix/smtpd pid 2573 exit status 1
  5. Nov 25 13:55:37 mail postfix/master[2497]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
复制代码
在我telnet 25端口的时候不出现欢迎的画面,而且输入任何内容无效,过几秒钟就自动断开连接


postfix配置如下:
  1. [root@mail dovecot]# postconf -n
  2. alias_database = hash:/etc/aliases
  3. alias_maps = hash:/etc/aliases
  4. broken_sasl_auth_clients = yes
  5. command_directory = /usr/sbin
  6. config_directory = /etc/postfix
  7. daemon_directory = /usr/libexec/postfix
  8. data_directory = /var/lib/postfix
  9. debug_peer_level = 2
  10. home_mailbox = Mailbox
  11. html_directory = no
  12. inet_interfaces = all
  13. inet_protocols = all
  14. mail_owner = postfix
  15. mailq_path = /usr/bin/mailq.postfix
  16. manpage_directory = /usr/share/man
  17. mydestination = $myhostname, localhost.$mydomain, localhost
  18. mydomain = dktest.com
  19. myhostname = mail.dktest.com
  20. mynetworks = 0.0.0.0/0
  21. myorigin = $mydomain
  22. newaliases_path = /usr/bin/newaliases.postfix
  23. queue_directory = /var/spool/postfix
  24. readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
  25. sample_directory = /usr/share/doc/postfix-2.6.6/samples
  26. sendmail_path = /usr/sbin/sendmail.postfix
  27. setgid_group = postdrop
  28. smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
  29. smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
  30. smtpd_sasl_auth_enable = yes
  31. smtpd_sasl_path = /var/run/dovecot/auth-client
  32. smtpd_sasl_security_options = noanonymous
  33. smtpd_sasl_type = dovecot
  34. unknown_local_recipient_reject_code = 550
  35. virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
  36. virtual_gid_maps = static:2000
  37. virtual_mailbox_base = /var/vmail
  38. virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
  39. virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
  40. virtual_transport = virtual
  41. virtual_uid_maps = static:2000
  42. [root@mail dovecot]#
复制代码
dovecot 配置如下:
  1. [root@mail dovecot]# doveconf -n
  2. # 2.0.9: /etc/dovecot/dovecot.conf
  3. # OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final)
  4. auth_mechanisms = plain login cram-md5
  5. dict {
  6.   expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  7.   quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  8. }
  9. disable_plaintext_auth = no
  10. listen = *
  11. mail_location = maildir:~/Maildir
  12. mbox_write_locks = fcntl
  13. passdb {
  14.   driver = pam
  15. }
  16. passdb {
  17.   args = /etc/dovecot/dovecot-sql.conf.ext
  18.   driver = sql
  19. }
  20. protocols = imap pop3
  21. service dict {
  22.   unix_listener dict {
  23.     group = vmail
  24.     mode = 0600
  25.     user = vmail
  26.   }
  27. }
  28. ssl = no
  29. ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
  30. ssl_key = </etc/pki/dovecot/private/dovecot.pem
  31. userdb {
  32.   driver = passwd
  33. }
  34. userdb {
  35.   args = /etc/dovecot/dovecot-sql.conf.ext
  36.   driver = sql
  37. }
  38. [root@mail dovecot]#

复制代码
在网上也没找到有用的解决方法,现在可以使用mysql内的帐号登录,可是无法发信,pop3可以收信

论坛徽章:
0
2 [报告]
发表于 2014-11-25 14:22 |只看该作者
   我只知道是smtp发信有问题,但是问题在哪,该怎么解决,却是不清楚

论坛徽章:
0
3 [报告]
发表于 2014-11-25 15:59 |只看该作者
   有木有人啊

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
4 [报告]
发表于 2014-11-26 08:02 |只看该作者
02.Nov 25 13:55:36 mail postfix/smtpd[2573]: warning: SASL: Connect to smtpd failed: No such file or directory

03.Nov 25 13:55:36 mail postfix/smtpd[2573]: fatal: no SASL authentication mechanisms

登录验证出问题,查看sasl配置看看

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
5 [报告]
发表于 2014-11-26 08:03 |只看该作者
“在我telnet 25端口的时候不出现欢迎的画面,而且输入任何内容无效,过几秒钟就自动断开连接”

telnet都不能上,看看postfix有没有起动,防火墙有没有挡住

论坛徽章:
0
6 [报告]
发表于 2014-11-26 09:22 |只看该作者
sasl 配置怎么看?  回复 4# cryboy2001


   

论坛徽章:
0
7 [报告]
发表于 2014-11-26 09:22 |只看该作者
  postfix 启动的,防火墙关闭的 回复 5# cryboy2001


   

论坛徽章:
0
8 [报告]
发表于 2014-11-26 10:14 |只看该作者
最新报错,邮件发出去就被自动删掉了。这是什么情况
  1. Nov 26 09:58:25 mail postfix/postfix-script[1650]: starting the Postfix mail system
  2. Nov 26 09:58:25 mail postfix/master[1651]: daemon started -- version 2.6.6, configuration /etc/postfix
  3. Nov 26 09:58:35 mail postfix/smtpd[1657]: connect from unknown[10.0.0.189]
  4. Nov 26 09:58:37 mail postfix/smtpd[1657]: D147222E6D: client=unknown[10.0.0.189], sasl_method=LOGIN, sasl_username=1235@dktest.com
  5. Nov 26 09:58:37 mail postfix/cleanup[1663]: D147222E6D: message-id=<201411251355395621728@dktest.com>
  6. Nov 26 09:58:37 mail postfix/qmgr[1654]: D147222E6D: from=<1235@dktest.com>, size=1452, nrcpt=1 (queue active)
  7. Nov 26 09:58:38 mail postfix/smtpd[1657]: disconnect from unknown[10.0.0.189]
  8. Nov 26 09:58:38 mail postfix/virtual[1665]: D147222E6D: to=<nsb@dktest.com>, relay=virtual, delay=0.52, delays=0.14/0.26/0/0.11, dsn=2.0.0, [color=Red]status=sent (delivered to maildir)[/color]
  9. Nov 26 09:58:38 mail postfix/qmgr[1654]: D147222E6D:[u][u][color=Red] removed[/color][/u][/u]
  10. Nov 26 10:01:48 mail postfix/smtpd[1701]: connect from unknown[10.0.0.189]
  11. Nov 26 10:01:50 mail postfix/smtpd[1701]: 566B222EC6: client=unknown[10.0.0.189], sasl_method=LOGIN, sasl_username=nsb@dktest.com
  12. Nov 26 10:01:50 mail postfix/cleanup[1711]: 566B222EC6: message-id=<201411261002258447750@dktest.com>
  13. Nov 26 10:01:50 mail postfix/qmgr[1654]: 566B222EC6: from=<nsb@dktest.com>, size=1459, nrcpt=1 (queue active)
  14. Nov 26 10:01:50 mail postfix/smtpd[1701]: disconnect from unknown[10.0.0.189]
  15. Nov 26 10:01:50 mail postfix/virtual[1713]: 566B222EC6: to=<1235@dktest.com>, relay=virtual, delay=0.23, delays=0.09/0.02/0/0.12, dsn=2.0.0, status=sent (delivered to maildir)
  16. Nov 26 10:01:50 mail postfix/qmgr[1654]: 566B222EC6:[color=Red] removed[/color]
  17. Nov 26 10:04:58 mail postfix/smtpd[1724]: connect from unknown[10.0.0.189]
  18. Nov 26 10:05:55 mail postfix/smtpd[1724]: 2B62822E6D: client=unknown[10.0.0.189]
  19. Nov 26 10:06:00 mail postfix/cleanup[1733]: 2B62822E6D: message-id=<>
  20. Nov 26 10:06:00 mail postfix/qmgr[1654]: 2B62822E6D: from=<123@123.com>, size=182, nrcpt=1 (queue active)
  21. Nov 26 10:06:00 mail postfix/virtual[1735]: 2B62822E6D: to=<1235@dktest.com>, relay=virtual, delay=16, delays=16/0.02/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
  22. Nov 26 10:06:00 mail postfix/qmgr[1654]: 2B62822E6D: removed
  23. Nov 26 10:06:02 mail postfix/smtpd[1724]: disconnect from unknown[10.0.0.189]
  24. [root@mail maildrop]#
复制代码
回复 4# cryboy2001


   

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
9 [报告]
发表于 2014-11-26 10:28 |只看该作者
"最新报错,邮件发出去就被自动删掉了。这是什么情况"

邮件发出去删除很正常的

论坛徽章:
0
10 [报告]
发表于 2014-11-26 10:36 |只看该作者
  可是在我的邮件目录下收不到我发出的邮件(本域的)回复 9# cryboy2001


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP