git subrepo commit (merge) mailcow/src/mailcow-dockerized
subrepo:
subdir: "mailcow/src/mailcow-dockerized"
merged: "81fb18894"
upstream:
origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "4ca02ecee"
git-subrepo:
version: "0.4.6"
origin: "???"
commit: "???"
Update to upstream 2026-10. Local patches re-applied by hand
(no Unbound DNS for containers, IPv6 off by default, fake-MySQL
stubs in dockerapi, Postfix overrides, no .env symlink); dropped
the unused dovecot and clamd Dockerfile patches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I2c2c194d1d436b841358685f5f94aef09eb19ae8
diff --git a/mailcow/src/mailcow-dockerized/data/conf/rspamd/dynmaps/settings.php b/mailcow/src/mailcow-dockerized/data/conf/rspamd/dynmaps/settings.php
index 274e9da..1b0e6b6 100644
--- a/mailcow/src/mailcow-dockerized/data/conf/rspamd/dynmaps/settings.php
+++ b/mailcow/src/mailcow-dockerized/data/conf/rspamd/dynmaps/settings.php
@@ -56,7 +56,7 @@
$email = explode('@', $email);
$email[0] = str_replace('.', '', $email[0]);
$email = implode('@', $email);
- }
+ }
$gm_alt = "@googlemail.com";
if (substr_compare($email, $gm_alt, -strlen($gm_alt)) == 0) {
$email = explode('@', $email);
@@ -114,7 +114,7 @@
$rcpt[] = str_replace('/', '\/', $row['address']);
}
// Aliases by alias domains
- $stmt = $pdo->prepare("SELECT CONCAT(`local_part`, '@', `alias_domain`.`alias_domain`) AS `alias` FROM `mailbox`
+ $stmt = $pdo->prepare("SELECT CONCAT(`local_part`, '@', `alias_domain`.`alias_domain`) AS `alias` FROM `mailbox`
LEFT OUTER JOIN `alias_domain` ON `mailbox`.`domain` = `alias_domain`.`target_domain`
WHERE `mailbox`.`username` = :object");
$stmt->execute(array(
@@ -184,7 +184,7 @@
rcpt = <?=json_encode($rcpt, JSON_UNESCAPED_SLASHES);?>;
<?php
}
- $stmt = $pdo->prepare("SELECT `option`, `value` FROM `filterconf`
+ $stmt = $pdo->prepare("SELECT `option`, `value` FROM `filterconf`
WHERE (`option` = 'highspamlevel' OR `option` = 'lowspamlevel')
AND `object`= :object");
$stmt->execute(array(':object' => $row['object']));
@@ -468,4 +468,36 @@
<?php
}
?>
+
+<?php
+// Start internal aliases
+
+$stmt = $pdo->query("SELECT `id`, `address`, `domain` FROM `alias` WHERE `active` = '1' AND `internal` = '1'");
+$aliases = $stmt->fetchAll(PDO::FETCH_ASSOC);
+while ($alias = array_shift($aliases)) {
+ // build allowed_domains regex and add target domain and alias domains
+ $stmt = $pdo->prepare("SELECT `alias_domain` FROM `alias_domain` WHERE `active` = '1' AND `target_domain` = :target_domain");
+ $stmt->execute(array(':target_domain' => $alias['domain']));
+ $allowed_domains = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ $allowed_domains = array_map(function($item) {
+ return str_replace('.', '\.', $item['alias_domain']);
+ }, $allowed_domains);
+ $allowed_domains[] = str_replace('.', '\.', $alias['domain']);
+ $allowed_domains = implode('|', $allowed_domains);
+?>
+ internal_alias_<?=$alias['id'];?> {
+ priority = 10;
+ rcpt = "<?=$alias['address'];?>";
+ from = "/^((?!.*@(<?=$allowed_domains;?>)).)*$/";
+ apply "default" {
+ MAILCOW_INTERNAL_ALIAS = 9999.0;
+ }
+ symbols [
+ "MAILCOW_INTERNAL_ALIAS"
+ ]
+ }
+<?php
+}
+?>
+
}