Services

SMTP Authentication

Authentication in SMTP is a little more complicated. Most servers, as in this example, support the AUTH PLAIN procedure, in which the access data must be Base64 coded. This is dealt with by the Perl command:

which signals it is ready for further SMTP commands. For protocols and servers not supported by openssl you can use gnutls-cli from the gnutls-bin package. First it creates a cleartext connection to an arbitrary TLS-enabled service such as:

This causes gnutls-cli to negotiate the TLS connection and to reconnect stdin and stdout to the newly created tunnel. It also presents some interesting information about the new TLS connection it just created:

This allows you to interactively connect to arbitrary TLS enabled services. Users wanting to experiment further may be interested to know that openssl also includes s_server which is able to emulate a very simple www server. gnutls-serv provides similar functionality for the gnutls-bin package.