aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-23 16:51:41 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-23 16:51:41 +0200
commitd8c20bc395b22fb5552afc8b69e8c60493228d2d (patch)
tree9e9b580cb0f36731de3c679d610c483e47ca9647
parentb6cc59dad2906de634ad11eb4eb466bc88224305 (diff)
downloadNix-d8c20bc395b22fb5552afc8b69e8c60493228d2d.tar.gz
Nix-d8c20bc395b22fb5552afc8b69e8c60493228d2d.tar.zst
Nix-d8c20bc395b22fb5552afc8b69e8c60493228d2d.zip
Fix postfix to allow + in sender mail
-rw-r--r--modules/private/mail/postfix.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/private/mail/postfix.nix b/modules/private/mail/postfix.nix
index 769ed5d..52cd77d 100644
--- a/modules/private/mail/postfix.nix
+++ b/modules/private/mail/postfix.nix
@@ -75,9 +75,13 @@
75 query = SELECT DISTINCT destination 75 query = SELECT DISTINCT destination
76 FROM forwardings_merge 76 FROM forwardings_merge
77 WHERE 77 WHERE
78 ((regex = 1 AND '%s' REGEXP CONCAT('^',source,'$') ) OR (regex = 0 AND source = '%s')) 78 (
79 (regex = 1 AND CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d') REGEXP CONCAT('^',source,'$') )
80 OR
81 (regex = 0 AND source = CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d'))
82 )
79 AND active = 1 83 AND active = 1
80 UNION SELECT '%s' AS destination 84 UNION SELECT CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d') AS destination
81 ''; 85 '';
82 } 86 }
83 { 87 {