emailrelay "cannot bind the listening port"


Staff member
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.

Therefore, I'm trying <a href="" rel="nofollow noreferrer">the advice here</a> to use EmailRelay to forward emails, adding authentication, via my account on Google.

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:

$ emailrelay --as-proxy --client-tls --client-auth /etc/emailrelay.auth
emailrelay: error: cannot bind the listening port:
emailrelay: exception: cannot bind the listening port:

I've looked through the <a href="" rel="nofollow noreferrer">user guide</a>, tried using the
option thinking this might be the issue - providing various IPs, with no joy - and I don't know what to try next.

(my server is running Oracle Enterprise Linux 5.1)


Since sendmail is running on port 25, I've tried an alternative port. Now I get a new error:

$ emailrelay --as-proxy --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

After killing sendmail, I've retried with port 25 and I get the same error ("cannot do tls/ssl: openssl not built in").


Looks like openssl is not installed:

$ 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