Discussion:
[Pkg-exim4-users] Adding a filter to send a copy of some mails, to an external mailbox.
Rémi Bouhl
2015-10-06 09:07:34 UTC
Permalink
Hi,

I have the following configuration, for small business purpose :
- We have one mail address, "***@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
: "***@company-local" and "***@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
***@company-local, to ***@ourcompany.fr), then sends it to the ISP
smarthost.

What we need is a copy of these mails : For every mail sent by
"***@company-local" to anyone, I need exim4 to send a copy to
"***@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 ?
Nick Guerette
2015-10-06 21:56:33 UTC
Permalink
One thing to be aware of is the value of dc_use_split_config in
/etc/exim4/update-exim4.conf.conf ; if it is 'true', then you need to
make configuration changes not in /etc/exim4/exim4.conf.template but
rather in one of the files under /etc/exim4/conf.d/ . The parameters
you are setting do not go directly in update-exim4.conf.conf. See:
https://wiki.debian.org/Exim#Configuration
Post by Rémi Bouhl
Hi,
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
exim4 as SMTP server.
This works good : exim4 relays mail for the Internet to our ISP
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
smarthost.
What we need is a copy of these mails : For every mail sent by
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 ?
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Nick Guerette
Embedded Systems Engineer
Mosaic Industries, Inc.
510-790-8222
http://mosaic-industries.com/embedded-systems
Rémi Bouhl
2015-10-08 09:46:09 UTC
Permalink
I have "dc_use_split_config" set to "false", so I guess I have to do
the configuration in /etc/exim4/exim4.conf.template

I have read /usr/share/doc/exim4-config/README.Debian.gz and
https://wiki.debian.org/Exim#Configuration , and I believe I
understand a bit how exim configuration files work.

My issue is that there is nothing in the documentation about "how to
set up a specific filter". Looking for "filter" in
/etc/exim4/exim4.conf.template shows up only options related to user
filters.
I have found many samples of config files using Google, but most of
them are not Debian-compliant.

I guess I need to translate this :

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

into a /etc/exim4/exim4.conf.template compatible syntax.

Should it start with a ".ifndef SYSTEM_FILTER" ?

I guess I will end up setting up user-defined filters, since there is
a lot of documentation about it :)
Post by Nick Guerette
One thing to be aware of is the value of dc_use_split_config in
/etc/exim4/update-exim4.conf.conf ; if it is 'true', then you need to
make configuration changes not in /etc/exim4/exim4.conf.template but
rather in one of the files under /etc/exim4/conf.d/ . The parameters
https://wiki.debian.org/Exim#Configuration
Post by Rémi Bouhl
Hi,
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
exim4 as SMTP server.
This works good : exim4 relays mail for the Internet to our ISP
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
smarthost.
What we need is a copy of these mails : For every mail sent by
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 ?
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Nick Guerette
Embedded Systems Engineer
Mosaic Industries, Inc.
510-790-8222
http://mosaic-industries.com/embedded-systems
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Rémi Bouhl
2015-10-21 09:43:14 UTC
Permalink
Well.

I solved this with Thunderbird : I send a copy to our info@ mailbox,
of every mail sent.
Post by Rémi Bouhl
I have "dc_use_split_config" set to "false", so I guess I have to do
the configuration in /etc/exim4/exim4.conf.template
I have read /usr/share/doc/exim4-config/README.Debian.gz and
https://wiki.debian.org/Exim#Configuration , and I believe I
understand a bit how exim configuration files work.
My issue is that there is nothing in the documentation about "how to
set up a specific filter". Looking for "filter" in
/etc/exim4/exim4.conf.template shows up only options related to user
filters.
I have found many samples of config files using Google, but most of
them are not Debian-compliant.
==
system_filter = /etc/exim4/copy_of_local.filter
system_filter_pipe_transport = address_pipe
system_filter_user = Debian-exim
==
into a /etc/exim4/exim4.conf.template compatible syntax.
Should it start with a ".ifndef SYSTEM_FILTER" ?
I guess I will end up setting up user-defined filters, since there is
a lot of documentation about it :)
Post by Nick Guerette
One thing to be aware of is the value of dc_use_split_config in
/etc/exim4/update-exim4.conf.conf ; if it is 'true', then you need to
make configuration changes not in /etc/exim4/exim4.conf.template but
rather in one of the files under /etc/exim4/conf.d/ . The parameters
https://wiki.debian.org/Exim#Configuration
Post by Rémi Bouhl
Hi,
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
exim4 as SMTP server.
This works good : exim4 relays mail for the Internet to our ISP
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
smarthost.
What we need is a copy of these mails : For every mail sent by
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 ?
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Nick Guerette
Embedded Systems Engineer
Mosaic Industries, Inc.
510-790-8222
http://mosaic-industries.com/embedded-systems
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Loading...