kernel - Reduce lwp_signotify() latency
[dragonfly.git] / usr.sbin / mailwrapper / mailwrapper.8
CommitLineData
d8c60831
SS
1.\" $NetBSD: mailwrapper.8,v 1.11 2002/02/08 01:38:50 ross Exp $
2.\" $FreeBSD: src/usr.sbin/mailwrapper/mailwrapper.8,v 1.12 2004/07/02 23:12:48 ru Exp $
984263bc
MD
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
55.Ux
56system, the administrator may wish to use one of several
57available MTAs.
58.Pp
59It would be difficult to modify all MUA software typically available
60on a system, so most of the authors of alternative MTAs have written
61their front end message submission programs so that they use the same
62calling conventions as
63.Xr sendmail 8
64and may be put into place instead of
65.Xr sendmail 8
66in
67.Pa /usr/sbin/sendmail .
68.Pp
69.Xr sendmail 8
70also typically has aliases named
71.Xr mailq 1
72and
73.Xr newaliases 1
74linked to it.
75The program knows to behave differently when its
76.Va argv[0]
77is
78.Dq mailq
79or
80.Dq newaliases
81and behaves appropriately.
82Typically, replacement MTAs provide similar
83functionality, either through a program that also switches behavior
84based on calling name, or through a set of programs that provide
85similar functionality.
86.Pp
87Although having replacement programs that plug replace
88.Xr sendmail 8
89helps in installing alternative MTAs, it essentially makes the
d8c60831 90configuration of the system depend on hand installing new programs in
984263bc
MD
91.Pa /usr .
92This leads to configuration problems for many administrators, since
93they may wish to install a new MTA without altering the system
94provided
95.Pa /usr .
96(This may be, for example, to avoid having upgrade problems when a new
97version of the system is installed over the old.)
98They may also have a shared
99.Pa /usr
100among several
101machines, and may wish to avoid placing implicit configuration
102information in a read-only
103.Pa /usr .
104.Pp
105The
106.Nm
107utility is designed to replace
108.Pa /usr/sbin/sendmail
109and to invoke an appropriate MTA instead of
110.Xr sendmail 8
111based on configuration information placed in
112.Pa /etc/mail/mailer.conf .
113This permits the administrator to configure which MTA is to be invoked on
114the system at run time.
115.Pp
116Other configuration files may need to be altered when replacing
117.Xr sendmail 8 .
118For example, if the replacement MTA does not support the
119.Fl A
120option with
121.Xr mailq 1 ,
122.Va daily_status_include_submit_mailq
123should be turned off in
124.Pa /etc/periodic.conf .
125.Sh FILES
126Configuration for
127.Nm
128is kept in
129.Pa /etc/mail/mailer.conf .
130.Pa /usr/sbin/sendmail
131is typically set up as a symbolic link to
132.Nm
133which is not usually invoked on its own.
a68e0df0
SW
134.Sh EXIT STATUS
135.Nm
136exits 0 on success, and \*[Gt]0 if an error occurs.
984263bc
MD
137.Sh DIAGNOSTICS
138The
139.Nm
d8c60831
SS
140utility will print a diagnostic if its configuration file is malformed or does
141not contain a mapping for the name under which
984263bc
MD
142.Nm
143was invoked.
d8c60831
SS
144In case the configuration file does not exist at all, a syslog event is being
145generated and
146.Nm
147falls back to the default mailer, which is
148.Xr sendmail 8 .
984263bc
MD
149.Sh SEE ALSO
150.Xr mail 1 ,
151.Xr mailq 1 ,
152.Xr newaliases 1 ,
153.Xr mailer.conf 5 ,
154.Xr periodic.conf 5 ,
155.Xr sendmail 8
156.Sh HISTORY
157The
158.Nm
159utility first appeared in
160.Nx 1.4
161and then
162.Fx 4.0 .
163.Sh AUTHORS
e65bc1c3 164.An Perry E. Metzger Aq Mt perry@piermont.com
984263bc
MD
165.Sh BUGS
166The entire reason this program exists is a crock.
167Instead, a command
168for how to submit mail should be standardized, and all the "behave
169differently if invoked with a different name" behavior of things like
170.Xr mailq 1
171should go away.