mjinject

(Inject a message from Majordomo into the qmail queue)

SYNOPSIS

mjinject [-rR] address-file sender < message

DESCRIPTION

This program is intended to be used as the outgoing mailer for Majordomo's resend program on a system using qmail. It takes a file of addresses and a sender address on the command line and an e-mail message on stdin and passes the message along to qmail-queue after running it through qmail-inject to canonify addresses and the like. In the address file, everything after the first space on a line is ignored, so the addresses can include comments provided that the address is the first sequence of non-whitespace on each line. Whitespace in addresses is not supported.

If the file name created by appending .programs to the address file exists, then in addition to passing the message to qmail-inject, mjinject also runs each program listed in that file and passes the message to it. The syntax is one program command line per line of the file, with whitespace separating the arguments (whitespace in arguments is not supported).

To use this program as Majordomo's outgoing mailer, just change the $mailer line in majordomo.cf to:

    $mailer = "/var/qmail/majordomo/mjinject $listdir/$opt_l \$sender";

(replacing /var/qmail/majordomo/mjinject with the full path to this script). Any arguments passed by resend to this program are ignored when using the above syntax, so there's no need to do anything special with the resend invocation.

The address list used will be the address list of the mailing list, maintained by Majordomo, so make sure that that address list consists of addresses, one per line, optionally with additional information after the address separated by a space.

When using this program, be sure to edit the beginning of it and change the hostname setting to point to your local host. mjinject uses this to fully-qualify addresses.

OPTIONS

-r

Force VERP (per-message sender addresses containing the e-mail address of the recipient, to enable cleaner bounce handling) to be used. For more information on VERP, see <http://cr.yp.to/proto/verp.txt>.

-R

Force VERP not to be used.

Without a command-line flag, the VERP default is determined by the setting of $verp at the top of the program (normally on).

RETURN VALUE

For nearly all errors, mjinject exits 111 to tell qmail to defer the the message and try to deliver it again. However, if an error is encountered when feeding the message to a program (using a .programs file), the message is bounced instead because it has already been delivered to the subscribers.

SEE ALSO

qmail-inject(8), qmail-queue(8)

For information about qmail, see <http://cr.yp.to/qmail.html>.

For detailed information on how to install and use this program, see the Majordomo with qmail FAQ at <http://www.eyrie.org/~eagle/faqs/mjqmail.html>.

Current versions of this program are available from its web site at <http://www.eyrie.org/~eagle/software/mjqmail/>.

AUTHOR

Russ Allbery <rra@stanford.edu> with help from Giles Lean <giles@nemeton.com.au>

COPYRIGHT AND LICENSE

Copyright 1997, 1998, 2002 by Russ Allbery <rra@stanford.edu>.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last spun 2022-12-12 from POD modified 2002-06-29