メールの問題

Discourse様

今朝、mail-receiver とアプリを再構築した後、以前は送信できていたメールで以下の結果が出ています。

この設定を試しましたが、それでも元に戻ってしまいます

![IMG_0876|68

こちらがより最近のログです


Ubuntuカーネルをアップデートした後のシステムクロックの可能性はありますか?

はい、1時間遅れていました

テストメールを送信したところ、同じエラーでバウンスバックしました。これは .\launcher logs mail-receiver で確認できます。

ホストシステムとは異なる時刻に設定されている、メール受信コンテナとアプリコンテナの両方があります。


ホストシステム - 正しい時刻 :white_check_mark:

アプリコンテナ - 間違った時刻 :cross_mark:

image

image

メール受信コンテナ - 間違った時刻 :cross_mark:

image

(投稿は作者によって削除されました)

From: Set timezone for Docker container - #2 by OrkoGrayskull


do as above post

まあ、まだ違いますね。mail-receiver を再構築して、両方の - が黄色になるようにしました。

これが、入ってきた最後のメールです

それらはホストシステムとは異なるタイムゾーンに設定されているように見えますが、それは問題ありません。

これらのコマンドを数分間隔で実行したと仮定すると、これは良好です。

「いいね!」 2

これらのスクリーンショットからは、何が起こっているのか正確にはわかりません。

フォーラムの着信アドレスは何ですか?(可能であれば少し編集してください)

どこからのアドレスですか?

フォーラムへのメールはどうなっていますか?

スクリーンショットではなく、ログのテキストを使用してください。

「いいね!」 1

discourse.domain.com

mail-receiverに接続しますが、mail-receiverはIPを不明として認識するため、バウンスバックします。メールはmail-receiverのキューに届きません。

これは正しくないと思います。エラーではなく、警告です。

このスクリーンショット(このテキストにしてください)は、ppyem30@discourse.domain.com というアドレスが受け入れられないことを示しています。これが失敗の原因のようです。

using backwards-compatible default setting… という行をさらに詳しく調べることをお勧めします。これが理由を示唆しているようです。

「いいね!」 2
root@ubuntu:/var/discourse# Jul 17 15:40:20 ubuntu-mail-receiver postfix/master[1]: デーモンが起動しました -- バージョン 3.7.11、設定 /etc/postfix
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: btprdrgo001.btinternet.com[65.20.50.131] から接続
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: btprdrgo001.btinternet.com[65.20.50.131] から切断 ehlo=1 quit=1 commands=2
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: btprdrgo001.btinternet.com[65.20.50.6] から接続
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: NOQUEUE: 拒否: RCPT from btprdrgo001.btinternet.com[65.20.50.6]: 554 5.7.1 <person@discourse.redacted.com>: 受信者のアドレスは拒否されました。アドレスを確認して、再度送信してください。; from=<ethan.mees@btinternet.com> to=<person@discourse.redacted.com> proto=ESMTP helo=<btprdrgo001.btinternet.com>
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: クライアント「btprdrgo001.btinternet.com[65.20.50.6]」からの受信者「person@discourse.redacted.com」を拒否するために、後方互換性のあるデフォルト設定 smtpd_relay_before_recipient_restrictions=no を使用しています
Jul 17 15:41:32 ubuntu-mail-receiver postfix/smtpd[122]: btprdrgo001.btinternet.com[65.20.50.6] から切断 ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=4/6
Jul 17 15:42:49 ubuntu-mail-receiver postfix/smtpd[122]: warning: ホスト名 unassigned.quadranet.com がアドレス 198.55.98.78 に解決されません
Jul 17 15:42:49 ubuntu-mail-receiver postfix/smtpd[122]: unknown[198.55.98.78] から接続
Jul 17 15:42:49 ubuntu-mail-receiver postfix/smtpd[122]: unknown[198.55.98.78] から切断 ehlo=1 auth=0/1 quit=1 commands=2/3
Jul 17 15:43:35 ubuntu-mail-receiver postfix/smtpd[122]: unknown[196.251.92.207] から接続
Jul 17 15:43:36 ubuntu-mail-receiver postfix/smtpd[122]: unknown[196.251.92.207] から切断 ehlo=1 quit=1 commands=2

以下を実行してください

 ./launcher destroy mail-receiver

その後、こちら の指示に従ってください。


Discourse への discourse.DOMAINNAME.com へのメール配信
OpenDKIM を起動中...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
ユーザー `postfix' をグループ `opendkim' に追加中...
<86>Jul 17 16:00:00 usermod[17]: add 'postfix' to group 'opendkim'<86>Jul 17 16:00:00 usermod[17]: add 'postfix' to shadow group 'opendkim'完了。
OpenDMARC を起動中...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
<22>Jul 17 16:00:00 opendkim[25]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)ユーザー `postfix' をグループ `opendmarc' に追加中...
<86>Jul 17 16:00:00 usermod[32]: add 'postfix' to group 'opendmarc'<86>Jul 17 16:00:00 usermod[32]: add 'postfix' to shadow group 'opendmarc'完了。
<22>Jul 17 16:00:00 opendmarc[40]: OpenDMARC Filter v1.4.2 starting (args: -c /etc/opendmarc.conf)<22>Jul 17 16:00:00 opendmarc[40]: additional trusted authentication services: (none)Postfix: Postfix は後方互換性のあるデフォルト設定を使用しています
Jul 17 16:00:00 ubuntu-mail-receiver postfix[52]: Postfix は後方互換性のあるデフォルト設定を使用しています
postfix: 詳細については http://www.postfix.org/COMPATIBILITY_README.html を参照してください
Jul 17 16:00:00 ubuntu-mail-receiver postfix[52]: 詳細については http://www.postfix.org/COMPATIBILITY_README.html を参照してください
postfix: 後方互換性を無効にするには、"postconf compatibility_level=3.6" および "postfix reload" を使用してください
Jul 17 16:00:00 ubuntu-mail-receiver postfix[52]: 後方互換性を無効にするには、"postconf compatibility_level=3.6" および "postfix reload" を使用してください
Postfix を起動中
Jul 17 16:00:00 ubuntu-mail-receiver postfix/master[1]: daemon started -- version 3.7.11, configuration /etc/postfix
Jul 17 16:00:28 ubuntu-mail-receiver postfix/smtpd[123]: connect from mail-ukwestazon11021090.outbound.protection.outlook.com[52.101.100.90]
Jul 17 16:00:28 ubuntu-mail-receiver postfix/smtpd[123]: NOQUEUE: reject: RCPT from mail-ukwestazon11021090.outbound.protection.outlook.com[52.101.100.90]: 554 5.7.1 <person@discourse.DOMAINNAME.com>: 受信者のアドレスが拒否されました: このアドレスへのメールは受け付けられません。アドレスを確認して、もう一度送信してください。; from=<ethan@DOMAINNAME.com> to=<person@discourse.DOMAINNAME.com> proto=ESMTP helo=<CWXP265CU009.outbound.protection.outlook.com>
Jul 17 16:00:28 ubuntu-mail-receiver postfix/smtpd[123]: using backwards-compatible default setting smtpd_relay_before_recipient_restrictions=no to reject recipient "person@discourse.DOMAINNAME.com" from client "mail-ukwestazon11021090.outbound.protection.outlook.com[52.101.100.90]"
Jul 17 16:00:28 ubuntu-mail-receiver postfix/smtpd[123]: disconnect from mail-ukwestazon11021090.outbound.protection.outlook.com[52.101.100.90] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
エラー詳細
エラー:	554 5.7.1 <person@discourse.YOURDOMAIN.com>: 受信者のアドレスは拒否されました。このアドレスへのメールは受け付けられません。アドレスを確認して、再度送信してください。
拒否したメッセージ:	ubuntu-mail-receiver.localdomain

