Dovecot Sieve for Pre-Fetching and Inlining Images
I’ve been self hosting email for at least three years now, and since the start I’ve been wanting a particular feature.
Many may remember years ago when Google announced how Gmail would start prefetching and locally serving up images. A
feature that was announced as privacy protecting, but in Google classic fashion really just meant they wanted to increase
the value of you data, by preventing other from also tracking it. Googles awful privacy track record aside, it’s still
a pretty good idea. I wanted that feature. I wanted Dovecot to automagically fetch remote images to a local server and
rewrite the URLs. This method had one particular downside, running a server and a small risk of someone randomly guessing
image URLs. What I did end up settling on was… instead of serving them from my own server, I’d simply inline the images
with base64 encoding, attached as a multi-part section.