当前位置: 技术问答>linux和unix
red hat 7.2为甚么速度会越来越慢,每天都要重起.
来源: 互联网 发布时间:2014-12-16
本文导语: 安装了sendmail后,每运行一天都要重起一次,开始一切都正常,过了半天再发邮件就会提示服务器忙.但是web服务又正常. 用netstat -ta查看则看到很多本地IP跟其他smtp通讯的记录. 用ps -aux查看也如此. 是有人利用我的邮件发...
安装了sendmail后,每运行一天都要重起一次,开始一切都正常,过了半天再发邮件就会提示服务器忙.但是web服务又正常.
用netstat -ta查看则看到很多本地IP跟其他smtp通讯的记录.
用ps -aux查看也如此.
是有人利用我的邮件发垃圾邮件,还是发完后的邮件没有得到处理.
如是发垃圾邮件该如何设定.
还有我把red hat 7.2的防火墙关掉了这有关系吗?
请告知设定那个文件,改那一项.越详细越好,分不是问题.
在线......请各位,指点.
用netstat -ta查看则看到很多本地IP跟其他smtp通讯的记录.
用ps -aux查看也如此.
是有人利用我的邮件发垃圾邮件,还是发完后的邮件没有得到处理.
如是发垃圾邮件该如何设定.
还有我把red hat 7.2的防火墙关掉了这有关系吗?
请告知设定那个文件,改那一项.越详细越好,分不是问题.
在线......请各位,指点.
|
修改文件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(`../m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
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(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/sendmail.st')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(QUEUE_DIR,`/var/spool/mqueue/q*')
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')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail)dnl
FEATURE(`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=127.0.0.1, Name=MTA')
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
MAILER(smtp)dnl
MAILER(procmail)dnl
其中,加下面的行:
1. TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
2. define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
3. DAEMON_OPTIONS(`Port=25,Name=MTA')dnl
4. DAEMON_OPTIONS(`Port=587,Name=MSA,M=Ea')dnl
注:(以上的条目配置文件如果有且前面有dnl去掉dnl就可以了)
第1,2行 移走前面的注释,打开相应的各种认证机制。
第3,4行 设置相应的MTA和MSA所在的端口号。
且注释出了
1. dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
2. dnl FEATURE(`accept_unresolvable_domains')dnl
第1行 允许通过网络连接Sendmail。
第2行 禁止不可解析的域名relay邮件
最后运行
#m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
写到/etc/sendmail.cf文件中,重启sendmail
2. 测试端口25,确保输出AUTH提示行。
#telnet localhost 25
Trying 127.0.0.1...
Connected to smtp.domain.com.
Escape character is '^]'.
220 smtp.domain.com ESMTP Sendmail 8.11.2/8.11.2; Sun, 1 July 2001 17:56:54 -0800
EHLO localhost
250-smtp.domain.com Hello IDENT:root@smtp.domain.com [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250 HELP
quit
221 2.0.0 smtp.domain.com closing connection
Connection closed by foreign host.
你需要至少看见AUTH行中有LOGIN PLAIN在那里,否则不能relay mail。
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(`../m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
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(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/sendmail.st')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(QUEUE_DIR,`/var/spool/mqueue/q*')
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')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail)dnl
FEATURE(`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=127.0.0.1, Name=MTA')
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
MAILER(smtp)dnl
MAILER(procmail)dnl
其中,加下面的行:
1. TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
2. define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
3. DAEMON_OPTIONS(`Port=25,Name=MTA')dnl
4. DAEMON_OPTIONS(`Port=587,Name=MSA,M=Ea')dnl
注:(以上的条目配置文件如果有且前面有dnl去掉dnl就可以了)
第1,2行 移走前面的注释,打开相应的各种认证机制。
第3,4行 设置相应的MTA和MSA所在的端口号。
且注释出了
1. dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
2. dnl FEATURE(`accept_unresolvable_domains')dnl
第1行 允许通过网络连接Sendmail。
第2行 禁止不可解析的域名relay邮件
最后运行
#m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
写到/etc/sendmail.cf文件中,重启sendmail
2. 测试端口25,确保输出AUTH提示行。
#telnet localhost 25
Trying 127.0.0.1...
Connected to smtp.domain.com.
Escape character is '^]'.
220 smtp.domain.com ESMTP Sendmail 8.11.2/8.11.2; Sun, 1 July 2001 17:56:54 -0800
EHLO localhost
250-smtp.domain.com Hello IDENT:root@smtp.domain.com [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250 HELP
quit
221 2.0.0 smtp.domain.com closing connection
Connection closed by foreign host.
你需要至少看见AUTH行中有LOGIN PLAIN在那里,否则不能relay mail。
|
gz up
|
把你的MAIL SERVER配置成SMTP AUTH,或者干脆关了。建议用QMAIL
|
我同意!!我也有同感!
|
你的smtp服务器验证身份吗,可能有人用你的smtp服务器!
Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
-- Geoffrey James, "The Tao of Programming"
Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
-- Geoffrey James, "The Tao of Programming"