From ff0b2df06008a892571ed747ba585a2939c24637 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sun, 4 Oct 2009 18:42:40 -0400 Subject: [PATCH] merge hcoop vmail configuration --- conf.d/router/250_exim4-config_spamcheck_vmail | 9 +++++++++ conf.d/router/310_exim4-config_virtual_user | 14 ++++++++++++++ .../transport/40_exim4-config_virtual_delivery | 16 ++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 conf.d/router/250_exim4-config_spamcheck_vmail create mode 100644 conf.d/router/310_exim4-config_virtual_user create mode 100644 conf.d/transport/40_exim4-config_virtual_delivery diff --git a/conf.d/router/250_exim4-config_spamcheck_vmail b/conf.d/router/250_exim4-config_spamcheck_vmail new file mode 100644 index 0000000..1b46a4a --- /dev/null +++ b/conf.d/router/250_exim4-config_spamcheck_vmail @@ -0,0 +1,9 @@ +# hcoop-change: Pass email through spamc if it has not already been +# scanned. + +spamcheck_router_vmail: + no_verify + condition = "${if !eq {$received_protocol}{spam-scanned} {1}{0}}" + require_files = /etc/spamassassin/addrs/${local_part}@${domain} + driver = accept + transport = spamcheck diff --git a/conf.d/router/310_exim4-config_virtual_user b/conf.d/router/310_exim4-config_virtual_user new file mode 100644 index 0000000..b2f28f8 --- /dev/null +++ b/conf.d/router/310_exim4-config_virtual_user @@ -0,0 +1,14 @@ +# hcoop-change: Route mail for hosted domains + +virtual_user: + driver = accept + transport = virtual_delivery + # Look up the parameters for this email address, and store them in + # $address_data for later use. If no data exists for this address, + # then "fail", which causes Exim to move on to the next router. + # This allows us to access the contents of $address_data in the + # virtual_delivery transport later on, without having to do multiple + # accesses to exim.dat. + address_data = ${tr{${lookup{$local_part@$domain} \ + dbm{/etc/courier/exim.dat}{$value} fail }} \ + {|}{ }} diff --git a/conf.d/transport/40_exim4-config_virtual_delivery b/conf.d/transport/40_exim4-config_virtual_delivery new file mode 100644 index 0000000..d18a328 --- /dev/null +++ b/conf.d/transport/40_exim4-config_virtual_delivery @@ -0,0 +1,16 @@ +# hcoop-change: This transport is used to deliver mail to virtual +# mailboxes (i.e. email accounts which have been granted to non-hcoop +# members by the owner of the domain) + +virtual_delivery: + debug_print = "T: virtual_delivery for $local_part@$domain" + driver = appendfile + user = ${extract{uid}{$address_data}} + group = nogroup + mode = 0600 + mode_fail_narrower = false + envelope_to_add + return_path_add + directory = ${extract{mail}{$address_data}}${run{/etc/exim4/get-token \ + ${extract{uid}{$address_data}}}{}} + maildir_format -- 2.20.1