当前位置: 首页 > 图文教程 > 服务器 > Web服务器 > Sendmail邮件服务器快速指(2)

Web服务器
增强WEB服务器IIS安全性的五个简单有效措施
图解Web服务器和FTP服务器安全配置[1]
linux操作系统下的域名解析系统设置
WEB专用服务器的安全设置技巧
Win Server 2003个人网络服务器安全攻略
在WIN2000系统下安装JSP服务器
保护WEB服务器的15个技巧
Windows下打造完美的服务器平台
使用IIS 5.0调整Web服务器的艺术与科学
如何架设基于windows XP的Web服务器
WEB服务器流量超负载:如何分散解决
另僻蹊径 通过IIS高效管理Web服务器
国外空间出现乱码的几种解决办法
使用反向代理技术保护Web服务器
网络应用 介绍并分析P2P流量识别与监测
针对Web服务器的八种攻击方式
用ubuntu server8.10做php-web服务器
PHPNow服务器套件安装
Windows 2003 Server安全配置指南
Microsoft Windows 2003集群攻略

Web服务器 中的 Sendmail邮件服务器快速指(2)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-02   浏览: 59 ::
收藏到网摘: n/a

二、工作环境

  本文假设用户希望在园区网环境中架设一个电子邮件服务器,为本单位用户提供邮件服务。该服务器拥有一个合法的IP地址202.99.11.200和一个合法的域名mail.linuxaid.com.cn,并且DNS的MX记录也指向该域名(注:这里示例域名和IP地址均为伪造域名和地址)。为了满足域名需求,DNS的域数据文件应该包含以下内容:

  IN MX 10 mail
  mail IN A 202.99.11.200

  试验环境为:redhat6.2、sendmail.8.11.4、qpopper4.0.3。

  三、软件下载

  分别从以下地址下载sendmail和qpopper:

  sendmail.8.11.4.tar.gz http://www.sendmail.org/current-release.html
  qpopper4.0.3.tar.gz http://www.eudora.com/qpopper_general/

  四、Sendmail的配置和安装

  Sendmail是目前使用最为广泛的一种E-mail服务器。当前其最新的稳定版本为8.11.4。下载得到tar.gz格式的压缩包以后,将其存放在/usr/src目录下。

  解压软件包:

  [root@email src]# tar xvfz sendmail.8.11.4.tar.gz
  [root@email src]# cd sendmail-8.11.4

  编译安装:

  [root@email sendmail-8.11.4]# cd sendmail
  [root@email sendmail]# sh Build

  生成配置文件:

  [root@email sendmail]#cd /usr/src/sendmail-8.11.4/cf/cf/

  一般该目录下应该有config.mc的文件,如果没有则创建新文件config.mc,内容为:

  divert(-1)
  dnl This is the macro config file used to generate the /etc/sendmail.cf
  dnl file. If you modify thei file you will have to regenerate the
  dnl /etc/sendmail.cf by running this macro config through the m4
  dnl preprocessor:
  dnl m4 /etc/sendmail.mc > /etc/sendmail.cf
  dnl You will need to have the Sendmail-cf package installed for this to work.
  include(`/usr/src/sendmail-8.11.4/cf')
  define(`confDEF_USER_ID',`8:12')
  OSTYPE(`linux')
  undefine(`UUCP_RELAY')
  undefine(`BITNET_RELAY')
  define(`confAUTO_REBUILD')
  define(`confTO_CONNECT', `1m')
  define(`confTRY_NULL_MX_LIST',true)
  define(`confDONT_PROBE_INTERFACES',true)
  define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
  FEATURE(`smrsh',`/usr/sbin/smrsh')
  FEATURE(`mailertable',`hash -o /etc/mail/mailertable')
  FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(smtp)
  MAILER(procmail)
  FEATURE(`access_db')
  FEATURE(`blacklist_recipients')
  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 hav 24x7 DNS do need this.
  FEATURE(`accept_unresolvable_domains')
  dnl FEATURE(`relay_based_on_MX')