When I try to send email from alpine I get the following error:

Error sending: connection failed to gmail-smtp...

(The message disappear before I have the time to copy it).

I suspect this is a firewall issue (I'm in a university campus). How can I fix this (or at least confirm)?


I tried to telnet:

yotam@sumsum:$> telnet smtp.gmail.com 587

Trying telnet:

Unable to connect to remote host: Connection timed out

1 Answer 1


Try connecting directly to the SMTP port on the server via telnet? See the Wikipedia page for an illustrative example. Start with the following (for a SMTP connection at port to smtp.gmail.com at port 25). Replace with the server and port you are using. In the following, EHLO and HELP are typed at the client prompt, as part of the SMTP negotiation. Note that the server response TO HELP is to point you to a copy of the Simple Mail Transfer Protocol (SMTP).

$ telnet smtp.gmail.com 25
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP k9sm2692779pbc.22
250-mx.google.com at your service, []
250-SIZE 35882577
214 2.0.0 http://www.google.com/search?btnI&q=RFC+2821 k9sm2692779pbc.22

If you can get this far, I suspect you don't have connection issues. Just one question to clarify. Is Alpine trying to deliver your mail directly, or are you handing off the mail delivery to a local mail server eg. Exim or Postfix? I have all my mail handed off to Exim, and then Exim sends it to a smarthost, which seems the preferred thing to do for hosts that don't have a static IP address at least. One advantage of the latter approach is that you can look at your mail server logs and/or queue to see what is happening with your mail.

  • 1
    Isn't gmail using port 587 for smtp? mail.google.com/support/bin/answer.py?answer=13287
    – Yotam
    May 30, 2011 at 8:14
  • Right. I just added "Replace with the server and port you are using." May 30, 2011 at 8:15
  • @Yotam: You do need to specify the port to whatever agent you are using to deliver the mail. May 30, 2011 at 8:23
  • 1
    @Faheem Mitha: I'm pretty sure I do. Any way I used alpine in the way describe here wijeyesakere.com/tech/tech/alpinemail.html
    – Yotam
    May 30, 2011 at 8:46
  • @Yotam: Yes, that is sending mail directly from Alpine. I don't recommend this. You are better off delivering to a local mail server (for all sorts of reasons). This is a misfeature in my opinion, MUA should not be doubling as MTAs. I used to do it that way (I've used Pine/Alpine since 1994), and I switched to delivering to Exim because it was just much better. May 30, 2011 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.