Hoje eu estava observando o arquivo de log do Postfix (em CentOS 6.X o padrão é /var/log/maillog) e vi um monte de mensagens sendo adiadas.
Jan 5 15:02:03 vps3 postfix/smtp[27441]: 3187E2180015: to=<undesired@domain.com>, relay=domain.com[167.114.XXX.XXX]:25, delay=254553, delays=254538/0.2/15/0, dsn= 4.4.2, status=deferred (conversation with domain.com[167.114.XXX.XXX] timed out while receiving the initial server greeting) Jan 5 15:02:03 vps3 postfix/smtp[27442]: CDED02180014: to=<undesired@domain.com.br>, relay=domain.com[167.114.XXX.XXX]:25, delay=258753, delays=258738/0.13/15/0, dsn =4.4.2, status=deferred (conversation with domain.com[167.114.XXX.XXX] timed out while receiving the initial server greeting) Jan 5 15:02:03 vps3 postfix/smtp[27443]: C8EE72180012: to=<undesired@domain.com.br>, relay=domain.com[167.114.XXX.XXX]:25, delay=258753, delays=258738/0.14/15/0, dsn =4.4.2, status=deferred (conversation with domain.com[167.114.XXX.XXX] timed out while receiving the initial server greeting) Jan 5 15:02:03 vps3 postfix/smtp[27444]: CDCE32180013: to=<undesired@domain.com.br>, relay=domain.com[167.114.XXX.XXX]:25, delay=258753, delays=258738/0.15/15/0, dsn =4.4.2, status=deferred (conversation with domain.com[167.114.XXX.XXX] timed out while receiving the initial server greeting)
e essas mensagens repetiam de tempos em tempos.
Aqui, a mensagem é a coisa menos importante. O que eu precisava era que estas linhas desaparecessem dos logs.
So here’;está uma dica para limpar mensagens presas na filas de mensagens e isso vale para qualquer motivo.
Para ver o que você tem na sua fila de e-mail digite:
# mailq
ou
# postqueue -p
Você vê resultados assim:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- 2CFD22180017 6361 Mon Jan 4 16:27:13 root@as8.producoesvsrevolucao.com.br (host alt1.gmail-smtp-in.l.google.com[64.233.190.27] said: 421-4.7.0 [192.99.43.88 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. 66si4725003qhp.11 - gsmtp (in reply to end of DATA command)) xxxnononoxxx@gmail.com AB6302180016 1062 Sat Jan 2 17:43:22 advertise.bz222yiaku@gmail.com (host alt1.gmail-smtp-in.l.google.com[64.233.190.27] said: 421-4.7.0 [192.99.43.88 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. j133si42716128qhj.106 - gsmtp (in reply to end of DATA command)) xxxnononoxxx@gmail.com 849F02180010 3677 Thu Dec 31 20:22:07 gtve5x@gmail.com (host alt1.gmail-smtp-in.l.google.com[64.233.190.27] said: 421-4.7.0 [192.99.43.88 15] Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. g70si65400626qkh.92 - gsmtp (in reply to end of DATA command)) xxxnononoxxx@gmail.com -- 12 Kbytes in 3 Requests.
Cada linha é uma mensagem na fila. O primeiro bloco é o Id de fila.
Para remover uma mensagem da Fila digite:
# postsuper -d AB6302180016 postsuper: AB6302180016: removed postsuper: Deleted: 1 message
Isto irá apagar a mensagem 849F02180010 da fila.
Outros comandos úteis:
# postfix flush
ou
# postfix -f
Limpa todas as mensagens da fila do Postfix.
# postsuper -d ALL
Remove todas as mensagens da fila.
# postsuper -d ALL deferred
Remove todas as mensagens adiadas da fila.