Next: sendmail script, Previous: sendmail gnutls, Up: sendmail [Contents][Index]
openssl
as connectorOpenSSL is a library implementing the SSL/TLS protocol; we can use it to establish encrypted and authenticated connections to a remote host.
An OpenSSL installation comes with a command line test program, openssl
, that can
establish an encrypted connection. We use this command as the “connector” modeled in
Send email through a process in background. It has a manual page, which
we may want to read.
Here we see how we can use the openssl
program in place of the gnutls-cli
program described in Using gnutls-cli
as connector. The two
methods have a lot in common (the SMTP protocol is the same), we only have to understand the
command line of the program.
Notice that
openssl
has a -crlf option that will cause all the lines sent to the server to be terminated by a carriage return/line feed sequence (\r\n
or\x0d\x0a
). If we write a script that terminates by itself the lines with this sequence, for example:printf 'ehlo localhost.localdomain\r\n'we must avoid this option, else SMTP protocol violation errors may occur. However, if we try a hand–driven interactive session, we want to use this option to send protocol–compliant lines.
• sendmail openssl now: | Immediate encrypted bridge. | |
• sendmail openssl delay: | Delayed encrypted bridge. |
Next: sendmail script, Previous: sendmail gnutls, Up: sendmail [Contents][Index]