Koozali.org: home of the SME Server

Copy of all sent e-mail FOR ONE SINGLE USER

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Copy of all sent e-mail FOR ONE SINGLE USER
« 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
...

Offline elmarconi

  • ****
  • 139
  • +0/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #1 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.
...

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #2 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)

Offline Bozely

  • *
  • 75
  • +0/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #3 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,

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #4 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

Offline Bozely

  • *
  • 75
  • +0/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #5 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,

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Copy of all sent e-mail FOR ONE SINGLE USER
« Reply #6 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