CONTENTS
#contents
----
Lastmodified &lastmod;
----

*Mailmanのインストール [#kcf1d8a2]
本家、[[菊地時夫:]]先生のサイトのインストールマニュアルはこちら~
本家.菊地時夫先生のサイトのインストールマニュアルはこちら
+[[portsでインストール>#oe512e9c]]
+[[Mailmanのチェック>#x9399738]]
+[[Apacheとの接続>#nd16424e]]
+[[Postfixとの接続>#r316984c]]
+[[mailmanの設定>#r4270433]]

**portsでインストール 2013/10/20 [#e0ece436]

 # portinstall japanese/mailman
&ref(mailman_install.PNG);

以前は、

 # cd /usr/ports/japanese/mailman --> portinstall mail/mailman -m "MAIL_GID=mailman" "CGI_GID=www"
 # make MAIL_GID=mailman CGI_GID=www install -->or? portinstall -m "MAIL_GID=mailman" "CGI_GID=www" mail/mailman 

みたいな事をしていた様なので、ちょっと、/usr/ports/japanese/mailman/Makefile をみると、今(2013/10/20)ではPostfix にチェックすると、MAIL_GID=mailman CGI_GID=www となるようです。

 ----------------------------------------------------------------------------
 Mailman has been installed, but requires further configuration before use!
 
 You will have to configure both your MTA (mail server) and web server to
 integrate with Mailman.  If the port's documentation has been installed,
 extensive post-installation instructions may be found in:
 
   /usr/local/share/doc/mailman/FreeBSD-post-install-notes
 
 Note (1):  If you use an alternate (non-Sendmail) MTA, you MUST be sure
 that the correct value of MAIL_GID was used when this port or package
 was built.  Performing a "make config" in the Mailman port directory
 you can choose your MTA with the correct MAIL_GID.
 
 Note (2):  The entire Mailman installation resides under /usr/local/mailman
 The command-line scripts necessary to administer Mailman have been
 installed in /usr/local/mailman/bin
 
 Note (3):  As of version 2.1, Mailman's queue runner runs as a daemon and
 is started by a script in /usr/local/etc/rc.d
 
 In order to make private archives searchable with namazu2, you need copy
 or link /usr/local/libexec/namazu.cgi to
 /usr/local/mailman/archives/private/<ML name>/ and configure .namazurc
 to refer to /usr/local/etc/namazu/namazu-sample.
 See also
 http://www.python.jp/pipermail/mailman-users-jp/2004-August/001008.html
 written in Japanese.
 ----------------------------------------------------------------------------
 
 Your Postfix hostname is non-default.
 You must add "SMTPHOST = g7.kuji-clinic.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.j7,1
 ===> SECURITY REPORT:
       This port has installed the following binaries which execute with
       increased privileges.
 /usr/local/mailman/cgi-bin/create
 /usr/local/mailman/cgi-bin/subscribe
 /usr/local/mailman/mail/mailman
 /usr/local/mailman/cgi-bin/listinfo
 /usr/local/mailman/cgi-bin/rmlist
 /usr/local/mailman/cgi-bin/options
 /usr/local/mailman/cgi-bin/private
 /usr/local/mailman/cgi-bin/admindb
 /usr/local/mailman/cgi-bin/edithtml
 /usr/local/mailman/cgi-bin/roster
 /usr/local/mailman/cgi-bin/admin
 /usr/local/mailman/cgi-bin/confirm
 
       If there are vulnerabilities in these programs there may be a security
       risk to the system. FreeBSD makes no guarantee about the security of
       ports included in the Ports Collection. Please type 'make deinstall'
       to deinstall the port if this is a concern.
 
       For more information, and contact details about the security
       status of this software, see the following webpage:
 http://www.python.jp/doc/contrib/mailman/releases.html
 ===>  Cleaning for ja-mailman-2.1.14.j7,1

インストール直後では、mailman ユーザが反映されておらず、

 mailman:*:91:91::0:0:Mailman User:/usr/local/mailman:/usr/sbin/nologin

一度、reboot.

取り敢えず、/usr/local/mailman 以下のオーナをmailmanに

 chown -R mailman:mailman /usr/local/mailman/

**Mailmanのチェック [#x9399738]
 # cd /usr/local/mailman
 # bin/check_perms -f
   または、
 # /usr/local/mailman/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

ということで、
 # chown www /usr/local/mailman/archives/private
 # chmod o-x /usr/local/mailman/archives/private
して、
 # /usr/local/mailman/bin/check_perms -f
 すると、
 No problems found

 # vi /usr/local/mailman/Mailman/mm_cfg.py
 最期の行に

 #################################################
 DEFAULT_SUBJECT_PREFIX = '[%(real_name)s:%%d]'
 OWNERS_CAN_ENABLE_PERSONALIZATION = Yes
 OWNERS_CAN_DELETE_THEIR_OWN_LISTS = Yes
 DEFAULT_EMAIL_HOST = 'g7.kuji-clinic.net'
 DEFAULT_URL_HOST = 'g7.kuji-clinic.net'
 "$SMTPHOST = g7.kuji-clinic.net"
 add_virtualhost('210.255.122.215','210.255.122.215')
 add_virtualhost('sns.kuji-clinic.net','sns.kuji-clinic.net')

を加える。

Mailmanのインストールの後、メールサーバとウエッブサーバへの接続をする。

**Apacheとの接続 [#nd16424e]

 cp /usr/local/mailman/icons/* /webのtop-pageのディレクトリ/icons/
 
 mkdir /usr/local/www/apache22/data/icons
 cp /usr/local/mailman/icons/* /usr/local/www/apache22/data/icons/

 vi /usr/local/etc/apache22/httpd.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>

 
 apachectl configtest
 apachectl restart
 


http://www.nw.is.kyusan-u.ac.jp/xoops/modules/bwiki/index.php?FreeBSD%2FMailServerSetup

**Postfixとの接続 [#r316984c]
 # 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 stop
 postfix start


**mailmanの設定 [#r4270433]
 # vi /usr/local/mailman/Mailman/mm_cfg.py
 
 DEFAULT_SERVER_LANGUAGE = 'ja'
 DEFAULT_EMAIL_HOST = 'mail.hogehoge.jp'
 DEFAULT_URL_HOST = 'www.hogehoge.jp'
 MTA = 'Postfix'
 
 bin/genaliases スクリプトを実行して aliases ファイルを初期化してください. 
 # cd /usr/local/mailman
 # bin/genaliases
 
 # chown mailman:mailman data/aliases*
 # chmod g+w data/aliases*

 つづいてサイト全体のリストを作成。
 # bin/newlist mailman
 Enter the email of the person running the list: kuji@smb.net
 Initial mailman password:
 Hit enter to notify mailman owner... 

 ★サイトのパスワードを変更するには、
 /usr/local/mailman/bin/mmsitepass  コマンドで変更 


http://mm.tkikuchi.net/mailman-install/node40.html

**mailman起動 [#o5007d5e]
 /usr/local/mailman/bin/mailmanctl start

 起動時に自動起動するには /etc/rc.conf
 mailman_enable="YES"
 を記述
***Mailmanで最初のリストを作成する [#f674ceee]
URL http://210.255.122.220/mailman/create を開いてください. 
----
http://www.voyager.gr.jp/~sampei/freebsd/mailman.html

*bin/rmlist sinonome48 [#ibabd866]
 hotshot# bin/rmlist sinonome48
 Not removing archives.  Reinvoke with -a to remove them.
 /usr/sbin/postmap: not found
 Traceback (most recent call last):
  File "bin/rmlist", line 161, in <module>
    main()
  File "bin/rmlist", line 122, in main
    sys.modules[modname].remove(mlist)
  File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 310, in remove
    _update_maps()
  File "/usr/local/mailman/Mailman/MTA/Postfix.py", line 60, in _update_maps
    raise RuntimeError, msg % (vcmd, status, errstr)
 RuntimeError: command failed: /usr/sbin/postmap /usr/local/mailman/data/virtual-mailman (status: 127, Unknown error: 127)
 hotshot#

 hotshot# locate postmap
 /usr/Backups/hotshot/usr/local/man/man1/postmap.1.gz
 /usr/Backups/hotshot/usr/local/sbin/postmap
 /usr/Backups/hotshot/usr/local/share/doc/postfix/postmap.1.html
 /usr/local/man/man1/postmap.1.gz
 /usr/local/sbin/postmap
 /usr/local/share/doc/postfix/postmap.1.html
 hotshot#

 hotshot# ln -s /usr/local/sbin/postmap /usr/sbin/

 hotshot# bin/rmlist sinonome48
 Not removing archives.  Reinvoke with -a to remove them.
 Removing list info
 hotshot#




*Error Undelivered Mail Returned to Sender [#e982931c]
2012/08/30
                   The mail system
 
 <sns_rs_base@k222.kuji-clinic.net>: Command died with status 2:
    "/usr/local/mailman/mail/mailman post sns_rs_base". Command output: Group
    mismatch error.  Mailman expected the mail wrapper script to be executed as
    group "nobody", but the system's mail server executed the mail script as
    group "mailman".  Try tweaking the mail server to run the script as group
    "nobody", or re-run configure,  providing the command line option
    `--with-mail-gid=mailman'.

というエラー。

/usr/ports/japanese/mailman

で、
 # make deinstall 
 # make rmconfig
 # portinstall japanese/mailman
として、postfix integrate と postfix にチェックをいれて、再度インストール、でOK


----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS