S
S
snake-yava2016-11-06 14:35:13
linux
snake-yava, 2016-11-06 14:35:13

How to configure Exim in VestaCP to send mail via SMTP if port 25 is blocked?

Сервер на Google Cloud, там как известно, 25 порт категорически заблокирован. Письма с сервера не приходят и это большая проблема. Пытаюсь настроить exim для отправки через SMTP mail.ru. Делегировал в DNS MX-записи на emx.mail.ru. Создал в biz.mail.ru ящик [email protected] Из интерфейса mail.ru письма отправляются.
По аналогии с инструкцией viewtopic.php?t=3753
Файла /etc/exim4/exim4.conf не было, поэтому скопировал его из /etc/exim4/exim4.conf.template. Добавил в соответствующие разделы конфига строки:

login:
  driver = plaintext
  public_name = LOGIN
  client_send = ": [email protected] : [email protected]"
  server_set_id = $auth1
  
smarthost:
  driver = manualroute
  domains = ! +local_domains
  transport = remote_smtp_auth
  route_list = * smtp.mail.ru  
  
 dnslookup:
  driver = dnslookup
  domains = *
  transport = remote_smtp
  no_more
  
 remote_smtp_auth:
  driver = smtp
  port = 465
  hosts = smtp.mail.ru
  hosts_require_auth = smtp.mail.ru
  hosts_require_tls = smtp.mail.ru
  
*@* [email protected] Ffr

Перезапустил exim из весты. Отправил через php mail() тестовое письмо, ничего не пришло.
sudo mailq
76m   446 1c2vbA-0001gY-5H <[email protected]>
          [email protected]
14m   448 1c2wYO-0002eT-I6 <[email protected]>
          [email protected]

Отрывок из лога
less /var/log/exim4/mainlog
2016-11-05 15:41:59 1c2vbA-0001gY-5H == [email protected] R=smarthost T=remote_smtp_auth defer (-53): retry t
ime not reached for any host
2016-11-05 15:41:59 1c2kGk-0007Oa-Ix == [email protected] R=smarthost T=remote_smtp_auth defer (-53): retry t
ime not reached for any host
2016-11-05 15:41:59 1c2LY6-0001XB-Dx Message is frozen
2016-11-05 15:41:59 End queue run: pid=9947
2016-11-05 15:42:20 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 15:42:20 1c2wYO-0002eT-I6 <= [email protected] U=snakeyava P=local S=448
2016-11-05 15:42:20 1c2wYO-0002eT-I6 == [email protected] R=smarthost T=remote_smtp_auth defer (-53): retry t
ime not reached for any host
2016-11-05 15:42:49 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 15:45:01 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 15:50:02 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 15:55:01 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 15:57:10 Warning: purging the environment.
 Suggested action: use keep_environment.
2016-11-05 16:00:02 Warning: purging the environment.
 Suggested action: use keep_environment.

Я не догоняю как правильно сконфигурировать exim. Помогите, пожалуйста. Хочется чтобы письма с сайтов отправлялись. Даже от Vestы ни разу писем не видел.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2016-11-06
@Sanes

При чет тут pjpmail() и 465 порт? проверяйте 465 порт и отправляйте через него по SMTP

S
snake-yava, 2016-11-07
@snake-yava

It is necessary that Vesta and any hosted sites can send email. Because no notifications are coming, and php mail() is not working. To do this, I'm trying to configure Exim so that letters from the admin panel are sent from at least one address via SMTP. Port 465 is the port of the smtp.mail.ru server. The question is, is the config correct and how to make the mail work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question