From 6535dd05720d77f9ff16d2decec1187bfa9e2915 Mon Sep 17 00:00:00 2001 From: Manuel Mausz Date: Thu, 25 Jun 2026 14:07:51 +0200 Subject: realrcptto: remove plus addressing from exported username --- realrcptto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'realrcptto.c') diff --git a/realrcptto.c b/realrcptto.c index f5f6f15..5ae9684 100644 --- a/realrcptto.c +++ b/realrcptto.c @@ -264,10 +264,14 @@ int depth; /* found a single dovecot-rda line. stop lookup */ if (count == 1 && username && found_rda) { - /* special case mailbox forward */ - if (username && !str_diff(username, "$EXT2") + /* special case: mailbox forward */ + if (!str_diff(username, "$EXT2") && extension && !str_diffn(extension, "mailbox-", 8)) username = extension + 8; + + /* remove plus-addressing */ + username[str_chr(username, '+')] = '\0'; + env_put2("DTUSER", username); return 1; } -- cgit v1.2.3