1

Сообщения якобы встают в очередь, но на почту не доходят.

Отправлял так:

$ sudo php -r "mail('[email protected]', 'Тестовое письмо с вашего сайта', 'Привет. Это тестовое сообщение.');"
  • OS: Ubuntu 16.04.5
  • PHP 7.0
  • Apache2

/etc/hostname

RPC

/etc/hosts

127.0.0.1   localhost.localdomain localhost
127.0.1.1   RPC.domain RPC

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1       test.jkl
127.0.0.1       lessonsPHP7
127.0.0.1       calc
127.0.0.1       mytest.loc

/var/mail.err - пустой;

/var/mail.log

Nov 30 08:13:33 RPC sm-mta[4942]: wATKMUrX015802: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=09:51:03, xdelay=00:10:54, mailer=esmtp, pri=210377, relay=alt4.gmail-smtp-in.l.google.com. [74.125.129.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Nov 30 08:13:33 RPC sm-mta[4942]: wATKMUrX015802: wAU62dWZ004942: sender notify: Warning: could not send message for past 4 hours
Nov 30 08:13:33 RPC sm-mta[4942]: wAU62dWZ004942: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Nov 30 08:13:33 RPC sm-mta[4942]: wATKI8XB015540: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=09:55:25, xdelay=00:00:00, mailer=esmtp, pri=390377, relay=alt4.gmail-smtp-in.l.google.com., dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.

jack@RPC:~$ telnet localhost 25

Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 RPC.domain ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Fri, 30 Nov 2018 08:20:02 +0200; (No UCE/UBE) logging access from: localhost.localdomain(OK)-localhost.localdomain [127.0.0.1]
8
  • Чтобы на gmail приходили письма корректно используйте phpmailer библиотеку. Они там по своему фильтруют и скорее всего блокируется как спам (не помечается а блокируется).
    – Nilsan
    30 ноя 2018 в 6:47
  • зачем телнетом локалхост мучать? помучайте mx.google.com 30 ноя 2018 в 6:59
  • @Nilsan, пробовал и на mail.ru. Тоже не получилось. Вечером попробую с PHPMailer. 30 ноя 2018 в 10:30
  • @Total Pusher, telnet: could not resolve mx.google.com/25: Name or service not known 30 ноя 2018 в 10:33
  • 1
    @Total Pusher, Похоже у моего провайдера закрыт порт 25. С помощью telnet alt4.gmail-smtp-in.l.google.com 25 достучаться не вышло: telnet: Unable to connect to remote host: Network is unreachable 6 дек 2018 в 5:01

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Посмотрите другие вопросы с метками или задайте свой вопрос.