[Dovecot] Dovecot LMTP does not pass envelope recipient +detail to sieve
Greg Rivers
gcr+dovecot at tharned.org
Wed Jan 8 04:20:57 EET 2014
On Mon, 6 Jan 2014, I wrote:
> I found this[1] thread that describes the same problem with dovecot-LDA,
> but the solution (add X-Original-To: header) has no effect with LMTP.
>
> My sendmail LMTP configuration:
> FEATURE(`local_lmtp',`[IPC]',`FILE /var/run/dovecot/lmtp')
>
> Sendmail's address test indicates that sendmail is providing user+detail
> to LMTP (see below). Except for this problem, dovecot, LMTP, and sieve
> are all working perfectly. Is there something I'm missing, or is this a
> bug?
>
> [1] http://dovecot.org/pipermail/dovecot/2012-July/136987.htm
>
It seems I was mistaken. By tracing the LMTP session between dovecot and
sendmail I found that sendmail does _not_ include the +detail in RCPT TO:.
I also determined that dovecot LMTP will in fact extract the +detail from
a X-Original-To: header, but only if one defines
lda_original_recipient_header.
So for the archives, to get sieve's "envelope :detail ..." working with
sendmail and dovecot LMTP, do the following:
1) Add "lda_original_recipient_header = X-Original-To" to 15-lda.conf
2) Add the following rule to sendmail.mc to add a X-Original-To: header
to every message:
LOCAL_CONFIG
H?${u}?X-Original-To: $u
--
Greg Rivers
More information about the dovecot
mailing list