pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.41k stars 79 forks source link

Add Precedence: Bulk header? #29

Closed wmnnd closed 3 years ago

wmnnd commented 3 years ago

A user on r/selfhosted suggested to add the Precedence: Bulk header to all campaigns sent with Keila. The idea is that it stops services such as GMail from sending automated out-of-office replies.

However, RFC 2076 says this header is "Non-standard, controversial, discouraged". A later RFC, RFC 3834 also mentions the header and kinda-not-really suggests its use to avoid automatic responses.

I was also unable to find any official docs from Google on this.

So if anyone has any practical previous experience using this header, that would be greatly appreciated.

crova commented 3 years ago

Mate, I checked headers for a number of providers I dealt with in the past:

It's been a couple of months since I last used any of those services, so they might have changed the way they do it (I don't think so though). And to be frank, while I did use all of them at some point, I mainly have experience with Mindbaz, Sendinblue, Expert Sender, and SES. As this small sample shows, it is not clear whether the header should be used or not. It's not like DKIM or DMARC records that everyone is dead set of their utility. That being said, I don't really have a suggestion here. It seems that it doesn't really matter.

Cheers.

wmnnd commented 3 years ago

Thanks for looking into this, @crova!

So my takeaway from your research would be to add the header. If Sendinblue sets the header, that suggests there is no major downside to it. And at the same time it might help making Keila a better citizen of the email world.

Wold you agree with that conclusion?

crova commented 3 years ago

No worries @wmnnd, my pleasure.

I would agree with you. I couldn't find anything conclusive about this on the web (if it should be enforced or not). From what I could gather it does not really matter and there shouldn't be any issues with using it.

If anything, you could set the value for list instead of bulk just because the latter might get a bad rep. But again, from the RFCs and the few mentions of it, it does not seem to matter at all (and everyone that sets the header, do it with bulk).

wmnnd commented 3 years ago

Okay wonderful, then I’d say let’s go with bulk! Do you want to create a MR?

Jcambass commented 3 years ago

This sounds like it would be a good option to allow users to opt-out of this functionality if they have a particular reason to do so. We can provide a default for what we think is right but providing escape hatches is always a good idea IMHO.

wmnnd commented 3 years ago

I’m fine with adding a config option but I think it should be up to the instance admin to make that choice, so it should be a global configuration option. And I would default to enabling the header, so it should be something like DISABLE_BULK_HEADER.

Jcambass commented 3 years ago

@wmnnd Yeah maybe I wasn't clear enough :) I think that it woul simply be an application config rather than a user changable per campain config.

wmnnd commented 3 years ago

Thanks everyone for contributing with your feedback. #45 has now been merged and adds the header with an option to disable it via an environment variable.