Skip to content

Commit

Permalink
Renamed filter hooks to MTA hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Jun 22, 2024
1 parent 05eb6bc commit 1835bf0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions src/pages/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl LayoutBuilder {
.route("/tracing")
.insert()
// Logging
.create("WebHooks")
.create("Webhooks")
.route("/web-hooks")
.insert()
// Cache
Expand Down Expand Up @@ -395,8 +395,8 @@ impl LayoutBuilder {
.create("Milters")
.route("/milter")
.insert()
.create("Hooks")
.route("/filter-hooks")
.create("MTA Hooks")
.route("/mta-hooks")
.insert()
.create("Pipes")
.route("/pipe")
Expand Down
8 changes: 4 additions & 4 deletions src/pages/config/schema/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl Builder<Schemas, ()> {
.suffix("url")
.names("webhook", "webhooks")
.new_id_field()
.label("WebHook Id")
.label("Webhook Id")
.help("Unique identifier for this webhook")
.build()
.new_field("url")
Expand Down Expand Up @@ -467,7 +467,7 @@ impl Builder<Schemas, ()> {
})
.build()
.new_form_section()
.title("WebHook settings")
.title("Webhook settings")
.fields(["_id", "url", "signature-key", "allow-invalid-certs"])
.build()
.new_form_section()
Expand All @@ -482,8 +482,8 @@ impl Builder<Schemas, ()> {
.title("Options")
.fields(["throttle", "timeout", "headers"])
.build()
.list_title("WebHooks")
.list_subtitle("Manage WebHooks")
.list_title("Webhooks")
.list_subtitle("Manage Webhooks")
.list_fields(["_id", "url"])
.build()
}
Expand Down
34 changes: 17 additions & 17 deletions src/pages/config/schema/smtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,18 +1577,18 @@ impl Builder<Schemas, ()> {
.list_subtitle("Manage Milter filters")
.list_fields(["_id", "hostname", "port"])
.build()
// Filter hooks
.new_schema("filter-hooks")
// MTA Hooks
.new_schema("mta-hooks")
.prefix("session.hook")
.suffix("url")
.names("filter hook", "filter hooks")
.names("hook", "hooks")
.new_id_field()
.label("Hook Id")
.help("Unique identifier for this filter hook")
.help("Unique identifier for this hook")
.build()
.new_field("enable")
.label("Enable")
.help("Expression that determines whether to enable this filter hook")
.help("Expression that determines whether to enable this hook")
.default("true")
.typ(Type::Expression)
.input_check(
Expand All @@ -1601,15 +1601,15 @@ impl Builder<Schemas, ()> {
.build()
.new_field("url")
.label("Endpoint URL")
.help(concat!("URL of the filter hook endpoint"))
.help(concat!("URL of the hook endpoint"))
.placeholder("https://127.0.0.1/filter")
.typ(Type::Input)
.input_check([Transformer::Trim], [Validator::Required, Validator::IsUrl])
.build()
.new_field("allow-invalid-certs")
.label("Allow Invalid Certs")
.help(concat!(
"Whether Stalwart SMTP should connect to a filter hook ",
"Whether Stalwart SMTP should connect to a hook ",
"server that has an invalid TLS certificate"
))
.default("false")
Expand All @@ -1620,7 +1620,7 @@ impl Builder<Schemas, ()> {
.label("Timeout")
.help(concat!(
"Maximum amount of time that Stalwart SMTP will wait for a response ",
"from this filter hook server"
"from this hook server"
))
.default("30s")
.typ(Type::Duration)
Expand All @@ -1631,7 +1631,7 @@ impl Builder<Schemas, ()> {
.help(concat!(
"Whether to respond with a temporary failure (typically a 4xx ",
"SMTP status code) when Stalwart encounters an error while ",
"communicating with this Filter hook server"
"communicating with this MTA Hook server"
))
.default("true")
.typ(Type::Boolean)
Expand All @@ -1641,7 +1641,7 @@ impl Builder<Schemas, ()> {
.label("Max Size")
.help(concat!(
"Maximum size, in bytes, of a response that Stalwart will accept",
" from this Filter hook server"
" from this MTA Hook server"
))
.default("52428800")
.typ(Type::Size)
Expand All @@ -1650,35 +1650,35 @@ impl Builder<Schemas, ()> {
.new_field("headers")
.typ(Type::Array)
.label("HTTP Headers")
.help("The headers to be sent with filter hook requests")
.help("The headers to be sent with hook requests")
.build()
.new_field("auth.username")
.label("Username")
.help(concat!(
"The username to use when authenticating with the filter hook server"
"The username to use when authenticating with the hook server"
))
.typ(Type::Input)
.input_check([Transformer::Trim], [])
.build()
.new_field("auth.secret")
.label("Secret")
.help(concat!(
"The secret to use when authenticating with the filter hook server"
"The secret to use when authenticating with the hook server"
))
.typ(Type::Secret)
.input_check([Transformer::Trim], [])
.build()
.new_field("stages")
.label("Run on stages")
.help("Which SMTP stages to run this filter hook on")
.help("Which SMTP stages to run this hook on")
.typ(Type::Select {
multi: true,
source: Source::Static(SMTP_STAGES),
})
.default("data")
.build()
.new_form_section()
.title("Filter hook settings")
.title("MTA Hook settings")
.fields(["_id", "url", "enable", "allow-invalid-certs"])
.build()
.new_form_section()
Expand All @@ -1697,8 +1697,8 @@ impl Builder<Schemas, ()> {
"options.tempfail-on-error",
])
.build()
.list_title("Filter hooks")
.list_subtitle("Manage Filter hooks")
.list_title("MTA Hooks")
.list_subtitle("Manage MTA Hooks")
.list_fields(["_id", "url"])
.build()
// Pipes
Expand Down

0 comments on commit 1835bf0

Please sign in to comment.