Suomeksi

Using Telnet or your own application with a secure mail server

  1. Install an application that tunnels the communication as secure (instructions for Windows) e.g.
  2. http://www.stunnel.org/
  3. Install stunnel to folfer c:\stunnel (You cannot save stunnel.conf if you install stunnel e.g. under Program files)
  4. During installation some parameters are aske, you can set e.g. FI as country, others you can leave empty by answering with a dot "."
  5. Open stunnel.conf in a text editor and comment out te following lines related to servers (place a ; -character to the beginning of the line)
  6. Then remove comments (or add lines) so that the client related lines look like below (smtp for sending and opop3/imap for receiving emails)
  7. Exceute stunnel from command line, and check e.g. with netstat that the ports set above to accept are listening. IP address 127.0.0.1 ensures that the ports are accesible only from the same machine.
  8. You can test e.g. with Telnet using POP3 (you need a gmail account and also need to modify setting to allow use of POP3, also some new security related measures might be added constantly)
  9. You can also use SMTP to send messages as shown below Note: email and password must be sent as bas64 encoded. Use an online encoder if you think they are secure (you are encoding your real email address and password). Or do it yourself, here example of C# code that does it

  10. String snd = "word";
    byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(snd);
    snd = System.Convert.ToBase64String(toEncodeAsBytes);