[Dovecot] Dovecot LMTP does not pass envelope recipient +detail to sieve
Greg Rivers
gcr+dovecot at tharned.org
Tue Jan 14 16:14:26 EET 2014
On Tue, 14 Jan 2014, Steffen Kaiser wrote:
>> "FEATURE(`preserve_local_plus_detail')" is actually one of the first things
>> I tried when I started working on this problem, but it doesn't quite work
>> with the standard configuration:
>>
>> $ sendmail -bv -d21.12 gcr+XYZZY at badger.tharned.org
>> -----rule matches: $@ $1
>> rewritten as: gcr + xyzzy
>> rewrite: ruleset localaddr returns: gcr + xyzzy
>> gcr+XYZZY at badger.tharned.org... User unknown
>
> OK, that rings a bell:
> the problem is the "w" flag. It checks that a valid system exists.
>
> If you remove the "w" flag, you loose the system user validaty check and
> the .forward feature.
>
Yes, I had considered that.
> You have four ways, IMHO:
>
> a) switch to LDA
>
That's what I plan to do in the interim.
> b) add Local_localaddr to validate the user yourself and accept that the
> .forward feature is not working
>
I can't do without .forward.
> c) I've patched sendmail's mailbox database code with a Dovecot stub,
> that queries the UserDB socket for validity of the users. If you use
> system users, you could probably just patch libsm/mbdb.c:
> mbdb_pw_lookup(name, user) to cut the +detail, something like:
>
> [snip]
>
> d) try a PAM module in pam.d/sendmail, that strips the +detail before
> processing the request
>
These would be a last resort.
> e) try to file a bug with sendmail.
>
Actually I did that yesterday. Claus Assmann is looking at it with me, so
I'm sure to get more good advise.
Thanks for looking at it and for your really useful suggestions.
(BTW, options a through e is five ways, not four. :-)
I'll keep this thread updated with my findings.
--
Greg
More information about the dovecot
mailing list