sendmail簡介與安裝
Home Up

 

 你是本篇文章第 位訪客(since 03/09/2005)

sendmail簡介

sendmail是UNIX系統中Default(非唯一)的SMTP Server程式。

sendmail可以擔任SMTP Server、SMTP Client、Mail Router等角色。

sendmail無法擔任Final Delivery Agent,將信件直接送入使用者信箱中。

sendmail版本與安裝

sendmail的版本

  1. sendmai網站:http://www.sendmail.org

  2. Provide Anti-Spam Configuration Capability Since Version 8.9.x

  3. RedHAT Linux 6.1光碟包含的sendmail版本為8.9.3

  4. sendmail目前(05/2000)最新版本為8.10.1(正式版本)

  5. sendmail 8.10.1新增功能(http://www.sendmail.org/current-release.html)

    SMTP Authentication, allowing users to use cryptographic authentication in SMTP to gain additional privileges, such as ability to relay.

    Performance improvements, including multiple queues, memory-buffered pseudo-files, and more control over resolver timeouts.

    Support for "message submission agent", as defined by RFC 2476.

    Ability to connect to servers running on named sockets.

    Changes to support IPv6.

    Better LDAP integration and support for LDAP-based routing.

    Improved support for virtual hosting.

    Even better anti-spam control features.

    Several new map classes, including ph, arith, and macro.

  6. Always Use The Newest version 

 sendmail安裝  : RedHAT's Way  - With RPM

  1. sendmail related rpm Packages in CDROM 

    sendmail-8.9.3-15.i386.rpm sendmail 相關程式及檔案
    sendmail-cf-8.9.3-10.i386.rpm sendmail,cf 相關m4設定檔,You Need This Only  When You want to change /etc/sendmail.cf by m4 marcro
    sendmail-doc-8.9.3-15.i386.rpm  sendmail related Documents(Will Be installed on  /usr/doc/sendmail)

 

  1. 安裝rpm 優點在於快速、管理方便,缺點在於版本更新速度往往必須等新版sendmail被包裝成rpm後,才可以進行更版。

sendmail安裝 : UNIX's Way - make with source
以下以sendmail.8.10.1為例說明如何在RedHat中安裝新版的sendmail

Step1. Get sendmail.8.10.1 Source (sendmail.8.10.1.tar.gz)
        You can get the newest version of sendmail from www.sendmail.org, or You get it From nmc.
         Put the compressed source file in some directory.

Step2. unzip sendmail
        [root@nmc /src]# tar zxvf sendmail.8.10.1.tar.gz
   
    ### directory sendmail.8.10.1 will be created

Step 3.Build sendmai binary code
        [root@nmc /src]# cd sendmail-8.10.1/
        [root@nmc sendmail-8.10.1]# sh Build
        
Step 4. Build The Configuration File - sendmail.cf
        --cp  generic-linux.mc in sendmail-8.10.1/cf/cf  to config.mc and modify it.
        --You May refer to Sendmail Configuration and Sendmail Feature 
        --in Woody's Linux Web for how to modify config.mc
        [root@nmc cf]# pwd
        /src/sendmail-8.10.1/cf/cf
        [root@nmc cf]# cp generic-linux.mc config.mc
        [root@nmc cf]# vi config.mc
        ...
       DOMAIN(generic)dnl
      
## Add The Following line into linux.mc
       FEATURE(access_db,hash -o /etc/mail/access) dnl 
       MAILER(local)dnl
        ...
       [root@nmc cf]# ./Build config.cf
       ### config.cf will be created in sendmail-8.10.1/cf/cf

Step 5. Backup Original sendmail binary adn sendmail.cf
        [root@nmc cf]# cp /usr/sbin/sendmail /usr/sbin/sendmail.8.9.3
      [root@nmc cf]# cp /etc/sendmail.cf /etc/sendmail.cf.8.9.3

Step 6. Install sendmail binary and sendmail.cf
      [root@nmc sendmail-8.10.1]# pwd
        /src/sendmail-8.10.1
      [root@nmc sendmail-8.10.1]# sh Build install
      [root@nmc cf]# cp cf/cf/config.cf /etc/mail/sendmail.cf
     
###sendmail 8.10.1 use /etc/mail/sendmail.cf while sendmail 8.9.3 use /etc/sendmail.cf
      [root@nmc cf]# cp /etc/aliases /etc/mail
      [root@nmc cf]# cp /etc/mail/sendmail.cw /etc/mail/local-host-names
        ### sendmail.cw define the hostnames your sendmail daemon accept !!
        ### sendmail 8.10.1 use new file local-host-names

Step 6. Restart sendmail and Version test
       [root@nmc cf]# /etc/rc.d/init.d/sendmail restart
     
Shutting down sendmail: [ OK ]
     
Starting sendmail: [ OK ]
     
[root@nmc cf]# telnet localhost 25
     
Trying 127.0.0.1...
        Connected to localhost.
        Escape character is '^]'.
        220 nmc.nchu.edu.tw ESMTP Sendmail 8.10.1/8.10.1; Fri, 26 May 2000 15:56:32 +0800
       ###The Version is Now 8.10.1

              

 

建置及維護者:
國立中興大學 電算中心    吳賢明   woody@nchu.edu.tw
本網頁最近更新時間:2000/10/13 上午 10:52:14