[[Mailman データーの移行]] #contents *Mailman-2.1.14+j6 install [#y0c0ee7e] Mailman-2.1.14+j6をDL http://www.python.jp/doc/contrib/mailman/index.html http://www.python.jp/doc/contrib/mailman/mailmaninstall.html DLしたMailman-2.1.14+j6.tgz を /usr/local/Mailman-2.1.14+j6.tgz において、解凍すると、/usr/local/mailman-2.1.14+j6 フォルダへ展開される。 /usr/local/mailman-2.1.14+j6 ./configure /usr/local/mailman/bin/mailmanctl stop cd /usr/local/mailman-2.1.14+j6/ make install guard# bin/check_perms -f Warning: Private archive directory is other-executable (o+x). This could allow other users on your system to read private archives. If you're on a shared multiuser system, you should consult the installation manual on how to fix this. No problems found guard# chown www /usr/local/mailman/archives/private guard# chmod o-x /usr/local/mailman/archives/private cd /usr/local/mailman-stop guard# cp -rp _Kuji /usr/local/mailman/ guard# cp -rp archives /usr/local/mailman/ guard# cp -rp lists /usr/local/mailman/ guard# cp -rp data /usr/local/mailman/ guard# cp -rp logs /usr/local/mailman/ guard# cp Mailman/mm_cfg.py /usr/local/mailman/Mailman/ directory permissions must be 02775: /usr/local/mailman/archives_dist/private (fixing) Problems found: 1 Re-run as mailman (or root) with -f flag to fix guard# bin/check_perms -f No problems found **通し番号のカスタマイズ [#w8476680] /usr/local/mailman/bin/set_post_id.py import time def set_post_id(m): today = time.strftime('%y%m%d', time.localtime()) m.post_id = float(int(today, 10) * 1000) + 1 m.Save() ** [#f9e79160] 1./usr/local/mailman/bin/mailmanctl stop でmailmanを停止。 2.ダウンロードした mailman-2.1.14+j6 を /usr/local/mailman-2.1.14+j6 へ展開 3../configure の後、make install 4.待避していた旧mailman から、以下のファイルを /usr/local/mailman/ へコピー # cp -rp _Kuji /usr/local/mailman/ # cp -rp archives /usr/local/mailman/ # cp -rp lists /usr/local/mailman/ # cp -rp data /usr/local/mailman/ # cp -rp logs /usr/local/mailman/ # cp Mailman/mm_cfg.py /usr/local/mailman/Mailman/ 5.mm_cfg.py は、コメント部分を省略しますが、以下の様にしています。 ──────────────────────────────────── # -*- python -*- ############################################### # Here's where we get the distributed defaults. from Defaults import * ################################################## # Put YOUR site-specific settings below this line. DEFAULT_SERVER_LANGUAGE = 'ja' GLOBAL_PIPELINE.insert(1, 'iso2022jpfix') "$SMTPHOST = mail.server.name" MTA = 'Postfix' POSTFIX_STYLE_VIRTUAL_DOMAINS = ['Virtual_Domain_Name'] add_virtualhost('Virtual_Host_Name','Virtual_Host_Name') OWNERS_CAN_ENABLE_PERSONALIZATION = Yes #GLOBAL_PIPELINE.insert(0,'behave') ──────────────────────────────────── 6.Anonymouse List の From: へ「(氏名)Full_name」を表示するために、以下の様な方法をとっています。 ──────────────────────────────────── --- Cleanse.py_dist 2011-10-30 07:02:40.000000000 +0900 +++ Cleanse.py 2011-10-30 07:03:40.000000000 +0900 @@ -1,5 +1,5 @@ -# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. -# +# 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 @@ -53,8 +53,17 @@ # 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: ────────────────────────────────────