title: Why does sendmail cli not send mails from docker containers?
body: <p>The following command (using the one and only original sendmail) sends an email:</p>
  
  <pre><code>echo "Subject: Testing Email" | cat - body.txt \
  | /usr/lib/sendmail -v -F some@body.com -t some@body.else.com
  </code></pre>
  
  <p>WordPress and others use it in a similiar fashion.</p>
  
  <p>Invoking it like that from within a docker container gets stuck, even though DNS (for MX lookup) and the MTA are reachable and the container is running privileged. People come up with all kinds of workarounds like using ssmtp which involve the setup of a dedicated MTA for the container. Given DNS and MX are available, I do not see a necessity for a dedicated MTA.</p>
  
  <p>Why does the (one and only original) sendmail executable fail to send emails from within docker containers?</p>