How can I connect Sendmail MTA and PHP-FPM docker containers

I would like to connect 2 containers:
– alterrebe/postfix-relay
– 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.

  • docker networking - Could not discover any bindable network interfaces
  • How to use docker to setup kafka and spark-streaming on a Mac?
  • Azure - Docker : Remote error : bad certificate :
  • Understanding chroot
  • Moving a Docker node to a different Azure account
  • Can we create a node group in docker swarm?
  • 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?

  • Docker image dns probem, name solve failed
  • My reverse proxy setup with traefik and docker is not resolving web server address
  • Why does Yesod install from an exclusive Stackage snapshot fail?
  • AWS Mesosphere: parameters for docker daemon
  • WORKDIR $HOME in Dockerfile does not seem to work
  • Docker ADD is failing with relative directory
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.