Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
new-inject(1)		     General Commands Manual		   new-inject(1)

NAME
     new-inject - preprocess a mail message

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  mes-
     sage 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	default-
     domain,  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 ad-
     dresses that will receive the message, and a sender address that  will  re-
     ceive 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 argu-
     ment  recipients and header recipients.  With the (default) -A option, new-
     inject uses argument recipients, or header recipients if there are no argu-
     ment 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 incom-
     ing Return-Path field, if there is one, and if the -S option  is  not  set;
     otherwise, the default envelope sender, as described below.  Incoming Enve-
     lope-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	environ-
     ment  variable:  $QMAILSUSER,  $QMAILUSER,  $MAILUSER,  $USER, or $LOGNAME,
     whichever comes first.  If the -M option is set, the per-message VERP  con-
     tains  a dash, the current time, and the process ID; otherwise it is empty.
     If the -R option is set, the per-recipient VERP contains a dash, the  enve-
     lope  recipient  user name, an equals sign, and the envelope recipient host
     name; otherwise it is empty.  (If there are several recipients, each recip-
     ient sees a different sender address.)  The host name  is	set  by  $QMAIL-
     SHOST, $QMAILHOST, $MAILHOST, or the empty string, subject to rewriting.

RECIPIENTS
     new-inject  rewrites  addresses in To, Cc, and Notice-Requested-Upon-Deliv-
     ery-To fields.  It cleans up the spacing, adds missing commas, trims  extra
     commas,  adds  missing quotes, wraps lines at a reasonable length, converts
     source routes into comments, etc.	If there are several To fields,  new-in-
     ject 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 omit-
     ted.  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-Fol-
     lowup-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 mes-
     sage does not contain a Mail-Followup-To field, new-inject adds a Mail-Fol-
     lowup-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 vari-
     able  $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.

MISCELLANY
     new-inject  puts  Received, Delivered-To, Errors-To, Return-Receipt-To, Re-
     sent-Sender, Resent-From, Resent-Reply-To,  Resent-To,  Resent-Cc,  Resent-
     Bcc,  Resent-Date,  and  Resent-Message-ID fields at the top of the header.
     It does not rewrite any of these fields; it follows the 822bis approach  of
     treating Resent-* as trace fields.

     new-inject discards incoming Content-Length fields.

SEE ALSO
     leapsecs(3), qmail-control(5), rewriting(5), qmail-queue(8)

								   new-inject(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=new-inject&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help