免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5081 | 回复: 2

求救 postfix + extmail +mysql 可以发送邮件 不能收邮件 [复制链接]

论坛徽章:
0
发表于 2010-02-20 11:31 |显示全部楼层
本帖最后由 pk-feiyang 于 2010-02-20 11:35 编辑

telnet localhost 25
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6

334 UGFzc3dvcmQ6

535 5.7.8 Error: authentication failed: generic failure
quit

mai 日志
ername.
Feb 20 06:20:59 mail postfix/smtpd[8598]: warning: localhost.localdomain[127.0.0.1]: SASL login authentication failed: generic failure
Feb 20 06:21:14 mail postfix/smtpd[8598]: disconnect from localhost.localdomain[127.0.0.1]
Feb 20 06:22:05 mail postfix/smtpd[8598]: connect from localhost.localdomain[127.0.0.1]
Feb 20 06:22:18 mail postfix/smtpd[8598]: warning: SASL authentication failure: All-whitespace username.
Feb 20 06:22:18 mail postfix/smtpd[8598]: warning: localhost.localdomain[127.0.0.1]: SASL login authentication failed: generic failure
Feb 20 06:22:24 mail postfix/smtpd[8598]: disconnect from localhost.localdomain[127.0.0.1]


可以给其他邮箱发送邮件,但是不能收取,我的是内网 ,我在路由上做映射了,能够往外网发送邮件,但是外网那个邮箱不能够回复 ,

mail mx 记录


root@my86:/home/www# dig mail.cehrs.com.cn

; <<>> DiG 9.4.2-P2 <<>> mail.cehrs.com.cn
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44511
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.cehrs.com.cn.                IN        A

;; ANSWER SECTION:
mail.cehrs.com.cn.        3591        IN        A        124.65.152.74

;; Query time: 2 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sat Feb 20 10:00:48 2010
;; MSG SIZE  rcvd: 51

论坛徽章:
0
发表于 2010-02-20 12:08 |显示全部楼层
本帖最后由 blueswxs 于 2010-02-20 12:14 编辑
telnet localhost 25
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
...
pk-feiyang 发表于 2010-02-20 11:31



一、确定是否支持验证
  1. #telnet smtp.163.com 25
  2. Trying 123.125.50.134...
  3. Connected to smtp.163.com (123.125.50.134).
  4. Escape character is '^]'.
  5. 220 163.com Anti-spam GT for Coremail System (163com[20090903])
  6. EHLO www.163.com
  7. 250-mail
  8. 250-PIPELINING
  9. 250-AUTH LOGIN PLAIN
  10. [color=Red]250-AUTH=LOGIN PLAIN[/color]
  11. 250-coremail 1Uxr2xKj7kG0xkI17xGrUDI0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2Uru1pe0UCa0xDrUUUUj
  12. 250 8BITMIME
复制代码
注意红色字,楼主的系统是否支持其中验证的一种。


二、检查你postfix关于SASL相关配置
最好贴出你的main.cf配置.


三、输入的用户名和密码是base64转码才能被接受。
例如:
#echo -n "blues" | openssl base64
Ymx1ZXM=

四、空格问题
warning: SASL authentication failure: All-whitespace username.

检查一下配置的时候是不是没有处理空格

论坛徽章:
0
发表于 2010-02-20 12:57 |显示全部楼层
这是我的main.cf
root@mail:/var/lib/dpkg# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
myhostname = mail.cehrs.com.cn
mynetworks = 127.0.0.1
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree{data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks,        permit_sasl_authenticated,        reject_non_fqdn_hostname,        reject_non_fqdn_sender,        reject_non_fqdn_recipient,        reject_unauth_destination,        reject_unauth_pipelining,        reject_invalid_hostname,        check_policy_service inet:127.0.0.1:10030
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = mysql:/etc/postfix/mysql_virtual_sender_maps.cf,        mysql:/etc/postfix/mysql_virtual_alias_maps.cf
smtpd_sender_restrictions = permit_mynetworks,        reject_sender_login_mismatch,        reject_authenticated_sender_login_mismatch,        reject_unauthenticated_sender_login_mismatch
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree{data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop:
virtual_uid_maps = static:1000
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP