---
name: "mailer.conf"
section: "5"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd", "openbsd"]
url: "https://new.carta.tech/mailer.conf"
---

# mailer.conf(5)

configuration file for mailwrapper(8)

## NAME

**mailer.conf** – configuration file for [mailwrapper(8)](/mailwrapper/8.md)

## DESCRIPTION

The file */etc/mail/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)](/mailwrapper/8.md). (For example, on a typical system */usr/sbin/sendmail* would be a symbolic link to [mailwrapper(8)](/mailwrapper/8.md), as would [newaliases(1)](/newaliases/1.md) and [mailq(1)](/mailq/1.md). 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)](/mailwrapper/8.md) was called with.

The file may also contain comment lines, denoted by a ‘#’ mark in the first column of any line.

## FILES

- */etc/mail/mailer.conf*

  ## EXAMPLES

This example shows how to set up **mailer.conf** to invoke the traditional [sendmail(8)](/sendmail/8.md) program:

```
# Execute the "real" sendmail program located in
# /usr/libexec/sendmail/sendmail
sendmail	/usr/libexec/sendmail/sendmail
mailq		/usr/libexec/sendmail/sendmail
newaliases	/usr/libexec/sendmail/sendmail
```

Using **Postfix** (from ports) to replace [sendmail(8)](/sendmail/8.md):

```
# Emulate sendmail using postfix
sendmail	/usr/local/sbin/sendmail
mailq		/usr/local/sbin/sendmail
newaliases	/usr/local/sbin/sendmail
```

Using **Exim** (from ports) to replace [sendmail(8)](/sendmail/8.md):

```
# Emulate sendmail using exim
sendmail	/usr/local/sbin/exim
mailq		/usr/local/sbin/exim -bp
newaliases	/usr/bin/true
rmail		/usr/local/sbin/exim -i -oee
```

Using **mini\_sendmail** (from ports) to replace [sendmail(8)](/sendmail/8.md):

```
# Send outgoing mail to a smart relay using mini_sendmail
sendmail	/usr/local/bin/mini_sendmail -srelayhost
```

Using [dma(8)](/dma/8.md) to replace [sendmail(8)](/sendmail/8.md):

```
# Execute dma instead of sendmail
sendmail	/usr/libexec/dma
mailq		/usr/libexec/dma
newaliases	/usr/libexec/dma
rmail		/usr/libexec/dma
```

## SEE ALSO

[mail(1)](/mail/1.md), [mailq(1)](/mailq/1.md), [newaliases(1)](/newaliases/1.md), [dma(8)](/dma/8.md), [mailwrapper(8)](/mailwrapper/8.md), [sendmail(8)](/sendmail/8.md)

[postfix(1)](/postfix/1.md) (*ports/mail/postfix*), [dma(8)](/dma/8.md) (*ports/mail/dma*), [exim(8)](/exim/8.md) (*ports/mail/exim*), mini\_sendmail(8) (*ports/mail/mini\_sendmail*)

## HISTORY

**mailer.conf** appeared in NetBSD 1.4.

## AUTHORS

Perry E. Metzger ⟨*perry@piermont.com*⟩

## BUGS

The entire reason this program exists is a crock. Instead, a command for how to submit mail should be standardized, and all the "behave differently if invoked with a different name" behavior of things like [mailq(1)](/mailq/1.md) should go away.
