postsrsd icon indicating copy to clipboard operation
postsrsd copied to clipboard

553 5.1.7 local part too long in

Open yctn opened this issue 5 years ago • 5 comments

we are using postsrd. but something we receive this error duo to the mail adres being to long:

SRS0=fGv9=BC=a.ccdefghijklmn.com=bounce-4IDNASXYtY_FG21s4IoV1XzCfCtHkb2RZY_qdGZ8Q-6A@email.mydomin.com

is there a way to adjust de size of the rewrit? or limit it?

yctn avatar Jul 28 '20 08:07 yctn

bump

pfarikrispy avatar Nov 19 '20 10:11 pfarikrispy

Unfortunately, there's not much I can do. The stateless SRS implementation needs to store the full original email address in the localpart, plus additional 13 characters overhead, which limits the effective email address length that can be forwarded to 51 characters. If you're desperate, you could shave off another one or two characters by dangerously weakening the embedded hash and/or timestamp, but that's it.

A possible alternative would be an SRS implementation that stores the original email address in a database, together with a random secret token, and uses that secret token in the email address. This would resolve the address length problem, but as you need to keep the database entry for at least a few hours, you'd open yourself up to a denial of service attack where a malicious sender could spam you with thousands or millions of random email addresses to exhaust your available database storage.

roehling avatar Nov 19 '20 12:11 roehling

I'll close this for now. Maybe I'll revisit this problem at a later date and add an optional database backend to PostSRSd.

roehling avatar Dec 09 '20 09:12 roehling

On second thought, I'll leave it open as a reminder for myself.

roehling avatar Dec 09 '20 09:12 roehling

Thanks for your thoughts and suggestions! We'll look it as well and see if we can work around the issue

pfarikrispy avatar Dec 10 '20 13:12 pfarikrispy

https://github.com/roehling/postsrsd/releases/tag/2.0.0a1

roehling avatar Dec 20 '22 15:12 roehling