mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-27 04:46:06 +08:00
Fix mailto parsing in HTMLs
This commit is contained in:
parent
6dbc0a82a9
commit
e7c6be45d8
2 changed files with 10 additions and 3 deletions
|
|
@ -168,7 +168,9 @@ impl SpamFilterAnalyzeDomain for Server {
|
||||||
if value.contains('@') {
|
if value.contains('@') {
|
||||||
return Some(ElementLocation::new(
|
return Some(ElementLocation::new(
|
||||||
Recipient {
|
Recipient {
|
||||||
email: Email::new(value),
|
email: Email::new(
|
||||||
|
value.split_once('?').map_or(value, |(e, _)| e),
|
||||||
|
),
|
||||||
name: None,
|
name: None,
|
||||||
},
|
},
|
||||||
if is_body {
|
if is_body {
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,8 @@ async fn antispam() {
|
||||||
.join("resources")
|
.join("resources")
|
||||||
.join("smtp")
|
.join("smtp")
|
||||||
.join("antispam");
|
.join("antispam");
|
||||||
|
let filter_test = std::env::var("TEST_NAME").ok();
|
||||||
|
|
||||||
for test_name in [
|
for test_name in [
|
||||||
"combined",
|
"combined",
|
||||||
"ip",
|
"ip",
|
||||||
|
|
@ -289,9 +291,12 @@ async fn antispam() {
|
||||||
"pyzor",
|
"pyzor",
|
||||||
"llm",
|
"llm",
|
||||||
] {
|
] {
|
||||||
/*if test_name != "combined" {
|
if filter_test
|
||||||
|
.as_ref()
|
||||||
|
.is_some_and(|s| !s.eq_ignore_ascii_case(test_name))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}
|
||||||
println!("===== {test_name} =====");
|
println!("===== {test_name} =====");
|
||||||
let contents = fs::read_to_string(base_path.join(format!("{test_name}.test"))).unwrap();
|
let contents = fs::read_to_string(base_path.join(format!("{test_name}.test"))).unwrap();
|
||||||
let mut lines = contents.lines();
|
let mut lines = contents.lines();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue