[[Mailman-2.1.14+j7 install ]]

Python 2.7 ではエラー

mailmanのソースを、gid などをセットした/usr/lodal/mailmanフォルダを作ったりするなどして、

./configure

が目出度く通ったので、いざ

piano2nd# make install
Creating architecture independent directories...
Creating directory hierarchy /usr/local/mailman/logs
mkdir /usr/local/mailman/logs
mkdir /usr/local/mailman/cgi-bin
Creating directory hierarchy /usr/local/mailman/mail
mkdir /usr/local/mailman/mail
for f in mmsitepass newlist rmlist add_members  list_members remove_members clone_member update arch  sync_members check_db withlist check_perms find_member  version config_list list_lists dumpdb cleanarch  list_admins genaliases change_pw mailmanctl qrunner inject  unshunt fix_url.py convert.py transcheck b4b5-archfix  list_owners msgfmt.py show_qfiles discard rb-archfix  reset_pw.py export.py;  do  /usr/bin/install -c -m 755 ../build/bin/$f /usr/local/mailman/bin;  done
for f in crontab.in;  do  /usr/bin/install -c -m 644 $f /usr/local/mailman/cron;  done
for f in checkdbs mailpasswds senddigests gate_news  nightly_gzip bumpdigests disabled cull_bad_shunt;  do  /usr/bin/install -c -m 755 ../build/cron/$f /usr/local/mailman/cron;  done
for i in ./*.jpg ./*.png ./*.ico;  do  /usr/bin/install -c -m 644 $i /usr/local/mailman/icons;  done
for d in bin cron scripts tests;  do  dir=/usr/local/mailman/$d;  /usr/bin/install -c -m 644 paths.py $dir;  done
/usr/bin/install -c -m 755 mailman /usr/local/mailman/scripts
/usr/bin/install -c -m 644 sitelist.cfg /usr/local/mailman/data
if [ -z "email-4.0.3+j" -a -d /usr/local/mailman/pythonlib/email ] ;  then  rm -rf /usr/local/mailman/pythonlib/email* ;  fi
for p in email-4.0.3+j   pykf-0.3.4;  do  gunzip -c ./$p.tar.gz | (cd . ; tar xf -);  (cd ./$p ; umask 02 ; PYTHONPATH=/usr/local/mailman/pythonlib /usr/local/bin/python setup.py --quiet install --install-lib /usr/local/mailman/pythonlib  --install-purelib /usr/local/mailman/pythonlib  --install-data /usr/local/mailman/pythonlib);  done
In file included from src/pykf.c:30:
/usr/local/include/python2.7/Python.h:166:17: error: pth.h: No such file or directory
error: command 'cc' failed with exit status 1
*** Error code 1

Stop in /usr/local/mailman-2.1.14+j7/misc.
*** Error code 1

Stop in /usr/local/mailman-2.1.14+j7.
piano2nd#
piano2nd#
piano2nd#
piano2nd#

とあえなく撃沈 python 2.7 から 2.6へダウンしる。結局2.5まで下げておk(´д`)

Mailman-2.1.14+j7スクラッチインストール

DLしたMailman-2.1.14+j7.tgz を /usr/local/Mailman-2.1.14+j7.tgz において、解凍すると、/usr/local/mailman-2.1.14+j7 フォルダへ展開される。

cd mailman-2.1.14+j7 
blackcube# ./configure
checking for --with-python... no
checking for python... /usr/local/bin/python
checking Python interpreter... /usr/local/bin/python
checking Python version... 2.7.2
checking Python's email package... not ok
checking Japanese codecs... ok
checking Korean codecs... ok
checking pykf... not ok
checking that Python has a working distutils... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for true... /usr/bin/true
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether #! works in shell scripts... yes
checking for --with-var-prefix... no
checking for --with-permcheck... yes
checking for --with-username... mailman
checking for user name "mailman"... configure: error:
***** No "mailman" user found!
***** Your system must have a "mailman" user defined
***** (usually in your /etc/passwd file).  Please see the INSTALL
***** file for details.

といってエラーするので、

portinstall japanese/mailman

した。

----------------------------------------------------------------------------

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

===> Correct pkg-plist sequence to create group(s) and user(s)
===>   Registering installation for ja-mailman-2.1.14_5

だそうだ。で、もっぺん、、/usr/local/mailman-2.1.14+j7で、

blackcube# ./configure
checking for --with-python... no
checking for python... /usr/local/bin/python
checking Python interpreter... /usr/local/bin/python
checking Python version... 2.7.2
checking Python's email package... not ok
checking Japanese codecs... ok
checking Korean codecs... ok
checking pykf... not ok
   略
config.status: creating build/cron/nightly_gzip
config.status: creating build/cron/senddigests
config.status: executing default commands
configuration completed at Tue Dec 13 13:02:14 JST 2011
blackcube#

でおk。で、portinstall した mailman を mailman_portinstalled へmv

drwxr-xr-x  14 root     wheel        1024 Dec 13 13:02 mailman-2.1.14+j7
-rw-r--r--   1 root     wheel     8679318 Dec 13 12:25 mailman-2.1.14+j7.gz
drwxrwsr-x  20 mailman  mailman       512 Dec 13 12:59 mailman_portinstalled

で,

make install
drwxr-xr-x  20 root     wheel         512 Dec 13 13:08 mailman
drwxr-xr-x  14 root     wheel        1024 Dec 13 13:02 mailman-2.1.14+j7
-rw-r--r--   1 root     wheel     8679318 Dec 13 12:25 mailman-2.1.14+j7.gz
drwxrwsr-x  20 mailman  mailman       512 Dec 13 12:59 mailman_portinstalled

となりまつ。

blackcube# chown -R mailman:mailman mailman
blackcube# cd mailman
blackcube# ll
blackcube# bin/check_perms -f
blackcube# chown www /usr/local/mailman/archives/private
blackcube# chmod o-x /usr/local/mailman/archives/private
blackcube# bin/check_perms -f
No problems found

Apacheとの接続

/usr/local/etc/apache22/Includes/mailman.conf

<IfModule alias_module>
ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/" 
Alias /pipermail/ "/usr/local/mailman/archives/public/"
</IfModule>

<Directory "/usr/local/mailman">
 Options FollowSymLinks ExecCGI
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>
blackcube# apachectl configtest
Syntax OK
blackcube# apachectl restart
blackcube#

Postfixとの接続

# vi /usr/local/etc/postfix/main.cf

alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases

↓(変更する)↓

alias_maps = hash:/etc/mail/aliases,
      hash:/usr/local/mailman/data/aliases <--行頭にTABをいれる
alias_database = hash:/etc/mail/aliases, hash:/usr/local/mailman/data/aliases

owner_request_special = no
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
postfix reload

mailmanの設定

# Put YOUR site-specific settings below this line.
DEFAULT_SERVER_LANGUAGE = 'ja'
DEFAULT_EMAIL_HOST = 'mail.smb.net'
DEFAULT_URL_HOST = 'www.smb.net'
MTA = 'Postfix'
USE_MAILMAN_MESSAGE_ID = Yes 
"SMTPHOST = blackcube.smb.net"

mailmanで新しいリストを作る

bin/genaliases スクリプトを実行して aliases ファイルを初期化しようとすると

blackcube# bin/genaliases
/usr/sbin/postalias: not found
Traceback (most recent call last):
 File "bin/genaliases", line 124, in <module>
   main()
 File "bin/genaliases", line 118, in main
   MTA.create(None, quiet=True)
 File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 241, in create
   _update_maps()
 File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 53, in _update_maps
   raise RuntimeError, msg % (acmd, status, errstr)
RuntimeError: command failed: /usr/sbin/postalias /usr/local/mailman/data/aliases (status: 127, Unknown error: 127)

また、新しいリストを作ろうとして、

blackcube# bin/newlist mailman
Enter the email of the person running the list: kuji@smb.net
Initial mailman password:
/usr/sbin/postalias: not found
Traceback (most recent call last):
 File "bin/newlist", line 259, in <module>
   main()
 File "bin/newlist", line 226, in main
   sys.modules[modname].create(mlist)
 File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 241, in create
   _update_maps()
 File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 53, in _update_maps
   raise RuntimeError, msg % (acmd, status, errstr)
RuntimeError: command failed: /usr/sbin/postalias /usr/local/mailman/data/aliases (status: 127, Unknown error: 127)
blackcube#

/usr/sbin/postalias が無い!といって止まる。確かに/usr/sbin/postalias はなくて、/usr/local/sbin/postalias はある。ので、

hotshot# ln -s /usr/local/sbin/postalias /usr/sbin/postalias
blackcube# ln -s /usr/local/sbin/postalias postalias

する。


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS