mirror of
https://github.com/chatmail/relay.git
synced 2026-05-21 05:18:04 +00:00
Add missing login map
This commit is contained in:
@@ -301,6 +301,18 @@ def _configure_postfix(config: Config, debug: bool = False) -> bool:
|
|||||||
)
|
)
|
||||||
need_restart |= header_cleanup.changed
|
need_restart |= header_cleanup.changed
|
||||||
|
|
||||||
|
# Login map that 1:1 maps email address to login.
|
||||||
|
login_map = files.put(
|
||||||
|
src=importlib.resources.files(__package__).joinpath(
|
||||||
|
"postfix/login_map"
|
||||||
|
),
|
||||||
|
dest="/etc/postfix/login_map",
|
||||||
|
user="root",
|
||||||
|
group="root",
|
||||||
|
mode="644",
|
||||||
|
)
|
||||||
|
need_restart |= login_map.changed
|
||||||
|
|
||||||
return need_restart
|
return need_restart
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
cmdeploy/src/cmdeploy/postfix/login_map
Normal file
1
cmdeploy/src/cmdeploy/postfix/login_map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/^(.*)$/ ${1}
|
||||||
@@ -49,3 +49,6 @@ virtual_mailbox_domains = {{ config.mail_domain }}
|
|||||||
mua_client_restrictions = permit_sasl_authenticated, reject
|
mua_client_restrictions = permit_sasl_authenticated, reject
|
||||||
mua_sender_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject
|
mua_sender_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject
|
||||||
mua_helo_restrictions = permit_mynetworks, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, permit
|
mua_helo_restrictions = permit_mynetworks, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, permit
|
||||||
|
|
||||||
|
# 1:1 map MAIL FROM to SASL login name.
|
||||||
|
smtpd_sender_login_maps = regexp:/etc/postfix/login_map
|
||||||
|
|||||||
Reference in New Issue
Block a user