warn set acl_m_redirect_from = warn condition = ${if eq{${domain:$h_X-Sieve-Redirected-From:}}{$qualify_domain}{yes}{no}} condition = ${if match{${local_part:$h_X-Sieve-Redirected-From:}}{\N^".+"$\N}{yes}{no}} set acl_m_redirect_from = ${local_part:$h_X-Sieve-Redirected-From:} set acl_m_redirect_from = ${sg{$acl_m_redirect_from}{\N^"(.+)"$\N}{\$1}} ifelse_strstr(confVIRT_MDIR_USERLIST, `LDAP', `dnl warn condition = ${if eq{$acl_m_redirect_from}{}{yes}{no}} condition = ${if eq{${domain:$h_X-Sieve-Redirected-From:}}{confLDAP_REALM}{yes}{no}} set acl_m_redirect_from = $h_X-Sieve-Redirected-From: set acl_m_redirect_from = ${lookup ldapm{\ user=${quote_ldap_dn:confLDAP_LOGIN} pass=${quote:confLDAP_PASS} REFERRALS=nofollow ldap:///confLDAP_BASE?mail?sub?(userPrincipalName=$acl_m_redirect_from)\ }{$value}} ') dnl ifelse_strstr(confVIRT_MDIR_USERLIST, `LDAP', `') warn condition = ${if eq{$acl_m_redirect_from}{}{yes}{no}} condition = ${if match_domain{${domain:$h_X-Sieve-Redirected-From:}}{+local_domains}{yes}{no}} set acl_m_redirect_from = $h_X-Sieve-Redirected-From: warn \ remove_header = X-Sieve-Redirected-From remove_header = X-Sieve condition = ${if eq{$acl_m_redirect_from}{}{no}{yes}} add_header = :at_start:X-Sieve-Redirected-From: <$acl_m_redirect_from>