We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
BCC All Incoming and Outgoing Mail
BCC All Incoming and Outgoing Mail
Hello there,
I understand there is a way to use exim to BCC all mail that going thou the system. My question is where can I add the following code to VestaCP exim filter?
########### Filter to locate the emails for the domain with fields TO, CC, BCC having the domain name included ###############
if (“$h_to:, $h_cc:, $h_bcc” contains “domain.com”)
then
unseen deliver “[email protected]”
endif
########### Filter to locate the emails sent from the domain ##############
if $sender_address_domain is domain.com
then
unseen deliver “[email protected]”
endif
Thanks,
John
I understand there is a way to use exim to BCC all mail that going thou the system. My question is where can I add the following code to VestaCP exim filter?
########### Filter to locate the emails for the domain with fields TO, CC, BCC having the domain name included ###############
if (“$h_to:, $h_cc:, $h_bcc” contains “domain.com”)
then
unseen deliver “[email protected]”
endif
########### Filter to locate the emails sent from the domain ##############
if $sender_address_domain is domain.com
then
unseen deliver “[email protected]”
endif
Thanks,
John
Re: BCC All Incoming and Outgoing Mail
Why the hell would you even want this?
Re: BCC All Incoming and Outgoing Mail
Although I forget which, I've seen this facility in other mail servers. I think when used, it's usually for audit/accountability purposes - ie where legally (or as policy) a company has to keep copies of every email - even if the sender deletes it etc.Milka wrote:Why the hell would you even want this?
Re: BCC All Incoming and Outgoing Mail
Thanks for the reasoning, GuzziGuy.
So, does VestaCP allow such option? Where or how I can add the exim filter file?
Thx, John.
So, does VestaCP allow such option? Where or how I can add the exim filter file?
Thx, John.
Re: BCC All Incoming and Outgoing Mail
Sorry - I'm a bit vague on Exim (having mainly used Postfix before) hence not supplying an actual answer! But the exim config is in /etc/exim4/exim4.conf.template - but I don't know if this is safe to edit or if it gets overwritten by subsequent Vesta upgrades. I've made some changes to mine, but not sure where your suggested code would go - I guess in the routers section?jboy1970 wrote:Thanks for the reasoning, GuzziGuy.
So, does VestaCP allow such option? Where or how I can add the exim filter file?
Thx, John.
Re: BCC All Incoming and Outgoing Mail
Just a reminder to myself.
Add below to /etc/exim/exim.conf
Then create /etc/exim/exim.filter and have following section
Add below to /etc/exim/exim.conf
Code: Select all
system_filter = /etc/exim/exim.filter
Code: Select all
### START OF OUTGOING + INCOMING MAIL FORWARDING ###
if first_delivery
and ("$h_to:, $h_cc:, $h_bcc" contains "domain.com")
or ("$h_from:" contains "domain.com")
then
unseen deliver "[email protected]"
endif
### END OF OUTGOING + INCOMING MAIL FORWARDING ###