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灯, 水草

请输入看板名称,例如:Tech_Job站内搜寻

TOP