add pedantic mode (used by localserve) that refuses some behaviour that is invalid according to specifications and that we normally accept for compatibility

This commit is contained in:
Mechiel Lukkien
2023-03-12 15:16:01 +01:00
parent 132f08913b
commit 317dc78397
16 changed files with 127 additions and 56 deletions

View File

@ -32,6 +32,7 @@ import (
"github.com/mjl-/mox/dns"
"github.com/mjl-/mox/mlog"
"github.com/mjl-/mox/moxio"
"github.com/mjl-/mox/moxvar"
"github.com/mjl-/mox/mtasts"
"github.com/mjl-/mox/smtp"
)
@ -352,6 +353,8 @@ func SetConfig(c *Config) {
RootCAs: Conf.Static.TLS.CertPool,
}
}
moxvar.Pedantic = c.Static.Pedantic
}
// ParseConfig parses the static config at path p. If checkOnly is true, no changes