- 论坛徽章:
- 0
|
本帖最后由 43670827 于 2013-10-28 21:35 编辑
在邮件服务器上使用root给mysql用户发邮件,
[root@mail named]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
220 mail.elifemail.ae ESMTP Postfix
ehlo mail.elifemail.ae
250-mail.elifemail.ae
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:root@mail.elifemail.ae
250 2.1.0 Ok
rcpt to:mysql@mail.elifemail.ae
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject:test
mail test!
.
250 2.0.0 Ok: queued as 62F79B60061
quit
221 2.0.0 Bye
日志中打印以下信息
Oct 28 17:11:45 mail postfix/smtp[9007]: BBDB1B60065: to=<root@elifemail.ae>, orig_to=<mysql@mail.elifemail.ae>, relay=none, delay=30, delays=0.02/0/30/0, dsn=4.4.1, status=deferred (connect to mail.elifemail.ae[10.251.177.15]: Connection timed out)
执行nslookup,结果如下:
[root@mail named]# nslookup
> mail.elifemail.ae
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: mail.elifemail.ae
Address: 10.251.177.15
> exit
执行dig结果如下:
[root@mail named]# dig mail.elifemail.ae mx
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 <<>> mail.elifemail.ae mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22857
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.elifemail.ae. IN MX
;; AUTHORITY SECTION:
elifemail.ae. 86400 IN SOA localost.elifemail.ae. root.elifemail.ae. 42 10800 900 604800 86400
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Oct 28 17:15:12 2013
;; MSG SIZE rcvd: 85
看了下各位大大以前的贴子。发现是说disbaled_nslookup=yes引起的,我执行了以下命令,结果如下:
[root@mail named]# postconf |grep relay_domains
fast_flush_domains = $relay_domains
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
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
relay_domains = $mydestination
relay_domains_reject_code = 554
[root@mail named]# postconf |grep lookup
disable_dns_lookups = no
ignore_mx_lookup_error = no
lmtp_host_lookup = dns
smtp_host_lookup = dns
smtpd_null_access_lookup_key = <>
smtpd_peername_lookup = yes
所以不知道原因了。。。请各位大大和高手们,帮忙看下。。搞了3天了。谢谢。
|
|