我虽为网管却自认很惭愧。请大师、高人为我指点迷津……置顶的帖子亦不能解决我的问题
我虽为网管却自认很惭愧。请大师、高人为我指点迷津……
再问“如何解决不能往163、sina发邮件问题”
一、环境
telnet mail.mydomain.com
Red Hat Linux release 7.3 (Valhalla)
Kernel 2.4.18-3 on an i686
login:
telnet mail.mydomain.com 25
220 mail.mydomain.com ESMTP Sendmail 8.11.6/8.11.6; Tue, 1 Feb 2005 19:43:55 +0800
二、现在的配置
$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
61.135.152.85 mail.mydomain.com mail mail.mydomain.com ns
$ hostname --fqdn
mail.mydomain.com
$ more /var/named/s/mydomain.com.hosts
@ IN SOA ns.mydomain.com. root.ns.mydomain.com. (
2004940039
1800
600
100800
1200 )
IN NS ns
IN MX 10 mail.mydomain.com.
localhost IN A 127.0.0.1
ns IN A 61.135.152.85
mail IN A 61.135.152.85
$ more /var/named/s/61.135.152.rev
@ IN SOA ns.mydomain.com. root.ns.mydomain.com. (
2003063814
10800
3600
604800
28800 )
IN NS ns.mydomain.com.
85 IN PTR ns.mydomain.com.
85 IN PTR mail.mydomain.com.
$ more /etc/mail/sendmail.mc
divert(-1)
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/sendmail.cf by running the following command:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl Uncomment and edit the following line if your mail needs to be sent out
dnl through an external mail server:
dnl define(`SMART_HOST',`mydomain.com')
define(`confDEF_USER_ID',``8:12'')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
define(`confDONT_PROBE_INTERFACES',`true')
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `5000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
DAEMON_OPTIONS(`Port=25,Name=MTA')dnl
DAEMON_OPTIONS(`Port=587,Name=MSA,M=Ea')dnl
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
dnl DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
dnl FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
dnl FEATURE(`relay_local_from')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwlocalhost.localdomain mydomain.com
三、现象
线索1:退信
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************
The original message was received at Mon, 31 Jan 2005 16:38:40 +0800
from [61.135.152.62]
----- The following addresses had transient non-fatal errors -----
----- Transcript of session follows -----
451 4.4.1 reply: read error from sinamx.sina.com.cn.
... Deferred: Connection reset by sinamx.sina.com.cn.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
线索2:
telnet mail.mydomain.com 25
220 mail.mydomain.com ESMTP Sendmail 8.11.6/8.11.6; Tue, 1 Feb 2005 19:43:55 +0800
helo
501 5.0.0 helo mydomain.com
quit
221 2.0.0 mail.mydomain.com closing connection
四、问题
依照网络上众多不能往sina、163发信的解决方案的帖子,根据我的配置已经排除了mx记录、fqdn、ip反向解析的可能,可是为什么仍然不能发信?并且我得到是441而非553错误……
另已经查询了反垃圾邮件联盟,域名、ip均不在其列表。
我怀疑是sendmail.mc的问题,可是不知错误在哪应该修正何处呀?我身为网管却自认很惭愧。请大师、高人为我指点迷津……