> On Dec 22, 2018, at 11:34 PM, Matt Saladna <m...@apisnetworks.com> wrote: > > I feared that. Are there any suitable sendmail wrappers that would provide > equivalent functionality?
With Postfix, it suffices to set the "MAIL_CONFIG" environment variable, which results in /usr/sbin/sendmail submitting mail to a different Postfix instance, provided that instance allows local submission. See MULTI_INSTANCE_README. So the wrapper could be as simple as: #! /bin/sh export MAIL_CONFIG=/etc/postfix-foo exec /usr/sbin/sendmail "$@" provided you could get the PATH set appropriately in the various "containers". If they must all run the same executable, and a priori custom environment variables are not an option, then you'll a wrapper than maps the caller's uid to a MAIL_CONFIG setting. You could of course then attempt to rewrite the message instead, and forgo the multiple instances. Your call... -- Viktor.