
Ubuntu日本語フォーラム

ログインしていません。
Postfix/devecotを使用してメールサーバーを構築しようとしています。
OEからpopのログオンができません。
メールの受信ができない状態です。
●postfixの設定です。
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
sendmail_path = /usr/sbin/postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
とりあえずローカル内での送受信を目指しています。
できるようになってから外部からの送受信に挑戦したいです。
すでにほかのディストリビューションでメールサーバーは成功しているので甘く見ていました。
courier-imapではなく、devecotを使う記事が多く見られたのでそうしてみていますが、どんなものでも動けば最上です。
postconfみたいに、devecotの設定を表示させる方法がわかりませんでした。
メーラーのOEでは
smtpとpopに192.168.1.2として設定しています。
popは見つかるがログオンできませんでした、とでます。
送信サーバーの設定などは総当り的にやってみましたがだめでした。
およそOEの設定というよりもサーバ側の設定のようです。
どなたか助け舟を出していただける方はいらっしゃいますでしょうか。
OS: ubuntu12.04 LTS
HW: HP ProLiant ML350 G5
オフライン
POP のログインは Dovecot が処理するので、Postfix は基本無関係です
Postfix の以下の設定値に関しては、Dovcecot の設定もこれに合わせないといけませんが、他にも両者で合わせないといけない項目もいくつかありますが、基本的には個別の設定です
home_mailbox = Maildir/
local_recipient_maps = unix:passwd.byname $alias_maps
OE で POP にログインできない理由を推察するには、提示いただいた情報では全く不足しています
少なくとも、ログイン時点の Dovecot のログ (/var/log/mail.log) の抜粋と、Dovecot のコンフィグを提示してください
なお postconf のような便利なコマンドは、残念なことに Dovecot にはありません
オフライン
ありがとうございます。
教えていただいた2行を追加してdovecotのrestartをしてから試みましたがログオンできないという同じ症状です。
以下にDovecotのconfigを貼ってみました。
## Dovecot configuration file
!include_try /usr/share/dovecot/protocols.d/*.protocol
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
!include conf.d/*.conf
!include_try local.conf
protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
ssl = no
mail_location = maildir:~/Maildir
mechanisms = plain login
socket listen {
client {
path = /var/spool/postfix/private/auth-client
mode = 0660
user = postfix
group = postfix
}
}
home_mailbox = Maildir/
local_recipient_maps = unix:passwd.byname $alias_maps
###############################
以下はmil.logです。
こんな感じのが繰り返し出ています。
Jul 25 01:24:12 ubuntu postfix/anvil[3125]: statistics: max connection rate 1/60s for (smtp:192.168.1.6) at Jul 25 01:22:31
Jul 25 01:24:12 ubuntu postfix/anvil[3125]: statistics: max connection count 1 for (smtp:192.168.1.6) at Jul 25 01:22:31
Jul 25 01:24:12 ubuntu postfix/anvil[3125]: statistics: max cache size 1 at Jul 25 01:22:31
Jul 25 01:24:43 ubuntu postfix/pickup[3005]: E31785A1BAE: uid=0 from=<root>
Jul 25 01:24:43 ubuntu postfix/cleanup[3648]: E31785A1BAE: message-id=<[email protected]>
Jul 25 01:24:43 ubuntu postfix/qmgr[3006]: E31785A1BAE: from=<[email protected]>, size=228, nrcpt=1 (queue active)
Jul 25 01:24:43 ubuntu postfix/local[3650]: E31785A1BAE: to=<[email protected]>, relay=local, delay=0.05, delays=0.02/0/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
Jul 25 01:24:43 ubuntu postfix/qmgr[3006]: E31785A1BAE: removed
###############################
なにかわかりますでしょうか。
ほかに提示しなければならないものがあればお知らせください。
オフライン
Postfix と Dovecot の設定ファイルの書式はまるで違います
Postfix の設定ファイルの記述をそのまま Dovecot に持ち込めば、エラーになってしまい Dovecot は起動しません
#3 では Dovecot の設定ファイルに記述した書式が間違ってしまっただめに、Dovecot が起動すらできていない状況になっていると思います
提示いただいた Dovecot の設定ファイルに以下の記述があるので、他に /usr/share/dovecot/protocols.d ディレクトリにある 拡張子が .protocol のファイルや、この設定ファイルがあるディレクトリの中の conf.d ディレクトリにある 拡張子が .conf のファイル、この設定ファイルがあるディレクトリにある local.conf ファイルも設定ファイルに含まれます
!include_try /usr/share/dovecot/protocols.d/*.protocol
!include conf.d/*.conf
!include_try local.conf
また、Dovecot のログは 日付、時間、ホスト名の後に「dovecot」という字句が現れます
#3 で提示いただいたログは、ホスト名 (ubuntu) の後に「postfix」という字句が現れていることから、すべて Postfix が出力したログだとわかります
オフライン
結果的には成功しました。
紆余曲折があったので報告しておきます。
まずOSの再インストールをしました。
同じやり方をしていても問題は解決しないので、postfixの設定のときに「設定なし」でやっていたところを、
「インターネットメール」というものを選びました。
ubuntuの公式サイトでpostfixの設定について書かれているものを参照しながらやってみました。
ry さん、
「なお postconf のような便利なコマンドは、残念なことに Dovecot にはありません」
とのことでしたが、dovecot -nと打てばpostconf -nと同様な感じで確認できます。今度試してみてください。
ほとんど設定はいらずにpopのログオンはできるようになり、やったーと思ったのもつかの間、
外部への送信ができなかったことに気がついていませんでした。
/////////////////////////////////////
このメールは、受信者全員または一部に届きませんでした。
件名: test
送信日時: 2012/07/29 23:13
以下の受信者にメールが配信できませんでした:
'[email protected]' 2012/07/29 23:13
554 5.7.1 <[email protected]>: Relay access denied
/////////////////////////////////////
となって配信不能のメールがoutlook2003から帰ってきてしまう現象です。
OP25B(Outbound Port 25 Blocking):迷惑メール送信規制でひかかった経験があるので我が家のプロバイダであるOCNの25番ポートにrelayさせる
relayhost = [****.ocn.ne.jp]:25
という記述をしてやればクリアできるとわかっていたので記述をして再テストをおこなってもなにも変わりませんでした。
それからだいぶ悩んだ末に、いろいろ設定は大事だけれど、外部への送信でかなり重要なのはmynetworks だという記述をどっかで見つけました。
よくよくよく見ると、
192.168.1.*が我が家のローカルIPなのにもかかわらず、
mynetworks = 192.168.8.0/28, 127.0.0.0/8
となっていました。。。
mynetworks = 192.168.1.0/28, 127.0.0.0/8
と、1を8に直して解決しました。
わたしのケアレスミスです。
しかしながら勉強になったました。
mynetworksが肝だということですね。
もし躓いた方がここを見ることがあったら参考にしてくださいな☆
ありがとうございました。
オフライン