sleepingbird.net Home since May.11 2003
Copyright sleepingbird, 1993- All rights reserved.
Linux Server

TOP > Linux Server > MailingList > メールアドレスの隠蔽(SPAM 対策)

メールアドレスの隠蔽(SPAM 対策)

 メーリングリストの案内ページに管理者のメールアドレスがそのまま掲載されているため、最近 SPAM が多く届くようになった。確認してみるとメーリングリストのアドレスも不用心に掲載されている。対策が後手になってしまったが一応これらのアドレスを表示しないようにしておく。

 まず、トップページに掲載されている mailman@ドメイン名 を隠す。

# su - mailman
$ cd /usr/local/mailman/Mailman/Cgi
$ vi listinfo.py

    welcome.extend(
        (_(''' To visit the general information page for an unadvertised list,
        open a URL similar to this one, but with a '/' and the %(adj)s
        list name appended.
        <p>List administrators, you can visit '''),
         Link(Utils.ScriptURL('admin'),
              _('the list admin overview page')),
         _(''' to find the management interface for your list.
         <p>If you are having trouble using the lists, please contact '''),
         Link('mailto:' + siteowner, siteowner),
         '.<p>'))
 下から2行目の行を削除してリンクを切る。ついでに最後の行のピリオドを取る。
    welcome.extend(
        (_(''' To visit the general information page for an unadvertised list,
        open a URL similar to this one, but with a '/' and the %(adj)s
        list name appended.
        <p>List administrators, you can visit '''),
         Link(Utils.ScriptURL('admin'),
              _('the list admin overview page')),
         _(''' to find the management interface for your list.
         <p>If you are having trouble using the lists, please contact '''),
         '<p>'))
 このままだと文言の整合性が無くなるので次を書き換える。
$ cd /usr/local/mailman/messages/ja/LC_MESSAGES
$ vi mailman.po

msgid ""
" to find the management interface for your list.\n"
"         <p>If you are having trouble using the lists, please contact "
msgstr ""
" で自分の管理ページを探してください.\n"
"<p>リストの利用に関するトラブルは, 次の宛先に連絡してください: "
 内容は随意に。
msgid ""
" to find the management interface for your list.\n"
"         <p>If you are having trouble using the lists, please contact "
msgstr ""
" で自分の管理ページを探してください.\n"
"<p>リストの利用に関するトラブルは, サイト管理人に連絡してください: "
 言語ファイルを .mo ファイルに変換して変更を反映させる。
$ msgfmt -o mailman.mo mailman.po
 各メーリングリスト案内ページのリストアドレスへの mailto リンクをはずす。
 メーリングリストの管理ページから「公開 HTML ページとテキストファイルを編集する」を選択し、「リスト総合案内ページ」を編集する。
        <td colspan="2">
          メーリングリストの全会員に送るメールは, 
          <A HREF="mailto:<MM-Posting-Addr>"><MM-Posting-Addr></A>
          のアドレス宛に送信してください.
 ここのリンクを削除する。
        <td colspan="2">
          メーリングリストの全会員に送るメールは, 
          <MM-Posting-Addr>
          のアドレス宛に送信してください.
 なお、/usr/local/mailman/templates/ja/listinfo.html が新規にリストを作成したときのテンプレートになっているのでこれも変更しておく。
 同じページのフッターの部分にメーリングリスト管理人へのメールリンクがあるので修正する。
$ cd /usr/local/mailman/Mailman
$ vi HTMLFormatter.py

        owner_link = Link('mailto:' + self.GetOwnerEmail(), ownertext).Format()
          
        owner_link = Link('http://www.sleepingbird.net/mail/cmfmail.cgi', ownertext).Format()