免费注册 查看新帖 |

Chinaunix

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

高手们请问在REDHAT9下如何配置SENDMAIL? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-11-03 16:09 |只看该作者 |倒序浏览
请问在REDHAT9下如何配置SENDMAIL? 好像和rh8,rh7*不一样。

论坛徽章:
0
2 [报告]
发表于 2003-11-03 16:15 |只看该作者

高手们请问在REDHAT9下如何配置SENDMAIL?

哪里不一样?

论坛徽章:
0
3 [报告]
发表于 2003-11-03 16:32 |只看该作者

高手们请问在REDHAT9下如何配置SENDMAIL?

rh7.3 和rh8.0这样配置可以,但rh9.0下的  用m4出错。
编辑:/etc/mail/sendmail.mc把下面的内容完全覆盖进去:注意下面的第13行中XXX.com改成你的域名:

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',`XXX.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(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')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
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


8、在/etc/mail中执行m4 sendmail.mc >; /etc/sendmail.cf
9、编辑/etc/mail/local-host-names增加你的域名XXX.com进去。
10、启动:/etc/init.d/sendmail restart
11、启动:/usr/sbin/popper xxx.xxx.xxx.xxx:110 (其中xxx.xxx.xxx.xxx是你的IP地址)
12、useradd -g mail ABC (增加一个用户名)


在rh9下使用m4

Last login: Mon Nov  3 10:03:28 2003 from 172.16.1.193
[root@bingbing root]# cd /
[root@bingbing /]# cd etc
[root@bingbing etc]# cd mail
[root@bingbing mail]# ls
access       domaintable.db    mailertable     sendmail.cf      sendmail.mc.bak  submit.mc      virtusertable.db
access.db    helpfile          mailertable.db  sendmail.cf.bak  statistics       trusted-users
domaintable  local-host-names  Makefile        sendmail.mc      submit.cf        virtusertable
[root@bingbing mail]# m4 sendmail.mc /etc/sendmail.cf
sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: 没有那个文件或目录
m4: /etc/sendmail.cf: 没有那个文件或目录
[root@bingbing mail]#

好像9中sendmail和以前的版本配置区别很大。

论坛徽章:
0
4 [报告]
发表于 2003-11-03 16:39 |只看该作者

高手们请问在REDHAT9下如何配置SENDMAIL?

8。0以上的没用过,但我记得8。0以上的SENDMAIL是读/etc/mail/sendmail.cf,不再是/etc/sendmail.cf了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP