Re: [Exim] Copy outgoing and incoming mail

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: michael
Data:  
Para: ph10, prudek
CC: exim-users
Assunto: Re: [Exim] Copy outgoing and incoming mail
> > How to copy all outgoing and incoming mail to a specified mailbox?
>
> FAQ Q9810.


The FAQ could need an update, though. There is no universal way to
copy all incoming and outgoing mail for a specific user to another
mail address. My (working) solution is a hack.

Monitor incoming mails:

d_bcc:
  driver                = aliasfile
  file                  = /var/exim/etc/bcc.db
  search_type           = dbm
  include_domain        = true
  errors_to             = postmaster@mydomain
  unseen                = true


Monitor outgoing mails:

t_bcc:
  driver                = pipe


message_filter          = /var/exim/etc/filter
message_filter_group    = exim
message_filter_user     = exim
message_filter_pipe_transport = t_bcc


# Exim filter <- do not edit or remove this line

if first_delivery then
  if "${lookup {$sender_address} dbm {/var/exim/etc/bcc.db} {true} {false}}" is "true" then
    unseen noerror pipe "/usr/exim/bin/exim -oi -oee -f postmaster@mydomain ${lookup{$sender_address}dbm{/var/exim/etc/bcc.db}{$value}fail}"
  endif
endif


The bcc file contains a mapping of mail addresses to be monitored to
the monitoring address.

Michael