Exim: Warning: message […] delayed 48 hours

Автор: | 08/15/2017

На почту пришло сообщение вида:

This message was created automatically by mail delivery software.
A message that you sent has not yet been delivered to one or more of its
recipients after more than 48 hours on the queue on mail.domain.org.ua.

The message identifier is: 1dgRJz-0003UV-ED
The date of the message is: Sat, 12 Aug 2017 10:57:59 +0300

The address to which the message has not yet been delivered is:


No action is required on your part. Delivery attempts will continue for
some time, and this warning may be repeated at intervals if the message
remains undelivered. Eventually the mail delivery software will give up,
and when that happens, the message will be returned to you.

Проверяем очередь на отправку на почтовом сервере:

20:18:03 [root@venti /home/setevoy] # mailq
57h  1.5K 1dgRJz-0003UV-ED <1th@domain.kiev.ua>


20:18:18 [root@venti /home/setevoy] # exim -bp
57h  1.5K 1dgRJz-0003UV-ED <1th@domain.kiev.ua>

Проверяем лог exim-а:

20:18:19 [root@venti /home/setevoy] # cat /var/log/exim/main.log | grep 1dgRJz-0003UV-ED
2017-08-13 04:11:22 1dgRJz-0003UV-ED == po***@mail.ru <Po***@MAIL.ru> R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host for 'mail                                                                  .ru'
2017-08-13 05:11:17 1dgRJz-0003UV-ED H=mail.ru [] Connection refused
2017-08-13 05:11:17 1dgRJz-0003UV-ED == po***@mail.ru <Po***@MAIL.ru> R=dnslookup T=remote_smtp defer (111): Connection refused

Почтовый сервер в ДЦ Воля, Украина, Киев — видимо добрался сюда бан российских ресурсов.

ОК, не проблема — переотправлю с другого сервера.

Несколько полезных команд по работе с очередями в Exim:

  • /usr/sbin/exim -M email-id => Force delivery of one message
  • /usr/sbin/exim -qf => Force another queue run
  • /usr/sbin/exim -qff => Force another queue run and attempt to flush the frozen message
  • /usr/sbin/exim -Mvl messageID => View the log for the message
  • /usr/sbin/exim -Mvb messageID => View the body of the message
  • /usr/sbin/exim -Mvh messageID => View the header of the message
  • /usr/sbin/exim -Mrm messageID =>  Remove message without sending any error message
  • /usr/sbin/exim -Mg messageID =>  Giveup and fail message to bounce the message to the Sender
  • /usr/sbin/exim -bpr | grep “<” | wc -l =>Number of emails in the que
  • /usr/sbin/exim -bpr | grep frozen | wc -l => How many Frozen mails on the queue
  • /usr/sbin/exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm =>  Deleteing Frozen Messages

Прочитать сообщение в очереди:

20:19:40 [root@venti /home/setevoy] # exim -Mvb 1dgRJz-0003UV-ED
Привет, Валер.

Очищаем очередь — указываем Exim на забросить попытки доставить письмо:

20:20:55 [root@venti /home/setevoy] # exim  -Mg 1dgRJz-0003UV-ED

Проверяем очередь:

20:23:41 [root@venti /home/setevoy] # exim -bp | wc -l

И в почтовый ящик отправителя упало Mail delivery fail:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed: