[ 永遠的UNIX::UNIX技術資料的寶庫 ]   GB | BIG5

首頁 > 網絡管理 > 其它 > 正文
網絡管理員指南 -21.簡單的 smail配置文件
本文出自:http://www.linpus.com.tw 作者: Andrew Anderson (2001-07-20 11:00:00)

這個部分為一個在本地網絡上的UUCP翻頁顯示樣本配置文件。它們包含在一個樣本文件中包括在
SMAIL-3.1.28  DE  源分區中.盡管我盡力解釋這些文件如何工作,仍然建議你閱讀非常準確的SMAIL(8)
手冊頁,它有詳細的篇幅介紹.當你了解SMAIL配置之的基本主張的時候,它就是值得閱讀的.它很簡單!
第一個文件顯示文件路由器,它描述一系列路由器到SMAIL.當SMAIL需要遞送一個信息到一個給定的地址
的時候,它按順序傳送地址到所有的路由器,直到有一個適合.適合在這裡意味著路由器在它的數據中發現
目標主機,它是路徑文件,/ETC/HOST,或者路由接口使用的路由機制.
注冊在SMAIL配置文件中經常由一個獨特的名字開頭來指定路由器,傳送,或者導航.它們跟隨著一組指定
它的行為的附件.這個列表包含一組全球屬性,例如驅使用,和只有特定啟動可以識別的私人屬性.屬性由
逗號分割開,而一組全球和私人屬性使用分號分割.
要使這些區分明確,假定你想要保留兩個單獨的PATHALIAS文件,一個包含你的域的路由信息,第二個包含
全球路由信息,當然,通常來自UUCP地圖.使用SMAIL,你可以現在在路由文件中指定兩個路由器,都使用
PATHALIAS驅動.這個驅動在PATHALIAS數據中查找主機名字.它得到一個特殊的名字:
第二個在上面給出的在每個路由器的全球屬性需要在路由器符合地址的時候被使用.在我們的案例中,
信息將使用UUX傳輸來遞送.傳輸在傳送文件中指定,它在下面進行解釋.
你可以通過傳送一個信息來詳細調節,如果你指定一個方式文件而不是傳送屬性將被遞送.我們將不會
在這裡處它們.
下面的路由文件為一個本地網絡指定路由器,它詢問決議集合.但是在一個INTERNET主機上你可能想要
使用SMAIL的建立-在BIND驅動.
在一個混合UUCP和TCP/IP的環境中,你可能遇到問題,你有主機在你的/ETC/HOST文件,你只是偶然連接
SLIP或者是PPP.要防止INET_HOSTS驅動遇到這些主機,你需要把他們放在PATH/FORCE文件中.這是另外
一個PATHALIAS風格的數據.並在SMAIL 詢問路由器之前被詢問.
本地地址的郵件處理的配置在路徑文件中.它的組成正象路由文件,有一個路徑的列表指定每一個路徑.
控制器不處理一個信息,它們只是顯示所有可能的重寄,例如通過匿名,郵件轉發或者類似.
當遞送郵件到一個本地地址,例如JANET,SMAIL傳送USR名字到所有順序的路徑.如果一個路徑符合,它或
者指定一個信息需要被遞送的傳送信息(例如,到用戶的郵箱文件),或者產生一個新的地址(例如,在評估
一個化名之).
因為涉及到安全問題,路徑通常做許多檢查他們使用的文件是否危害安全的動作.地址包含在一個不確定
的方式(例如從一個全球可寫的化名文件)被標記為不可靠.一些傳送驅動將關閉這樣的地址,例如那些遞
送一個信息到一個文件的傳送.
除了這之外,SMAIL還合作一個用戶使用一個各自的地址.用戶可以進行任何讀寫操作.例如JENET的郵箱,
遞送到的地址當然是JANET的地址.其他地址,例如那些從化名文件中得到的,有其他用戶,例如無人用戶.
這些特征的詳細內容,請參照SMAIL(8)主頁.
在成功路由或者引導一個信息之,SMAIL處理信息到相關的路由器或者控制器指定的傳送.同樣、,一個
傳送有一組全球和私人選項指定.
由每一個路徑指定的最為重要的選項處理傳送,例如管道驅動,它涉及到在CMD屬性中指定的命令.除了這
個,有許多全球屬性一個傳送可能用到,它在信息標題上顯示各種傳送,可能是信息主體.RETURN-PATH屬性,
例如,使傳輸插入一個RETURN-PATH區域到信息標題.UNIX-FROM-HACK屬性使他在所有單詞之前出現,有一
個 標志.
# A sample /usr/lib/smail/transports file
 
# local - deliver mail to local users
local:  driver=appendfile,        # append message to a file
        return_path,              # include a Return-Path: field
        from,                     # supply a From_ envelope line
        unix_from_hack,           # insert > before From in body
        local;                    # use local forms for delivery
 
        file=/var/spool/mail/${lc:user}, # location of mailbox files
        group=mail,               # group to own file for System V
        mode=0660,                # group mail can access
        suffix="\n",              # append an extra newline
 
# pipe - deliver mail to shell commands
pipe:   driver=pipe,              # pipe message to another program
        return_path,              # include a Return-Path: field
        from,                     # supply a From_ envelope line
        unix_from_hack,           # insert > before From in body
        local;                    # use local forms for delivery
 
        cmd="/bin/sh -c $user", # send address to the Bourne Shell
        parent_env,               # environment info from parent addr
        pipe_as_user,             # use user-id associated with address
        ignore_status,            # ignore a non-zero exit status
        ignore_write_errors,      # ignore write errors, i.e., broken pipe
        umask=0022,               # umask for child process
        -log_output,              # do not log stdout/stderr
 
# file - deliver mail to files
file:   driver=appendfile,
        return_path,              # include a Return-Path: field
        from,                     # supply a From_ envelope line
        unix_from_hack,           # insert > before From in body
        local;                    # use local forms for delivery
 
        file=$user,               # file is taken from address
        append_as_user,           # use user-id associated with address
        expand_user,              # expand ~ and $ within address
        suffix="\n",              # append an extra newline
        mode=0600,                # set permissions to 600
 
# uux - deliver to the rmail program on a remote UUCP site
uux:    driver=pipe,
        uucp,                     # use UUCP-style addressing forms
        from,                     # supply a From_ envelope line
        max_addrs=5,              # at most 5 addresses per invocation
        max_chars=200;            # at most 200 chars of addresses
 
        cmd="/usr/bin/uux - -r -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,           # have uucp logs contain caller
        log_output,               # save error output for bounce messages
#       defer_child_errors,       # retry if uux returns an error
 
# demand - deliver to a remote rmail program, polling immediately
demand: driver=pipe,
        uucp,                     # use UUCP-style addressing forms
        from,                     # supply a From_ envelope line
        max_addrs=5,              # at most 5 addresses per invocation
        max_chars=200;            # at most 200 chars of addresses
 
        cmd="/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,           # have uucp logs contain caller
        log_output,               # save error output for bounce messages
#       defer_child_errors,       # retry if uux returns an error
 
# hbsmtp - half-baked BSMTP. The output files must
#       be processed regularly and sent out via UUCP.
hbsmtp: driver=appendfile,
        inet,                     # use RFC 822-addressing
        hbsmtp,                   # batched SMTP w/o HELO and QUIT
        -max_addrs, -max_chars;   # no limit on number of addresses
 
        file="/var/spool/smail/hbsmtp/$host",
        user=root,                # file is owned by root
        mode=0600,                # only read-/writable by root.
 
# smtp - deliver using SMTP over TCP/IP
smtp:   driver=tcpsmtp,
        inet,
        -max_addrs, -max_chars;   # no limit on number of addresses
 
        short_timeout=5m,               # timeout for short operations
        long_timeout=2h,                # timeout for longer SMTP operations
        service=smtp,                   # connect to this service port
# For internet use: uncomment the below 4 lines
#       use_bind,                       # resolve MX and multiple A records
#       defnames,                       # use standard domain searching
#       defer_no_connect,               # try again if the nameserver is down
#       -local_mx_okay,                 # fail an MX to the local host
 
(http://www.fanqiang.com)
    進入【UNIX論壇

相關文章
網絡管理員指南 -21.簡單的 smail配置文件 (2001-07-20 11:00:00)
網絡管理員指南 -20.一個PLIP的零打印機電纜 (2001-07-20 10:08:00)
網絡管理員指南 -19.Newsreader配置 (2001-07-20 09:04:00)
網絡管理員指南 -18.NNTP描述 -5>Nntpd與C-News的接口 (2001-07-20 08:10:00)
網絡管理員指南 -18.NNTP描述 -4>NNTP授權 (2001-07-20 07:00:00)
網絡管理員指南 -18.NNTP描述 -3>限定NNTP訪問 (2001-07-19 22:08:00)
網絡管理員指南 -18.NNTP描述 -2>安裝NNTP服務器 (2001-07-19 21:04:00)
網絡管理員指南 -18.NNTP描述 -1>介紹 (2001-07-19 20:10:00)
網絡管理員指南 -17.C-News -9>維護工具可任務 (2001-07-19 19:00:01)
網絡管理員指南 -17.C-News -8>在一個NFS環境下的C-News (2001-07-19 18:08:00)

===更多相關===
 

★  樊強制作 歡迎分享  ★