postal icon indicating copy to clipboard operation
postal copied to clipboard

To: Returnpath is not routing

Open hassancs91 opened this issue 6 years ago • 15 comments

Iam trying to handle bouncing in postal. but the bounce emails that are incoming to return path are marked as hard fail.

any workaround? Capture

hassancs91 avatar May 27 '20 15:05 hassancs91

If you go into the message, you should be able to see why it hard failed.

willpower232 avatar May 28 '20 16:05 willpower232

When I open the message, I see this: This message was a bounce but we couldn't link it with any outgoing message and there was no route for it.

But I added a route for this address. this problem happens when the return path is the same domain as the sending domain.

so it's impossible to read bounce messaged in this way. How do we use the return path address in postal then?

hassancs91 avatar May 28 '20 18:05 hassancs91

The return path is for when Postal sends a message and then receives a bounce as it may not have failed straight away.

Was it supposed to correspond to a message Postal sent or did you email it directly?

willpower232 avatar May 29 '20 15:05 willpower232

This is the scenario: I Setup Postal and everything is perfect, I sent a test email to my address and got the return-path address.

The return path address is the address used by other mail providers to send bounces back, yes?

so I got this return path address and I send a message to this address to test bounce handling.

I got the message in postal coming from my email address to the return path address from: [email protected] to: [email protected]

and I created a route for the return path address to another Gmail inbox, so I can read the bounces through IMAP from my mailing app (mautic)

The problem is that postal is not routing emails that are coming to the return path. all other routes are fine. but this is giving a hard fail. with the message, I sent you above.

I hope that I explained the scenario.

am I doing something wrong?

Thank you!

hassancs91 avatar May 29 '20 15:05 hassancs91

I see, it might be that as it isn't a genuine bounce, it won't get routed or something but I'm not sure.

You could try emailing an address that definitely doesn't exist or one you know is full maybe?

willpower232 avatar Jun 02 '20 16:06 willpower232

I tried sending a direct message to the return path address, and it shows the same error (cant route) this is weird. I dont understand what's happing.

hassancs91 avatar Jun 06 '20 10:06 hassancs91

@hassancs91 if you send email to return path then if of course will be HardFail as your email can't be correct bounce.

dragoangel avatar Jun 20 '20 07:06 dragoangel

@dragoangel Then how to handle bounces??

hassancs91 avatar Jun 20 '20 07:06 hassancs91

Hi @hassancs91 what you mean by how handle bounce? Maybe you mean: how test bounce cases? If - yes, then answer is: For example you can send email to your own another mail server to use that over quotas (doesn't have free space to get new mail) or to not existing user. If - no, pls repeat your question more correctly, I don't get it.

Note: why I recommend sending to own email server: to not get bad IP reputation due to many bounces from one IP while you will test your cases.

dragoangel avatar Jul 05 '20 19:07 dragoangel

Hi. This is the scenario: Mautic connected to Postal When I send an email marketing campaign through mautic, some emails will bounce. so emails will bounce in postal. I need to automatically blacklist those hard bounces in my email system (Mautic) this is bounce handling.

usually bounces emails will go back to the return-path address. but the problem is that this address is autogenerated by postal so we can't read those emails. from other applications. and there is no webhook that works with Mautic.

this is the problem.

hassancs91 avatar Jul 06 '20 13:07 hassancs91

So that's what you needed to start with your issues description that you have app which not integrated with postal. Hard bounce will be returned to postal. If you go through setup guidelines you have created mx for return patch which is pointing to postal server - that the place where bounce will be delivered. Postal will know which delivery would succeed/failed/deferred. And yep you need webhooks endpoints in your app developed for postal integration to get that data immediately. Not optimal way, but still you can get that data for each dedicated email (by its id returned when you send emails via api) it's status till you not get hard bounce or delivered status by https://krystal.github.io/postal-api/controllers/messages.html methods. If you use plain SMTP delivery that I doesn't think this possible - you need monitor your hard bounce manually and manage your subscriptions manually also. Better ask @willpower232 as I simple user as you. There isn't any api method that allows list existing messages by filters per server (at least I doesn't find such in docs), so you can't grep them to automate list generation. Actually having such method is quite cool future, for example: show last 1000 email delivered where [email protected], and subject='blabla.*' (regex) and status='hard_bounce' fromdate=, tilldate=, next_tokeb=. Which will return array of mail in bunch with maximum 1000 value's and next_token if there more then 1000 was been filtered.

dragoangel avatar Jul 06 '20 14:07 dragoangel

Thank you for your reply. if postal can allows us to set custom return-path address. like a fixed one. then we can monitor bounces through Imap. but I dont think this is possible.

Thanks anyway.

hassancs91 avatar Jul 06 '20 15:07 hassancs91

The wiki says that the __returnpath__ route can only be a HTTP endpoint and that doesn't appear to have changed so the only way to monitor bounces is essentially without an inbox so it does not seem that what you want is currently possible with Postal.

willpower232 avatar Jul 06 '20 17:07 willpower232

Yeah, this is what I thought, thank you. I hope this to be updated in the future so we can connect any app to postal.

hassancs91 avatar Jul 06 '20 17:07 hassancs91

This is the scenario: I Setup Postal and everything is perfect, I sent a test email to my address and got the return-path address.

The return path address is the address used by other mail providers to send bounces back, yes?

so I got this return path address and I send a message to this address to test bounce handling.

I got the message in postal coming from my email address to the return path address from: [email protected] to: [email protected]

and I created a route for the return path address to another Gmail inbox, so I can read the bounces through IMAP from my mailing app (mautic)

The problem is that postal is not routing emails that are coming to the return path. all other routes are fine. but this is giving a hard fail. with the message, I sent you above.

I hope that I explained the scenario.

am I doing something wrong?

Thank you!

Dear Mr. Hassan,

YES! I've been facing the same problem, unable to replace [email protected] bounce address to a custom address([email protected])..Please, can you help me how to solve this? or Could you please be very kind to let me know If there is any other script/tool that can allow me to have custom bounce address?

Thank you in advance!

XenyFord avatar Dec 07 '21 18:12 XenyFord