1. Use dsconfig to configure a StartTLS connection to the server.
    $ bin/dsconfig create-external-server \
      --server-name myTLSServer --type smtp \ 
      --set server-host-name:tls.smtp.example.com \
      --set server-port:587 \ 
      --set smtp-security:starttls \
      --set user-name:MyAccountName \ 
      --set password:AAD5yZ+DjvwiYkBSMer6GQ6B3szQ6gSSBjA=
  2. Use dsconfig to configure a newly-created SMTP server. This command adds the server to the global list of mail servers that the Directory Server can use.
    $ bin/dsconfig set-global-configuration-prop \
      -set smtp-server:myTLSServer