spantaleev/matrix-docker-ansible-deploy

Fail to send registration email

Closed this issue · 3 comments

description:
Try to configure matrix mailer to send registration emails, but the following configurations cannot meet the requirements. The relevant ports have been opened and can be connected via telnet. The stmp authorization code in configuration 1 can also be used on other clients.

configuration 0:

matrix_mailer_container_extra_arguments: ["-p","8025:8025","-p","25:8025","-p","587:8025","-p","465:8025"]

error log:

Aug 07 04:43:19 matrix.chatie.io systemd[1]: Started Matrix mailer.
Aug 07 04:43:20 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:43:20 exim 4.94.2 daemon started: pid=8, -q15m, listening for SMTP on port 8025 (IPv6 and IPv4)
Aug 07 04:43:20 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:43:20 Start queue run: pid=9
Aug 07 04:43:20 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:43:20 End queue run: pid=9
Aug 07 04:44:22 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:44:22 1mCEC6-00000A-P8 <= matrix@wechaty.tk H=(22e023c01adb) [172.18.0.14] P=esmtp S=2974 id=2011941570.0.1628311462623@22e023c01adb
Aug 07 04:44:22 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:44:22 1mCEC6-00000A-P8 H=mx3.qq.com [240d:c040:1:40::133] Address not available
Aug 07 04:44:54 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:44:54 1mCEC6-00000A-P8 H=mx3.qq.com [203.205.219.57]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:45:25 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:45:25 1mCEC6-00000A-P8 H=mx2.qq.com [203.205.219.58]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:45:57 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:45:57 1mCEC6-00000A-P8 H=mx1.qq.com [162.62.116.184]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:45:57 matrix.chatie.io matrix-mailer[19657]: 2021-08-07 04:45:57 1mCEC6-00000A-P8 == XXX@qq.com R=dnslookup T=remote_smtp defer (110): Operation timed out H=mx1.qq.com [162.62.116.184]: SMTP timeout after initial connection

configuration 1:

matrix_mailer_container_extra_arguments: ["-p","8025:8025","-p","25:8025","-p","587:8025","-p","465:8025"]
matrix_mailer_sender_address: "xxx@163.com"
matrix_mailer_relay_use: true
matrix_mailer_relay_host_name: "smtp.163.com"
matrix_mailer_relay_host_port: 587
matrix_mailer_relay_auth: true
matrix_mailer_relay_auth_username: "xxx@163.com"
matrix_mailer_relay_auth_password: "My Authorization Code"

error log:

Aug 07 04:21:21 matrix.chatie.io systemd[1]: Started Matrix mailer.
Aug 07 04:21:21 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:21:21 exim 4.94.2 daemon started: pid=7, -q15m, listening for SMTP on port 8025 (IPv6 and IPv4)
Aug 07 04:21:21 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:21:21 Start queue run: pid=8
Aug 07 04:21:21 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:21:21 End queue run: pid=8
Aug 07 04:21:42 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:21:42 1mCDqA-000009-17 <= XXX@163.com H=(27cd74b0deae) [172.18.0.14] P=esmtp S=2974 id=266154568.10.1628310101899@27cd74b0deae
Aug 07 04:21:42 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:21:42 1mCDqA-000009-17 H=mx3.qq.com [240d:c040:1:40::133] Address not available
Aug 07 04:22:13 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:22:13 1mCDqA-000009-17 H=mx3.qq.com [203.205.219.57]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:22:45 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:22:45 1mCDqA-000009-17 H=mx2.qq.com [203.205.219.58]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:23:16 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:23:16 1mCDqA-000009-17 H=mx1.qq.com [162.62.116.184]: SMTP timeout after initial connection: Operation timed out
Aug 07 04:23:16 matrix.chatie.io matrix-mailer[346]: 2021-08-07 04:23:16 1mCDqA-000009-17 == XXX@qq.com R=dnslookup T=remote_smtp defer (110): Operation timed out H=mx1.qq.com [162.62.116.184]: SMTP timeout after initial connection

I also tried to register with other emails, such as gmail, 163mail, and foxmail.

The configuration of 163's STMP may still have a problem with the server. After I used QQ's STMP, it started to work.

I would suggest you to kindly START and STOP the VM and try sending the email.
Also, DONOT RESTART the VM.

With the Azure Subscription Management Support 's help, after stop and start our vm, we can connect port/25 from our server. And we can send e-mail with the address "matrix@wechaty.tk" now.