|
|
|
|
|
by beefsack
4730 days ago
|
|
I just recently decided that I wanted an in-house solution to inbound email handling (the user can send emails into the server containing commands to run) as I didn't like the expense or having to rely on an external service to do it for me. In the space of about half a day I had a working test bed: * Vanilla Postfix * A user with a .forward file, calling curl to post the email to my receiver route on my app * A receiver in my Go app using the inbuilt mail package * Logic to recursively parse multipart emails to extract plain text where possible, or strip tags from HTML when there is no text/plain version I've been amazed at the performance and the reliability of it even in staging. It automatically emails back a confirmation of the commands and the confirmation comes back lightning quick, back through the Postfix server. Anyone considering creating their own inbound email handler shouldn't be scared to have a crack, I was amazed at how simple and rewarding it was. |
|
You get all sorts of goodies like nice attachment handling and automatic stripping out of quoted text which aren't exactly hard but fiddly.