Sending Email Using Telnet - STARTTLS first

Discussion in 'Mac Programming' started by rebello95, Nov 7, 2011.

  1. rebello95 macrumors member

    Jun 15, 2011
    I'm trying to send an email using Telnet through terminal on Snow Leopard. I'm following the directions on but I'm getting an error "530 5.7.0 Must issue a STARTTLS command first. f7sm8403573vdj.13"

    How can I fix this?

  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Google search term: STARTTLS

    Seriously, look it up. Mail servers are more locked down now than they used to be. This is to help reduce or eliminate spam, among other security improvements.

    If your mail server insists on TLS, then the client (i.e. you typing things into telnet) has no choice but to do it. If you can't do it using telnet, too bad. Get a different SMTP server. I guess the days of telnet'ing into mail servers is one with the dust of history.
  3. rebello95 thread starter macrumors member

    Jun 15, 2011
    Okay. Then, 1) How do I send an email using TLS and 2) What service providers don't require TLS?

  4. jtara macrumors 65816

    Mar 23, 2009
    You can't send an email using TLS with telnet. Once you issue the required command to switch to TLS, the connection has to be encrypted using TLS (SSL). I don't think you can do TLS encryption in your head and type-in the encrypted content. ;)

    Most mail servers today have different ports that have different requirements. Port 25 is the standard SMTP port. 143, 465, 587, and 993 are popular ports for authenticated access. I think 465 and 587 would typically use STARTTLS, and 993 just straight TLS (no negotiation, just assumes TLS).

    If you're getting your email from a third-party provider, they almost certainly require authentication. If from your ISP, they may or may not require it, but will certainly require it if you are accessing from outside their network.

    I'd be surprised if many providers REQUIRE encryption. Check your provider's documentation.
  5. jiminaus macrumors 65816


    Dec 16, 2010
    To make it more difficult for people trying to write spam scripts?

    Somehow I doubt the OP is doing SMTP manually over telnet because he's interested in learning about the SMTP protocol.
  6. jtara macrumors 65816

    Mar 23, 2009
    Encryption doesn't make it more difficult for people trying to write spam scripts.

    Well, at least not those willing to actually learn a programming language and use a code library.

    It just prevents "sniffing" of content sent across the network.

    Authentication, on the other hand, at least provides accountability. It allows spammers to be traced back to accounts, so that accounts can be disabled. And when said accounts are associated with the limited number of broadband providers (often, one) in an area, it can be an effective billy-club. Once they're locked-out of the only broadband provider available, they're kinda screwed...

    I do see your point. Encryption would slow-down the lazy spammers.

Share This Page