1 (edited by mak_nikki 2020-04-20 14:45:07)

Topic: no authorization by smtp

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2
- Deployed with iRedMail Easy or the downloadable installer? the downloadable installer
- Linux/BSD distribution name and version: ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
There are several php modules for sending mail, here is one of them
php module .msmtprc, its settings:
# smtp account configuration for default
account default
logfile /home/bitrix/msmtp_default.log
host mail.mebelson.ru
port 465
from it@mebelson.ru
auth on
user it@mebelson.ru
password *******
tls on
tls_certcheck off

Logs:
Apr 20 10:24:07 host = mail.mebelson.ru tls = on auth = on user=it@mebelson.ru from=it@mebelson.ru recipients = hosting_test @ bitrixsoft.com, noreply @ bitrixsoft.com errormsg = 'cannot connect to mail.mebelson.ru, port 465: Connection refused' exitcode = EX_TEMPFAIL
______________________________________-

Our ip addresses are not blocked.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: no authorization by smtp

Please use port 587 with TLS instead, port 465 is not enabled by iRedMail by default.

3

Re: no authorization by smtp

ZhangHuangbin wrote:

Please use port 587 with TLS instead, port 465 is not enabled by iRedMail by default.

There are no connections on port 587 either.

Post's attachments

1.PNG
1.PNG 24.3 kb, file has never been downloaded. 

2.PNG
2.PNG 26.33 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4

Re: no authorization by smtp

You can try to enable port 465 then: https://docs.iredmail.org/enable.smtps.html

5

Re: no authorization by smtp

ZhangHuangbin wrote:

You can try to enable port 465 then: https://docs.iredmail.org/enable.smtps.html

You have already indicated actions already done. It does not help.

6

Re: no authorization by smtp

mak_nikki wrote:

You have already indicated actions already done. It does not help.

Excuse me, what do you mean "it does not help"?

7

Re: no authorization by smtp

ZhangHuangbin wrote:
mak_nikki wrote:

You have already indicated actions already done. It does not help.

Excuse me, what do you mean "it does not help"?

I mean
that your advice did not solve the problem.

8

Re: no authorization by smtp

Please make sure your php script uses correct network port and secure connection:

- Port 587, STARTTLS
- Port 465, SSL

9

Re: no authorization by smtp

ZhangHuangbin wrote:

Please make sure your php script uses correct network port and secure connection:

- Port 587, STARTTLS
- Port 465, SSL

With other mail servers sending emails works, for example Gmail. I tried already ssl 443, starttls 587. The problem is not solved.

10

Re: no authorization by smtp

Any related log in Postfix log file (/var/log/maillog)?

11

Re: no authorization by smtp

ZhangHuangbin wrote:

Any related log in Postfix log file (/var/log/maillog)?

maybe these lines:
1) May 4, 08:43:25 mail postfix / smtps / smtpd [5749]: disconnect from the unknown [192.168.102.251] ehlo = 1 auth = 1
    mail = 2 rcpt = 2 data = 1 rset = 2 quit = 1 team = 10
2) May  4 08:45:22 mail postfix/smtps/smtpd[6578]: connect from unknown[192.168.102.251]
3) May  4 08:45:22 mail postfix/smtps/smtpd[6578]: Anonymous TLS connection established from unknown[192.168.102.251]:
    TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
4) May  4 08:45:22 mail postfix/smtps/smtpd[6578]: disconnect from unknown[192.168.102.251] ehlo=1 auth=1 quit=1
    commands=3

12 (edited by mak_nikki 2020-06-17 12:16:23)

Re: no authorization by smtp

ZhangHuangbin wrote:

Any related log in Postfix log file (/var/log/maillog)?


On a local network, sending via smtp through 587 works. And if you connect externally, it does not work. Checking telnet ***.***.***.*** 587 connection is.

13

Re: no authorization by smtp

Don't use telnet to check a ssl/tls connection. Please try it with a MUA like Thunderbird.

14

Re: no authorization by smtp

ZhangHuangbin wrote:

Don't use telnet to check a ssl/tls connection. Please try it with a MUA like Thunderbird.

Smtp works in Thunderbird. But not on web resources. Moreover, the smtp connection works in the local network.