質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
Dovecot

Dovecotとは、POPやIMAPサーバーを提供するMDA(メール配送エージェント)の一つです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

Q&A

解決済

2回答

5715閲覧

メールサーバーをメーラーにアカウント設定できる状態にしたい

mo_nmr

総合スコア7

Dovecot

Dovecotとは、POPやIMAPサーバーを提供するMDA(メール配送エージェント)の一つです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

0グッド

0クリップ

投稿2016/08/16 13:35

編集2016/08/17 06:41

###前提・実現したいこと
さくらVPS、Ubuntuでpostfix+dovecotを使ってメールサーバーを立てようとしてます。

やりたいことは、Thunderbirdなどのメーラーでアカウントの設定をして送受信までできるようにすることです。(理想はメーラーにメールアドレス・パスワードを入れたらアカウントの自動検出までできるようになることです。)

現状メーラーでアカウントの設定ができない状態(Thunderbirdでは「アドレスを確認してください!」や「Thunderbirdはあなたのアカウント設定を見つけられませんでした」と言ったメッセージが出る)なので、お力を貸していただきたいです。
1週間悩み続けています・・・。

###バージョン等
Ubuntu 14.04.4
Postfix 2.11.0
Dovecot 2.2.9

参考サイト:
http://tipszone.jp/20120521_mail_server/
http://qiita.com/mizuki_takahashi/items/1b33e1f679359827c17d

一通り設定をして、メールアカウントから外部(Gmail)への送信、外部(Gmail)からの受信はできていると思います。(tlnetコマンドで指定したアカウントからGmailに届き、設定したメールボックスに届いている事を確認済み)
バーチャルドメイン、仮想ユーザーなどを設定しています。

postfixの状態↓

# postconf -n broken_sasl_auth_clients = yes 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 home_mailbox = Maildir/ inet_interfaces = all inet_protocols = ipv4 local_recipient_maps = unix:passwd.byname $alias_maps mail_owner = postfix mailbox_size_limit = 1073741824 mailq_path = /usr/bin/mailq message_size_limit = 10485760 mydestination = $myhostname,localhost.$mydomain,localhost mydomain = example.com myhostname = mail.example.com mynetworks = 192.168.0.0/24, 127.0.0.0/8, 10.0.0.0/24, VPSのIPアドレス mynetworks_style = host myorigin = $mydomain newaliases_path = /usr/bin/newaliases relay_domains = $mydestination relayhost = sendmail_path = /usr/sbin/postfix setgid_group = postdrop smtpd_banner = $myhostname ESMTP unknown smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $mydomain smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_cert_file = /etc/pki/tls/certs/mail.crt smtpd_tls_key_file = /etc/pki/tls/certs/mail.key smtpd_tls_security_level = may unknown_local_recipient_reject_code = 550 virtual_gid_maps = static:10000 virtual_mailbox_base = /var/spool/virtual virtual_mailbox_domains = example.com virtual_mailbox_maps = hash:/etc/postfix/vmailbox virtual_uid_maps = static:10000

