Support for Lockbox?
chuckphillips opened this issue · comments
Any plans to support lockbox encryption of the email
column in the mailkick_opt_outs
table?
Hey @chuckphillips, I think you can add the necessary columns and create an initializer with:
Mailkick::OptOut.encrypts :email
Mailkick::OptOut.blind_index :email
(and follow the typically pattern for migrating columns if needed)
This line will need to be changed to use Active Record to generate email condition - something like Actually, looks like that's a join so it won't be as straightforward - both email columns would need to have a blind index and use the same key.WHERE EXISTS(#{Mailkick::OptOut.where(email: email, ...).to_sql})
- so it'll use the blind index when one exists or the normal column otherwise.
mailkick/lib/mailkick/model.rb
Line 14 in 4dad736
Let me know if you have any luck with it.
Cleaning up issues
I just wanted to say that native support to Lockbox would be awesome 🙏
Just fyi: Just pushed Mailkick 1.0, which no longer stores emails (it just references models). This should be better for privacy.