SYNOPSIS
new-inject [ -nNaAhHFIMRS ] [ -fsender ] [ recip ... ]
DESCRIPTION
With the (default) -N option, new-inject reads a mail message from its
standard input, rewrites the message header, and feeds the rewritten
message to qmail-queue.
With the -n option, new-inject prints the message rather than feeding
it to qmail-queue.
See http://pobox.com/~djb/proto/immhf.html for a complete description
of the Internet mail message header format.
The FIMRS options can be set as letters inside the $QMAILINJECT
environment variable.
ADDRESS REWRITING
new-inject transforms each address according to the control files
defaultdomain, defaulthost, me, plusdomain, and rewrite. See
rewriting(5) for further details. If you set the environment variable
$QMAILREWRITEFILE, and that file exists, it overrides rewrite.
ENVELOPE ADDRESSES
new-inject builds an envelope for the message: a list of recipient
addresses that will receive the message, and a sender address that will
receive bounces.
If new-inject is printing the message rather than feeding it to
qmail-queue, it prints an Envelope-Sender field and an
Envelope-Recipients field at the top of the new message header.
With the -a option, new-inject builds the envelope recipient list from
the argument recipients, i.e., all recip addresses listed on the
command line. With the -h option, new-inject builds the envelope
recipient list from the header recipients, i.e., all addresses listed
in the incoming message under Envelope-Recipients, or under To, Cc,
Bcc, and Apparently-To if Envelope-Recipients is not supplied. With
the -H option, new-inject uses both argument recipients and header
recipients. With the (default) -A option, new-inject uses argument
recipients, or header recipients if there are no argument recipients.
The envelope sender is set by the -f option if it is supplied;
otherwise, the incoming Envelope-Sender field, if there is one;
otherwise, the incoming Return-Path field, if there is one, and if the
-S option is not set; otherwise, the default envelope sender, as
described below. Incoming Envelope-Sender and Return-Path fields are
removed in any case.
The default envelope sender contains a user name, a per-message VERP, a
per-recipient VERP, and a host name. The user name is set by an
environment variable: $QMAILSUSER, $QMAILUSER, $MAILUSER, $USER, or
etc. If there are several To fields, new-inject merges them into a
single To field.
new-inject removes all incoming Bcc and Apparently-To fields.
SENDERS
new-inject rewrites addresses in From and Sender fields.
If the incoming message does not contain a From field, new-inject
creates a new From field.
If the -F option is set, new-inject discards any incoming From field,
and creates a new From field.
The new From field contains a personal name, a user name, and a host
name. The personal name is set by $QMAILNAME, $MAILNAME, or $NAME,
whichever comes first; if none of these variables are set, the personal
name is omitted. The user name is set by $QMAILUSER, $MAILUSER, $USER,
or $LOGNAME. The host name is set by $QMAILHOST, $MAILHOST, or the
empty string, subject to rewriting.
RESPONSE TARGETS
new-inject rewrites addresses in Reply-To, Mail-Reply-To, and
Mail-Followup-To fields.
If the environment variable $QMAILMFTFILE is set, new-inject reads a
list of mailing list addresses, one per line, from that file. If To+Cc
includes one of those addresses (without regard to case), and if the
incoming message does not contain a Mail-Followup-To field, new-inject
adds a Mail-Followup-To field with all the To+Cc addresses.
DATE FIELDS
If the incoming message has comprehensible Date fields, new-inject
takes the last one and rewrites it in a standard format. It transforms
2-digit (and 3-digit) years into 4-digit years. It also transforms
obsolete time zone names into numeric time zones.
Otherwise new-inject makes a new Date field with the current time in
UTC, counting leap seconds.
THREADING
If the incoming message does not contain a Message-ID field, new-inject
creates a new Message-ID field.
If the -I option is set, new-inject discards any incoming Message-ID
field, and creates a new Message-ID field.
new-inject uses the control file idhost (overridden by he environment
variable $QMAILIDHOST; defaulting to me) in its new Message-ID field.
idhost need not be the current host's name. It is your responsibility
to obtain authorization from the owner of the idhost domain.
new-inject(1)
Man(1) output converted with
man2html