/etc/mailer.conf
contains a series of lines of the form
name
program
[arguments ...]
The first word of each line is the
name
of a program invoking
mailwrapper(8).
(For example, on a typical system
/usr/sbin/sendmail
would be a symbolic link to
mailwrapper(8),
as would
newaliases(1)
and
mailq(1).
Thus,
name
might be
``sendmail''
or
``newaliases''
etc.)
The second word of each line is the name of the
program
to actually execute when the first name is invoked.
The further
arguments,
if any, are passed to the
program
,
followed by the arguments
mailwrapper(8)
was called with.
The file may also contain comment lines, denoted by a `#' mark in the first column of any line.
The default mailer is
sendmail(8),
which will also start by default (unless specifically disabled via an
rc.conf(5)
setting) so that locally generated mail can be delivered, if the
``sendmail''
setting in
/etc/mailer.conf
is set to
``/usr/libexec/sendmail/sendmail''.
# Execute the "real" sendmail program located in
# /usr/libexec/sendmail/sendmail
sendmail /usr/libexec/sendmail/sendmail
send-mail /usr/libexec/sendmail/sendmail
mailq /usr/libexec/sendmail/sendmail
newaliases /usr/libexec/sendmail/sendmail
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmail
This example shows how to invoke the postfix(1) MTA suite in place of sendmail(8):
# Emulate sendmail using postfix
sendmail /usr/libexec/postfix/sendmail
send-mail /usr/libexec/postfix/sendmail
mailq /usr/libexec/postfix/sendmail
newaliases /usr/libexec/postfix/sendmail
This example shows the use of the mini-sendmail package from pkgsrc in place of sendmail(8): Note the use of additional arguments.
# Send outgoing mail to a smart relay using mini-sendmail
sendmail /usr/pkg/sbin/mini-sendmail -srelayhost
send-mail /usr/pkg/sbin/mini-sendmail -srelayhost
pkgsrc/mail/mini_sendmail