Shadow Transport / Copying emails

tdldp

Verified User
Joined
May 9, 2005
Messages
150
Hi everyone...

I have a particular need to copy mails received on certain accounts in our company. I'll stop immediate legal questionning around this, we have declared in France our activity, have received legal authorisation do this and we have informed all our clients that email are logged 1 year for security and legal purposes....

Now the problem ...
Following code works... At least as it is defined...
Problem, is that is saves all mails on all accounts in the domain.... (domain.com), including personnal emails for which we have nothing to care about, and most of all not authorisation to log...

Code:
virtual_localdelivery:
  driver = appendfile
  create_directory
  delivery_date_add
  directory_mode = 770
  envelope_to_add
  directory = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}/imap/${domain}/${local_part}/Maildir
  maildir_format
  group = mail
  mode = 660
  return_path_add
  user = "${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}"
  quota = ${if exists{/etc/virtual/${domain}/quota}{${lookup{$local_part}lsearch*{/etc/virtual/${domain}/quota}{$value}{0}}}{0}}
  shadow_transport = local_copy_incoming
  shadow_condition = ${if eq {$domain}{domain.com}{yes}{no}}

local_copy_incoming:
  driver = appendfile
  directory = /home/mail/domain.com/mailarchive/.${tr {$local_part}{.}{_}}@${tr {$domain}{.}{_}}.incoming/
  delivery_date_add
  envelope_to_add
  return_path_add
  group = mail
  mode = 0660
  maildir_format = true
  create_directory = true

What i would like :
1°/
is to restrict script funtionning to certain email accounts on the domain, which would be stored in a file (in ./etc/virtual/logging_list) (sales, accounting, technical @ domain.com)

2°/
on 1 account (could be at term up to five accouts stored in the preceding list) which can receive personnal and certain professionnal emails, restrict mail copying on mail only received from adresses stored in a file (in ./etc/virtual/expeditor_list) which are professional mail adress list i will maintain uptodate...

Does anyone have a clue on how to do this...
And i repeat, we have a legal authorisation to do so... No need to say we are not allowed... My problem is to find a technical solution so that i do not store any personnal emails which are not our concern...

Yours...

Tdldp
 
Back
Top