Exim4: Copy all outgoing mail : split file config

Submitted by Jeff on Thu, 19/04/2018 - 09:55
Forums

Adapted from flat-file config at Raymii.Org.

First, make the archive directory with your required domain name:

mkdir -p /var/mail/waspa.org.za/archive
chown Debian-exim:Debian-exim /var/mail/waspa.org.za -R

Create the following to enable Exim system_filter:

Edit /etc/exim4/main/20_exim4_prionyx_system_filter

system_filter = /etc/exim4/system_filter.exim
system_filter_directory_transport = local_copy_outgoing

Edit /etc/exim4/transport/40_exim4_prionyx_system_filter

local_copy_outgoing:  
driver = appendfile  
delivery_date_add  
envelope_to_add  
return_path_add  
group = Debian-exim  
user = Debian-exim  
mode = 0660  
maildir_format = true  
create_directory = true

Edit /etc/exim4/system_filter.exim

if $sender_address_domain is waspa.org.za
then unseen save /var/mail/waspa.org.za/archive/.${tr{$sender_address}{.}{_}}.outgoing/
endif

exim -bV

service exim4 reload


 

 

FF Tags
Category