Eu tenho um MTA postfix enviar somente configurado que pode enviar de @ example.com
Quando uma rejeição acontece, eu gostaria de lidar com isso em um script.
Eu segui os passos dados por esta resposta: link
Meu script é chamado corretamente, mas o endereço de entrada ainda recebe um e-mail com a devolução. Como posso evitar que isso aconteça?
main.cf
mydestination = bounce.example.com, localhost
# BOUNCE CONFIG
notify_classes = bounce
bounce_notice_recipient = [email protected]
transport_maps = hash:/etc/postfix/transport_maps
bounce_size_limit = 1
transport_maps
# when you make changes to this file, run:
# sudo postmap /etc/postfix/transport_maps
[email protected] bulkbounce:
master.cf
bulkbounce unix - n n - - pipe
flags=FRq user=nouser argv=/path/to/bouncescript.sh
No entanto, enviar um email como (válido de, inválido rcpt):
FROM: [email protected]
TO: [email protected]
SUBJECT: ...
...
Resultados em meu script sendo chamado (bom) e [email protected] recebendo um email com a mensagem devolvida (não desejada).
Como posso desativar isso? Ou o que estou perdendo?
Logs de exemplo:
Nov 16 17:27:32 dev postfix/smtpd[6654]: connect from localhost[::1]
Nov 16 17:27:32 dev postfix/smtpd[6654]: 486FED9F98: client=localhost[::1]
Nov 16 17:27:32 dev postfix/cleanup[6658]: 486FED9F98: message-id=<[email protected]>
Nov 16 17:27:32 dev postfix/qmgr[6652]: 486FED9F98: from=<someuser@example>, size=544, nrcpt=1 (queue active)
Nov 16 17:27:32 dev postfix/smtpd[6654]: disconnect from localhost[::1]
Nov 16 17:28:13 dev postfix/smtp[6659]: 486FED9F98: to=<[email protected]>, relay=tribulant.com[23.22.38.89]:25, delay=41, delays=0.05/0.02/21/20, dsn=5.0.0, status=bounced (host tribulant.com[23.22.38.89] said: 550 No such person at this address. (in reply to RCPT TO command))
Nov 16 17:28:13 dev postfix/cleanup[6658]: 7604CD9F9D: message-id=<[email protected]>
Nov 16 17:28:13 dev postfix/qmgr[6652]: 7604CD9F9D: from=<>, size=2984, nrcpt=1 (queue active)
Nov 16 17:28:13 dev postfix/bounce[6693]: 486FED9F98: sender non-delivery notification: 7604CD9F9D
Nov 16 17:28:13 dev postfix/cleanup[6658]: 76DAED9F9E: message-id=<[email protected]>
Nov 16 17:28:13 dev postfix/qmgr[6652]: 76DAED9F9E: from=<[email protected]>, size=2599, nrcpt=1 (queue active)
Nov 16 17:28:13 dev postfix/bounce[6693]: 486FED9F98: postmaster non-delivery notification: 76DAED9F9E
Nov 16 17:28:13 dev postfix/qmgr[6652]: 486FED9F98: removed
Nov 16 17:28:13 dev postfix/smtp[6659]: 7604CD9F9D: to=<someuser@example>, relay=mx.mailprotect.be[178.208.39.141]:25, delay=0.08, delays=0/0/0.05/0.03, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C0B5E4401F4)
Nov 16 17:28:13 dev postfix/qmgr[6652]: 7604CD9F9D: removed
Nov 16 17:28:13 dev postfix/pipe[6694]: 76DAED9F9E: to=<[email protected]>, relay=bulkbounce, delay=0.16, delays=0/0.01/0/0.15, dsn=2.0.0, status=sent (delivered via bulkbounce service)
Nov 16 17:28:13 dev postfix/qmgr[6652]: 76DAED9F9E: removed
fqdn: app.example.com