1.\" $OpenBSD: mailwrapper.8,v 1.4 2000/06/11 21:03:40 millert Exp $ 2.\" $NetBSD: mailwrapper.8,v 1.5 1999/03/22 18:44:01 garbled Exp $ 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. 42See below. 43.Sh DESCRIPTION 44At one time, the only Mail Transfer Agent (MTA) software easily available 45was 46.Xr sendmail 8 . 47As a result of this, most Mail User Agents (MUAs) such as 48.Xr mail 1 49had the path and calling conventions expected by 50.Xr sendmail 8 51compiled in. 52.Pp 53Times have changed, however. 54On a modern system, the administrator may wish to use one of several 55available MTAs. 56.Pp 57It would be difficult to modify all MUA software typically available 58on a system, so most of the authors of alternative MTAs have written 59their front end message submission programs so that they use the same 60calling conventions as 61.Xr sendmail 8 62and may be put into place instead of 63.Xr sendmail 8 64in 65.Pa /usr/sbin/sendmail . 66.Pp 67.Xr sendmail 8 68also typically has aliases named 69.Xr mailq 1 70and 71.Xr newaliases 8 72linked to it. 73The program knows to behave differently when its 74.Va argv[0] 75is 76.Dq mailq 77or 78.Dq newaliases 79and behaves appropriately. 80Typically, replacement MTAs provide similar 81functionality, either through a program that also switches behavior 82based on calling name, or through a set of programs that provide 83similar functionality. 84.Pp 85Although having replacement programs that plug replace 86.Xr sendmail 8 87helps in installing alternative MTAs, it essentially makes the 88configuration of the system depend on hard installing new programs in 89.Pa /usr . 90This leads to configuration problems for many administrators, since 91they may wish to install a new MTA without altering the system 92provided 93.Pa /usr . 94(This may be, for example, to avoid having upgrade problems when a new 95version of the system is installed over the old.) 96They may also have a shared 97.Pa /usr 98among several 99machines, and may wish to avoid placing implicit configuration 100information in a read-only 101.Pa /usr . 102.Pp 103The 104.Nm 105program is designed to replace 106.Pa /usr/sbin/sendmail 107and to invoke an appropriate MTA instead of 108.Xr sendmail 8 109based on configuration information placed in 110.Pa /etc/mailer.conf . 111This permits the administrator to configure which MTA is to be invoked on 112the system at run time. 113.Sh FILES 114Configuration for 115.Nm 116is kept in 117.Pa /etc/mailer.conf . 118.Pa /usr/sbin/sendmail 119is typically set up as a symlink to 120.Nm 121which is not usually invoked on its own. 122.Sh DIAGNOSTICS 123.Nm 124will return an error value and print a diagnostic if its configuration 125file is missing or malformed, or does not contain a mapping for the 126name under which 127.Nm 128was invoked. 129.Sh SEE ALSO 130.Xr mail 1 , 131.Xr mailq 1 , 132.Xr mailer.conf 5 , 133.Xr newaliases 8 , 134.Xr sendmail 8 135.Sh AUTHORS 136Perry E. Metzger <perry@piermont.com> 137.Sh BUGS 138The entire reason this program exists is a crock. 139Instead, a command 140for how to submit mail should be standardized, and all the "behave 141differently if invoked with a different name" behavior of things like 142.Xr mailq 1 143should go away. 144