public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Rspamd] Fix and improve settings map
9bbf9dc6
data/conf/rspamd/dynmaps/settings.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Diff
diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php
index a2be8ceb..0bf9f519 100644
--- a/data/conf/rspamd/dynmaps/settings.php
+++ b/data/conf/rspamd/dynmaps/settings.php
@@ -62,7 +62,9 @@ function wl_by_sogo() {
if (!filter_var($contact, FILTER_VALIDATE_EMAIL)) {
continue;
}
- $rcpt[$row['user']][] = '/^' . str_replace('/', '\/', $contact) . '$/i';
+ // Explicit from, no mime_from, no regex - envelope must match
+ // mailcow white and blacklists also cover mime_from
+ $rcpt[$row['user']][] = str_replace('/', '\/', $contact);
}
}
return $rcpt;
@@ -86,7 +88,7 @@ function ucl_rcpts($object, $type) {
if (!empty($local) && !empty($domain)) {
$rcpt[] = '/^' . str_replace('/', '\/', $local) . '[+].*' . str_replace('/', '\/', $domain) . '$/i';
}
- $rcpt[] = '/^' . str_replace('/', '\/', $row['address']) . '$/i';
+ $rcpt[] = str_replace('/', '\/', $row['address']);
}
// Aliases by alias domains
$stmt = $pdo->prepare("SELECT CONCAT(`local_part`, '@', `alias_domain`.`alias_domain`) AS `alias` FROM `mailbox`
@@ -104,7 +106,7 @@ function ucl_rcpts($object, $type) {
if (!empty($local) && !empty($domain)) {
$rcpt[] = '/^' . str_replace('/', '\/', $local) . '[+].*' . str_replace('/', '\/', $domain) . '$/i';
}
- $rcpt[] = '/^' . str_replace('/', '\/', $row['alias']) . '$/i';
+ $rcpt[] = str_replace('/', '\/', $row['alias']);
}
}
}