SetupBBS 板


LINE

※ [本文轉錄自 shakalaca 看板] 作者: shakalaca (Lord Of The BBS :D) 看板: shakalaca 標題: [beta] BBS 收站外信件 時間: Mon Oct 20 11:57:38 2003 BBS 收站外信完全手冊 ==================== ※ 版本 2003.10.20 初稿 ※ 作者 Jian-Zhou Huang <[email protected]> ※ 參考文件 * php.twbbs.org / Plan: 看板 & php.twbbs.org / InstallBBS: 看板 & ※ 大綱 0) 操作環境 1) 使用 sendmail 2) 使用 postfix ※ 操作環境 下面的操作使用 FreeBSD 5.1, sendmail 已經內建, 而 postfix 使用 ports 安裝. 通常作業系統都已經內建 sendmail, 如果你想要使用 postfix 取代 sendmail, 可以在網路上找到不少中文的安裝文件, 在這邊就不多提了. :) 適用的 BBS 有: Maple 及其延伸版本 (PACK, WindTop) Ptt 系列 WD 系列 SOB 系列 Firebird 系列 ※ 使用 sendmail 設定 cf 檔的目錄在 /usr/share/sendmail/cf 顏色的說明如下: 1) 使用 Firebird 與 Ptt 系列只要加入白色部分. Firebird 請將 A=bbsmail $u 改為 A=bbsmail -d $u 2) 使用 SOB, Atlantis, WD 除了白色還要加入紅色部分. 3) 如果使用 MapleBBS 系列, 除了白色紅色, 請加入黃色部分. 有幾個地方要注意: 1) /home/bbs 請換成你的 BBS 家目錄 2) 欄位之間請用 tab 而非空白鍵 * 方法一: 利用 m4 切換到設定 cf 檔的目錄, 首先將下面的檔案存為 mailer/bbs.m4 ==========================[我是bbs.m4的分隔線]============================= PUSHDIVERT(-1) # # Copyright (c) 1999 Ying-Chieh Liao (ijliao). All rights reserved. # Copyright (c) 1998 Yen-Ming Lee (Leeym). All rights reserved. # # By using this file, you agree to the terms and conditions set # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # # ifdef(`BBSMAIL_PATH',, `define(`BBSMAIL_PATH', /home/bbs/bin/bbsmail)') ifdef(`BBSMAIL_FLAGS',, `define(`BBSMAIL_FLAGS', `lsSDFMhPu')') ifdef(`BBSMAIL_ARGS',, `define(`BBSMAIL_ARGS', `bbsmail')') ifdef(`MAILPOST_PATH',, `define(`MAILPOST_PATH', /home/bbs/bin/mailpost)') ifdef(`MAILPOST_FLAGS',, `define(`MAILPOST_FLAGS', `lsSDFMhPu')') ifdef(`MAILPOST_ARGS',, `define(`MAILPOST_ARGS', `mailpost')') POPDIVERT ################################# ### BBS Mailer specification ### ################################# VERSIONID(`@(#)bbs.m4 8.11 (ijliao) 1/22/1999') Mbbsmail, P=BBSMAIL_PATH, F=BBSMAIL_FLAGS, U=bbs, S=10, R=20/40, A=BBSMAIL_ARGS $u Mmailpost, P=MAILPOST_PATH, F=MAILPOST_FLAGS, U=bbs, S=10, R=20/40, A=MAILPOST_ARGS $u ==========================[我是bbs.m4的分隔線]============================= 再來修改 m4/proto.m4, 首先找到 Sparse=0 這個部分, 將後面的內容修改如下: Sparse=0 R$* $: $>Parse0 $1 initial parsing ifdef(`_MAILER_bbs_',`dnl Rbbs < @ $=w . > $#mailpost $: bbs mailpost for bbs Rbbsreg < @ $=w . > $#mailpost $: bbsreg mailpost for bbs R$+.bbs < @ $=w . > $#bbsmail $: $1 bbs mail gateway', `dnl') R<@> $#_LOCAL_ $: <@> special case error msgs R$* $: $>ParseLocal $1 handle local hacks R$* $: $>Parse1 $1 final parsing 同樣的檔案再往下找尋 "handle locally delivered names" 並修改後面的內容: # handle locally delivered names R$=L $#_LOCAL_ $: @ $1 special local names ifdef(`_MAILER_bbs_',`dnl Rbbs $#mailpost $: bbs mailpost for bbs Rbbsreg $#mailpost $: bbsreg mailpost for bbs R$+.bbs $#bbsmail $: $1 bbs mail gateway', `dnl') R$+ $#_LOCAL_ $: $1 regular local names 黃色就是你要增加的部分, 每一行都三個欄位, 欄位間的空白請用 tab 鍵. 接著去 /etc/mail, 將 freebsd.mc 拷貝為 你的hostname.mc, 比如說我這台 為 lion.ee.ncku.edu.tw, 則我的檔名便是 lion.ee.ncke.edu.tw.mc 修改該檔案, 在最後一行加入 MAILER(bbs) 儲存離開, 在 /etc/mail 目錄裡面執行 make 並重新啟動: # make install restart-mta * 方法二: 直接修改 sendmail.cf 找到你的 sendmail.cf 所在, 直接修改: 首先找到 Sparse=0 這一段, 將後方文字修改如下: Sparse=0 R$* $: $>Parse0 $1 initial parsing Rbbs < @ $=w . > $#mailpost $: bbs mailpost for bbs Rbbsreg < @ $=w . > $#mailpost $: bbsreg mailpost for bbs R$+.bbs < @ $=w . > $#bbsmail $: $1 bbs mail gateway R<@> $#local $: <@> special case error msgs R$* $: $>ParseLocal $1 handle local hacks R$* $: $>Parse1 $1 final parsing 接著往下 100 行左右, 找到 handle locally delivered names: # handle locally delivered names R$=L $#local $: @ $1 special local names Rbbs $#mailpost $: bbs mailpost for bbs Rbbsreg $#mailpost $: bbsreg mailpost for bbs R$+.bbs $#bbsmail $: $1 bbs mail gateway R$+ $#local $: $1 regular local names 最後是檔案的末端, 加入: Mbbsmail, P=/home/bbs/bin/bbsmail, F=lsSDFMhPu, U=bbs, S=10, R=20/40, A=bbsmail $u Mmailpost, P=/home/bbs/bin/mailpost, F=lsSDFMhPu, U=bbs, S=10, R=20/40, A=mailpost $u 然後重新啟動 sendmail: # /etc/rc.d/sendmail restart ※ 使用 postfix 假設設定檔案都在 /usr/local/etc/postfix/ 裡面, 而目前所在目錄就在那邊. 首先編輯 main.cf, 加入下面兩行: transport_maps = hash:/usr/local/etc/postfix/transport virtual_maps = pcre:/usr/local/etc/postfix/virtual 然後是 master.cf, 加入下面兩行: bbsmail unix - n n - - pipe flags=FR user=bbs argv=/home/bbs/bin/bbsmail $mailbox (接上行) mailpost unix - n n - - pipe flags=FR user=bbs argv=/home/bbs/bin/mailpost 接著編輯 transport: bbsmail bbsmail: mailpost mailpost: 以及 virtual, 假設我的 domain name 為 your.domain.name.here /^(.+)\.bbs@your\.domain\.name\.here$/ $1bbsmail. /^bbs(reg)?@your\.domain\.name\.here$/ bbs@mailpost. 然後產生 hash 檔案: # postmap hash:/usr/local/etc/postfix/transport 最後重新載入設定檔: # postfix reload 這樣子就行了. 同樣注意, Firebird 與 Ptt 只要加入 bbsmail 那部份即可. -- 我的簽名檔只有十個字. -- ^..^ < 豬 頭 紀 公 園 - php.twbbs.org (140.113.208.200) > -w @@ w-- < bittern.csie.nctu.edu.tw >







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Boy-Girl站內搜尋

TOP