mailtest1
Simple smtp sending for diagnostics
Usage
mailtest --host
host.example.com
--rcptto
[email protected]
[send_options ...]
[additional
recipients ...]
Options: --help
brief help
message
--debug
enable debugging
host to
connect
to
--rcptto
recipient
recipient for
message
--helo
machine
machine name
for
EHLO
--vrfy
request
VRFY
of
recipient
--expn
request
EXPN
of
recipient
--mailfrom
from
use as
MAIL
FROM
value
--from822
from
content From:
--port
port
port to
connect
to
--body
generate
body
--include_options
include Options
in
body
--include_headers
include generated
headers
in
body
--tls
perform
TLS
on
connect
--nostarttls
do
no
attempt
STARTTLS
--stricttls
Enable
strict
verification
on
TLS
connection
--tlsargs
arg=value
[,arg=value]
well-known path
--output
file
Output file
to
receive
well-known
data
Options
-
--help -
Print a brief help message and exits.
-
-d, --debug -
Enables debugging, outpus additional information whilst processing requests.
-
-h, --host=host -
Specifies the host to connect to. Must be specified and must be IP-resolvable.
-
-m, --ehlo=machine -
Specified the machine name to use as the EHLO value. Defaults to the fully-qualified name of the host running the command.
-
-r, --rcptto=recipient -
Specifies the recipient of message. This is used as the RCPT TO value.
-
-v, --vrfy -
Uses the recipient parameter for the value in a VRFY request. This disables the sending of an email.
-
-e, --expn -
Uses the recipient parameter for the value in an EXPN request. This disables the sending of an email.
-
-f, --mailfrom=from_address -
Specified the value to use in the MAIL FROM command. Defaults to the current username at the FQDN of the machine
-munless the-Boption is used.
-
-u, --from822=from_user -
Specified the value to use in the message headers. Defaults to the
-ffrom_address value unless the-Boption is used.
-
-B, --bounce -
Replace the
--mailfromfrom_address with \<\> and the--from833from_user withmailer-daemon@hostwhere the host is the value of--ehlomachine
-
-p, --port=port -
Specified the port to connect to on the specified host. Defaults to port 25 unless
-Sis given in which case it defaults to 465.
-
-S, --tls -
Specifies that TLS be used directly on the connection prior to any SMTP commands. Changes the connection port to 465 unless it has been explicitly provided. Disables any attempts at STARTTLS.
-
-s, --nostarttls -
Disables attempting STARTTLS if offered. Disabled by use of
-S.
-
--stricttls -
Enables strict verification of the TLS connection. Sets the underlying SSL option
SSL_verify_modeto 1/SSL_VERIFY_PEER rather than 0/SSL_VERIFY_NONE. Since the aim of this tool is to test the SMTP protocol behaviour and not the TLS behaviour the decision was made to default theSSL_verify_modeto 0/SSL_VERIFY_NONE.
-
--sslargs=argname=argvalue[,argname=argvalue...] -
Allow full control over underlying SSL options. Overrides
--stricttls. See the documentation forIO::Socket::SSLfor further details.--sslargs SSL_verifycn_name=certname.example.com
-
-b, --body -
Generate a body for the message being sent.
-
-O, --include-options -
Include details of options used in the message body.
-
-H, --include-headers -
Include a copy of the generated headers in the message body.
-
-w, --wellknown=well-known-path -
Provides the path value for a WELLKNOWN command.
-
-W, --output=output_file -
Provides the output file where the WELLKNOWN data should be stored.
Overview
mailtest is a simple utility for testing SMTP connections. It is designed to debug endpoints and not for full email generation.
It support a number of basic operations, SEND, VRFY, EXPN, WELLKNOWN.
Compatibility
"mailtest" only requires modules that should be in all normal distributions.
Copyright and license
This software is Copyright (c) 2008,2020,2024 by Bernard Quatermass.