On Wed, 9 Sep 2026, Crystal Kolipe wrote: > On Tue, Sep 08, 2026 at 08:42:18PM +0100, Mark Hills wrote: > > Here's an example: I would like our outbound SMTP servers to strip > > "Received" headers, to avoid exposing some gnarly details of our internal > > network (eg. prototype script below) > > > > There needs quite a lot of code to sit between smtpd and this script. > > About 300 lines of C. Possibly less. [...] > all that is required is field-splitting the lines that you receive via > the filter API, session management, and error handling.
This is "all"(!) A bunch of state, a persistent process, and due care around field splitting, escaping and buffer handling. This is "and now draw the rest of the owl" That ~15 line example requires ~2,000% overhead with no discernable upside (but corresponding exponential increase in bugs) > Written like that, it might sound ominous, but about 98% of this has > already been done for you, (we published a guide to writing smtpd > filters which includes examples of such logic). Please link to this guide? It does not appear to be in the docs. If it exists then the project would be well placed to deploy this -- a "wrapper" filter which forks scripts on stdin/stdout, maintaned and installed as part of OpenSMTPd, bug-free. Nevertheless, it still only applies to "listen" config, which is also limiting (as others have asked in these archives) The approach taken by "mda" has high degree of clarity, ease and safety. The most powerful place to do this for filtering would be "action" lines. Is there a reason to actively resist this? Or did just nobody experiemnt or provide patches. Thanks -- Mark
