[Dovecot] Dovecot LMTP does not pass envelope recipient +detail to sieve

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Jan 9 09:27:45 EET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 7 Jan 2014, Greg Rivers wrote:

> 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

First: This won't work, if the message has two or more recipients, $u is 
empty then. Do you serialize messages per recipient?

Second: My Debian sendmail v8.14.4 does pass +detail to LMTP.

Mlocal,         P=[IPC], F=lsDFMAw5:/|@qPSXnz9, S=EnvFromSMTP/HdrFromL, 
R=EnvToL/HdrToL,
                 T=DNS/RFC822/SMTP,
                 A=FILE /var/run/dovecot2.2/lmtp

looks like just:

FEATURE(`local_lmtp',`[IPC]',`FILE /var/run/dovecot2.2/lmtp')dnl

of my mc-file effects it.

The use of forwarding, aliases or virtuser table might strip the detail, 
you need to do explicitly preserve the +detail with those. 
Retry with a recipient without any rewriting and from the local host.

echo TEST | sendmail -v recpient+detail at yourdomain.tld

Received: from ux-2s11.inf.fh-bonn-rhein-sieg.de
     by ux-2s11.inf.fh-bonn-rhein-sieg.de (Dovecot) with LMTP id 
aC4NEHRMzlK7dgAALie3fw
     for <uid+detail>; Thu, 09 Jan 2014 08:15:00 +0100

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUs5PcV3r2wJMiz2NAQI7PAf/WeQTTHBiXpV+aEHDm2/xkL/oVhyU6i3V
iBie5ArGDDTQYN2ga8fvYG6AMnlSJbWIH2jpf5sGIcqsuq89FWDZvt5vPZ7TXVHC
uUvIDEotU2pPvXqvs5bsWvdDMkAWT4Cjx2EFn07NZJyPo8tRZhqh8vkUgU7JzIIR
Zf3u3lqq+CdHD46QeDpi47yrYglgbO/K1rXdmXcLL8MYKbaPmG6nRd6ea0rPyRd4
vKGrTF1Q6YyabyrbvcFdsM2DHM4gO48g1QsfIG0M/nCjihMKMMizuB9U2IaxnRqy
2WtOMXspECaokRzSXuWSJ9dancKkI6hJB9JJIv0vUXIXAg/j9guE9w==
=iBfY
-----END PGP SIGNATURE-----


More information about the dovecot mailing list