On Thu, Jul 22, 2021 at 02:19:23PM -0400, post...@ptld.com wrote: > And im not a fan of proxy filter, it feels like an expensive and > cumbersome work around solution.
The SMTP engine is easy to implement, and only has to be written once. You can probably find existing ones to which you can add your custom body inspection requirements. Keep in mind that message bodies are often multi-part MIME entities, some body parts may be transfer-encoded, and some structured headers may be also be encoded (RFC2047 or RFC2231). Messages can be quite large and sending the entire message as a single string parameter is not a good idea, it is best handled as a stream, and SMTP is the natural protocol for transmitting it. Perhaps you're lookin for an SMTP proxy with Sieve support, so that you can express simple rules on the message envelope, header and body. I haven't looked, but I expect that such a beast can be found on github, or similar. -- Viktor.