> From: "Paulo Andre" <pandre@???>
>
> Hi, could someone tell me why the below conf wont redirect an attachment
to
> the email address?
>
> warn message = X-Redirect-To: deniedbox@???
> demime = exe:bat
>
> scan_redirect:
> driver = redirect
> condition = ${if def:h_X-Redirect-To: {1}{0}}
> headers_add = X-Original-Recipient: $local_part@$domain
> data = $h_X-Redirect-To:
> headers_remove = X-Redirect-To
> redirect_router = virtual_local_mailbox
I don't know specifically why that doesn't work, maybe it has to do with the
order of processing of headers_remove , data, and/or condition in the
router.
Have you tried using an ACL variable? It would be simpler anyway than adding
and removing the header:
warn demime = exe:bat
set acl_m0 = deniedbox@???
scan_redirect:
driver = redirect
condition = ${if eq{$acl_m0}{}{false}{true}}
headers_add = X-Original-Recipient: $local_part@$domain
data = $acl_m0
redirect_router = virtual_local_mailbox
Actually, now that I think about it, you probably don't need condition =
either since the router will decline if data = is empty.
David