CONTENTS


Lastmodified 2020-06-30 (火) 11:34:51


Mailman Customize

japanese/mailman をカスタマイズして、書き換えた・追加したファイルのメモ

portupgrade -r すると、

Your Postfix hostname is non-default.
You must add "SMTPHOST = piano2nd.smb.net" to the bottom of mm_cfg.py.

言われる

portupgradeなどで影響を受けそうなファイル達・・・

Mailman Anonymouse List

「通し番号」の自動更新??

http://piano2nd.smb.net/~kuji/pukiwiki-1.4.7/index.php?Mailman%20Tips%202#v062918a

/usr/local/mailman/bin/set_post_id.py   ← Mailmanには無いファイルなので、UPGradeしても上書きされません

fileset_post_id.py_mod

Anonymouse List の From: へ「(氏名)Full_name」を表示したい

http://piano2nd.smb.net/~kuji/pukiwiki-1.4.7/index.php?Mailman%20Anonymouse%20List#w50ae22f

/usr/local/mailman/Mailman/Handlers/Cleanse.py_TFC 
/usr/local/mailman/Mailman/Handlers/Cleanse.py      コレは上書きされるので差分を置いておくヨロシ
/usr/local/mailman/Mailman/Handlers/Cleanse.py_dist

fileCleanse.py_mod

さらに、配信時にCcと Toを消去する、クロスポスト対策版

fileCleanse.py_mod_FC

重要マーク付きで投稿されたメールの重要マークを除去する

Cleanse.pyを編集

del msg['X-Priority']
del msg['Importance']
del msg['X-MSMail-Priority']

のヘッダを除去する

 
# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
# NAGAE version
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.

"""Cleanse certain headers from all messages."""

import re

from email.Utils import formataddr

from Mailman.Utils import unique_message_id
from Mailman.Logging.Syslog import syslog
from Mailman.Handlers.CookHeaders import uheader


def process(mlist, msg, msgdata):
    # Always remove this header from any outgoing messages.  Be sure to do
    # this after the information on the header is actually used, but before a
    # permanent record of the header is saved.
    del msg['approved']
    # Remove this one too.
    del msg['approve']
    # And these too.
    del msg['x-approved']
    del msg['x-approve']
    # Also remove this header since it can contain a password
    del msg['urgent']
    # We remove other headers from anonymous lists
    if mlist.anonymous_list:
        syslog('post', 'post to %s from %s anonymized',
               mlist.internal_name(), msg.get('from'))
        del msg['X-Priority']
        del msg['Importance']
        del msg['X-MSMail-Priority']
        del msg['from']
        del msg['to']
        del msg['cc']
        del msg['reply-to']
        del msg['sender']
        del msg['return-path']
        # Hotmail sets this one
        del msg['x-originating-email']
        # And these can reveal the sender too
        del msg['received']
        # And so can the message-id so replace it.
        del msg['message-id']
        msg['Message-ID'] = unique_message_id(mlist)

        for sender in msg.get_senders():
            if mlist.isMember(sender):
                break
        else:
            sender = msg.get_sender()
        i18ndesc = str(uheader(mlist, mlist.getMemberName(sender), 'From'))
        if i18ndesc == '':
            i18ndesc = str(uheader(mlist, mlist.description, 'From'))
        msg['From'] = formataddr((i18ndesc, mlist.GetListEmail()))

        msg['Reply-To'] = mlist.GetListEmail()
        uf = msg.get_unixfrom()
        if uf:
            uf = re.sub(r'\S*@\S*', mlist.GetListEmail(), uf)
            msg.set_unixfrom(uf)
    # Some headers can be used to fish for membership
    del msg['return-receipt-to']
    del msg['disposition-notification-to']
    del msg['x-confirm-reading-to']
    # Pegasus mail uses this one... sigh
    del msg['x-pmrqc']

Gmail対策

http://piano2nd.smb.net/~kuji/pukiwiki-1.4.7/index.php?cmd=read&page=Gmail%E5%AF%BE%E7%AD%96%EF%BC%9F&word=cook

/usr/local/mailman/Mailman/Handlers/CookHeaders.py_Gmail
/usr/local/mailman/Mailman/Handlers/CookHeaders.py    これも、上書きされるアル
/usr/local/mailman/Mailman/Handlers/CookHeaders.py_dist

fileCookHeaders.py_Gmail_mod

fileCookHeaders.py_mod

portupgrade -f japanese/mailman

Mailman on FreeBSD


Total access 2179:本日 2:昨日 1

Counter: 2179, today: 2, yesterday: 1

添付ファイル: fileCleanse.py_mod_FC 424件 [詳細] fileCookHeaders.py_Gmail_mod 469件 [詳細] fileCookHeaders.py_mod 483件 [詳細] fileCleanse.py_mod 471件 [詳細] fileset_post_id.py_mod 441件 [詳細]

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2020-06-30 (火) 11:34:51