change queries for new vmail db schema, changes for exim 4.94+ compat
This commit is contained in:
parent
ceb0a589ec
commit
1107d9e7f0
|
@ -463,31 +463,34 @@ acl_rcpt_to:
|
|||
# Recipent Address Checks
|
||||
######################################################################
|
||||
|
||||
# Ensure only valid SRS prefixed bounce message get accepted
|
||||
deny
|
||||
senders = :
|
||||
domains = +local_domains
|
||||
local_parts = ${if match {$local_part} {(?i)\N^SRS[01][=+-]\N} {$local_part}}
|
||||
control = caseful_local_part
|
||||
condition = ${if match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{\n}}}{^ERROR: .* Invalid hash at .*}}
|
||||
message = Invalid reverse path (SRS check failed on $local_part@$domain).
|
||||
|
||||
warn
|
||||
senders = :
|
||||
domains = +local_domains
|
||||
local_parts = ${if match {$local_part} {\N^srs[01][=+-]\N} {$local_part}}
|
||||
control = caseful_local_part
|
||||
condition = ${if match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{ }}}{^SRS: Case insensitive hash match detected. Someone smashed case in the local-part. .*}}
|
||||
log_message = SRS hash smashed on the way for $local_part@$domain by case insensitive MTA.
|
||||
|
||||
# this is for debugging only. can be safely removed any time
|
||||
warn
|
||||
senders = :
|
||||
domains = +local_domains
|
||||
local_parts = ${if match {$local_part} {(?i)\N^SRS[01][=+-]\N} {$local_part}}
|
||||
control = caseful_local_part
|
||||
condition = ${if !match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{\n}}}{^ERROR: .* Invalid hash at .*}}
|
||||
log_message = Incoming SRS bounce to $local_part@$domain
|
||||
# SRS configs taken from: https://ente.limmat.ch/kb/exim/exim_v4_srs.html
|
||||
## SRS checks are temporarily disabled. srsd is currently broken on Ubuntu 22.04.
|
||||
## These could be updated to use "run{/usr/bin/srs" instead of readsocket.
|
||||
## # Ensure only valid SRS prefixed bounce message get accepted
|
||||
## deny
|
||||
## senders = :
|
||||
## domains = +local_domains
|
||||
## local_parts = ${if match {$local_part} {(?i)\N^SRS[01][=+-]\N} {$local_part}}
|
||||
## control = caseful_local_part
|
||||
## condition = ${if match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{\n}}}{^ERROR: .* Invalid hash at .*}}
|
||||
## message = Invalid reverse path (SRS check failed on $local_part@$domain).
|
||||
##
|
||||
## warn
|
||||
## senders = :
|
||||
## domains = +local_domains
|
||||
## local_parts = ${if match {$local_part} {\N^srs[01][=+-]\N} {$local_part}}
|
||||
## control = caseful_local_part
|
||||
## condition = ${if match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{ }}}{^SRS: Case insensitive hash match detected. Someone smashed case in the local-part. .*}}
|
||||
## log_message = SRS hash smashed on the way for $local_part@$domain by case insensitive MTA.
|
||||
##
|
||||
## # this is for debugging only. can be safely removed any time
|
||||
## warn
|
||||
## senders = :
|
||||
## domains = +local_domains
|
||||
## local_parts = ${if match {$local_part} {(?i)\N^SRS[01][=+-]\N} {$local_part}}
|
||||
## control = caseful_local_part
|
||||
## condition = ${if !match{${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part@$domain}{5s}{\n}}}{^ERROR: .* Invalid hash at .*}}
|
||||
## log_message = Incoming SRS bounce to $local_part@$domain
|
||||
|
||||
# Deny if the local part contains @ or % or / or | or !. These are
|
||||
# rarely found in genuine local parts, but are often tried by people
|
||||
|
@ -757,7 +760,9 @@ srs_bounce:
|
|||
allow_defer
|
||||
local_part_prefix = srs0+ : srs0- : srs0= : srs1+ : srs1- : srs1=
|
||||
caseful_local_part
|
||||
address_data = ${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part_prefix$local_part@$domain}{5s}{ }{:defer: SRS daemon failure}}
|
||||
address_data = ${run{/usr/bin/srs --secretfile=/etc/exim4/srsd.secret --hashlength=24 --reverse --address=$local_part_prefix$local_part@$domain}{$value}{:defer: SRS failure}}
|
||||
## srsd is broken on ubuntu 22.04. using above "run" command instead
|
||||
# address_data = ${readsocket{/run/srsd/srsd.sock}{REVERSE $local_part_prefix$local_part@$domain}{5s}{ }{:defer: SRS daemon failure}}
|
||||
data = ${sg {$address_data} {^SRS: Case insensitive hash match detected. Someone smashed case in the local-part\. .* ([^ ]+)@([^ ]+)\$} {\N$1@$2\N} }
|
||||
headers_add = X-SRS: Decoded valid SRS return address to ${quote_local_part:${local_part:$address_data}}@${domain:$address_data} by $primary_hostname
|
||||
|
||||
|
@ -766,9 +771,11 @@ srs_forward:
|
|||
senders = ! : ! *@+local_domains
|
||||
domains = ! +local_domains : ! +relay_to_domains
|
||||
condition = ${lookup mysql{SELECT vm_domains.id FROM vm_domains WHERE vm_domains.domain='${original_domain}' AND vm_domains.status = '1'}}
|
||||
address_data = ${readsocket{/run/srsd/srsd.sock}\
|
||||
{FORWARD $sender_address_local_part@$sender_address_domain $original_domain\n}\
|
||||
{5s}{\n}{:defer: SRS daemon failure}}
|
||||
address_data = ${run{/usr/bin/srs --secretfile=/etc/exim4/srsd.secret --hashlength=24 --forward --address=$sender_address_local_part@$sender_address_domain --alias=$original_domain}{$value}{:defer: SRS failure}}
|
||||
## srsd is broken on ubuntu 22.04. using above "run" command instead
|
||||
# address_data = ${readsocket{/run/srsd/srsd.sock}\
|
||||
# {FORWARD $sender_address_local_part@$sender_address_domain $original_domain\n}\
|
||||
# {5s}{\n}{:defer: SRS daemon failure}}
|
||||
errors_to = ${quote_local_part:${local_part:$address_data}}@${domain:$address_data}
|
||||
data = ${quote_local_part:$local_part}@$domain
|
||||
headers_add = X-SRS-Forward: from $sender_address to $original_local_part@$original_domain forwarded to $local_part@$domain by $primary_hostname
|
||||
|
@ -799,19 +806,17 @@ virtual_alias:
|
|||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
data = ${lookup mysql{SELECT CONCAT(vm_aliases.mbox,'@${domain}') FROM vm_aliases, vm_mboxes, vm_domains WHERE vm_aliases.alias='${local_part}' AND vm_aliases.domain='${domain}' AND vm_aliases.mbox=vm_mboxes.mbox AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_domains.domain='${domain}' AND vm_domains.status = '1'}}
|
||||
data = ${lookup mysql{SELECT CONCAT(vm_aliases.mbox,'@','${domain}') FROM vm_mboxes, vm_aliases WHERE vm_mboxes.mbox=vm_aliases.mbox AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_aliases.alias='${local_part}' AND vm_aliases.domain='${domain}'}}
|
||||
|
||||
junk_filter:
|
||||
driver = accept
|
||||
domains = +local_domains
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
condition = ${if and { \
|
||||
{ !eq {$received_protocol}{spam-scanned}} \
|
||||
{ eq {$header_X-Junk-Flag:}{YES}} \
|
||||
{ !eq {$header_X-Whitelist-Flag:}{YES}} \
|
||||
} {yes}{no}}
|
||||
condition = ${lookup mysql{SELECT vm_mboxes.id FROM vm_mboxes, vm_domains WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_mboxes.filter > '0' AND vm_domains.domain=vm_mboxes.domain AND vm_domains.status='1'}}
|
||||
local_parts = ${lookup mysql{SELECT vm_mboxes.mbox FROM vm_mboxes WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_mboxes.filter > '0'}}
|
||||
condition = ${if eq {$header_X-Junk-Flag:}{YES}}
|
||||
condition = ${if !eq {$header_X-Whitelist-Flag:}{YES}}
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
transport = junk_delivery
|
||||
|
||||
spam_filter:
|
||||
|
@ -819,25 +824,24 @@ spam_filter:
|
|||
domains = +local_domains
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
condition = ${if and { \
|
||||
{ eq {$received_protocol}{spam-scanned}} \
|
||||
{ eq {$header_X-Spam-Flag:}{YES}} \
|
||||
{ !eq {$header_X-Whitelist-Flag:}{YES}} \
|
||||
} {yes}{no}}
|
||||
condition = ${lookup mysql{SELECT id FROM vm_domains, vm_mboxes WHERE vm_domains.domain='${domain}' vm_domains.status='1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status>'0'}}
|
||||
local_parts = ${lookup mysql{SELECT vm_mboxes.mbox FROM vm_mboxes WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_mboxes.filter = '2'}}
|
||||
condition = ${if eq {$received_protocol}{spam-scanned}}
|
||||
condition = ${if eq {$header_X-Spam-Flag:}{YES}}
|
||||
condition = ${if !eq {$header_X-Whitelist-Flag:}{YES}}
|
||||
transport = junk_delivery
|
||||
|
||||
virtual_vacation:
|
||||
driver = accept
|
||||
domains = +local_domains
|
||||
# currently configured to *not* autorespond to + aliases
|
||||
#local_part_suffix = +*
|
||||
#local_part_suffix_optional = true
|
||||
local_parts = ${lookup mysql{SELECT vm_mboxes.mbox FROM vm_mboxes, vm_autoresponders WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.mode='Vacation' AND vm_autoresponders.status='1'}}
|
||||
# add options for start & end date fields to above query
|
||||
# do not reply to errors or lists or spam-scanned messages, require vacation message in db
|
||||
condition = ${if and { \
|
||||
{ !match {$h_precedence:} {(?i)junk|bulk|list}} \
|
||||
{ !eq {$received_protocol}{spam-scanned}} \
|
||||
{ !eq {$sender_address} {}} \
|
||||
{ eq {${lookup mysql{SELECT vm_autoresponders.mode FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1'}{$value}fail}}{Vacation}} \
|
||||
} {yes} {no}}
|
||||
# add options for start & end date fields
|
||||
condition = ${if !match {$h_precedence:} {(?i)junk|bulk|list}}
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
condition = ${if !eq {$sender_address} {}}
|
||||
no_expn
|
||||
# do not reply to errors and bounces or lists
|
||||
senders = " ! ^.*-request@.*:\
|
||||
|
@ -856,14 +860,12 @@ virtual_autoresponder:
|
|||
# currently configured to *not* autorespond to + aliases
|
||||
#local_part_suffix = +*
|
||||
#local_part_suffix_optional = true
|
||||
local_parts = ${lookup mysql{SELECT vm_mboxes.mbox FROM vm_mboxes, vm_autoresponders WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.mode='Autoresponder' AND vm_autoresponders.status='1'}}
|
||||
# add options for start & end date fields to above query
|
||||
# do not reply to errors or lists or spam-scanned messages, require autoresponder message in db
|
||||
condition = ${if and { \
|
||||
{ !match {$h_precedence:} {(?i)junk|bulk|list}} \
|
||||
{ !eq {$received_protocol}{spam-scanned}} \
|
||||
{ !eq {$sender_address} {}} \
|
||||
{ eq {${lookup mysql{SELECT vm_autoresponders.mode FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1'}{$value}fail}}{Autoresponder} } \
|
||||
} {yes} {no}}
|
||||
# add options for start & end date fields
|
||||
condition = ${if !match {$h_precedence:} {(?i)junk|bulk|list}}
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
condition = ${if !eq {$sender_address} {}}
|
||||
no_expn
|
||||
# do not reply to errors and bounces or lists
|
||||
senders = " ! ^.*-request@.*:\
|
||||
|
@ -882,7 +884,7 @@ virtual_forward_and_drop:
|
|||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
data = ${lookup mysql{SELECT vm_forwards.forward_to FROM vm_domains, vm_mboxes, vm_forwards WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_forwards.mbox='${local_part}' AND vm_forwards.domain='${domain}' AND vm_forwards.save_local='0'}}
|
||||
data = ${lookup mysql{SELECT vm_forwards.forward_to FROM vm_mboxes, vm_forwards WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_forwards.mbox='${local_part}' AND vm_forwards.domain='${domain}' AND vm_forwards.save_local='0'}}
|
||||
|
||||
virtual_forward_and_keep:
|
||||
driver = redirect
|
||||
|
@ -890,22 +892,20 @@ virtual_forward_and_keep:
|
|||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
data = ${lookup mysql{SELECT CONCAT('${local_part}@${domain}\n', vm_forwards.forward_to) FROM vm_domains, vm_mboxes, vm_forwards WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_forwards.mbox='${local_part}' AND vm_forwards.domain='${domain}' AND vm_forwards.save_local='1'}}
|
||||
data = ${lookup mysql{SELECT CONCAT('${local_part}@${domain}\n', vm_forwards.forward_to) FROM vm_mboxes, vm_forwards WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_forwards.mbox='${local_part}' AND vm_forwards.domain='${domain}' AND vm_forwards.save_local='1'}}
|
||||
|
||||
spamcheck_router:
|
||||
driver = accept
|
||||
# uncomment next line to bypass spamcheck when testing address routing with "exim -bt user@example.com"
|
||||
#address_test = false
|
||||
domains = +local_domains
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
condition = ${if and { \
|
||||
{ !eq {$received_protocol}{spam-scanned}} \
|
||||
{ !eq {$sender_address_domain}{$domain}} \
|
||||
{ < {$message_size}{512k}} \
|
||||
{ !eq {$header_X-Junk-Flag:}{YES}} \
|
||||
{ !eq {$header_X-Whitelist-Flag:}{YES}} \
|
||||
{ gt {${lookup mysql{SELECT vm_mboxes.filter FROM vm_domains, vm_mboxes WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0'}{$value}fail}}{0} } \
|
||||
} {yes} {no}}
|
||||
# Check for other headers too? Blacklist, SPF, DKIM failers go directly to Spam folder without spam scan??? - actually they should go to spam folder before this router is hit?
|
||||
local_parts = ${lookup mysql{SELECT vm_mboxes.mbox FROM vm_mboxes WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0'}}
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
condition = ${if !eq {$sender_address_domain}{$domain}}
|
||||
condition = ${if !eq {$header_X-Whitelist-Flag:}{YES}}
|
||||
condition = ${if < {$message_size}{512k}}
|
||||
headers_remove = X-Spam-Checker-Version:X-Spam-Flag:X-Spam-Level:X-Spam-Status:X-Spam-Score:X-Spam-Report
|
||||
transport = spamcheck
|
||||
|
||||
|
@ -914,7 +914,7 @@ user_filter:
|
|||
domains = +local_domains
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
data = ${lookup mysql{SELECT vm_filters.filter FROM vm_domains, vm_mboxes, vm_filters WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_filters.mbox='${local_part}' AND vm_filters.domain='${domain}'}}
|
||||
data = ${lookup mysql{SELECT vm_filters.filter FROM vm_mboxes, vm_filters WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_filters.mbox='${local_part}' AND vm_filters.domain='${domain}'}}
|
||||
user = vmail
|
||||
no_verify
|
||||
no_expn
|
||||
|
@ -931,8 +931,7 @@ lmtp_localuser:
|
|||
domains = +local_domains
|
||||
local_part_suffix = +*
|
||||
local_part_suffix_optional = true
|
||||
condition = ${lookup mysql{SELECT vm_mboxes.id FROM vm_domains, vm_mboxes WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0'}}
|
||||
# add checks to query for domain & mbox being active
|
||||
condition = ${lookup mysql{SELECT vm_mboxes.id FROM vm_mboxes WHERE vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0'}}
|
||||
transport = dovecot_lmtp
|
||||
cannot_route_message = Unknown user
|
||||
|
||||
|
@ -941,7 +940,7 @@ virtual_alias_catchall:
|
|||
driver = redirect
|
||||
domains = +local_domains
|
||||
condition = ${if !eq {$received_protocol}{spam-scanned}}
|
||||
data = ${lookup mysql{SELECT CONCAT(vm_aliases.mbox,'@${domain}') FROM vm_aliases, vm_mboxes, vm_domains WHERE vm_aliases.alias='catchall' AND vm_aliases.domain='${domain}' AND vm_aliases.mbox=vm_mboxes.mbox AND vm_mboxes.domain='${domain} AND vm_mboxes.status > '0' AND vm_domains.domain='${domain}' AND vm_domains.status = '1'}}
|
||||
data = ${lookup mysql{SELECT CONCAT(vm_aliases.mbox,'@','${domain}') FROM vm_mboxes, vm_aliases WHERE vm_mboxes.mbox=vm_aliases.mbox AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_aliases.alias='catchall' AND vm_aliases.domain='${domain}'}}
|
||||
|
||||
# This router handles aliasing using a linearly searched alias file with the
|
||||
# name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,
|
||||
|
@ -1030,7 +1029,8 @@ begin transports
|
|||
|
||||
remote_smtp:
|
||||
driver = smtp
|
||||
dkim_domain = ${lc:${domain:$h_from:}}
|
||||
# run{/bin/echo part is required to de-taint the domain
|
||||
dkim_domain = ${run{/bin/echo ${lc:${domain:$h_from:}}}{$value}}
|
||||
dkim_canon = relaxed
|
||||
dkim_selector = ${if exists{/etc/ssl/dkim/${dkim_domain}.selector}{${readfile{/etc/ssl/dkim/${dkim_domain}.selector}{}}}{0}}
|
||||
dkim_private_key = ${if exists{/etc/ssl/dkim/${dkim_domain}.pem}{/etc/ssl/dkim/${dkim_domain}.pem}{0}}
|
||||
|
@ -1042,14 +1042,19 @@ remote_smtp:
|
|||
# particular group instead of using the sticky bit. The commented options below
|
||||
# show how this can be done.
|
||||
|
||||
local_delivery:
|
||||
driver = appendfile
|
||||
file = /var/mail/$local_part
|
||||
delivery_date_add
|
||||
envelope_to_add
|
||||
return_path_add
|
||||
group = vmail
|
||||
mode = 0660
|
||||
#local_delivery:
|
||||
# driver = appendfile
|
||||
## file = /var/vmail/$local_part_data
|
||||
# maildir_format = true
|
||||
# directory = /home/$local_part_data/Maildir
|
||||
# create_directory = true
|
||||
# directory_mode = 770
|
||||
# delivery_date_add
|
||||
# envelope_to_add
|
||||
# return_path_add
|
||||
# user = $local_part
|
||||
# group = $local_part
|
||||
# mode = 0660
|
||||
|
||||
dovecot_lmtp:
|
||||
driver = lmtp
|
||||
|
@ -1060,61 +1065,47 @@ dovecot_lmtp:
|
|||
#allow suffixes/prefixes (default unset)
|
||||
#rcpt_include_affixes
|
||||
|
||||
#local_delivery:
|
||||
# driver = appendfile
|
||||
## file = /var/vmail/$local_part
|
||||
# maildir_format = true
|
||||
# directory = /home/$local_part/Maildir
|
||||
# create_directory
|
||||
# directory_mode = 770
|
||||
# delivery_date_add
|
||||
# envelope_to_add
|
||||
# return_path_add
|
||||
# user = $local_part
|
||||
# group = $local_part
|
||||
# mode = 0660
|
||||
|
||||
## for vacation mail
|
||||
vacation_transport:
|
||||
driver = autoreply
|
||||
log = /var/vmail/${domain}/${local_part}/vacation_log
|
||||
once = /var/vmail/${domain}/${local_part}/vacation_once_db
|
||||
log = /var/vmail/${domain_data}/${local_part_data}/vacation_log
|
||||
once = /var/vmail/${domain_data}/${local_part_data}/vacation_once_db
|
||||
return_path = ${local_part}@${domain}
|
||||
to = ${sender_address}
|
||||
from = ${local_part}@${domain}
|
||||
subject = ${lookup mysql{SELECT vm_autoresponders.subject FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Vacation'}{$value}{"Auto Reply"}}
|
||||
text = ${lookup mysql{SELECT vm_autoresponders.body FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Vacation'}{$value}fail}
|
||||
subject = ${lookup mysql{SELECT vm_autoresponders.subject FROM vm_autoresponders WHERE vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Vacation'}{$value}{"Auto Reply"}}
|
||||
text = ${lookup mysql{SELECT vm_autoresponders.body FROM vm_autoresponders WHERE vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Vacation'}{$value}fail}
|
||||
user = vmail
|
||||
|
||||
## for autoresponder
|
||||
autoresponder_transport:
|
||||
driver = autoreply
|
||||
log = /var/vmail/${domain}/${local_part}/autoresponder_log
|
||||
log = /var/vmail/${domain_data}/${local_part_data}/autoresponder_log
|
||||
return_path = ${local_part}@${domain}
|
||||
to = ${sender_address}
|
||||
from = ${local_part}@${domain}
|
||||
subject = ${lookup mysql{SELECT vm_autoresponders.subject FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Autoresponder'}{$value}{"Auto Reply"}}
|
||||
text = ${lookup mysql{SELECT vm_autoresponders.body FROM vm_domains, vm_mboxes, vm_autoresponders WHERE vm_domains.domain='${domain}' AND vm_domains.status = '1' AND vm_mboxes.mbox='${local_part}' AND vm_mboxes.domain='${domain}' AND vm_mboxes.status > '0' AND vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Autoresponder'}{$value}fail}
|
||||
subject = ${lookup mysql{SELECT vm_autoresponders.subject FROM vm_autoresponders WHERE vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Autoresponder'}{$value}{"Auto Reply"}}
|
||||
text = ${lookup mysql{SELECT vm_autoresponders.body FROM vm_autoresponders WHERE vm_autoresponders.mbox='${local_part}' AND vm_autoresponders.domain='${domain}' AND vm_autoresponders.status='1' AND vm_autoresponders.mode='Autoresponder'}{$value}fail}
|
||||
user = vmail
|
||||
|
||||
maildir_delivery:
|
||||
driver = appendfile
|
||||
maildir_format
|
||||
directory = /var/vmail/${domain}/${local_part}/Maildir
|
||||
create_directory
|
||||
directory_mode = 750
|
||||
user = vmail
|
||||
#maildir_delivery:
|
||||
# driver = appendfile
|
||||
# maildir_format = true
|
||||
# directory = /var/vmail/${domain_data}/${local_part_data}/Maildir
|
||||
# create_directory = true
|
||||
# directory_mode = 750
|
||||
# user = vmail
|
||||
|
||||
user_filter_maildir_delivery:
|
||||
driver = appendfile
|
||||
maildir_format
|
||||
maildir_format = true
|
||||
user = vmail
|
||||
|
||||
junk_delivery:
|
||||
driver = appendfile
|
||||
maildir_format
|
||||
directory = /var/vmail/${domain}/${local_part}/Maildir/.Junk
|
||||
create_directory
|
||||
maildir_format = true
|
||||
directory = /var/vmail/${domain_data}/${local_part_data}/Maildir/.Junk
|
||||
create_directory = true
|
||||
directory_mode = 750
|
||||
user = vmail
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user