Skip navigation.

FLY's Blog

メモ帳代わりに日記でも・・・

MailMan -(ハイフン)の入ったアドレスを登録する方法

,

Mailmanを使ってメーリングリストを構築しているんだけど、
アドレスに-(ハイフン)の入っているアドレスが登録できなくて、それをどうにかして登録できるようにする方法を探してみました。

まずはMailmanの設定で-(ハイフン)の入っているアドレスと登録できるようにします。
これはサーバによって場所が異なります。

普通は/usr/local/mailman/Mailman/Utils.pyを変更するんだけど、
ない!!! 何で、ないんだろう??
X-serveで作っていると場所が違うらしい調べてみると/usr/share/mailman/Mailman/Utils.pyらしい、

_badchars = re.compile('[][()<> |;^,]')

def ValidateEmail(s):
    """Verify that the an email address isn't grossly invalid."""
    # Pretty minimal, cheesy check.  We could do better...
    if not str:
        raise Errors.MMBadEmailError
    if _badchars.search(s) or str[0] == '-':
        raise Errors.MMHostileAddress
    if string.find(s, '/') <>  -1 and        os.path.isdir(os.path.split(s)[0]):
        # then
        raise Errors.MMHostileAddress
    user, domain_parts = ParseEmail(s)

ここの
if _badchars.search(s) or str[0] == '-':

if _badchars.search(s):
に変更すれば登録できるようになる。

登録が終わっても-(ハイフン)が入っているとPostfix側が送信しないようにするらしい
なのでこれを送信できるようにします。
これは-をついている場合コマンドのオプションに間違えないようにするためらしい。

/etc/postfix/main.cfに以下の分を追記します。
allow_min_user = yes

これでpostfixを再起動すると-(ハイフン)が入っていても送れるようになるらしい。。。
でもまだできてないんで、できたらまた書きます。

参考サイト
タイトルをコロコロ変えると捕捉されづらくなるよね日記
Postfix チュートリアル
ITメディアエンタープライズ


fmlメーリングリスト管理
梅垣 まさひろ 寺村 綾子
オーム社 (2000/06)
売り上げランキング: 239886
おすすめ度の平均: 3.0
3 もう少しっ

メー言―メールで送る名言集
DECO
東京書籍 (2004/05)
売り上げランキング: 253603
おすすめ度の平均: 4.5
5 ソフトな名言とか格言とかの本です。
5 携帯電話が無かったら生まれてなかった名言集
4 幅広いね!


関連記事
MY OPERA 500 Internal Server Error
プロキシサーバ構築 -Squid-
MY OPERA ブログがFirefoxでみるとスタイルがずれている。
ニコニコ動画で「すでにログインしています」と出てログインできないしyoutube見れねー
Flash playerの不具合をなおす Opera,Firefox,Mozilla,Netscape
Thunderbird(サンダーバード)データ移行方法vistaとXP

少年の悶絶雑炊

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

Download Opera, the fastest and most secure browser
January 2010
S M T W T F S
December 2009February 2010
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30