We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Не работает SMTP
Не работает SMTP
В общем никак не могу настроить почтовый сервис так, чтобы он посылал письма с подтверждением регистрации, с контактной формы и т.д. Пока юзаю сторонний сервис Sendinblue, но хотелось бы использовать собственную почтовую службу Весты.
Результат выдачи плагина WP Mail Smtp
Результат выдачи плагина Easy Wp Smtp
Не пойму в чём дело, вроде данные SMTP сервера и созданного почтового ящика вводил верно, но всё равно выдаёт ошибку.
Результат выдачи плагина WP Mail Smtp
Code: Select all
Versions:
WordPress: 5.7.2
WordPress MS: No
PHP: 8.0.6
WP Mail SMTP: 2.8.0
Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP Error: Could not connect to SMTP host.
Host: mydomain.com
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)
Server:
OpenSSL: OpenSSL 1.0.2k 26 Jan 2017
Apache.mod_security: No
Debug:
Mailer: Прочие SMTP
SMTP Error: Could not connect to SMTP host.
SMTP Debug:
2021-05-21 06:53:49 Connection: opening to mydomain.com:587, timeout=300, options=array()
2021-05-21 06:53:49 Connection: opened
2021-05-21 06:53:49 SERVER -> CLIENT: 220 mydomain.com ESMTP Exim 4.94.2 Fri, 21 May 2021 08:53:49 +0200
2021-05-21 06:53:49 CLIENT -> SERVER: EHLO mydomain.com
2021-05-21 06:53:49 SERVER -> CLIENT: 250-mydomain.com Hello mydomain.com [ip.xxx.xx.xxx]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPE_CONNECT250-AUTH PLAIN LOGIN250-CHUNKING250-STARTTLS250 HELP
2021-05-21 06:53:49 CLIENT -> SERVER: STARTTLS
2021-05-21 06:53:49 SERVER -> CLIENT: 220 TLS go ahead
2021-05-21 06:53:49 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [/home/user1/web/mydomain.com/public_html/wp-includes/PHPMailer/SMTP.php line 467]
SMTP Error: Could not connect to SMTP host.
2021-05-21 06:53:49 CLIENT -> SERVER: QUIT
2021-05-21 06:53:49
2021-05-21 06:53:49
2021-05-21 06:53:49 Connection: closed
SMTP Error: Could not connect to SMTP host.
Code: Select all
Following error occurred when attempting to send test email:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Re: Не работает SMTP
Пробовал отключить и проверку сертификатов, и использовать SMTP без TLS. А вот насчёт OpenSSL поподробней, юзаю Cloudflare в качестве DNS (только DNS, без проксирования) и LetsEncrypt сертификат от панели Vesta.
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Не работает SMTP
Я имел в виду php-расширение. Включено, очевидно.
Порты соответствующие открыты? Как в Весте, так и у хостера?
Re: Не работает SMTP
Там клоудфлер порты рубит,если пытаетесь почту через них слать.
Re: Не работает SMTP
Короче, сделал ход конём и полностью вырубил все связи сайта с Cloudflare, даже DNS отключил, перевёл сайт на DNS регистратора. Результат - SMTP сервер всё равно не работает, значит дело не в Cloudflare. Насчёт портов есть вот такие вот строчки в exim.conf
daemon_smtp_ports = 25 : 465 : 587 : 2525
tls_on_connect_ports = 465
daemon_smtp_ports = 25 : 465 : 587 : 2525
tls_on_connect_ports = 465
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Не работает SMTP
Это совершенно необязательно.
Это не имеет отношения.
1. Проверьте, открыты ли порты для доступа извне - не закрыты ли они у хостера, на сервере в файерволе.
2. Попробуйте подключиться каким-либо другим клиентом, не php.
Re: Не работает SMTP
Я не знаю, как проверить открыты ли порты для доступа у хостера, но я сделал следующее.
1. Подключился через Roundcube Webmail и попробовал послать письмо, получил следующую ошибку.
SMTP ошибка (550): Невозможно установить отправителя "[email protected]" (Access denied - Invalid HELO name (See RFC2821 4.1.3))
2. Установил Mozilla Thunderbird и подключился к почте. Вроде получилось подключится, но письма по прежнему не получается отправлять, а номер порта для SMTP почему то 25.
3. Зашёл в FIrewall панели, ситуация для SMTP следующая ACCEPT TCP /SMTP 25,465,587,2525
1. Подключился через Roundcube Webmail и попробовал послать письмо, получил следующую ошибку.
SMTP ошибка (550): Невозможно установить отправителя "[email protected]" (Access denied - Invalid HELO name (See RFC2821 4.1.3))
2. Установил Mozilla Thunderbird и подключился к почте. Вроде получилось подключится, но письма по прежнему не получается отправлять, а номер порта для SMTP почему то 25.
3. Зашёл в FIrewall панели, ситуация для SMTP следующая ACCEPT TCP /SMTP 25,465,587,2525
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Не работает SMTP
Проверьте тут: https://mxtoolbox.com/diagnostic.aspxSkorsa wrote: ↑Thu May 27, 2021 8:55 amЯ не знаю, как проверить открыты ли порты для доступа у хостера, но я сделал следующее.
1. Подключился через Roundcube Webmail и попробовал послать письмо, получил следующую ошибку.
SMTP ошибка (550): Невозможно установить отправителя "[email protected]" (Access denied - Invalid HELO name (See RFC2821 4.1.3))
2. Установил Mozilla Thunderbird и подключился к почте. Вроде получилось подключится, но письма по прежнему не получается отправлять, а номер порта для SMTP почему то 25.
3. Зашёл в FIrewall панели, ситуация для SMTP следующая ACCEPT TCP /SMTP 25,465,587,2525
Re: Не работает SMTP
Вот такая вот штука получается
https://prnt.sc/13iegw0
Session Transcript:
Connecting to IP.116
220 mydomain.com ESMTP Exim 4.94.2 Fri, 28 May 2021 12:13:06 +0200 [5285 ms]
EHLO keeper-us-east-1c.mxtoolbox.com
250-mydomain.com Hello keeper-us-east-1c.mxtoolbox.com [18.205.72.90]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-CHUNKING
250-STARTTLS
250 HELP [230 ms]
MAIL FROM:<[email protected]>
250 OK [233 ms]
RCPT TO:<[email protected]>
550 relay not permitted [459 ms]
LookupServer 7343ms
https://prnt.sc/13iegw0
Session Transcript:
Connecting to IP.116
220 mydomain.com ESMTP Exim 4.94.2 Fri, 28 May 2021 12:13:06 +0200 [5285 ms]
EHLO keeper-us-east-1c.mxtoolbox.com
250-mydomain.com Hello keeper-us-east-1c.mxtoolbox.com [18.205.72.90]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-CHUNKING
250-STARTTLS
250 HELP [230 ms]
MAIL FROM:<[email protected]>
250 OK [233 ms]
RCPT TO:<[email protected]>
550 relay not permitted [459 ms]
LookupServer 7343ms