xref: /freebsd/usr.sbin/mailwrapper/mailwrapper.8 (revision 6e1fc0118033f42b7c0d3623c8f67a89ebecabb2)
102371cebSXin LI.\"	$OpenBSD: mailwrapper.8,v 1.12 2014/03/27 22:34:42 jmc Exp $
202371cebSXin LI.\"	$NetBSD: mailwrapper.8,v 1.16 2014/09/19 16:05:55 wiz Exp $
33ae92913SPeter Wemm.\"
43ae92913SPeter Wemm.\" Copyright (c) 1998
53ae92913SPeter Wemm.\" 	Perry E. Metzger.  All rights reserved.
63ae92913SPeter Wemm.\"
73ae92913SPeter Wemm.\" Redistribution and use in source and binary forms, with or without
83ae92913SPeter Wemm.\" modification, are permitted provided that the following conditions
93ae92913SPeter Wemm.\" are met:
103ae92913SPeter Wemm.\" 1. Redistributions of source code must retain the above copyright
113ae92913SPeter Wemm.\"    notice, this list of conditions and the following disclaimer.
123ae92913SPeter Wemm.\" 2. Redistributions in binary form must reproduce the above copyright
133ae92913SPeter Wemm.\"    notice, this list of conditions and the following disclaimer in the
143ae92913SPeter Wemm.\"    documentation and/or other materials provided with the distribution.
153ae92913SPeter Wemm.\" 3. All advertising materials mentioning features or use of this software
163ae92913SPeter Wemm.\"    must display the following acknowledgment:
173ae92913SPeter Wemm.\"	This product includes software developed for the NetBSD Project
183ae92913SPeter Wemm.\"	by Perry E. Metzger.
193ae92913SPeter Wemm.\" 4. The name of the author may not be used to endorse or promote products
203ae92913SPeter Wemm.\"    derived from this software without specific prior written permission.
213ae92913SPeter Wemm.\"
223ae92913SPeter Wemm.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
233ae92913SPeter Wemm.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
243ae92913SPeter Wemm.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
253ae92913SPeter Wemm.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
263ae92913SPeter Wemm.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
273ae92913SPeter Wemm.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
283ae92913SPeter Wemm.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
293ae92913SPeter Wemm.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
303ae92913SPeter Wemm.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
313ae92913SPeter Wemm.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
323ae92913SPeter Wemm.\"
3302371cebSXin LI.Dd October 29, 2014
343ae92913SPeter Wemm.Dt MAILWRAPPER 8
353ae92913SPeter Wemm.Os
363ae92913SPeter Wemm.Sh NAME
373ae92913SPeter Wemm.Nm mailwrapper
3802371cebSXin LI.Nd invoke appropriate
3902371cebSXin LI.Tn MTA
4002371cebSXin LIsoftware based on configuration file
413ae92913SPeter Wemm.Sh SYNOPSIS
42f2e366a1SSheldon HearnSpecial.
43f2e366a1SSheldon HearnSee below.
443ae92913SPeter Wemm.Sh DESCRIPTION
4502371cebSXin LIOnce upon time, the only Mail Transfer Agent
4602371cebSXin LI.Pq Tn MTA
4702371cebSXin LIsoftware easily available was
4802371cebSXin LI.Dq sendmail .
4902371cebSXin LIThis famous
5002371cebSXin LI.Tn MTA
5102371cebSXin LIwas written by
5202371cebSXin LI.An Eric Allman
5302371cebSXin LIand first appeared in
5402371cebSXin LI.Bx 4.1 .
5502371cebSXin LIThe legacy of this
5602371cebSXin LI.Tn MTA
5702371cebSXin LIaffected most Mail User Agents
5802371cebSXin LI.Pq Tn MUAs
5902371cebSXin LIsuch as
6002371cebSXin LI.Xr mail 1 ;
6102371cebSXin LIthe path and calling conventions expected by
6202371cebSXin LI.Dq sendmail
6302371cebSXin LIwere compiled in.
643ae92913SPeter Wemm.Pp
6502371cebSXin LIBut times changed.
663ae92913SPeter WemmOn a modern
6702371cebSXin LI.Fx
6802371cebSXin LIsystem, the administrator may wish to use one of several available
6902371cebSXin LI.Tn MTAs .
703ae92913SPeter Wemm.Pp
7102371cebSXin LIIt would be difficult to modify all
7202371cebSXin LI.Tn MUA
7302371cebSXin LIsoftware typically available on a system,
7402371cebSXin LIso most of the authors of alternative
7502371cebSXin LI.Tn MTAs
7602371cebSXin LIhave written their front end message submission programs
7702371cebSXin LIthat may appear in the place of
7802371cebSXin LI.Pa /usr/sbin/sendmail ,
7902371cebSXin LIbut still follow the same calling conventions as
8002371cebSXin LI.Dq sendmail .
813ae92913SPeter Wemm.Pp
8202371cebSXin LIThe
8302371cebSXin LI.Dq sendmail
8402371cebSXin LI.Tn MTA
853ae92913SPeter Wemmalso typically has aliases named
863ae92913SPeter Wemm.Xr mailq 1
873ae92913SPeter Wemmand
883ae92913SPeter Wemm.Xr newaliases 1
89f2e366a1SSheldon Hearnlinked to it.
90f2e366a1SSheldon HearnThe program knows to behave differently when its
913ae92913SPeter Wemm.Va argv[0]
923ae92913SPeter Wemmis
933ae92913SPeter Wemm.Dq mailq
943ae92913SPeter Wemmor
953ae92913SPeter Wemm.Dq newaliases
96f2e366a1SSheldon Hearnand behaves appropriately.
9702371cebSXin LITypically, replacement
9802371cebSXin LI.Tn MTAs
9902371cebSXin LIprovide similar functionality, either through a program that also
10002371cebSXin LIswitches behavior based on calling name, or through a set of programs
10102371cebSXin LIthat provide similar functionality.
1023ae92913SPeter Wemm.Pp
10302371cebSXin LIAlthough having replacement programs that plug replace
10402371cebSXin LI.Dq sendmail
10502371cebSXin LIhelps in installing alternative
10602371cebSXin LI.Tn MTAs ,
10702371cebSXin LIit essentially makes the configuration of the system depend
10802371cebSXin LIon hand installing new programs in
1093ae92913SPeter Wemm.Pa /usr .
1103ae92913SPeter WemmThis leads to configuration problems for many administrators, since
11102371cebSXin LIthey may wish to install a new
11202371cebSXin LI.Tn MTA
11302371cebSXin LIwithout altering the system provided
1143ae92913SPeter Wemm.Pa /usr .
1153ae92913SPeter Wemm(This may be, for example, to avoid having upgrade problems when a new
1163ae92913SPeter Wemmversion of the system is installed over the old.)
1173ae92913SPeter WemmThey may also have a shared
1183ae92913SPeter Wemm.Pa /usr
11902371cebSXin LIamong several machines, and may wish to avoid placing
12002371cebSXin LIimplicit configuration information in a read-only
1213ae92913SPeter Wemm.Pa /usr .
1223ae92913SPeter Wemm.Pp
1233ae92913SPeter WemmThe
1243ae92913SPeter Wemm.Nm
12502371cebSXin LIprogram is designed to replace
1263ae92913SPeter Wemm.Pa /usr/sbin/sendmail
12702371cebSXin LIand to invoke an appropriate
12802371cebSXin LI.Tn MTA
1293ae92913SPeter Wemmbased on configuration information placed in
13024ed0a57SBaptiste Daroussin.Pa ${LOCALBASE}/etc/mail/mailer.conf
13124ed0a57SBaptiste Daroussinfalling back on
1323fe0477aSAndrey A. Chernov.Pa /etc/mail/mailer.conf .
13302371cebSXin LIThis permits the administrator to configure which
13402371cebSXin LI.Tn MTA
13502371cebSXin LIis to be invoked on
1363ae92913SPeter Wemmthe system at run time.
13726085e0dSGregory Neil Shapiro.Pp
13826085e0dSGregory Neil ShapiroOther configuration files may need to be altered when replacing
13926085e0dSGregory Neil Shapiro.Xr sendmail 8 .
14002371cebSXin LIFor example, if the replacement
14102371cebSXin LI.Tn MTA
14202371cebSXin LIdoes not support the
14326085e0dSGregory Neil Shapiro.Fl A
14426085e0dSGregory Neil Shapirooption with
14526085e0dSGregory Neil Shapiro.Xr mailq 1 ,
14626085e0dSGregory Neil Shapiro.Va daily_status_include_submit_mailq
14726085e0dSGregory Neil Shapiroshould be turned off in
14826085e0dSGregory Neil Shapiro.Pa /etc/periodic.conf .
1493ae92913SPeter Wemm.Sh FILES
1503ae92913SPeter WemmConfiguration for
1513ae92913SPeter Wemm.Nm
1523ae92913SPeter Wemmis kept in
15324ed0a57SBaptiste Daroussin.Pa ${LOCALBASE}/etc/mail/mailer.conf
15424ed0a57SBaptiste Daroussinor
1553fe0477aSAndrey A. Chernov.Pa /etc/mail/mailer.conf .
1563ae92913SPeter Wemm.Pa /usr/sbin/sendmail
15739e80db3SPhilippe Charnieris typically set up as a symbolic link to
1583ae92913SPeter Wemm.Nm
1593ae92913SPeter Wemmwhich is not usually invoked on its own.
1607e87aff9SXin LI.Sh EXIT STATUS
161bc84aa4bSRuslan Ermilov.Ex -std
1623ae92913SPeter Wemm.Sh DIAGNOSTICS
163490d5836SPhilippe CharnierThe
1643ae92913SPeter Wemm.Nm
1657e87aff9SXin LIwill print a diagnostic if its configuration file is missing or malformed,
1667e87aff9SXin LIor does not contain a mapping for the name under which it was invoked.
1673ae92913SPeter Wemm.Sh SEE ALSO
1683ae92913SPeter Wemm.Xr mail 1 ,
1693ae92913SPeter Wemm.Xr mailq 1 ,
1703ae92913SPeter Wemm.Xr newaliases 1 ,
171521cb9d2SPeter Wemm.Xr mailer.conf 5 ,
17226085e0dSGregory Neil Shapiro.Xr periodic.conf 5 ,
173*6e1fc011SGraham Percival.Xr dma 8 ,
17476a06f84SBen Smithurst.Xr sendmail 8
1753ae92913SPeter Wemm.Sh HISTORY
176490d5836SPhilippe CharnierThe
1773ae92913SPeter Wemm.Nm
178490d5836SPhilippe Charnierutility first appeared in
179521cb9d2SPeter Wemm.Nx 1.4
180521cb9d2SPeter Wemmand then
181521cb9d2SPeter Wemm.Fx 4.0 .
1823ae92913SPeter Wemm.Sh AUTHORS
18301c2b8acSBaptiste Daroussin.An Perry E. Metzger Aq Mt perry@piermont.com
1843ae92913SPeter Wemm.Sh BUGS
185f2e366a1SSheldon HearnThe entire reason this program exists is a crock.
186f2e366a1SSheldon HearnInstead, a command
18702371cebSXin LIfor how to submit mail should be standardized, and all the
18802371cebSXin LI.Dq behave differently if invoked with a different name
18902371cebSXin LIbehavior of things like
1903ae92913SPeter Wemm.Xr mailq 1
1913ae92913SPeter Wemmshould go away.
192