Postfix + MySQL + proxymap

I discovered I could improve Postfix performances when using MySQL as backend

According to http://spike.porcupine.org/test/html/proxymap.8.html :

To consolidate the number of open lookup tables by sharing one open table among multiple processes. For example, making mysql connections from every Postfix daemon process results in “too many connec- tions” errors.

**Edit /etc/postfix/main.cf : **

<code># Allow proxy for the settings using MySQL
proxy_read_maps = $virtual_alias_maps $virtual_mailbox_maps $transport_maps $virtual_uid_maps $virtual_gid_maps

# add proxy: in front of any mysql: 
virtual_mailbox_base = /var/spool/postfix/vmail
virtual_minimum_uid = 1000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/vmailsql/vmailbox
virtual_alias_maps = proxy:mysql:/etc/postfix/vmailsql/valias
transport_maps = proxy:mysql:/etc/postfix/vmailsql/transport
virtual_uid_maps = proxy:mysql:/etc/postfix/vmailsql/vuid
virtual_gid_maps = proxy:mysql:/etc/postfix/vmailsql/vgid
local_recipient_maps = $virtual_mailbox_maps</code>



Thanks for reading this post!


Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!