Thunderbirdでメールアカウントの設定をした時のログ↓

Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21632) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21631) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21633) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21634) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21635) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21636) Aug 16 20:39:44 ubuntu dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<XdUZzi465gDSmYSr> Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21637) Aug 16 20:39:44 ubuntu dovecot: auth: Debug: auth client connected (pid=21638) Aug 16 20:39:44 ubuntu dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<owsazi46MgDSmYSr> Aug 16 20:39:44 ubuntu dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<Bwwazi46KwDSmYSr> Aug 16 20:39:44 ubuntu dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<pB8azi465QDSmYSr> Aug 16 20:39:44 ubuntu dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<Uisazi46bgDSmYSr> Aug 16 20:39:44 ubuntu dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<oE4azi469QDSmYSr> Aug 16 20:39:44 ubuntu dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<B2Eazi46RgDSmYSr> Aug 16 20:39:44 ubuntu dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=111.111.111.111, lip=000.000.000.0, session=<GHoazi46UADSmYSr> Aug 16 20:40:26 ubuntu postfix/smtpd[21639]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Aug 16 20:40:26 ubuntu postfix/smtpd[21639]: fatal: unexpected command-line argument: permit_sasl_authenticated,reject_unauth_destination Aug 16 20:40:26 ubuntu postfix/smtpd[21640]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Aug 16 20:40:26 ubuntu postfix/smtpd[21640]: fatal: unexpected command-line argument: permit_sasl_authenticated,reject_unauth_destination Aug 16 20:40:26 ubuntu postfix/smtpd[21641]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Aug 16 20:40:26 ubuntu postfix/smtpd[21641]: fatal: unexpected command-line argument: permit_sasl_authenticated,reject_unauth_destination Aug 16 20:40:26 ubuntu postfix/smtpd[21642]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Aug 16 20:40:26 ubuntu postfix/smtpd[21642]: fatal: unexpected command-line argument: permit_sasl_authenticated,reject_unauth_destination Aug 16 20:40:27 ubuntu postfix/master[21612]: warning: process /usr/lib/postfix/smtpd pid 21639 exit status 1 Aug 16 20:40:27 ubuntu postfix/master[21612]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling Aug 16 20:40:27 ubuntu postfix/master[21612]: warning: process /usr/lib/postfix/smtpd pid 21640 exit status 1 Aug 16 20:40:27 ubuntu postfix/master[21612]: warning: process /usr/lib/postfix/smtpd pid 21641 exit status 1 Aug 16 20:40:27 ubuntu postfix/master[21612]: warning: process /usr/lib/postfix/smtpd pid 21642 exit status 1 Aug 16 20:41:14 ubuntu postfix/smtpd[21644]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Aug 16 20:41:14 ubuntu postfix/smtpd[21644]: connect from unknown[89.248.160.150] Aug 16 20:41:15 ubuntu dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Aug 16 20:41:15 ubuntu dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat Aug 16 20:41:15 ubuntu dovecot: auth: Debug: passwd-file /etc/dovecot/passwd: Read 3 users in 0 secs Aug 16 20:41:15 ubuntu dovecot: auth: Debug: auth client connected (pid=0) Aug 16 20:41:15 ubuntu dovecot: auth: Debug: client in: AUTH#0111#011LOGIN#011service=smtp#011nologin#011lip=000.000.000.0#011rip=89.248.160.150 Aug 16 20:41:15 ubuntu dovecot: auth: Debug: client passdb out: CONT#0111#011VXNlcm5hbWU6 Aug 16 20:41:16 ubuntu dovecot: auth: Debug: client in: CONT<hidden> Aug 16 20:41:16 ubuntu dovecot: auth: Debug: client passdb out: CONT#0111#011UGFzc3dvcmQ6 Aug 16 20:41:16 ubuntu dovecot: auth: Debug: client in: CONT<hidden> Aug 16 20:41:16 ubuntu dovecot: auth: Debug: passwd-file(mail@example.com,89.248.160.150): lookup: user=mail@example.com file=/etc/dovecot/passwd Aug 16 20:41:16 ubuntu dovecot: auth: passwd-file(mail@example.com,89.248.160.150): unknown user Aug 16 20:41:18 ubuntu postfix/smtpd[21644]: warning: unknown[89.248.160.150]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Aug 16 20:41:18 ubuntu dovecot: auth: Debug: client passdb out: FAIL#0111#011user=mail@example.com Aug 16 20:41:18 ubuntu postfix/smtpd[21644]: disconnect from unknown[89.248.160.150]

サーバーの構築が初めてなので何かと曖昧なところが多いですが、必要な情報がありましたら言っていただけるとありがたいです。
おかしなところや、試した方がいい事がありましたらご指摘お願い致します。

  • 補足
    メーラーからの接続は手動でもまだ出来ていないので、

その点に関して、何が原因か・どう原因を調べたらよいかなど,
お力を貸して頂きたいです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

postfix/smtpd[21639]: fatal: unexpected command-line argument: permit_sasl_authenticated,reject_unauth_destination

master.cf に書式エラーがあるようです。
"-o" が抜けているのではないでしょうか。

dovecot: auth: Debug: passwd-file(mail@example.com,89.248.160.150): lookup: user=mail@example.com file=/etc/dovecot/passwd
dovecot: auth: passwd-file(mail@example.com,89.248.160.150): unknown user

mail@example.com」ユーザーが /etc/dovecot/passwd に見つからないようです。
書式やスペルミスがないか確認ください。

投稿2016/08/17 08:16

TaichiYanagiya

総合スコア12141

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mo_nmr

2016/08/17 10:20

ご回答ありがとうございます。 master.cfで ` -o smtpd_recipient_restrictions= permit_sasl_authenticated,reject_unauth_destination ` を ` -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_unauth_destination ` に修正(`=`の後の半角スペースを削除)したところ、ログの`fatal`や`warning `も消え、メーラーからの登録ができました・・・。(Thunderbirdは自動登録まで一気にできました) こういった設定ファイルは半角スペースは入っても大丈夫だと思っていたのですが、 いけないものだったのでしょうか・・・? また「mail@example.com」ユーザーに関しては、 この時は「test@example.com」のアドレスでメーラーに登録しようとしていたので、 なぜ「mail@example.com」ユーザーがログに出てきたのかがわかりません。。 結論としてまとめますと、 メーラーからの登録ができるようになり今回の問題を解決できました。 ありがとうございます!
TaichiYanagiya

2016/08/17 15:52

半角スペースは、main.cf では OK ですが、master.cf のコマンド引数箇所では NG です。
mo_nmr

2016/08/18 02:58

そうなのですね。。気をつけます。 ありがとうございます!
guest

0

投稿2016/08/16 14:20

CHERRY

総合スコア25171

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mo_nmr

2016/08/17 06:34

ありがとうございます! 自動設定についてはどう設定されているかがわかったのですが、 現状、メーラーで手動設定をしても接続ができていない(メールアカウントにログインできていない?)状態なので、 まず手動でも設定できるようにしないといけないのかなと思っております。 最終的に自動設定の設定は必要だと思うので上記の問題が解決後、 設定する際に参考にさせて頂きます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問