Download raw body.
smtpd: change the table protocol
April 29, 2024 3:37 PM, "Omar Polo" <op@omarpolo.com> wrote: > This changes the transport layer for the smtpd <-> proc tables > communications. > > Using imsg here has proven to be quite painful because smtpd internals > (struct definition etc.) needs to be kept in sync with the table > implementations, and it's also hard to actually write external tables. > > Instead, a filter-like protocol for tables completely decouples the > implementations and allows to write tables more easily. > > All the OpenSMTPD-extras tables were converted to the new stdio protocol > and I intend to commit this together with a diff for ports to avoid a > fallout. > > The table themselves will continue to work as they do now, only the > transport layer will change. > > The configuration also won't need any change. > > Regarding the diff: there's a bit of churn due to the addition of a > field to fork_proc_backend(). When forking the tables we need to > redirect stdout too, and i'm not sure if it's safe to do so for the > queues and schedulers too. The new flag ensures that we dup() stdout to > the socketpair only for the tables. > > The protocol is documented in the added smtpd-tables.7 manual page. > > ok? :) > besides minor typo spotted in the man page, ok for me and the sooner is the better so we have as much time as possible to spot shortcomings if any.
smtpd: change the table protocol