mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-26 20:35:55 +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('@') {
|
||||
return Some(ElementLocation::new(
|
||||
Recipient {
|
||||
email: Email::new(value),
|
||||
email: Email::new(
|
||||
value.split_once('?').map_or(value, |(e, _)| e),
|
||||
),
|
||||
name: None,
|
||||
},
|
||||
if is_body {
|
||||
|
|
|
|||
|
|
@ -263,6 +263,8 @@ async fn antispam() {
|
|||
.join("resources")
|
||||
.join("smtp")
|
||||
.join("antispam");
|
||||
let filter_test = std::env::var("TEST_NAME").ok();
|
||||
|
||||
for test_name in [
|
||||
"combined",
|
||||
"ip",
|
||||
|
|
@ -289,9 +291,12 @@ async fn antispam() {
|
|||
"pyzor",
|
||||
"llm",
|
||||
] {
|
||||
/*if test_name != "combined" {
|
||||
if filter_test
|
||||
.as_ref()
|
||||
.is_some_and(|s| !s.eq_ignore_ascii_case(test_name))
|
||||
{
|
||||
continue;
|
||||
}*/
|
||||
}
|
||||
println!("===== {test_name} =====");
|
||||
let contents = fs::read_to_string(base_path.join(format!("{test_name}.test"))).unwrap();
|
||||
let mut lines = contents.lines();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue