672 xargs doesn't support -0
[illumos-gate.git] / usr / src / man / man1 / vacation.1
blob40c61a55fe3bf69829f68bb63e2dffb64d531894
1 '\" te
2 .\" Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH VACATION 1 "Aug 20, 2005"
8 .SH NAME
9 vacation \- reply to mail automatically
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBvacation\fR [\fB-I\fR]
14 .fi
16 .LP
17 .nf
18 \fBvacation\fR [\fB-a\fR \fIalias\fR] [\fB-e\fR \fIfilter_file\fR] [\fB-f\fR \fIdatabase_file\fR]
19      [\fB-j\fR] [\fB-m\fR \fImessage_file\fR] [\fB-s\fR \fIsender\fR] [\fB-t\fR\fIN\fR] \fIusername\fR
20 .fi
22 .LP
23 .nf
24 \fBvacation\fR [\fB-f database_file\fR] \fB-l\fR
25 .fi
27 .SH DESCRIPTION
28 .sp
29 .LP
30 The \fBvacation\fR utility automatically replies to incoming mail.
31 .SS "Installation"
32 .sp
33 .LP
34 The installation consists of an interactive program which sets up
35 \fBvacation\fR's basic configuration.
36 .sp
37 .LP
38 To install \fBvacation\fR,  type it with no arguments on the command line. The
39 program creates a \fB\&.vacation.msg\fR file, which contains the message that
40 is automatically sent to all senders when \fBvacation\fR is enabled, and starts
41 an editor for you to modify the message. (See USAGE section.) Which editor is
42 invoked is determined by the \fBVISUAL\fR or \fBEDITOR\fR environment variable,
43 or \fBvi\fR(1) if neither of those environment variables are set.
44 .sp
45 .LP
46 A \fB\&.forward\fR file is also created if one does not exist in your home
47 directory. Once created, the \fB\&.forward\fR file will contain a line of the
48 form:
49 .sp
50 .LP
51 One copy of an incoming message is sent to the \fIusername\fR and another copy
52 is piped into \fBvacation\fR:
53 .sp
54 .in +2
55 .nf
56 \e\fIusername\fR, "|/usr/bin/vacation \fIusername\fR"
57 .fi
58 .in -2
60 .sp
61 .LP
62 If a \fB\&.forward\fR file is present in your home directory, it will ask
63 whether you want to remove it, which disables \fBvacation\fR and ends the
64 installation.
65 .sp
66 .LP
67 The program automatically creates \fB\&.vacation.pag\fR and
68 \fB\&.vacation.dir\fR, which contain a list of senders when \fBvacation\fR is
69 enabled.
70 .SS "Activation and Deactivation"
71 .sp
72 .LP
73 The presence of the \fB\&.forward\fR file determines whether or not
74 \fBvacation\fR is disabled or enabled. To disable \fBvacation\fR, remove the
75 \fB\&.forward\fR file, or move it to a new name.
76 .SS "Initialization"
77 .sp
78 .LP
79 The \fB-I\fR option clears the \fBvacation\fR log files, \fB\&.vacation.pag\fR
80 and \fB\&.vacation.dir\fR, erasing the list of senders from a previous
81 \fBvacation\fR session. (See OPTIONS section.)
82 .SS "Additional Configuration"
83 .sp
84 .LP
85 \fBvacation\fR provides configuration options that are not part of the
86 installation, these being \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR,
87 \fB-s\fR, and \fB-t\fR. (See OPTIONS section.)
88 .SS "Reporting"
89 .sp
90 .LP
91 \fBvacation\fR provides a reporting option, \fB-l\fR. See \fBOPTIONS\fR.
92 .SH OPTIONS
93 .sp
94 .LP
95 The following options are supported:
96 .sp
97 .ne 2
98 .na
99 \fB\fB-I\fR\fR
101 .RS 6n
102 Initializes the \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR files and
103 enables \fBvacation\fR. If the \fB-I\fR flag is not specified, and a \fIuser\fR
104 argument is given, \fBvacation\fR reads the first line from the standard input
105 (for a \fBFrom:\fR line, no colon). If absent, it produces an error message.
110 Options \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR, \fB-s\fR, and
111 \fB-t\fR are configuration options to be used in conjunction with
112 \fBvacation\fR in the \fB\&.forward\fR file, not on the command line. For
113 example,
115 .in +2
117 \e\fIusername\fR, "|/usr/bin/vacation \fB-t1m\fR \fIusername\fR"
119 .in -2
123 repeats replies to the sender every minute.
125 .ne 2
127 \fB\fB-a\fR \fIalias\fR\fR
129 .RS 20n
130 Indicates that \fIalias\fR is one of the valid aliases for the user running
131 \fBvacation\fR, so that mail addressed to that alias generates a reply.
135 .ne 2
137 \fB\fB-e\fR \fIfilter_file\fR\fR
139 .RS 20n
140 Uses \fIfilter_file\fR instead of \fB\&.vacation.filter\fR as the source of the
141 domain and email address filters.
145 .ne 2
147 \fB\fB-f\fR \fIdatabase_file\fR\fR
149 .RS 20n
150 Uses \fIdatabase_file\fR instead of \fB\&.vacation\fR as the base name for the
151 database file.
155 .ne 2
157 \fB\fB-j\fR\fR
159 .RS 20n
160 Does not check whether the recipient appears in the \fBTo:\fR or the \fBCc:\fR
161 line. Warning: use of this option can result in vacation replies being sent to
162 mailing lists and other inappropriate places; its use is therefore strongly
163 discouraged.
167 .ne 2
169 \fB\fB-m\fR \fImessage_file\fR\fR
171 .RS 20n
172 Uses \fB~/\fImessage_file\fR\fR as the message to send for the reply instead of
173 \fB~/.vacation.msg\fR. \fImessage_file\fR is a relative path to the desired
174 vacation message file. To prevent directory/file "not found" errors,
175 \fImessage_file\fR should be on the same disk partition as \fB~/.forward\fR.
179 .ne 2
181 \fB\fB-s\fR \fIsender\fR\fR
183 .RS 20n
184 Replies to \fIsender\fR instead of the value read from the UNIX \fBFrom\fR line
185 of the incoming message.
189 .ne 2
191 \fB\fB-t\fR\fIN\fR\fR
193 .RS 20n
194 Changes the interval between repeat replies to the same sender. The default is
195 1 week. A trailing \fBs\fR, \fBm\fR, \fBh\fR, \fBd\fR, or \fBw\fR scales
196 \fIN\fR to seconds, minutes, hours, days, or weeks, respectively.
201 The \fB-l\fR option is neither for initialization nor configuration., but for
202 reporting. The \fB-f\fRoption can also be used in conjunction with the
203 \fB-l\fR.
205 .ne 2
207 \fB\fB-l\fR\fR
209 .RS 6n
210  Lists the addresses to which a reply has been sent since the last invocation
211 of \fBvacation -I\fR, along with a date and time stamp.
214 .SH USAGE
217 \fB\&.vacation.msg\fR should include a header with at least a \fBSubject:\fR
218 line (it should not include a \fBTo:\fR line). For example:
220 .in +2
222 \fBSubject: I am on vacation
223 I am on vacation until July 22.  If you have something urgent,
224 please contact Joe Jones (jones@fB0).
225         --John\fR
227 .in -2
232 If the string \fB$SUBJECT\fR appears in the \fB\&.vacation.msg\fR file, it is
233 replaced with the subject of the original message when the reply is sent. Thus,
234 a \fB\&.vacation.msg\fR file such as
236 .in +2
238 \fBSubject: I am on vacation
239 I am on vacation until July 22.
240 Your mail regarding "$SUBJECT" will be read when I return.
241 If you have something urgent, please contact
242 Joe Jones (jones@fB0).
243         --John\fR
245 .in -2
250 will include the subject of the message in the reply.
253 No message is sent if the \fBTo:\fR or the \fBCc:\fR line does not list the
254 user to whom the original message was sent or one of a number of aliases for
255 them, if the initial \fBFrom\fR line includes the string \fB\(miREQUEST@\fR, or
256 if a \fBPrecedence:\fR \fBbulk\fR \fBor\fR \fBPrecedence:\fR \fBjunk\fR line is
257 included in the header.
260 \fBvacation\fR will also not respond to mail from either \fBpostmaster\fR or
261 \fBMailer-Daemon\fR.
264 In addition to the above criteria, if a \fB\&.vacation.filter\fR file exists,
265 it is used to constrain further the set of addresses to which a reply is sent.
266 Each line in that file should be either a domain name, an email address, a
267 negated domain name or a negated email address. A negated line starts with the
268 single character \fB!\fR.
271 Each line is compared in the order listed to the sender address. A line
272 containing an email address matches if the sender address is exactly the same
273 except for case, which is ignored.  A line containing a domain name matches if
274 the sender address is \fIsomething\fR\fB@\fR\fIdomain-name\fR or
275 \fIsomething\fR\fB@\fR\fIsomething.domain-name\fR. A reply is sent if the first
276 match is an entry that is not negated. If the first match is a negated entry,
277 or if no lines match, then no reply is sent.
280 A sample filter file might look like the following:
282 .in +2
284 !host.subdomain.sun.com
285 sun.com
286 !wife@mydomain.com
287 mydomain.com
288 onefriend@hisisp.com
289 anotherfriend@herisp.com
291 .in -2
296 Blank lines and lines starting with  "\fB#\fR" are ignored.
297 .SH FILES
300 \fB~/.forward\fR
303 \fB~/.vacation.filter\fR
306 \fB~/.vacation.msg\fR
309 A list of senders is kept in the \fBdbm\fR format files \fB\&.vacation.pag\fR
310 and \fB\&.vacation.dir\fR in your home directory. These files are \fBdbm\fR
311 files and cannot be viewed directly with text editors.
312 .SH SEE ALSO
315 \fBvi\fR(1), \fBsendmail\fR(1M), \fBdbm\fR(3UCB), \fBgetusershell\fR(3C),
316 \fBaliases\fR(4), \fBshells\fR(4), \fBattributes\fR(5)