On 29-10-13 22:00, Wolfgang Ganzert wrote:> Hello Ladies and Gentlemen,
>
> first of all I have to say that dovecot is really impressive. I seems to be
a
> very goot IMAP server and has in general a good documentation.
>
> I'm a beginner regarding the administration so please excuse if my
questions
> sound silly but I want to learn to administrate these sophisticated things.
>
> Now here's my configuration:
> Linux openSuSE 12.1
> Postfix 2.8.8
> Dovecot 2.0.16
>
> Boundary condition:
> Postfix as smtp (Postfix is configured as relay server; mail is sent to
> smtp.web.de if mail is not locally distributed)
> Dovecot as IMAP server in my private network (192.168....)
>
> Situation:
> I want to store outgoing mail which is send by postfix also in a
"SENT" folder
> in Dovecot. The SENT folder is available and created through the plugin
> "autocreate". The main.cf file from postfix contains the
following mailbox
> command:
>
> mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a
"$RECIPIENT" -m
> SENT
>
> If I send a simple mail from the shell with the following command
>
> echo "Hello me" | mail -s "Dovecot test 50, shell nach
SENT" $USER
>
> the mail is send to my mailbox and stored in the folder "SENT" as
unread.
>
> Problem:
> 1.
> I would expect to have to mails coming in; one in my "SENT"
folder because
> this is copy of the mail and another one which is the incoming folder
because
> the mail was sent to me. But, there is no mail in the incoming folder.
> 2.
> If I use a mail client like kmail2 the same thing happens. The mail is
> distributed to the SENT folder but there's no copy in the incoming
folder.
> 3.
> If I send a mail to my adress at @web.de with the postfix configuration
from
> above I do not receive the mail at web.de.
> 4.
> If I send a mail to my adress at @web.de with a postfix simplified mailbox
> command NOT containing the mailbox with "-m", then mail is send
to web.de and
> there I receive it in the incoming box. This is the simplified command:
> mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a
"$RECIPIENT"
>
> Summary:
> All examples from above show that I do not get a COPY of the outgoing mail
in
> my "SENT" folder but it's the REAL mail.
>
You are correct ;)
You need 2 copies of the e-mail: one that is delivered to the recipient
(on- or offsite), and one copy needs to go in your sent folder. To fix
it, you could bcc yourself and store the bcc in the sent folder.
Postfix can do that using always_bcc / recipient_bcc_maps. You should
generate that only for the non IMAP sent e-mails (no idea on how to
detect that), and then send that copy to dovecot-lda.
When you generate the bcc using recipient delimiter syntax
(account+sent at domain.tld), sieve is easily configurable to deliver to
your sent folder.
So generally speaking, you have a Postfix problem to solve. The dovecot
part is really easy :)
Regards,
Tom