Mailman環境の構築
以下の環境で構築を行います。
| OS | CentOS 2.6.18-53.1.14.el5 | 
| hostname | ml01.local | 
| IP | 192.168.1.100 | 
| Postfix | postfix.i386 2.2.3.3-2 | 
| Dovecot | dovecot3.0.5 | 
| Mailman | mailman-2.1.7 | 
| Httpd | httpd-3.0.5 | 
| Python | python2.1以降2.3推奨 | 
1)Postfix
インストール
# yum -y install postfix
設定
| # vi /etc/postfix/main.cf | |
| myhostname = testfs01.local | 追加(時FQDN名を指定) | 
| myorigin = $mydomain | 追加(ローカルからのメール送信時の送信元 | 
| inet_interfaces = all | メールアドレス@以降にドメイン名を付加) | 
| inet_interfaces = all | 変更(外部からのメール受信を許可) | 
| mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain | |
| 変更(自ドメイン宛メールを受信できるようにする) | |
| home_mailbox = Maildir/ | 追加(メールボックス形式をMaildir形式にする) | 
| smtpd_banner = $myhostname ESMTP unknown | 追加(メールサーバーソフト名の隠蔽化) | 
| □ 以下を最終行へ追加(SMTP-Auth設定) | |
| smtpd_sasl_auth_enable = yes | |
| smtpd_sasl_local_domain = $myhostname | |
| smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination | |
| □ 以下を最終行へ追加(SMTP-Auth設定) | |
| message_size_limit = 10485760 | 受信メールサイズを10MB=10x1024x1024Bに制限 | 
- SMTP-Auth用ユーザー名、パスワードにシステムのユーザ名、パスワードを使用する場合(使用しない場合は省略) 
# /etc/rc.d/init.d/saslauthd start # chkconfig saslauthd on # chkconfig --list saslauthd saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 
- SMTP-Authユーザ名、パスワードをシステムユーザー名、パスワードと別々に設定 
# vi /usr/lib/sasl2/smtpd.conf pwcheck_method: auxprop 
- 新規ユーザ作成時にMakedir形式のメールボックス作成処理
# mkdir -p /etc/skel/Maildir/new # mkdir -p /etc/skel/Maildir/cur # mkdir -p /etc/skel/Maildir/tmp # chmod -R 700 /etc/skel/Maildir/ 
- sendmail停止
# service sendmail stop # chkconfig sendmail off # chkconfig --list sendmail sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off 
- メールサーバ切り替え 
# alternatives --config mta 2 プログラムがあり 'mta'を提供します。 選択 コマンド ----------------------------------------------- *+1 /usr/sbin/sendmail.sendmail 2 /usr/sbin/sendmail.postfix Enterを押して現在の選択[+]を保持するか、選択番号を入力します:2 
サービス開始とサービス設定
# chkconfig postfix on # chkconfig --list postfix postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
2)Dovecot インストール
インストール
# yum -y install dovecot
設定
| # vi /etc/dovecot.conf | |
| protocols = imap imaps pop3 pop3s | 追加(POPアクセスを追加) | 
| mail_location = maildir:~/Maildir | 追加(メールボックス形式をMaildir形式とする) | 
| valid_chroot_dirs = /home | 追加※OpenSSH+Chrootを導入している場合のみ | 
サービス開始 
# service dovecot start # chkconfig dovecot on # chkconfig --list dovecot dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off
