smtp.opensmtpd - Man Page

Simple Mail Transfer Protocol client


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


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

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 data.

The options are as follows:


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.


Display version and usage.


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 Sm off [proto :// [user: pass @]] host [: port.] Sm on The following protocols are available:


Normal SMTP session with opportunistic STARTTLS.


Normal SMTP session with mandatory STARTTLS.


Plain text SMTP session without TLS.


LMTP session with opportunistic STARTTLS.


LMTP session with mandatory STARTTLS.


Plain text LMTP session without TLS.


SMTP session with forced TLS on connection.

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


Be more verbose. This option can be specified multiple times.

See Also



The smtp program first appeared in OpenBSD 6.4.