title: emailrelay "cannot bind the listening port"
body: <p>I'm setting up my web server on Amazon's EC2. My site used to run locally and used my ISP's SMTP server to send email, which hasn't been a problem before - but now that the emails are originating from outside my ISP won't accept them.</p>
  
  <p>Therefore, I'm trying <a href="http://jiri.wordpress.com/2010/03/24/send-emails-using-utl_mail-and-google-gmail-smtp-server/" rel="nofollow noreferrer">the advice here</a> to use EmailRelay to forward emails, adding authentication, via my account on Google.</p>
  
  <p>I've followed the instructions, created the emailrelay.auth file, run the configure, make, make install, but when I try to start the emailrelay service I'm getting this error:</p>
  
  <pre><code>$ emailrelay --as-proxy smtp.gmail.com:587 --client-tls --client-auth /etc/emailrelay.auth
  emailrelay: error: cannot bind the listening port: 0.0.0.0:25
  emailrelay: exception: cannot bind the listening port: 0.0.0.0:25
  </code></pre>
  
  <p>I've looked through the <a href="http://emailrelay.sourceforge.net/userguide.html" rel="nofollow noreferrer">user guide</a>, tried using the <code>--interface</code> option thinking this might be the issue - providing various IPs, with no joy - and I don't know what to try next.</p>
  
  <p>(my server is running Oracle Enterprise Linux 5.1)</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Since sendmail is running on port 25, I've tried an alternative port. Now I get a new error:</p>
  
  <pre><code>$ emailrelay --as-proxy smtp.gmail.com:587 --client-tls --client-auth /etc/emailrelay.auth --port 8025
  emailrelay: error: cannot do tls/ssl: openssl not built in
  emailrelay: exception: cannot do tls/ssl: openssl not built in
  </code></pre>
  
  <p>After killing sendmail, I've retried with port 25 and I get the same error ("cannot do tls/ssl: openssl not built in").</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Looks like openssl is not installed:</p>
  
  <pre><code>$ grep ssl config.log
    $ ./configure --with-openssl
  configure:7373: checking for openssl
  conftest.cpp:31:25: error: openssl/ssl.h: No such file or directory
  | #include &lt;openssl/ssl.h&gt;
  configure:7431: WARNING: ignoring --with-openssl, check config.log and try setting CFLAGS
  config.status:719: creating src/gssl/Makefile
  </code></pre>