---
name: "qmail-local"
section: "8"
platform: "linux"
package: "qmail"
version: "1.06-6.2~deb10u1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/qmail-local"
---

# qmail-local(8)

deliver or forward a mail message

## NAME

qmail-local - deliver or forward a mail message

## SYNOPSIS

**qmail-local** \[ **-nN** \] *user* *homedir* *local* *dash* *ext* *domain* *sender* *defaultdelivery*

## DESCRIPTION

**qmail-local** reads a mail message and delivers it to *user* by the procedure described in **[dot-qmail(5)](/dot-qmail/5.md)**.

The message's envelope recipient is *local@domain*. **qmail-local** records *local@domain* in a new **Delivered-To** header field. If exactly the same **Delivered-To: *local@domain*** already appears in the header, **qmail-local** bounces the message, to prevent mail forwarding loops.

The message's envelope sender is *sender*. **qmail-local** records *sender* in a new **Return-Path** header field.

*homedir* is the user's home directory. It must be an absolute directory name.

*dash* and *ext* identify the **.qmail*dashext*** file used by **qmail-local**; see **[dot-qmail(5)](/dot-qmail/5.md)**. Normally *dash* is either empty or a lone hyphen. If it is empty, **qmail-local** treats a nonexistent **.qmail*ext*** the same way as an empty **.qmail*ext***: namely, following the delivery instructions in *defaultdelivery*.

The standard input for **qmail-local** must be a seekable file, so that **qmail-local** can read it more than once.

## OPTIONS

- **-n**

  Instead of reading and delivering the message, print a description of the delivery instructions.

- **-N**

  (Default.) Read and deliver the message.

## EXIT CODES

0 if the delivery is completely successful; nonzero if any delivery instruction failed. Exit code 111 indicates temporary failure.

## SEE ALSO

[dot-qmail(5)](/dot-qmail/5.md), [envelopes(5)](/envelopes/5.md), [qmail-command(8)](/qmail-command/8.md), [qmail-queue(8)](/qmail-queue/8.md), [qmail-send(8)](/qmail-send/8.md), [qmail-lspawn(8)](/qmail-lspawn/8.md)
