launchmail - an SMTP client with a sendmail compatible wrapper
launchmail [options] [filename] options:
-h, --help - Print a help message then exit -V, --version - Print a version message then exit -v, --verbose=level - Set the verbosity level -d, --debug=level - Set the debug level
-f, --from=address - Sender address -s, --subject=subject - Message subject -t, --to=addresses - Recipient address list (comma separated) -T, --tofile=filename - Recipient address list filename -c, --cc=addresses - Carbon Copy address list -C, --ccfile=filename - Carbon Copy address list filename -b, --bcc=addresses - Blind Carbon Copy address list -B, --bccfile=filename - Blind Carbon Copy address list filename -r, --readto - Read message for recipients -!, --sendbcc - Don't remove Bcc header (when --readto) -g, --gmtime - Add Date: header in gmtime -l, --localtime - Add Date: header in localtime -x, --header="name: value" - Arbitrary header -X, --headerfile=filename - Arbitrary header filename -m, --mailfrom=address - SMTP mail from address -n, --hostname=hostname - SMTP helo hostname -S, --server=hostname - SMTP server to connect to -P, --port=# - Port to use when connecting to SMTP server -o, --timeout=# - Seconds to wait during SMTP dialogue -N, --noheaders - Do not insert any headers -q, --quiet - Remain silent when an error occurs
launchmail is a simple SMTP client. It prepares headers but otherwise ignores the
content of the message being sent. It doesn't do attachments or MIME
encoding. Some other software has to prepare the message. This just sends
the message to the SMTP server of your choice. It probably shouldn't even
prepare any headers (hence the -r and -N options).
To use launchmail as a drop-in replacement for sendmail(8), install the sendmail wrapper script as /usr/sbin/sendmail and make sure that the environment variable $SMTPSERVER is set. If $SMTPSERVER is not set, the sendmail wrapper will use localhost as the default which will probably not be very useful. The most seamless
way to replace sendmail
with launchmail is to edit the sendmail wrapper so that it knows which SMTP server to connect to.
Display a help message and exit.
Display a version message and exit.
Set the message verbosity level to level. launchmail does not have any verbose messages so this has no effect.
Set the debug message level to level. Set to level 1 for a trace of what launchmail is doing. Set to level 2 to include a trace when
launchmail is waiting.
Specify the sender address. This address is used as the MAIL FROM:
address during the SMTP dialogue (unless --mailfrom option is supplied) and it is used to create the From: header (unless the --noheaders
option is supplied). If this option is not supplied, its value is
determined automatically.
Specify the subject of the message. This is used to create the Subject:
header (unless the --noheaders option is supplied).
Specify primary recipients for the message. Multiple addresses may be given
as a comma separated list or with multiple --to options. The addresses are used as RCPT TO: addresses during the SMTP dialogue and they are used to create the To: header (unless the --noheaders option is supplied).
Specify the name of a file containing primary recipient addresses. The
addresses in the file are used as RCPT TO: addresses during the SMTP dialogue and they are used to create To: headers (unless the
--noheaders option is supplied).
Specify secondary recipients for the message. Multiple addresses may be
given as a comma separated list or with multiple --cc options. The addresses are used as RCPT TO: addresses during the SMTP dialogue and they are used to create the Cc: header (unless the --noheaders option is supplied).
Specify the name of a file containing secondary recipient addresses. The
addresses in the file are used as RCPT TO: addresses during the SMTP dialogue and they are used to create Cc: headers (unless the
--noheaders option is supplied).
Specify blind carbon copy recipients for the message. Multiple addresses
may be given as a comma separated list or with multiple --bcc options. The addresses are only used as RCPT TO: addresses during the SMTP dialogue.
Specify the name of a file containing blind recipient addresses. The
addresses in the file are only used as RCPT TO: addresses during the SMTP dialogue.
Scan the header section in the message for To:, Cc: and Bcc:
headers and use the addresses found as RCPT TO: addresses suring the SMTP dialogue. Exclude any Bcc: header found when sending the message. This option implies --noheaders.
Send the Bcc: header with the message. Normally, a Bcc: header is not generated or sent to the SMTP server, whether it originated
from a --bcc
or --bccfile option or from the header section of the message itself (with the --readto option). This option causes the Bcc: header to be sent to the SMTP server. There's probably no need for this.
Adds a Date: header to the message in GMT. This is not done by default.
Adds a Date: header to the message in the local timezone. This is not done by default.
Specify an arbitrary header to be included in the message (unless the
--noheaders option is supplied). For example:
-x'Organization: n. the act or process of organizing or of being organized' --header='Sender: sender@f.q.d.n' --header='X-Loop: BeenHere'
Specify the name of a file containing arbitrary headers to be included in
the message (unless the --noheaders option is supplied).
Specify the envelope sender address. This address is only used as the MAIL
FROM: address during the SMTP dialogue. If this option is not supplied, the
address given in the -f option (or determined automatically) is used instead.
Specify the local host's name. This is used as the HELO host during the SMTP dialogue. If this option is not supplied, it's value
is determined automatically.
Specify the SMTP server host to connect to.
Specify the tcp port number to connect to when connecting to the SMTP server.
Specify the number of seconds to wait for responses from the SMTP server. This defaults to 10. There's probably no need to change this.
Do not insert any headers into the message.
Remain silent when an error occurs.
The --tofile, --ccfile, --bccfile and --headerfile options take a file name as an argument. launchmail will use the contents of these files if and only if it deems them to be
safe. This means that neither the files themselves nor the directories in
which they reside are group or world writable.
The files may contain comments (`#' until the end of the line) and lines may be continued by placing a `\' at the end of the line. There may be whitespace after the `\' and even a comment but nothing else.
Addresses in the recipient files may appear one per line or many per line, comma separated. Headers in the header file must appear one per line.
Send message to me@home with subject and date headers:
launchmail -S smtphost -t me@home -s subject -g message
Send message to the recipients in its own headers:
launchmail -S smtphost -r message
mutt(1), sendmail(8), qmail(8), postfix(8), metamail(1), metasend(1), uuencode(1), mpack(1)
20001127 raf <raf@raf.org>