Allow system users to auth on the mail stack and send emails

This commit is contained in:
Alexandre Aubin 2019-09-27 22:55:12 +02:00
parent 7636b486c0
commit f0751aff17
2 changed files with 16 additions and 1 deletions

View file

@ -38,16 +38,28 @@ ssl_prefer_server_ciphers = no
###############################################################################
# Regular Yunohost accounts
passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}
# Internally, allow authentication from system user
# who might want to send emails (e.g. from apps)
passdb {
override_fields = allow_nets=127.0.0.1/32,::1/64
driver = pam
}
userdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}
userdb {
driver = passwd
}
protocol imap {
imap_client_workarounds =
mail_plugins = $mail_plugins imap_quota antispam

View file

@ -107,7 +107,10 @@ virtual_alias_domains =
virtual_minimum_uid = 100
virtual_uid_maps = static:vmail
virtual_gid_maps = static:mail
smtpd_sender_login_maps= ldap:/etc/postfix/ldap-accounts.cf
smtpd_sender_login_maps=
ldap:/etc/postfix/ldap-accounts.cf, # Regular Yunohost accounts
hash:/etc/postfix/sender_login_maps # Extra maps for system users who need to send emails
# Dovecot LDA
virtual_transport = dovecot