usage of STARTTLS

6 thoughts on “usage of STARTTLS

  1. Hi,

     

    I want to encrypt the smtp access to a smtp server using STARTTLS.

     

    After HELO I send STARTTLS to the server, but after receiving OK I don’t know how to continue the smtp communication.

     

    Normally, without using STARTTLS (no encrypted transmission), I continue by sending the authentication. That works fine, but now I also want to use encrypted transmission.

     

    Can you help me?

     

    Thank you, 

     

    Best regards.

     

     

    Please see the recorded responses from the GC864QUADV2:

     

    AT+CREG?

    +CREG: 1,5

    OK
    AT+CPIN?

    +CPIN: READY

    OK
    AT+CSQ

    +CSQ: 31,0

    OK
    AT#CIMI

    #CIMI: 214074200153112

    OK
    AT+CGDCONT=1,”IP”,”internetm2m.air.com”,”0.0.0.0″,0,0

    OK
    AT#SCFG=1,1,0,0,600,50

    OK
    AT#CPUMODE=2

    OK
    AT#SSLS=1

    #SSLS: 1,0

    OK
    AT#SGACT=1,0,”datalink”,”MONILOG”

    OK
    AT#SGACT=1,1,”datalink”,”MONILOG”

    #SGACT: 10.1.20.53

    OK
    AT#SD=1,0,587,”smtp.web.de”,0,0

    CONNECT
    220 web.de (mrweb003) Nemesis ESMTP Service ready
    250-web.de Hello datalink [80.27.96.158]
    250-SIZE 69920427
    250-AUTH LOGIN PLAIN
    250 STARTTLS
    220 OK
    0x15 0x03 0x03 0x00 0x02 0x02 0x0A  <– received ascii data changed to hex data  (encrypted data?)

      1. I have a older version of the AT Command Reference Guide. The AT SMTP stack was developed
        in the last time and has currently more usefull functions (integrated
        SLL, Content-Transfer-Encoding…). I could use the integrated and
        powerfull AT SMTP Stack.

         

        Before the
        updates, I made my own SMTP Stack with MIME Protocoll because to send
        more recipients, blindcopy recipients, textbody in HTML format and more
        than one file… 

         

        Is it possible to transfer more than one recipient with the AT commands?

        It is possible to send more then one file with different encoding type?

         

        If
        no, which name has your MIME boundary? If I know that i could
        implemended more files in the serial datastream of AT#SMTPCL after send
        the textbody. Because of the MINE protocol, with sending "+++" the
        boundary must be closed and the SMTP command DATA must end like
        CRLF.CRLF. It should be possible to made it with understanding SMTP and
        MIME protocol.

         

        I think I must update the GC864 QUAD V2
        (AT+CGMR=10.00.057). Which firmware version is needed and where can I
        find them.I have a EVK2, because I can do that by myself.

         

        Thank you for your answer.

  2. Thank you for your quit answer. I have upgrade the module with the latest version and tested the new Email functions. It works great.

    The Problem is, our customers need to enter multiple recipients, blind copies and a HTML and the opportunity for the input of HTML text body. Also it should be possible to send multiple files.
     
    This can not be realized with the AT commands. The SSL User Guide from Telit is not very helpful for my problem. Please understand, its not the problem to make the Email Header with MIME protocol or the communication with the SMTP server about the SMTP protocol. 
     

    The SMTP server (like all new SMTPs) requires a non-encrypted request (EHLO). Thereafter, the encryption is started with the STARTTLS command. The server encrypted the data at this time but i cant decrypt the data.

     
    How can I start the encryption/decryption at this point?
     
    Eric
    1. So the SMTP socket connection starts not encrypted and begins encryption after STARTTSL command; the Telit SSL socket implementation doesn’t allow this, only with SSL encryption from the very beginning – so I would say is not currently doable.

       

  3. This possibility of switching on encryption during an existing socket should be implemented. Ok, this is a not so good answer, because of my problem. Thank you for your help