]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/mailwrapper/mailwrapper.8
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / usr.sbin / mailwrapper / mailwrapper.8
1 .\"     $OpenBSD: mailwrapper.8,v 1.12 2014/03/27 22:34:42 jmc Exp $
2 .\"     $NetBSD: mailwrapper.8,v 1.16 2014/09/19 16:05:55 wiz Exp $
3 .\" $FreeBSD$
4 .\"
5 .\" Copyright (c) 1998
6 .\"     Perry E. Metzger.  All rights reserved.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\"    must display the following acknowledgment:
18 .\"     This product includes software developed for the NetBSD Project
19 .\"     by Perry E. Metzger.
20 .\" 4. The name of the author may not be used to endorse or promote products
21 .\"    derived from this software without specific prior written permission.
22 .\"
23 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .\"
34 .Dd October 29, 2014
35 .Dt MAILWRAPPER 8
36 .Os
37 .Sh NAME
38 .Nm mailwrapper
39 .Nd invoke appropriate
40 .Tn MTA
41 software based on configuration file
42 .Sh SYNOPSIS
43 Special.
44 See below.
45 .Sh DESCRIPTION
46 Once upon time, the only Mail Transfer Agent
47 .Pq Tn MTA
48 software easily available was
49 .Dq sendmail .
50 This famous
51 .Tn MTA
52 was written by
53 .An Eric Allman
54 and first appeared in
55 .Bx 4.1 .
56 The legacy of this
57 .Tn MTA
58 affected most Mail User Agents
59 .Pq Tn MUAs
60 such as
61 .Xr mail 1 ;
62 the path and calling conventions expected by
63 .Dq sendmail
64 were compiled in.
65 .Pp
66 But times changed.
67 On a modern
68 .Fx
69 system, the administrator may wish to use one of several available
70 .Tn MTAs .
71 .Pp
72 It would be difficult to modify all
73 .Tn MUA
74 software typically available on a system,
75 so most of the authors of alternative
76 .Tn MTAs
77 have written their front end message submission programs
78 that may appear in the place of
79 .Pa /usr/sbin/sendmail ,
80 but still follow the same calling conventions as
81 .Dq sendmail .
82 .Pp
83 The
84 .Dq sendmail
85 .Tn MTA
86 also typically has aliases named
87 .Xr mailq 1
88 and
89 .Xr newaliases 1
90 linked to it.
91 The program knows to behave differently when its
92 .Va argv[0]
93 is
94 .Dq mailq
95 or
96 .Dq newaliases
97 and behaves appropriately.
98 Typically, replacement
99 .Tn MTAs
100 provide similar functionality, either through a program that also
101 switches behavior based on calling name, or through a set of programs
102 that provide similar functionality.
103 .Pp
104 Although having replacement programs that plug replace
105 .Dq sendmail
106 helps in installing alternative
107 .Tn MTAs ,
108 it essentially makes the configuration of the system depend
109 on hand installing new programs in
110 .Pa /usr .
111 This leads to configuration problems for many administrators, since
112 they may wish to install a new
113 .Tn MTA
114 without altering the system provided
115 .Pa /usr .
116 (This may be, for example, to avoid having upgrade problems when a new
117 version of the system is installed over the old.)
118 They may also have a shared
119 .Pa /usr
120 among several machines, and may wish to avoid placing
121 implicit configuration information in a read-only
122 .Pa /usr .
123 .Pp
124 The
125 .Nm
126 program is designed to replace
127 .Pa /usr/sbin/sendmail
128 and to invoke an appropriate
129 .Tn MTA
130 based on configuration information placed in
131 .Pa ${LOCALBASE}/etc/mail/mailer.conf
132 falling back on
133 .Pa /etc/mail/mailer.conf .
134 This permits the administrator to configure which
135 .Tn MTA
136 is to be invoked on
137 the system at run time.
138 .Pp
139 Other configuration files may need to be altered when replacing
140 .Xr sendmail 8 .
141 For example, if the replacement
142 .Tn MTA
143 does not support the
144 .Fl A
145 option with
146 .Xr mailq 1 ,
147 .Va daily_status_include_submit_mailq
148 should be turned off in
149 .Pa /etc/periodic.conf .
150 .Sh FILES
151 Configuration for
152 .Nm
153 is kept in
154 .Pa ${LOCALBASE}/etc/mail/mailer.conf
155 or
156 .Pa /etc/mail/mailer.conf .
157 .Pa /usr/sbin/sendmail
158 is typically set up as a symbolic link to
159 .Nm
160 which is not usually invoked on its own.
161 .Sh EXIT STATUS
162 .Ex -std
163 .Sh DIAGNOSTICS
164 The
165 .Nm
166 will print a diagnostic if its configuration file is missing or malformed,
167 or does not contain a mapping for the name under which it was invoked.
168 .Sh SEE ALSO
169 .Xr dma 8 ,
170 .Xr mail 1 ,
171 .Xr mailq 1 ,
172 .Xr newaliases 1 ,
173 .Xr mailer.conf 5 ,
174 .Xr periodic.conf 5 ,
175 .Xr sendmail 8
176 .Sh HISTORY
177 The
178 .Nm
179 utility first appeared in
180 .Nx 1.4
181 and then
182 .Fx 4.0 .
183 .Sh AUTHORS
184 .An Perry E. Metzger Aq Mt perry@piermont.com
185 .Sh BUGS
186 The entire reason this program exists is a crock.
187 Instead, a command
188 for how to submit mail should be standardized, and all the
189 .Dq behave differently if invoked with a different name
190 behavior of things like
191 .Xr mailq 1
192 should go away.