[exim] Mail filter

Etusivu
Poista viesti
Vastaa
Lähettäjä: Terry
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] Mail filter
I need to keep a carbon copy of all out going and incoming mail. I have
created a .forward as a test in one user home directory like so

# Exim filter
unseen deliver carboncopy@???

And in exim/configure i have uncommented the filter line like so

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
condition = ${if exists{$home/.forward} {yes} {no} }

This works great for all incoming mail but does not copy any out going
i based my configuration on the faq

A5033: The most straightforward way is to set up a system filter, and
include a command such as:

unseen deliver mailbox@???

This sends a copy of every message to mailbox@??? (unless
the message already has that recipient - Exim never does duplicate
deliveries).

To save only "outgoing" messages, you need to come up with a definition
of what "outgoing" means. Typically, this might be a check on the sender
address and/or on the originating host. Here is an example:

   if $sender_address_domain is mydomain.com and
      ${mask:$sender_host_address/24} is 192.168.324.0/24
   then
     unseen deliver mailbox@???
Regards Terry
   endif