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:
parent
047774b250
commit
3934add185
@ -32,6 +32,7 @@ virtual_uid_maps = static:8
|
|||||||
virtual_gid_maps = static:8
|
virtual_gid_maps = static:8
|
||||||
local_transport = virtual
|
local_transport = virtual
|
||||||
local_recipient_maps = $virtual_mailbox_maps
|
local_recipient_maps = $virtual_mailbox_maps
|
||||||
|
smtpd_sender_login_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_sender_maps.cf
|
||||||
```
|
```
|
||||||
|
|
||||||
and for Postfix SASL support :
|
and for Postfix SASL support :
|
||||||
@ -46,6 +47,12 @@ smtpd_sasl_security_options = noanonymous
|
|||||||
broken_sasl_auth_clients = yes
|
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
|
## /etc/postfix/pgsql/relay_domains.cf
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -99,6 +106,16 @@ dbname = postfix
|
|||||||
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true
|
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
|
# Dovecot
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user