To extend my previous message :
I added the option '-o lmtp_destination_recipient_limit=1' to Postfix and try again to send a message to someone outside my domains, but adding two people in CC. It seems that Dovecot is still handling the delivery incorrectly. Here is the transcript of what happened :
May 26 09:39:00 lmtp(47593): Debug: none: root=, index=, indexpvt=,
control=, inbox=, alt=
May 26 09:39:00 lmtp(47593): Info: Connect from 9.6.71.10
May 26 09:39:00 lmtp(47593): Debug: Loading modules from directory:
/usr/local/lib/dovecot
May 26 09:39:00 lmtp(47593): Debug: Module loaded:
/usr/local/lib/dovecot/lib10_mailden_filter_plugin.so
May 26 09:39:00 lmtp(47593): Debug: auth input: contact@mailden.pro
home=/mailboxes/mailden.pro/contact/ uid=200 gid=6
email=contact@mailden.pro
May 26 09:39:00 lmtp(47593): Debug: Added userdb setting:
plugin/email=contact@mailden.pro
May 26 09:39:00 lmtp(47593): Debug: auth input:
stan@sapienssapide.fr home=/mailboxes/sapienssapide.fr/stan/ uid=200
gid=6 email=stan@sapienssapide.fr
May 26 09:39:00 lmtp(47593): Debug: Added userdb setting:
plugin/email=stan@sapienssapide.fr
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_plugin_init
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug: Effective
uid=200, gid=6, home=/mailboxes/mailden.pro/contact/
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_mail_user_created
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_parse_setting
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug:
mailden_filter: Filtering mailden_filter via socket
/var/run/dovecot//decrypt-filter
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_parse_setting
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug:
mailden_filter: Filtering mailden_filter_out via socket
/var/run/dovecot//encrypt-filter
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info: plain_pass
is null
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug: Namespace
inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes location=dbox:/mailboxes/mailden.pro/contact/
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug: fs:
root=/mailboxes/mailden.pro/contact, index=, indexpvt=, control=,
inbox=, alt=
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_mailbox_allocated
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_mail_allocated
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_mail_save_begin
May 26 09:39:00 box encrypt_mail: -> Encrypt arg : contact@mailden.pro
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Debug: Namespace :
Using permissions from /mailboxes/mailden.pro/contact: mode=0700
gid=default
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
sjhnApTvglPpuQAAz9GZsw: msgid=<5382EFA2.7020202@mailden.fr>: saved
mail to INBOX
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_mail_allocated
May 26 09:39:00 lmtp(47593, contact@mailden.pro): Info:
mailden_filter_istream_opened
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug: Effective
uid=200, gid=6, home=/mailboxes/sapienssapide.fr/stan/
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
mailden_filter_mail_user_created
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
mailden_filter_parse_setting
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug:
mailden_filter: Filtering mailden_filter via socket
/var/run/dovecot//decrypt-filter
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
mailden_filter_parse_setting
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug:
mailden_filter: Filtering mailden_filter_out via socket
/var/run/dovecot//encrypt-filter
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info: plain_pass
is null
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug: Namespace
inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes location=dbox:/mailboxes/sapienssapide.fr/stan/
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug: fs:
root=/mailboxes/sapienssapide.fr/stan, index=, indexpvt=, control=,
inbox=, alt=
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
mailden_filter_mailbox_allocated
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
mailden_filter_mail_allocated
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Debug: Namespace
: Using permissions from /mailboxes/sapienssapide.fr/stan: mode=0700
gid=default
May 26 09:39:00 lmtp(47593, stan@sapienssapide.fr): Info:
sjhnApTvglPpuQAAz9GZsw: msgid=<5382EFA2.7020202@mailden.fr>: saved
mail to INBOX
May 26 09:39:00 lmtp(47593): Info: Disconnect from 9.6.71.10:
Successful quit
May 26 09:39:00 box decrypt_mail: -> Decrypt arg :
contact@mailden.pro,n
The last line above shows that, again, Dovecot is trying to read the email from mailboxe and it launched the 'decypt_mail' program with user1's params (user1 = 'contact@mailden.pro'). At this stage, neither user1 (contact@mailden.pro) nor user2 (stan@sapienssapide.fr) are connected and authenticated. Therefore, decrypt_mail is launched without user1's password (decrypc args are email and user password. In the above case, user password is set to 'n' because is missing).
Stan.