[Dovecot] Plugin mail-filter tangles

Stanislas SABATIER s.sabatier at pobox.com
Wed May 28 14:41:02 UTC 2014


Le 28/05/2014 11:12, Axel Luttgens a écrit :
>> Because, if I send an email from an outside account to someone and CC
>> user2 and user3, everything is working perfectly at Dovecot's side, even
>> if Postfix is launching a single process to deliver the email !
>> [...]
> Hmmm... I don't fully understand, but it seems you're adding new info to this thread.
> Could you elaborate (inside vs "outside account", "working perfectly"...)?
>
> Axel
Hello,
I tried to explain my specific case in my first post to the list (first
mail of this thread, may 24) :
I have 3 (virtuals) users belonging to 3 different domains, all managed
by my Dovecot server. One of these users (user1) is connected to my
Dovecot with MUA Thunderbird, and he's writing an email to someone
outside of my domains (ie someone at yahoo.com for example), but he puts
two others users' email addresses belonging to my domains in CC.
To sum up, here are the headers : (CASE 1)

    *from : user1 at mydomain1*
    to: someone at yahoo.com
    CC: user2 at mydomain2, user3 at mydomaine3


In this specific situation, Dovecot receives one email from Postfix for
user2 and user3. Dovecot is creating two user contexts, load mail-filter
plugin with user2 params, it saves the email, then it loads mail-filter
plugin with user3 params BUT, instead of reading the original email from
Postfix, Dovecot is trying to read the email from user2 (I see an
istream opening in logs) and pass it to user3. That fails because, in
this context, Dovecot can't access user2's email that has been encrypt
by my mail-filter.

On the other hand, if someone outside of my domains (therefore not
connected to my Dovecot) is sending the same email, with user2 and user3
in CC, Dovecot is not handling the email the same way, while receiving
the same email from Postfix.
To sum up, here are the headers : (CASE 2)

    *from : someone at gmail.com*
    to : someone at yahoo.com
    CC: user2 at mydomain2, user3 at mydomaine3


In this situation, Dovecot receives one email from Postfix for user2 and
user3 (same situation than case 1). Dovecot is creating two user
contexts, load mail-filter plugin with user2 params, it saves the email,
then it loads mail-filter plugin with user3 params and save the email
with user3 params. And I can say « working perfectly » !

All the same, in case 1 and case 2, Dovecot is receiving ONE email over
LMTP from Postfix.

Regards,
Stan.


More information about the dovecot mailing list