On 8/22/2018 10:29 AM, Noel Jones wrote:
On 8/21/2018 3:17 PM, deoren wrote:
Hi all,
We've been using Postfix for years with good results, but in recent
years have moved to a load-balanced HAProxy front-end with multiple
backend relay nodes. I've consulted various sources during that time
to perform the initial setup and light tuning since then.
The health checks are run often and simulate a full email delivery
session in an attempt to exercise the full configuration (including
alias resolution and other related db queries).
This setup works pretty well, but occasionally there is enough of a
delay between one of the steps in the simulated delivery that the
health check fails and the node is marked as down.
When this occurs I have been unable to determine exactly why the
issue occurs. I've adjusted various timeout and timing settings
within HAProxy and Postfix, so I assume that our mostly stock
MariaDB 10.0.x installation is likely to blame.
Do you have any recommendations for guides that cover tuning Postfix
and MySQL? I'd like to start there and work through the steps before
turning back to the configuration as a whole.
Another option I'm considering is replicating the database contents
(where applicable) in MySQL to local SQLite databases that are
synced to the relay nodes, cutting MySQL/MariaDB out of the picture
entirely.
Our client node count is currently less than 100.
Thanks in advance for any guides that you can reference!
Are you using the proxymap service with your table lookups? That
can greatly reduce the load on the MySQL server and improve
performance, sometimes dramatically.
http://www.postfix.org/postconf.5.html#proxy_read_maps
http://www.postfix.org/proxymap.8.html
-- Noel Jones
We are, thank you for asking and for suggesting that. I've got a TODO
item stubbed out for me to return to later though regarding how I should
APPEND to the list instead of overwriting the default values. I'm not
aware of any support for doing the shell equivalent of:
VARIABLE="$VARIABLE;newvalue"
but please let me know if I'm overlooking anything. Because of my
ignorance on that point, I plan to return to the config after we upgrade
to Ubuntu 18.04 (and thus a newer version of Postfix) to see if there
are any new stock proxy_read_maps entries that I need to add to my list.
Please let me know if I am completely misunderstanding how defining
values like that work (perhaps append is the default behavior?).
The primary configuration file for our Postfix backend relays can be
found here:
https://github.com/deoren/postfix-examples/blob/master/backend-relay/etc/postfix/main.cf
and here if you want to strip out the verbose comments:
https://github.com/deoren/postfix-examples/blob/pruned-comments/backend-relay/etc/postfix/main.cf
The other config file fragments are in the same directory as that file,
both with verbose comments and with a Git branch that only includes
minimal comments.
Thanks in advance for any advice/corrections you can offer.