トップ 差分 一覧 ソース 検索 ヘルプ PDF RSS ログイン

Debian(Sarge)/2006-4-2

この記事は古いです
こちらを参照→
http://goungoun.dip.jp/app/fswiki/wiki.cgi/debianetch?page=2007%2F04%2F19%2D01%A1%A2quickml

目次

quickml

インストール

apt-get install quickml

$ sudo apt-get install quickml
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libruby1.8 ruby1.8
Suggested packages:
  ruby1.8-examples rdoc1.8 ri1.8
The following NEW packages will be installed:
  libruby1.8 quickml ruby1.8
0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.
Need to get 1535kB of archives.
After unpacking 6013kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 ftp://ftp.debian.or.jp sarge/main libruby1.8 1.8.2-7sarge2 [1349kB]
Get:2 ftp://ftp.debian.or.jp sarge/main ruby1.8 1.8.2-7sarge2 [151kB]                                                                                                                        
Get:3 ftp://ftp.debian.or.jp sarge/main quickml 0.7-2 [35.0kB]                                                                                                                               
Fetched 1535kB in 54s (28.4kB/s)                                                                                                                                                             
Selecting previously deselected package libruby1.8.
(Reading database ... 23131 files and directories currently installed.)
Unpacking libruby1.8 (from .../libruby1.8_1.8.2-7sarge2_i386.deb) ...
Selecting previously deselected package ruby1.8.
Unpacking ruby1.8 (from .../ruby1.8_1.8.2-7sarge2_i386.deb) ...
Selecting previously deselected package quickml.
Unpacking quickml (from .../archives/quickml_0.7-2_all.deb) ...
Setting up libruby1.8 (1.8.2-7sarge2) ...

Setting up ruby1.8 (1.8.2-7sarge2) ...
Setting up quickml (0.7-2) ...
Starting quickml: quickml.

今回の設定概要

通常のメールアドレスは「xxxx.dip.jp」
quickml用のメールアドレスは「mlxxxx.dip.jp」
とする。

                          postfix
                      +--------------+
xxxx.dip.jp ----->(25)|--->自分で処理|            quickml
                      |              |           +-------+
mlxxxx.dip.jp --->(25)|---->中継---->|--->(10025)|       |
                      |              |           |       |
<---------------------|<-------------|(25)<------|       |
                      |              |           |       |
                      +--------------+           +-------+

postfix設定

quickmlへの中継設定を行う。

/etc/postfix/main.cf

$ sudo vi /etc/postfix/main.cf
mydestination を変更
transport_maps,local_recipient_maps を追加

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = localhost.localdomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mlxxxx.dip.jp, xxxx.dip.jp, localhost.localdomain, localhost.localdomain, localhost
relayhost =
##mynetworks = 127.0.0.0/8
mynetworks = 127.0.0.0/8,192.168.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

## add
smtpd_hello_required = yes
smtpd_hello_restrictions = reject_non_fqdn_hostname
disable_vrfy_command = yes

#add
transport_maps = hash:/etc/postfix/transport
local_recipient_maps = 

/etc/postfix/transport

$ sudo vi /etc/postfix/transport

mlxxxx.dip.jp   smtp:localhost:10025

postmap /etc/postfix/transport

$ sudo postmap /etc/postfix/transport

quickml設定

/etc/quickml/quickmlrc

メールホスト名を確認

$ cat /etc/mailname
xxxx.dip.jp

$ sudo vi /etc/quickml/quickmlrc

# -*- mode: ruby -*-
mailname = File.open("/etc/mailname") do |fp| fp.read.chomp; end
Config = {
  :port => 10025,       # see /usr/share/doc/quickml/with-mta.rd
  :user => "list",
  :group => "list",
  :bind_address => "127.0.0.1",

  ###:smtp_host => mailname,
  :smtp_host => "localhost",
  ###:domain => mailname,
  :domain => "mlxxxx.dip.jp",
  :postmaster => "postmaster@#{mailname}",
  :info_url => "",

  :data_dir => '/var/lib/quickml',
  :pid_file => '/var/run/quickml/quickml.pid',
  :log_file => '/var/log/quickml/quickml-log',

  :verbose_mode => true,
  :max_members => 100,
  :max_mail_length => 100 * 1024,
  :ml_life_time => 86400 * 31,
  :ml_alert_time => 86400 * 30,
  :auto_unsubscribe_count => 5,

  :sweep_interval => 3600,
  :max_threads => 10,
  :timeout => 120,
  :use_qmail_verp => false,

  :confirm_ml_creation => false, # for confirming ML creation.

  ###:message_catalog => nil,  # for English messages
  :message_catalog => '/usr/share/quickml/messages.ja', # for Japanese messages
  :authorized_creators_list => '/etc/quickml/authorized_creators',
  # :distribute_address => "dist@#{mailname}",
  # :report_address => "notify@#{mailname}"
  :report_address => "xxxx@#{mailname}"
}

/etc/quickml/authorized_creators

$ sudo vi /etc/quickml/authorized_creators
にメーリングリスト作成を許すユーザのアドレスを正規表現で記述

各サービス再起動

$ sudo /etc/init.d/postfix reload
Reloading Postfix configuration...done.
$ 
$ sudo /etc/init.d/quickml reload
Usage: /etc/init.d/quickml {start|stop|restart|force-reload}
$ sudo /etc/init.d/quickml restart
Restarting quickml: quickml.
$ 

確認

test-ml という名前のメーリングリストを作ってみる。

from: test-ml@mlxxxx.dip.jp

でメールを送ると、test-mlメーリングリストが作成されること。

ユーザ追加は cc に書くだけ

from: test-ml@mlxxxx.dip.jp
cc: addusr@hoge.hoge,...

覚書

場所メモ

/var/log/quickml/quickml-log ログ
/var/lib/quickml 各メーリングリスト定義

authorized_creators_list 定義時のエラー?

authorized_creators_list で定義したユーザ以外からメーリングリストを
作ろうとしても作れないはずなのでテストしてみたら、以下のログが出力
された。

xxxx2006-04-02T01:38:24: Connect: localhost.localdomain
xxxx2006-04-02T01:38:24: Command: EHLO localhost.localdomain
xxxx2006-04-02T01:38:24: Command: MAIL FROM:<hoge@hoge.hoge>
xxxx2006-04-02T01:38:24: Command: RCPT TO:<test98-ml@mlxxxx.dip.jp>
xxxx2006-04-02T01:38:24: Command: DATA
xxxx2006-04-02T01:38:25: MAIL FROM:<hoge@hoge.hoge>
xxxx2006-04-02T01:38:25: RCPT TO:<test98-ml@mlxxxx.dip.jp>
xxxx2006-04-02T01:38:25: From: hoge@hoge.hoge
xxxx2006-04-02T01:38:25: Cc:
xxxx2006-04-02T01:38:25: bare From: hoge <hoge@hoge.hoge>
xxxx2006-04-02T01:38:25: bare Cc:
xxxx2006-04-02T01:38:25: Closed: localhost.localdomain
xxxx2006-04-02T01:38:25: Unknown Session Error: QuickML::UnauthorizedCreator: QuickML::UnauthorizedCreator
xxxx2006-04-02T01:38:25: /usr/lib/ruby/1.8/quickml/core.rb:108:in `initialize'/usr/lib/ruby/1.8/quickml/core.rb:1040:…

何かのエラーっぽくみえたので調べると、これが正常動作でした。
(rubyの例外処理で詳細ログが出力されているだけでした)

最終更新時間:2006年04月02日 02時07分33秒