qmail-inject(8)

NAME
qmail-inject - preprocess and send a mail message

SYNOPSIS
qmail-inject [ -nNaAhH ] [ -fsender ] [ recip ... ]

DESCRIPTION
qmail-inject reads a mail message from its standard input, adds appropriate information to the message header, and invokes qmail-queue to send the message to one or more recipients. See qmail-header(5) for information on how qmail-inject rewrites header fields. qmail-inject normally exits 0. If there is a severe syntax error in the message or a problem running qmail-queue, qmail-inject prints a warning and exits 1.

OPTIONS

-a  Send the message to all addresses given as recip arguments; do not use header recipient addresses.

-h  Send the message to all header recipient addresses. For non-forwarded messages, this means the addresses listed under To, Cc, Bcc, Apparently-To. For forwarded messages, this means the addresses listed under Resent-To, Resent-Cc, Resent-Bcc. Do not use any recip arguments.

-A  (Default.) Send the message to all addresses given as recip arguments. If no recip arguments are supplied, send the message to all header recipient addresses.

-H  Send the message to all header recipient addresses, and to all addresses given as recip arguments.

-fsender
    Pass sender to qmail-queue as the envelope sender address. Bounces will be sent to this address. If no -f option is supplied, qmail-inject takes the envelope sender address from the first Return-Path field. (Note that qmail-inject always strips Return-Path fields from the message.) If there is no Return-Path field, qmail-inject takes the user's login name as the default.

-N  (Default.) Feed the resulting message to qmail-queue.

-n  Print the message rather than feeding it to qmail-queue.

CONTROL FILES

defaultdomain
    Default domain name. Default: me, if that is supplied; otherwise the literal name defaultdomain, which is probably not what you want. qmail-inject adds this name to any host name without dots, including defaulthost if defaulthost does not have dots. (Exception: see plusdomain.)

defaulthost
    Default host name. Default: me, if that is supplied; otherwise the literal name defaulthost, which is probably not what you want. qmail-inject adds this name to any address without a host name. defaulthost need not be the current host's name. For example, you may prefer that outgoing mail show just your domain name.

idhost
    Host name for Message-IDs. Default: me, if that is supplied; otherwise the literal name idhost, which is certainly not what you want. idhost need not be the current host's name. For example, you may prefer to use fake host names in Message-IDs. However, idhost must be a fully-qualified name within your domain, and each host in your domain should use a different idhost.

plusdomain
    Plus domain name. Default: me, if that is supplied; otherwise the literal name plusdomain, which is probably not what you want. qmail-inject adds this name to any host name that ends with a plus sign, including defaulthost if defaulthost ends with a plus sign. If a host name does not have dots but ends with a plus sign, qmail-inject uses plusdomain, not defaultdomain.

SEE ALSO
addresses(5), qmail-control(5), qmail-header(5), qmail-queue(8)