「007 スペクター」21世紀のボンドにスペクター
100万ポイント山分け!1日5回検索で1ポイントもらえる
>>
人気記事ランキング
ブログを作成
楽天市場
007647
HOME
|
DIARY
|
PROFILE
【フォローする】
【ログイン】
Code of the O....rz....hov
PR
×
< 新しい記事
新着記事一覧(全14件)
過去の記事 >
Sep 3, 2008
postfix
カテゴリ:
Debian/Ubuntu
http://hisashim.livejournal.com/333206.html
Debian etch上のPostfixでSMTP-AUTHを行い、SASL認証できたクライアントにのみ他ドメインへのリレーを許可する設定。 SASL認証にはsaslauthd + pamを使う。SSL/TLSによる通信路の暗号化は後で。
必要なものをインストール。最近はpostfixでtlsとsaslが使えるようになったので、postfix-tlsでなくてよい。あとsaslauthdを使うならlibsasl2-modulesのインストールを忘れずに。fatal: no SASL authentication mechanismsと言われる。
% sudo apt-get install postfix postfix-doc sasl2-bin libsasl2-modules
saslauthdのREADMEにPostfixから使う際の例が書いてあるので、よく読んで設定。起動を忘れずに。
% sudo vi /etc/default/saslauthd
START=yes
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
% sudo adduser postfix sasl
Adding user `postfix' to group `sasl' ...
Done.
% sudo /etc/init.d/saslauthd start
Starting SASL Authentication Daemon: saslauthd.
PostfixのサーバとしてのSASL設定ファイルを作る。pwcheck_methodとmech_listの両方を指定すること。
% sudo >/etc/postfix/sasl/smtpd.conf
% sudo vi /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
Postfixのmain.cfにSASLの設定を追加してリロード。
* 設定ファイルのデリミタは空白のみが安全らしい。カンマは避ける。
* Postfixがクライアントとして動作するときの挙動はsmtp_*で、サーバとして動作するときの挙動はsmtpd_*で制御する。
* PostfixのSASL_README.htmlにあるsmtpd_recipient_restrictionsの設定例の右辺は = permit_mynetworks permit_sasl_authenticatedとなっているが、拒否を意味する値を1つは含めないとエラーを吐いて動かない模様。 ただしrejectだと554 5.7.1 johnd@example.org: Recipient address rejected: Access denied; となってまともなユーザまでメールを受け取れなくなるので、reject_unauth_destinationに。
% sudo vi /etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
% sudo postconf -n
% sudo /etc/init.d/postfix reload
% telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 example.org ESMTP Postfix
EHLO foo
250-example.org
...
250-AUTH PLAIN LOGIN
...
% sudo tail /var/log/mail.log
Thunderbirdで試してみるときはログを取るとよい。
notepad C:\Program Files\Mozilla Thunderbird\thunderbird-log.bat
set NSPR_LOG_FILE=.\log.txt
set NSPR_LOG_MODULES=IMAP:5,POP3:5,NNTP:5,SMTP:5
"C:\Program Files\Mozilla Thunderbird\thunderbird.exe"
sshで中継するときも-vで冗長にメッセージを出してもらうとよい。
% slogin -v -L 993:example.org:993 -L 25:example.org:25 jdoe@example.org
資料:
* /usr/share/doc/postfix/README.Debian
* /usr/share/doc/sasl2-bin/README.Debian
* http://www.postfix-jp.info/trans-2.3/jhtml/SASL_README.html
* http://www.postfix-jp.info/trans-2.3/jhtml/SMTPD_ACCESS_README.html
* http://www.postfix-jp.info/origdocs/install-report-sasl.html
* http://www.araki.net/wiki/araki-wiliki.cgi?araki%3apostfix%3apostfix-book-errata1
* http://hurring.com/howto/debian_postfix_sasl/
If you get the "fatal: no SASL authentication mechanisms" error message from postfix, install "libsasl2-modules"
* http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
お気に入りの記事を「いいね!」で応援しよう
いいね!
0
シェアする
Last updated Sep 3, 2008 10:13:49 AM
< 新しい記事
新着記事一覧(全14件)
過去の記事 >
ホーム
フォローする
過去の記事
新しい記事
新着記事
上に戻る
【毎日開催】
15記事にいいね!で1ポイント
10秒滞在
いいね!
--
/
--
次の日記を探す
おめでとうございます!
ミッションを達成しました。
広告を見てポイントを獲得する
※「ポイントを獲得する」ボタンを押すと広告が表示されます。
x
エラーにより、アクションを達成できませんでした。下記より再度ログインの上、改めてミッションに参加してください。
ログインする
x
X
© Rakuten Group, Inc.
X
共有
Facebook
Twitter
Google +
LinkedIn
Email
Design
a Mobile Website
スマートフォン版を閲覧
|
PC版を閲覧
人気ブログランキングへ
無料自動相互リンク
にほんブログ村 女磨き
LOHAS風なアイテム・グッズ
みんなが注目のトレンド情報とは・・・?
So-netトレンドブログ
Livedoor Blog a
Livedoor Blog b
Livedoor Blog c
楽天ブログ
JUGEMブログ
Excitブログ
Seesaaブログ
Seesaaブログ
Googleブログ
なにこれオシャレ?トレンドアイテム情報
みんなの通販市場
無料のオファーでコツコツ稼ぐ方法
無料オファーのアフィリエイトで稼げるASP
ホーム
Hsc
人気ブログランキングへ
その他
Share by: