postal
postal copied to clipboard
How to trigger a hard bounce for incoming route
Mail coming into my postal hits a webhook endpoint which looks for a matched user. If no match is found, I'd like to trigger a hard fail and send a bounce email back saying "this email address doesn't exist anymore". I have two questions around this:
- What response should my webhook send back to trigger a hard fail? I tried sending back 550, but that's resulting in a soft fail.
and, sidenote question:
- I've edited /opt/postal/app/lib/postal/bounce_message.rb slightly -- when can I expect those changes will over overwritten? When I update postal I presume?
-
it looks like its expecting HTTP codes not SMTP code so I think you might want to try 400 but I could be mistaken if thats not the file. https://github.com/atech/postal/blob/5c8f9b99c019952ea93bdb6cf329af2cffd43336/lib/postal/http_sender.rb#L34-L53
-
exactly, the files won't be replaced until you update Postal