3.2.7 Mailer Statement
Syntax
mailer {
url url;
}
Description
A mailer is a special logical entity GNU Mailutils uses for
sending messages. Its internal representation is discussed in
Mailer (Editor's note: dangling link). The mailer
statement configures it.
The mailer statement contains a single sub-statement:
— Configuration:
url str
Set the mailer URL.
GNU Mailutils supports two types of mailer URLs, described
in the table below. As usual, square brackets indicate optional parts:
- smtp://host[:port]
- Use an SMTP server host to send messages. Optional port
specifies port number or symbolic name (as defined in
/etc/services). It defaults to 25. The host can be
specified as either an IP address in dotted-quad notation or as a
symbolic host name. In the latter case, DNS system will be used to
resolve it.
- sendmail://progname
- Use sendmail-compatible program
progname. Sendmail-compatible means that the program must
support following command line options:
- -oi
- Do not treat ‘.’ as message terminator.
- -f addr
- Use addr as the sender address.
- -t
- Get recipient addresses from the message.
- sendmail:
- This is a special form of the ‘sendmail’ mailer. It uses the
sendmail binary from the
_PATH_SENDMAIL
macro in your
/usr/include/paths.h. It is the default mailer.
- prog://progname?query
- A prog mailer. This is a generalization of ‘sendmail’
mailer that allows to use arbitrary external programs as mailers.
The progname must be a full pathname of the binary file. When
sending message, Mailutils will invoke this file with the arguments
specified by query and will pipe the message to be sent to its
standard input.
The query part is a list of arguments, separated by ‘&’
signs. Arguments may contain the following macro-substitutions:
- ‘${sender}’
- Expands to the sender email address.
- ‘${rcpt}’
- Expands to the recipient email addresses.