Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: Jáder on March 05, 2014, 10:59:12 PM

Title: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: Jáder on March 05, 2014, 10:59:12 PM
Hi

I know I can copy all sent (or sent/received e-mails) for ALL USERS. (wiki.contribs.org/Email#Keep_a_copy_of_all_emails)
I know I can archive e-mails (wiki.contribs.org/MailArchiva).

BUT:

I´d like to get a copy of all SENT e-mail for ONE SINGLE USER.
Is this possible ?

Thanks

Jáder
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: elmarconi on March 07, 2014, 09:54:14 PM
Dive into the ocean of possibilities of procmail.
Use the BCC ALL USERS you mentioned.
Use procmail rules to either delete all other email or fwd it to a separate ghost-account.
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: mmccarn on March 08, 2014, 01:09:58 PM
Here's a similar - unresolved - question from a couple years ago:
Re: BCC single email address (not all users) (http://forums.contribs.org/index.php/topic,48616.msg241621)
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: Bozely on May 11, 2015, 12:11:47 PM
I too am very interested in this functionality.

Jáder, did you ever find a solution? Does anyone else have experience of implementing the aforementioned functionality?

Thanks,
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: Stefano on May 11, 2015, 12:44:55 PM
the first idea coming to my mind:
setup all bcc to a user (let's call it "myuser")
create a procmail rule for myuser that keeps only emails sent from the desidered user (mail header FROM:)

never tested
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: Bozely on May 11, 2015, 04:52:51 PM
Thanks Stefano,

I'm already using the BCC to copy all mail in to a maillog at present which I would cannot change, is it possible to have two emails in the BCC?

If so, do you have any recommended reading for setting up procmail rules?

Ta,
Title: Re: Copy of all sent e-mail FOR ONE SINGLE USER
Post by: Stefano on May 11, 2015, 05:01:33 PM
create a group, add the 2 users, then use goupname@domain.tld as bcc recipient

use a procmail's recipe only on one of the group's users

a little search with google give me
Code: [Select]
:0:
* !^(From):.*(myuser)
/dev/null

search google for "procmail recipe from header filtering", works for me