[Pkg-exim4-users] Adding a filter to send a copy of some mails, to an external mailbox.

Rémi Bouhl remibouhl at gmail.com
Tue Oct 6 09:07:34 UTC 2015


Hi,

I have the following configuration, for small business purpose :
- We have one mail address, "info at ourcompany.fr", and one Debian
client were we use Icedove to read, process and answer these mails. We
use our ISP smarthost for sending mails. This Debian client is the
only computer that can access to the Internet. We have a separate
Windows LAN.

- Since we needed to forward some of these mails to some coworkers, I
have installed exim4 on the Debian client, and created local mailboxes
: "ls at company-local" and "jm at company-local", and set up Icedove to use
exim4 as SMTP server.

This works good : exim4 relays mail for the Internet to our ISP
smarthost, and stores "@company-local" mails in /var/mail/$user. My
coworkers can read their local mails using Thunderbird in Windows.

They can answer the mails, too : they use exim4 as outgoing SMTP
server. exim4 rewrites the mail ("From" is changed from
xxx at company-local, to info at ourcompany.fr), then sends it to the ISP
smarthost.

What we need is a copy of these mails : For every mail sent by
"xxx at company-local" to anyone, I need exim4 to send a copy to
"info at ourcompany.fr", using the ISP smarthost.

I have created a filter.

exim4 config is split between exim4.conf.template and update-exim4.conf.conf

Where do I write the following lines to use my filter ?

====
system_filter = /etc/exim4/filter.txt
system_filter_pipe_transport = address_pipe
system_filter_user = Debian-exim
====

I have tried to write these in both exim4.conf.template and
update-exim4.conf.conf, with no success.
I have tried in /var/lib/exim4/config.autogenerated, but it gets overwritten.

Can you point me to the right way of adding my filter ?



More information about the Pkg-exim4-users mailing list