How can I connect Sendmail MTA and PHP-FPM docker containers
I would like to connect 2 containers:
– php-fpm (my build)
I’m using Amazon EC2 Container Service and I would like to send emails through Amazon SES. Every of my server (Nginx, PHP-FPM, Redis, Postfix Relay) is one separated container and I cannot find a solution to make it work PHP-FPM with Postfix Relay.
My requirement is to use the “/usr/sbin/sendmail” binary and not SMTP host, post solution.
My idea was to define “/usr/sbin/sendmail” as a volume in postfix-relay container and use it in php-fpm by setting “sendmail_path = ” in php.ini file, but it doesn’t work in docker version 1.8.1 (and maybe versions higher then 1.6). On Amazon I’m using docker version 1.7.1
I don’t have many experience with Postfix neither Sendmail. Could anyone help me to find a solution for my problem?
Or is there a better solution?