【 以下文字转载自 fbFPUG 讨论区 】
【 原文由 Harimau.bbs@dragon.seed.net.tw 所发表 】
1. 由于 bbs 只能收纯文件的信件, 因此挡掉所有不是纯文件的信, 包括有 attachment
的, rtf 格式的, 有病毒的, ... 等等。
根据 rfc, 信件的 content type 有两种, 就是 text 和 multipart。因此, 我们
只接受 text 而挡掉所有 multipart。
在 sendmail.cf 寻找 "REWRITING RULES" 字串, 上面可看到:
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>
在此加上这几行 (注意 "$#error" 前面要用 tab 不能用 space):
HContent-Type: $>check_content_type
HX-Mailer: $>check_mailer
Scheck_content_type
Rmultipart $* $#error $: 553 We only accept plain text email
Scheck_mailer
D{Msg_mailer}"553 SPAMBOT is not allowed here."
RLightningMail$+ $#error $: ${Msg_mailer}
RMailKing$+ $#error $: ${Msg_mailer}
R<WC Mail> $#error $: ${Msg_mailer}
R<Microsoft Outlook Express 4.72.3110.5> $#error $: ${Msg_mailer}
RThe Bat! ($+) $+ $#error $: ${Msg_mailer}
--
FROM feeling.dhs.org