On 01.09.24 15:39, Kirill A. Korinsky wrote: > On Sun, 01 Sep 2024 13:12:19 +0200, > Christian Schulte <schulte...@gmail.com> wrote: >> >> I just started to read OpenSMTPD sources. Regarding the latest >> discussions on tech@, there maybe seems to be the need to instruct >> OpenSMTPD listeners to behave differently when acting as MTA or MSA. >> Reading man smtpd.conf(5)[1] there is an option to add a tag to the >> "listen on [socket]" directive. Those tags are currently used in "match" >> directives. Maybe this could be extended to add well known tags to a >> listener to control operation modes like MTA or MSA. Both of this is >> documented in corresponding RFCs. Is there any interest for me to take a >> closer look any maybe come up with some patches tech@? I am really just >> starting to read OpenSMTPD sources. If there already is a way to >> instruct OpenSMTPD listeners to behave differently regarding to - for >> example - handling message ids based on in either MTA or MSA mode, >> please let me know. I would like to avoid spending time into this, if >> there is no interest but I think there really should be a way to >> configure listeners to specific operation modes like MTA or MSA. >> > > As far as I know and had discovered by reading sources the specified > behaviour for the MSA like adding Message-Id is triggered only when listener > is used submission port. > > So, simple use submission port and that's it. > > P.S. I think that m...@opensmtpd.org is the right misc@ for this email. >
Thinking out loud now. If OpenSMTPD does something based on the port configured, I would rate that utterly workaround. I am thinking about adding support for something like this. listen on ... mode mta listen on ... mode mta-accurate listen on ... mode msa listen on ... mode msa-accurate Maybe someone wants to s/accurate/pedantic/g. But that's a language thing. mode mta Default mode, when no mode is given in the configuration file. Without any logic about ports. Just transport the message. Even if it contains a message id <nospam@nospam>. mode mta-accurate Would refuse to accept any mails without a (valid) message id. Permanent failure. "No message id or message id invalid" right now lacking a definition of invalid but that is documented in various RFCs. mode msa Check validity of the message id. If not present, add a message id. If not valid, overwrite it silently with something sane. mode msa-accurate Check validity of the message id. If not present, add a message id. If not valid, permanent failure. -- Christian