Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

BCC All Incoming and Outgoing Mail

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
jboy1970
Posts: 3
Joined: Wed Oct 08, 2014 2:51 pm

BCC All Incoming and Outgoing Mail
  • Quote

Post by jboy1970 » Mon Nov 17, 2014 6:13 am

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
Top

Milka
Posts: 137
Joined: Tue Feb 11, 2014 2:03 pm

Re: BCC All Incoming and Outgoing Mail
  • Quote

Post by Milka » Mon Nov 17, 2014 7:17 am

Why the hell would you even want this?
Top

GuzziGuy
Posts: 14
Joined: Thu Oct 30, 2014 6:27 pm

Re: BCC All Incoming and Outgoing Mail
  • Quote

Post by GuzziGuy » Mon Nov 17, 2014 8:16 am

Milka wrote:Why the hell would you even want this?
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.
Top

jboy1970
Posts: 3
Joined: Wed Oct 08, 2014 2:51 pm

Re: BCC All Incoming and Outgoing Mail
  • Quote

Post by jboy1970 » Mon Nov 17, 2014 2:55 pm

Thanks for the reasoning, GuzziGuy.

So, does VestaCP allow such option? Where or how I can add the exim filter file?

Thx, John.
Top

GuzziGuy
Posts: 14
Joined: Thu Oct 30, 2014 6:27 pm

Re: BCC All Incoming and Outgoing Mail
  • Quote

Post by GuzziGuy » Tue Nov 18, 2014 12:29 pm

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.
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?
Top

jboy1970
Posts: 3
Joined: Wed Oct 08, 2014 2:51 pm

Re: BCC All Incoming and Outgoing Mail
  • Quote

Post by jboy1970 » Sat May 20, 2017 2:34 pm

Just a reminder to myself.

Add below to /etc/exim/exim.conf

Code: Select all

system_filter = /etc/exim/exim.filter
Then create /etc/exim/exim.filter and have following section

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 ###
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password