fixed inconsistency in env variable name
This commit is contained in:
parent
44757ff96e
commit
427d9f7520
1 changed files with 51 additions and 10 deletions
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
$(hostname) = {env:MADDY_HOSTNAME}
|
$(hostname) = {env:MADDY_HOSTNAME}
|
||||||
$(primary_domain) = {env:MADDY_DOMAIN}
|
$(primary_domain) = {env:MADDY_DOMAIN}
|
||||||
$(local_domains) = $(primary_domain) {env:HOSTUX_DOMAINS_WITH_DKIM}
|
$(local_domains) = $(primary_domain) {env:HOSTUX_LOCAL_DOMAINS}
|
||||||
|
|
||||||
tls file /certs/live/$(hostname)/fullchain.pem /certs/live/$(hostname)/privkey.pem
|
tls file /certs/live/$(hostname)/fullchain.pem /certs/live/$(hostname)/privkey.pem
|
||||||
|
|
||||||
|
@ -59,6 +59,10 @@ table.chain local_rewrites {
|
||||||
optional_step static {
|
optional_step static {
|
||||||
entry postmaster postmaster@$(primary_domain)
|
entry postmaster postmaster@$(primary_domain)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table.chain hostux_rewrites {
|
||||||
|
optional_step regexp "(.+)\+(.+)@(.+)" "$1@$3"
|
||||||
optional_step sql_query {
|
optional_step sql_query {
|
||||||
driver sqlite3
|
driver sqlite3
|
||||||
dsn {env:HOSTUX_EMAIL_DATABASE_SQLITE}
|
dsn {env:HOSTUX_EMAIL_DATABASE_SQLITE}
|
||||||
|
@ -66,15 +70,15 @@ table.chain local_rewrites {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#table.sql_query hostux_destinations {
|
table.sql_query hostux_destinations {
|
||||||
# driver sqlite3
|
driver sqlite3
|
||||||
# dsn {env:HOSTUX_EMAIL_DATABASE_SQLITE}
|
dsn {env:HOSTUX_EMAIL_DATABASE_SQLITE}
|
||||||
# lookup "SELECT emailAddress AS address FROM `email-addresses`
|
lookup "SELECT emailAddress AS address FROM `email-addresses`
|
||||||
# WHERE address = $1
|
WHERE address = $1
|
||||||
# UNION
|
UNION
|
||||||
# SELECT emailAlias AS address FROM `email-aliases`
|
SELECT emailAlias AS address FROM `email-aliases`
|
||||||
# WHERE address = $1"
|
WHERE address = $1"
|
||||||
#}
|
}
|
||||||
|
|
||||||
msgpipeline local_routing {
|
msgpipeline local_routing {
|
||||||
# Insert handling for special-purpose local domains here.
|
# Insert handling for special-purpose local domains here.
|
||||||
|
@ -96,6 +100,13 @@ msgpipeline local_routing {
|
||||||
|
|
||||||
deliver_to &local_mailboxes
|
deliver_to &local_mailboxes
|
||||||
}
|
}
|
||||||
|
destination_in hostux_destinations {
|
||||||
|
modify {
|
||||||
|
replace_rcpt &hostux_rewrites
|
||||||
|
}
|
||||||
|
|
||||||
|
deliver_to &local_mailboxes
|
||||||
|
}
|
||||||
|
|
||||||
default_destination {
|
default_destination {
|
||||||
reject 550 5.1.1 "User doesn't exist"
|
reject 550 5.1.1 "User doesn't exist"
|
||||||
|
@ -119,6 +130,9 @@ smtp tcp://0.0.0.0:25 {
|
||||||
source $(local_domains) {
|
source $(local_domains) {
|
||||||
reject 501 5.1.8 "Use Submission for outgoing SMTP"
|
reject 501 5.1.8 "Use Submission for outgoing SMTP"
|
||||||
}
|
}
|
||||||
|
source_in hostux_destinations {
|
||||||
|
reject 501 5.1.8 "Use Submission for outgoing SMTP"
|
||||||
|
}
|
||||||
default_source {
|
default_source {
|
||||||
destination postmaster $(local_domains) {
|
destination postmaster $(local_domains) {
|
||||||
deliver_to &local_routing
|
deliver_to &local_routing
|
||||||
|
@ -155,6 +169,30 @@ submission tls://0.0.0.0:465 tcp://0.0.0.0:587 {
|
||||||
deliver_to &remote_queue
|
deliver_to &remote_queue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
source_in hostux_destinations {
|
||||||
|
check {
|
||||||
|
authorize_sender {
|
||||||
|
prepare_email &hostux_rewrites
|
||||||
|
user_to_email identity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
destination postmaster $(local_domains) {
|
||||||
|
deliver_to &local_routing
|
||||||
|
}
|
||||||
|
destination_in hostux_destinations {
|
||||||
|
deliver_to &local_routing
|
||||||
|
}
|
||||||
|
|
||||||
|
default_destination {
|
||||||
|
# TODO: rspamd milter w/ DKIM signing
|
||||||
|
#modify {
|
||||||
|
# dkim $(primary_domain) $(local_domains) default
|
||||||
|
#}
|
||||||
|
deliver_to &remote_queue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default_source {
|
default_source {
|
||||||
reject 501 5.1.8 "Non-local sender domain"
|
reject 501 5.1.8 "Non-local sender domain"
|
||||||
}
|
}
|
||||||
|
@ -188,6 +226,9 @@ target.queue remote_queue {
|
||||||
destination postmaster $(local_domains) {
|
destination postmaster $(local_domains) {
|
||||||
deliver_to &local_routing
|
deliver_to &local_routing
|
||||||
}
|
}
|
||||||
|
destination_in hostux_destinations {
|
||||||
|
deliver_to &local_routing
|
||||||
|
}
|
||||||
default_destination {
|
default_destination {
|
||||||
reject 550 5.0.0 "Refusing to send DSNs to non-local addresses"
|
reject 550 5.0.0 "Refusing to send DSNs to non-local addresses"
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue