mox/testdata/webserver/domains.conf
Mechiel Lukkien 2c07645ab4
deprecate having only localparts in an Account's Destinations, it should always be a full email address
current behaviour isn't intuitive. it's not great to have to attempt parsing
the strings as both localpart and email address. so we deprecate the
localpart-only behaviour. when we load the config file, and it has
localpart-only Destinations keys, we'll change them to full addresses in
memory. when an admin causes a write of domains.conf, it'll automatically be
fixed. we log an error with a deprecated notice for each localpart-only
destinations key.

sometime in the future, we can remove the old localpart-only destination
support. will be in the release notes then.

also start keeping track of update notes that need to make it in the release
notes of the next release.

for issue #18
2023-03-09 22:13:56 +01:00

92 lines
2 KiB
Text

Domains:
mox.example:
LocalpartCaseSensitive: false
Accounts:
mjl:
Domain: mox.example
Destinations:
mjl@mox.example: nil
WebDomainRedirects:
redir.mox.example: mox.example
WebHandlers:
-
LogName: redirhttps
Domain: schemeredir.example
PathRegexp: ^/
DontRedirectPlainHTTP: true
WebRedirect:
BaseURL: https://schemeredir.example
-
LogName: static
Domain: mox.example
PathRegexp: ^/static/
DontRedirectPlainHTTP: true
WebStatic:
# This is run from the http package.
Root: ../testdata/web
ListFiles: true
ResponseHeaders:
X-Test: mox
-
LogName: nolist
Domain: mox.example
PathRegexp: ^/nolist/
DontRedirectPlainHTTP: true
WebStatic:
StripPrefix: /nolist/
# This is run from the http package.
Root: ../testdata/web/static
-
LogName: httpsredir
Domain: mox.example
PathRegexp: ^/tls/
WebStatic:
# This is run from the http package.
Root: ../testdata/web/static
-
LogName: baseurlonly
Domain: mox.example
PathRegexp: ^/baseurl/
DontRedirectPlainHTTP: true
WebRedirect:
BaseURL: https://tls.mox.example?q=1#fragment
-
LogName: pathonly
Domain: mox.example
PathRegexp: ^/pathonly/
DontRedirectPlainHTTP: true
WebRedirect:
OrigPathRegexp: ^/pathonly/old/(.*)$
ReplacePath: /pathonly/new/$1
StatusCode: 307
-
LogName: baseurlpath
Domain: mox.example
PathRegexp: ^/baseurlpath/
DontRedirectPlainHTTP: true
WebRedirect:
BaseURL: //other.mox.example?q=1#fragment
OrigPathRegexp: ^/baseurlpath/old/(.*)$
ReplacePath: /baseurlpath/new/$1
# test code depends on these last two webhandlers being here.
-
LogName: strippath
Domain: mox.example
PathRegexp: ^/strip/
DontRedirectPlainHTTP: true
WebForward:
StripPath: true
# replaced while testing
URL: http://127.0.0.1:1/a
ResponseHeaders:
X-Test: mox
-
LogName: nostrippath
Domain: mox.example
PathRegexp: ^/nostrip/
DontRedirectPlainHTTP: true
WebForward:
# replaced while testing
URL: http://127.0.0.1:1/a
ResponseHeaders:
X-Test: mox