Change all occurrences of "local_port != 25" or "local_port == 25" to something that user can easily change

It was already asked in Change `local_port != 25` heuristics to `listener != 'smtp'` · stalwartlabs/stalwart · Discussion #2843 · GitHub

“anyone can change it to the expression you propose.” isn’t a solution,
local_port is littered across like 10 different options, and it isn’t even clear where it is set, you can’t even search for it.
Not to mention that hardcoding it is just a plain bad design.

It is very bad, basic stalwart haproxy example is completely broken if user doesn’t do a duck hunt game with those expressions, and that fact also isn’t even mentioned in the documentation.

I don’t think changing local_port != 25 heuristics to listener != 'smtp' is a proper solution though, as it just hardcodes a name of the listener instead of a port, though is better than the status quo.

IMO it should be a setting, like a default domain.
SystemSettings already contains defaultDomainId and defaultHostname,
I suggest adding a setting called defaultMtaMtaPort or defaultMtaMtaListener or whatever name you want to call it, and then add some expression and replace 25 with that, for example as is the case with domain and hostname variables: Functions | Stalwart
Or eg, anything else, like a local lookup key or something will work, specifics doesn’t matter.