diff options
| author | manuel <manuel@mausz.at> | 2017-12-06 16:07:13 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2017-12-06 16:07:13 +0100 |
| commit | 8bc9274be73f10781fe910a02097d858ad39c718 (patch) | |
| tree | 0ce2569070fa5f444d0f6a71773cf9a5928ba138 /realrcptto.c | |
| parent | 63ce8bafa5bad20bf5cbb62be6fffc7842af18dc (diff) | |
| download | qmail-8bc9274be73f10781fe910a02097d858ad39c718.tar.gz qmail-8bc9274be73f10781fe910a02097d858ad39c718.tar.bz2 qmail-8bc9274be73f10781fe910a02097d858ad39c718.zip | |
realrcptto: extract username from mailbox forwards
Diffstat (limited to 'realrcptto.c')
| -rw-r--r-- | realrcptto.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/realrcptto.c b/realrcptto.c index 34661c7..235ed14 100644 --- a/realrcptto.c +++ b/realrcptto.c | |||
| @@ -257,6 +257,10 @@ int depth; | |||
| 257 | /* found a single dovecot-rda line. stop lookup */ | 257 | /* found a single dovecot-rda line. stop lookup */ |
| 258 | if (count == 1 && username && found_rda) | 258 | if (count == 1 && username && found_rda) |
| 259 | { | 259 | { |
| 260 | /* special case mailbox forward */ | ||
| 261 | if (username && !str_diff(username, "$EXT2") | ||
| 262 | && extension && !str_diffn(extension, "mailbox-", 8)) | ||
| 263 | username = extension + 8; | ||
| 260 | env_put2("DTUSER", username); | 264 | env_put2("DTUSER", username); |
| 261 | return 1; | 265 | return 1; |
| 262 | } | 266 | } |
| @@ -272,6 +276,7 @@ char *addr; | |||
| 272 | int depth; | 276 | int depth; |
| 273 | { | 277 | { |
| 274 | env_unset("DTUSER"); | 278 | env_unset("DTUSER"); |
| 279 | extension = NULL; | ||
| 275 | return realrcptto_ex(addr, depth); | 280 | return realrcptto_ex(addr, depth); |
| 276 | } | 281 | } |
| 277 | 282 | ||
