0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

DOCUMENTS: Configure "smtpd_sender_login_maps" in Dovecot & PostgreSQL example

A short explanation is also added.
This commit is contained in:
Davide Beatrici 2021-11-28 14:42:29 +01:00
parent 047774b250
commit 3934add185

View File

@ -32,6 +32,7 @@ virtual_uid_maps = static:8
virtual_gid_maps = static:8
local_transport = virtual
local_recipient_maps = $virtual_mailbox_maps
smtpd_sender_login_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_sender_maps.cf
```
and for Postfix SASL support :
@ -46,6 +47,12 @@ smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
```
Please note that `smtpd_sender_login_maps` is only taken into account when a relevant restriction is specified in `smtpd_sender_restrictions`.
By default a client can send emails from any addresses!
For reference: http://www.postfix.org/postconf.5.html#reject_sender_login_mismatch
## /etc/postfix/pgsql/relay_domains.cf
```
@ -99,6 +106,16 @@ dbname = postfix
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true
```
## /etc/postfix/pgsql/virtual_sender_maps.cf
```
user = postfix
password = whatever
hosts = localhost
dbname = postfix
query = SELECT username FROM mailbox WHERE username='%s' AND active = true
```
# Dovecot