Retransmitir email do Postfix através de outro servidor para rejeições

1

Eu gostaria que o Postfix tentasse entregar um e-mail inicialmente e, somente se houver uma rejeição, tente enviar por meio de um relay.

O cenário é que nós mudamos um site existente, com os usuários que precisamos enviar por e-mail, para um novo servidor com um novo IP que os principais provedores de e-mail estão pulando fora de controle. Eu sei que preciso aquecer o IP, mas o problema é como garantir a entrega enquanto aquecemos o IP? Parece um Catch-22.

Minha ideia é testar nosso novo endereço IP e, apenas com a devolução, tente novamente por meio de um IP de aquecimento que já enviamos por e-mail.

Eu sei como retransmitir todos os e-mails do Postfix para outro servidor Postfix, mas espero poder fazer uma retransmissão condicional apenas ao receber uma rejeição, para que possamos eventualmente aquecer esse novo IP.

    
por Shovas 14.03.2017 / 22:16

1 resposta

1

postconf -e soft_bounce=yes    
postconf -e smtp_fallback_relay=otherhost:port
postconf -e bounce_queue_lifetime=0

soft_bounce (padrão: não)

Safety net to keep mail queued that would otherwise be returned to the sender. This parameter disables locally-generated bounces, changes the handling of negative responses from remote servers, content filters or plugins, and prevents the Postfix SMTP server from rejecting mail permanently by changing 5xx reply codes into 4xx. However, soft_bounce is no cure for address rewriting mistakes or mail routing mistakes.

Note: "soft_bounce = yes" is in some cases implemented by modifying server responses. Therefore, the response that Postfix logs may differ from the response that Postfix actually sends or receives.

Example:

soft_bounce = yes

bounce_queue_lifetime (padrão: 5d)

Consider a bounce message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the bounce_queue_lifetime limit. By default, this limit is the same as for regular mail.

Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is d (days).

Specify 0 when mail delivery should be tried only once.

This feature is available in Postfix 2.1 and later.

smtp_fallback_relay

smtp_fallback_relay (default: $fallback_relay) Optional list of relay hosts for SMTP destinations that can't be found or that are unreachable. With Postfix 2.2 and earlier this parameter is called fallback_relay. By default, mail is returned to the sender when a destination is not found, and delivery is deferred when a destination is unreachable. With bulk email deliveries, it can be beneficial to run the fallback relay MTA on the same host, so that it can reuse the sender IP address. This speeds up deliveries that are delayed by IP-based reputation systems (greylist, etc.). The fallback relays must be SMTP destinations. Specify a domain, host, host:port, [host]:port, [address] or [address]:port; the form [host] turns off MX lookups. If you specify multiple SMTP destinations, Postfix will try them in the specified order. To prevent mailer loops between MX hosts and fall-back hosts, Postfix version 2.2 and later will not use the fallback relays for destinations that it is MX host for (assuming DNS lookup is turned on).

    
por 14.03.2017 / 23:53