title: Disabling IPv6 name/address support: Address family not supported by protocol
body: <p>I encountered the error quoted in the title, on Symfony3 and working with custom commands. There is this error, but also the fact that the mail is not sent. I cannot find a solution :
  <br>
  <code>sendmail: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol</code>
  <br>
  <code>postdrop: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol</code></p>
  
  <p>Here is the core of the matter :</p>
  
  <p>my Command</p>
  
  <pre><code>class poke2WeekUserCommand extends ContainerAwareCommand
  {
      protected function configure()
      {
          $this
              -&gt;setName('mr:poke-2-week-user')
              -&gt;setDescription("Pokes users than havent't posted an advert for a while.")
              -&gt;setHelp("Pokes users than havent't posted an advert for a while.")
          ;
      }
  
      protected function execute(InputInterface $input, OutputInterface $output)
      {
          $cron = $this-&gt;getContainer()-&gt;get('mr_platform.cron');
  
          try {
              $cron-&gt;poke2WeekUser();
              $output-&gt;writeln('Ok !');
          } catch (\Exception $e) {
              $output-&gt;writeln('Error');
          }
      }
  }
  </code></pre>
  
  <p>my Cron class</p>
  
  <pre><code>class Cron
  {
    private $container;
  
    public function __construct($container){
      $this-&gt;container=$container;
    }
  
    public function poke2WeekUser(){
      $mailer=$this-&gt;container-&gt;get('mailer');
      $em=$this-&gt;container-&gt;get('doctrine.orm.entity_manager');
      $repUser=$em-&gt;getRepository('MRUserBundle:User');
      $users=$repUser-&gt;findAll();
      $ans='';
      foreach($users as $user){
          if((int)$user-&gt;getCreationDate()-&gt;diff(new \Datetime())-&gt;d==14&amp;&amp;!$user-&gt;getPerson()){
              $mail = \Swift_Message::newInstance()
                 -&gt;setSubject("Subscription and advert posting")
                 -&gt;setFrom(array('info@mamyroom.fr' =&gt; 'MamyRoom'))
                 -&gt;setTo($user-&gt;getEmail())
                 -&gt;setBody($this-&gt;container-&gt;get('templating')-&gt;render('MRPlatformBundle:Common/Mail:poke2WeekUser.html.twig',array('user'=&gt;$user)), 'text/html')
              ;
              $mailer-&gt;send($mail);
              $ans.='Sent to '.$user-&gt;getUsername().PHP_EOL;
          }
      }
      return new Response($ans);
    }
  }
  </code></pre>
  
  <p>I will go past the injection of the container, and the 'use' statements.
  What I find interesting (and quite odd) is that it works fine on my localhost (the error occurs on my distant server, with OVH)  : I assume that OS X and Linux have a different behaviour for this issue ?</p>
  
  <p>I hope someone knows a bit of it ! Thanks in advance</p>