1.\" $NetBSD: mailwrapper.8,v 1.6 1999/03/25 16:40:17 is Exp $ 2.\" $FreeBSD$ 3.\" 4.\" Copyright (c) 1998 5.\" Perry E. Metzger. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgment: 17.\" This product includes software developed for the NetBSD Project 18.\" by Perry E. Metzger. 19.\" 4. The name of the author may not be used to endorse or promote products 20.\" derived from this software without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.\" The following requests are required for all man pages. 34.Dd December 16, 1998 35.Dt MAILWRAPPER 8 36.Os 37.Sh NAME 38.Nm mailwrapper 39.Nd invoke appropriate MTA software based on configuration file 40.Sh SYNOPSIS 41Special. See below. 42.Sh DESCRIPTION 43At one time, the only Mail Transfer Agent (MTA) software easily available 44was 45.Xr sendmail 8 . 46As a result of this, most Mail User Agents (MUAs) such as 47.Xr mail 1 48had the path and calling conventions expected by 49.Xr sendmail 8 50compiled in. 51.Pp 52Times have changed, however. 53On a modern 54.Nx 55system, the administrator may wish to use one of several 56available MTAs. 57.Pp 58It would be difficult to modify all MUA software typically available 59on a system, so most of the authors of alternative MTAs have written 60their front end message submission programs so that they use the same 61calling conventions as 62.Xr sendmail 8 63and may be put into place instead of 64.Xr sendmail 8 65in 66.Pa /usr/sbin/sendmail . 67.Pp 68.Xr sendmail 8 69also typically has aliases named 70.Xr mailq 1 71and 72.Xr newaliases 1 73linked to it. The program knows to behave differently when its 74.Va argv[0] 75is 76.Dq mailq 77or 78.Dq newaliases 79and behaves appropriately. Typically, replacement MTAs provide similar 80functionality, either through a program that also switches behavior 81based on calling name, or through a set of programs that provide 82similar functionality. 83.Pp 84Although having replacement programs that plug replace 85.Xr sendmail 8 86helps in installing alternative MTAs, it essentially makes the 87configuration of the system depend on hard installing new programs in 88.Pa /usr . 89This leads to configuration problems for many administrators, since 90they may wish to install a new MTA without altering the system 91provided 92.Pa /usr . 93(This may be, for example, to avoid having upgrade problems when a new 94version of the system is installed over the old.) 95They may also have a shared 96.Pa /usr 97among several 98machines, and may wish to avoid placing implicit configuration 99information in a read-only 100.Pa /usr . 101.Pp 102The 103.Nm 104program is designed to replace 105.Pa /usr/sbin/sendmail 106and to invoke an appropriate MTA instead of 107.Xr sendmail 8 108based on configuration information placed in 109.Pa /etc/mail/mailer.conf . 110This permits the administrator to configure which MTA is to be invoked on 111the system at run time. 112.Sh FILES 113Configuration for 114.Nm 115is kept in 116.Pa /etc/mail/mailer.conf . 117.Pa /usr/sbin/sendmail 118is typically set up as a symlink to 119.Nm 120which is not usually invoked on its own. 121.Sh DIAGNOSTICS 122.Nm 123will return an error value and print a diagnostic if its configuration 124file is missing or malformed, or does not contain a mapping for the 125name under which 126.Nm 127was invoked. 128.Sh SEE ALSO 129.Xr mail 1 , 130.Xr mailq 1 , 131.Xr newaliases 1 , 132.Xr mailer.conf 5 , 133.Xr sendmail 8 . 134.Sh HISTORY 135.Nm 136first appeared in 137.Nx 1.4 138and then 139.Fx 4.0 . 140.Sh AUTHORS 141Perry E. Metzger <perry@piermont.com> 142.Sh BUGS 143The entire reason this program exists is a crock. Instead, a command 144for how to submit mail should be standardized, and all the "behave 145differently if invoked with a different name" behavior of things like 146.Xr mailq 1 147should go away. 148