Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 587

Trying telnet:

Unable to connect to remote host: Connection timed out

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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 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 25
Connected to
Escape character is '^]'.
220 ESMTP k9sm2692779pbc.22
EHLO at your service, []
250-SIZE 35882577
214 2.0.0 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.

share|improve this answer
Isn't gmail using port 587 for smtp? –  Yotam May 30 '11 at 8:14
Right. I just added "Replace with the server and port you are using." –  Faheem Mitha May 30 '11 at 8:15
@Yotam: You do need to specify the port to whatever agent you are using to deliver the mail. –  Faheem Mitha May 30 '11 at 8:23
@Faheem Mitha: I'm pretty sure I do. Any way I used alpine in the way describe here –  Yotam May 30 '11 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. –  Faheem Mitha May 30 '11 at 9:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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