From
https://www.gentoo.org/support/use-flags/
Code: Select all
global
ldap Add LDAP support (Lightweight Directory Access Protocol)
postfix
dovecot-sasl Enable net-mail/dovecot protocol version 1 (server only) SASL implementation
eai Add support for SMTPUTF8
ldap-bind Add support for binding to LDAP backend using dev-libs/cyrus-sasl
lmdb Add support for using dev-db/lmdb for lookup tables
memcached Add support for using net-misc/memcached for lookup tables
If I understand you correctly, this postfix instance is supposed to only act as a sanitizing proxy for incoming mail. You want to filter mail before passing it to another server equipped with some storage backend, right?
In this case I'd try use ldap. Receiving mail does not call for authentication, so sasl is not required on a proxy (MTA).
Im my personal setup I'm using dovecot-sasl, which delegates authentication to the storage backend which in turn queries mysql database, however this authentication is only used for mail submission. When it comes to receiving mail, I have postfix run SQL query for virtual mailboxes and virtual aliases directly, before forwarding it to dovecot.
You'll need an ldap query there and probably a relay host instead, but the idea is not too different.