mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-28 09:16:15 +00:00
smtp_server: allow 8bit envelopes
We'll accept these in MAIL FROM and RCPT TO, and leave it to the client to indicate whether 8bit is in use. This is partially supporting 8BITMIME and SMTPUTF8, without explicitly claiming support for it via the EHLO capabilities. This is probably sufficient to approximate support for sites that are willing to try it and advertise those extensions for themselves via https://docs.kumomta.com/reference/events/smtp_server_ehlo/ ```lua kumo.on('smtp_server_ehlo', function(domain, conn_meta, extensions) table.insert(extensions, 'SMTPUTF8') table.insert(extensions, '8BITMIME') return extensions end) ``` refs: https://github.com/KumoCorp/kumomta/issues/327
This commit is contained in:
@@ -1418,17 +1418,7 @@ impl SmtpServer {
|
||||
.await?;
|
||||
continue;
|
||||
}
|
||||
let address = address.to_string();
|
||||
if !address.is_ascii() {
|
||||
self.write_response(
|
||||
501,
|
||||
"Syntax error: address is not ASCII and SMTPUTF8 is not supported by this server",
|
||||
Some(line),
|
||||
).await?;
|
||||
continue;
|
||||
}
|
||||
|
||||
let address = EnvelopeAddress::parse(&address)?;
|
||||
let address = EnvelopeAddress::parse(&address.to_string())?;
|
||||
if let Err(rej) = self
|
||||
.call_callback::<(), _, _>(
|
||||
"smtp_server_mail_from",
|
||||
@@ -1462,16 +1452,7 @@ impl SmtpServer {
|
||||
.await?;
|
||||
continue;
|
||||
}
|
||||
let address = address.to_string();
|
||||
if !address.is_ascii() {
|
||||
self.write_response(
|
||||
501,
|
||||
"Syntax error: address is not ASCII and SMTPUTF8 is not supported by this server",
|
||||
Some(line),
|
||||
).await?;
|
||||
continue;
|
||||
}
|
||||
let address = EnvelopeAddress::parse(&address)?;
|
||||
let address = EnvelopeAddress::parse(&address.to_string())?;
|
||||
|
||||
let sender = self.state.as_ref().unwrap().sender.clone();
|
||||
let relay_disposition = self.check_relaying(&sender, &address).await?;
|
||||
|
||||
Reference in New Issue
Block a user