Take the 2-minute tour ×
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)?

Edit:

I tried to telnet:

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

Trying 209.85.229.109... 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 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
Trying 74.125.53.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP k9sm2692779pbc.22
EHLO
250-mx.google.com at your service, [59.183.41.125]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
HELP
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.

share|improve this answer
1  
Isn't gmail using port 587 for smtp? mail.google.com/support/bin/answer.py?answer=13287 –  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
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 '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

 
discard

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.