web-dev-qa-db-ja.com

DokuWikiのGmailのSMTP設定?

Vagrantでデモ目的でdokuwikiをセットアップしようとしていますが、それをテストする人たちが登録して確認メールを受信できるようにしたいと思います。

dokuwiki-plugin-smtp をインストールしました。これでSMTPサーバーを使用できるようにしたいと思います。

Gmailがこの目的に適していると述べている場所をいくつか見つけましたが、メールを送信するドメインがありません。

これまでに私がやったことは次のとおりです。

  1. DokuのAdmin設定にアクセスしました
  2. Configuration Settingsをクリックしました
  3. smtpをクリックしました
  4. Smtpセクション...および次の値を入力します:
    1. Your outgoing SMTP server:smtp.gmail.com
    2. The port your SMTP server listens on. Usually 25. 465 for SSL:465
    3. What kind of encryption is used when communicating with your SMTP Server? SSL
    4. If authentication is required, put your username here.<my-gmail-email-address>
    5. Password for the above user.<my-gmail-email-address-password>
    6. The name to be used during HELO phase of SMTP. Should be the FQDN of the webserver DokuWiki is running on. Leave empty for autodetection。ここに何を置くべきかわかりません。
    7. Print a full error log when sending fails? Disable when everything works!チェック。
    8. Saveをクリックしました。
  5. <doku-home>/conf/dokuwiki.phpにアクセスし、$conf['mailfrom']を指すように<my-gmail-email-address>を編集しました。
  6. ブラウザのAdmin画面に戻りました。
    1. Check SMTP configurationをクリックしました
    2. Testmailダイアログで、To:フィールドを使用して別のメールアドレスにメールを送信しようとしました。
    3. Send Mailをクリックしました

出力は次のとおりです。

Set: the server
Set: the auth
Set: a message will be sent
Connecting to smtp.gmail.com at 465
Got: 220 smtp.gmail.com ESMTP p206sm2da861897ywb.29 - gsmtp
Sent: EHLO [192.168.33.10]
Got: 250-smtp.gmail.com at your service, [207.255.6.224]
Got: 250-SIZE 35882577
Got: 250-8BITMIME
Got: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
Got: 250-ENHANCEDSTATUSCODES
Got: 250-PIPELINING
Got: 250-CHUNKING
Got: 250 SMTPUTF8
Sent: AUTH LOGIN
Got: 334 VXNlcm5shbWU6
Sent: bGVlYW5kMDBdAZ21haWwuY29t
Got: 334 UGFzc3dvdcmQ6
Sent: dmlzaipMNzMhJkNWNVk=
Got: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsdbvEf
Got: 534-5.7.14 xM8arKaU-YecG1GrUg1rUPPs6tdYNskmkjoyqwKryYWkCxW9PNKXHd6vt0yKIoauYjo1FLW
Got: 534-5.7.14 8aoPuega-taL5QSUdj03t5HpLNJ2vFEd_GIbBAvQo39Wi6Hpd3irkM3xV9sbVyyB7rCYMbs
Got: 534-5.7.14 OL8zl-onlXEiLP6f8J6FJFlF13Y1qmiNMiX7iJixQZJ_K8bs9docaAABH78hRSSGyiAGqZr
Got: 534-5.7.14 LX6UABKLBKdOddNqiyOHE16U3CVk> Please log in via your web browser and
Got: 534-5.7.14 then try again.
Got: 534-5.7.14  Learn more at
Got: 534 5.7.14  https://support.google.com/mail/answer/78754 p206sm2861897ywb.29 - gsmtp

最後に記載されているhttps://support.google.com/mail/answer/78754 p206sm2861897ywb.29のURLにアクセスしても結果は得られません。

また、The port your SMTP server listens on. Usually 25. 465 for SSL587のポート設定とWhat kind of encryption is used when communicating with your SMTP Server?587の設定を使用してこの構成を試しましたが、まだメールを送信できません。

この設定を取得しました here

私は、問題がThe name to be used during HELO phase of SMTP. Should be the FQDN of the webserver DokuWiki is running on. Leave empty for autodetectionを要求する場所にあるかもしれないと考え続けますが、私はそのことを完全には確信していません。

電子メールの送信を許可する可能性のあるものは他にありますか?別のプラグインや別のメールサーバーにすら落ち着くでしょう。これは、テストとデモンストレーションのみを目的として設定しています。

1
leeand00

まず、上記の完全なログを投稿するべきではありません。 Gmailのユーザー名とパスワードが含まれています!したがって、最初に行うことは、Gmailパスワードを変更することです。

あなたの問題に取り組むために:

  1. 2factor認証を使用している場合、アプリケーションパスワードを作成し、それを使用して認証する必要があります。
  2. https://support.google.com/a/answer/6260879?hl=en で説明されているように、「安全でない」アプリを有効にする必要があります。 SMTP経由
3
Andreas Gohr