ask.discourse.comで試してみました。

手順に従いました。明確にする必要があったのは、/var/discourse/shared/mail-receiver/ ディレクトリに到達したとき、

nano valid_recipients

または

nano valid_recipients.yml

のどちらを入力すべきかという点です。


mail-reciever.yml にコピー&ペーストし、その後再ビルドしました。これは以下のログに対応します。

root@ubuntu:/var/discourse# ./launcher logs mail-receiver
x86_64 arch detected.
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Operating environment:
HOSTNAME=ubuntu-mail-receiver
LANGUAGE=en_US.UTF-8
MAIL_DOMAIN=discourse.DOMAINNAME.com
DOCKER_HOST_IP=172.17.0.1
PWD=/
DISCOURSE_BASE_URL=https://DOMAINNAME.com
HOME=/root
LANG=en_US.UTF-8
TERM=xterm
SHLVL=1
DISCOURSE_API_USERNAME=system
LC_ALL=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
INCLUDE_DMARC=true
DISCOURSE_API_KEY=[64 digit api key redacted]
_=/usr/bin/env
Delivering mail sent to discourse.DOMAINNAME.com to Discourse
Starting OpenDKIM...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Adding user `postfix' to group `opendkim' ...
<86>Jul 17 19:38:44 usermod[16]: add 'postfix' to group 'opendkim'<86>Jul 17 19:38:44 usermod[16]: add 'postfix' to shadow group 'opendkim'Done.
Starting OpenDMARC...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
<22>Jul 17 19:38:44 opendkim[24]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)Adding user `postfix' to group `opendmarc' ...
<86>Jul 17 19:38:44 usermod[31]: add 'postfix' to group 'opendmarc'<86>Jul 17 19:38:44 usermod[31]: add 'postfix' to shadow group 'opendmarc'Done.
<22>Jul 17 19:38:44 opendmarc[39]: OpenDMARC Filter v1.4.2 starting (args: -c /etc/opendmarc.conf)<22>Jul 17 19:38:44 opendmarc[39]: additional trusted authentication services: (none)postfix: Postfix is using backwards-compatible default settings
Jul 17 19:38:44 ubuntu-mail-receiver postfix[49]: Postfix is using backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
Jul 17 19:38:44 ubuntu-mail-receiver postfix[49]: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=3.6" and "postfix reload"
Jul 17 19:38:44 ubuntu-mail-receiver postfix[49]: To disable backwards compatibility use "postconf compatibility_level=3.6" and "postfix reload"
Starting Postfix
Jul 17 19:38:44 ubuntu-mail-receiver postfix/master[1]: daemon started -- version 3.7.11, configuration /etc/postfix
Jul 17 19:39:12 ubuntu-mail-receiver postfix/smtpd[171]: connect from smtp3.nottingham.ac.uk[128.243.44.55]
Jul 17 19:39:12 ubuntu-mail-receiver postfix/smtpd[171]: NOQUEUE: reject: RCPT from smtp3.nottingham.ac.uk[128.243.44.55]: 554 5.7.1 <person.self@discourse.DOMAINNAME.com>: Recipient address rejected: Mail to this address is not accepted. Check the address and try again?; from=<person@nottingham.ac.uk> to=<person.xytz@discourse.DOMAINNAME.com> proto=ESMTP helo=<smtp3.nottingham.ac.uk>
Jul 17 19:39:12 ubuntu-mail-receiver postfix/smtpd[171]: using backwards-compatible default setting smtpd_relay_before_recipient_restrictions=no to reject recipient "person.xytz@discourse.DOMAINNAME.com" from client "smtp3.nottingham.ac.uk[128.243.44.55]"
Jul 17 19:39:12 ubuntu-mail-receiver postfix/smtpd[171]: disconnect from smtp3.nottingham.ac.uk[128.243.44.55] ehlo=1 mail=1 rcpt=0/1 bdat=0/1 quit=1 commands=3/5

多くのカテゴリにカスタム受信メールアドレスがあります。フォーマットを category+<tag>@discourse.DOMAINNAME.com に変更する必要がありますか(カテゴリへの直接投稿のため)?