Ok, I got this working. The workaround is probably a bit dirty, but it works.
In my scenario, I got a domain, several aliases but only one mailbox, so I could activate the Bcc option for the domain in Virtualmin.
However, I manually had to run postmap /etc/postfix/bcc and reload postfix for the changes to take effect. I guess this is a Virtualmin bug. Anyway.
The /etc/postfix/bcc file looks like this
| Code: |
@mydomain.tld mailbox@mydomain.tld
|
which bcc's mail sent from all domain's addresses to that mailbox. this is generated by virtualmin. however, i suppose you can manually edit the bcc file to bind bcc rules to separate addresses, like this:
| Code: |
mailbox@mydomain.tld mailbox@mydomain.tld
|
I manually edited the .procmailrc file of my mailbox to look like this:
| Code: |
:0
* ^(From).*mydomain.tld
{
folder=Sent
:0 c
Maildir/.$folder/
:0 hi
* LASTFOLDER ?? /\/[^/]+$
| mv $LASTFOLDER Maildir/$folder/cur/$MATCH:2,S
}
|
So now I can disable the "save message in sent folder" in both client and webmail, as the server will do so automatically (otherwise you would get duplicates).
Let me know what you think!
hal