smtp(1) — Linux manual page


SMTP(1)                BSD General Commands Manual               SMTP(1)

NAME         top

     smtp — Simple Mail Transfer Protocol client

SYNOPSIS         top

     smtp [-Chnv] [-a authfile] [-F from] [-H helo] [-s server]
          [recipient ...]

DESCRIPTION         top

     The smtp utility is a Simple Mail Transfer Protocol (SMTP) client
     which can be used to run an SMTP transaction against an SMTP

     By default, smtp reads the mail content from the standard input,
     establishes an SMTP session, and runs an SMTP transaction for all
     the specified recipients.  The content is sent unaltered as mail

     The options are as follows:

     -a authfile
             Perform a login before sending the message.  The username
             and password are read from authfile and need to be on the
             first and second line respectively.  This option requires a
             TLS or STARTTLS server.

     -C      Do not require server certificate to be valid.

     -F from
             Set the return-path (MAIL FROM) for the SMTP transaction.
             Default to the current username.

     -H helo
             Define the hostname to advertise (HELO) when establishing
             the SMTP session.

     -h      Display usage.

     -n      Do not actually execute a transaction, just try to
             establish an SMTP session and quit.  When this option is
             given, no message is read from the standard input.

     -s server
             Specify the server to connect to and connection parameters.
             The format is [proto://[user:pass@]]host[:port].  The
             following protocols are available:

             smtp        Normal SMTP session with opportunistic
             smtp+tls    Normal SMTP session with mandatory STARTTLS.
             smtp+notls  Plain text SMTP session without TLS.
             lmtp        LMTP session with opportunistic STARTTLS.
             lmtp+tls    LMTP session with mandatory STARTTLS.
             lmtp+notls  Plain text LMTP session without TLS.
             smtps       SMTP session with forced TLS on connection.

             Defaults to “smtp://localhost:25”.

     -v      Be more verbose.  This option can be specified multiple

SEE ALSO         top


HISTORY         top

     The smtp program first appeared in OpenBSD 6.4.

COLOPHON         top

     This page is part of the OpenSMTPD (a FREE implementation of the
     server-side SMTP protocol) project.  Information about the project
     can be found at  If you have a bug
     report for this manual page, see
     ⟨⟩.  This page was
     obtained from the project's upstream Git repository
     ⟨⟩ on 2021-08-27.  (At
     that time, the date of the most recent commit that was found in the
     repository was 2021-04-28.)  If you discover any rendering problems
     in this HTML version of the page, or you believe there is a better
     or more up-to-date source for the page, or you have corrections or
     improvements to the information in this COLOPHON (which is not part
     of the original manual page), send a mail to

BSD                         February 13, 2021                        BSD