1vacation(1) User Commands vacation(1)
2
3
4
6 vacation - reply to mail automatically
7
9 vacation [-I]
10
11
12 vacation [-a alias] [-e filter_file] [-f database_file]
13 [-j] [-m message_file] [-s sender] [-tN] username
14
15
16 vacation [-f database_file] -l
17
18
20 The vacation utility automatically replies to incoming mail.
21
22 Installation
23 The installation consists of an interactive program which sets up vaca‐
24 tion's basic configuration.
25
26
27 To install vacation, type it with no arguments on the command line.
28 The program creates a .vacation.msg file, which contains the message
29 that is automatically sent to all senders when vacation is enabled, and
30 starts an editor for you to modify the message. (See USAGE section.)
31 Which editor is invoked is determined by the VISUAL or EDITOR environ‐
32 ment variable, or vi(1) if neither of those environment variables are
33 set.
34
35
36 A .forward file is also created if one does not exist in your home
37 directory. Once created, the .forward file will contain a line of the
38 form:
39
40
41 One copy of an incoming message is sent to the username and another
42 copy is piped into vacation:
43
44 \username, "|/usr/bin/vacation username"
45
46
47
48 If a .forward file is present in your home directory, it will ask
49 whether you want to remove it, which disables vacation and ends the
50 installation.
51
52
53 The program automatically creates .vacation.pag and .vacation.dir,
54 which contain a list of senders when vacation is enabled.
55
56 Activation and Deactivation
57 The presence of the .forward file determines whether or not vacation is
58 disabled or enabled. To disable vacation, remove the .forward file, or
59 move it to a new name.
60
61 Initialization
62 The -I option clears the vacation log files, .vacation.pag and .vaca‐
63 tion.dir, erasing the list of senders from a previous vacation session.
64 (See OPTIONS section.)
65
66 Additional Configuration
67 vacation provides configuration options that are not part of the
68 installation, these being -a, -e, -f, -j, -m, -s, and -t. (See OPTIONS
69 section.)
70
71 Reporting
72 vacation provides a reporting option, -l. See OPTIONS.
73
75 The following options are supported:
76
77 -I Initializes the .vacation.pag and .vacation.dir files and enables
78 vacation. If the -I flag is not specified, and a user argument is
79 given, vacation reads the first line from the standard input (for
80 a From: line, no colon). If absent, it produces an error message.
81
82
83
84 Options -a, -e, -f, -j, -m, -s, and -t are configuration options to be
85 used in conjunction with vacation in the .forward file, not on the com‐
86 mand line. For example,
87
88 \username, "|/usr/bin/vacation -t1m username"
89
90
91
92 repeats replies to the sender every minute.
93
94 -a alias Indicates that alias is one of the valid aliases
95 for the user running vacation, so that mail
96 addressed to that alias generates a reply.
97
98
99 -e filter_file Uses filter_file instead of .vacation.filter as the
100 source of the domain and email address filters.
101
102
103 -f database_file Uses database_file instead of .vacation as the base
104 name for the database file.
105
106
107 -j Does not check whether the recipient appears in the
108 To: or the Cc: line. Warning: use of this option
109 can result in vacation replies being sent to mail‐
110 ing lists and other inappropriate places; its use
111 is therefore strongly discouraged.
112
113
114 -m message_file Uses ~/message_file as the message to send for the
115 reply instead of ~/.vacation.msg. message_file is a
116 relative path to the desired vacation message file.
117 To prevent directory/file "not found" errors, mes‐
118 sage_file should be on the same disk partition as
119 ~/.forward.
120
121
122 -s sender Replies to sender instead of the value read from
123 the UNIX From line of the incoming message.
124
125
126 -tN Changes the interval between repeat replies to the
127 same sender. The default is 1 week. A trailing s,
128 m, h, d, or w scales N to seconds, minutes, hours,
129 days, or weeks, respectively.
130
131
132
133 The -l option is neither for initialization nor configuration., but for
134 reporting. The -foption can also be used in conjunction with the -l.
135
136 -l Lists the addresses to which a reply has been sent since the
137 last invocation of vacation -I, along with a date and time stamp.
138
139
141 .vacation.msg should include a header with at least a Subject: line (it
142 should not include a To: line). For example:
143
144 Subject: I am on vacation
145 I am on vacation until July 22. If you have something urgent,
146 please contact Joe Jones (jones@fB0).
147 --John
148
149
150
151
152 If the string $SUBJECT appears in the .vacation.msg file, it is
153 replaced with the subject of the original message when the reply is
154 sent. Thus, a .vacation.msg file such as
155
156 Subject: I am on vacation
157 I am on vacation until July 22.
158 Your mail regarding "$SUBJECT" will be read when I return.
159 If you have something urgent, please contact
160 Joe Jones (jones@fB0).
161 --John
162
163
164
165
166 will include the subject of the message in the reply.
167
168
169 No message is sent if the To: or the Cc: line does not list the user to
170 whom the original message was sent or one of a number of aliases for
171 them, if the initial From line includes the string −REQUEST@, or if a
172 Precedence: bulk or Precedence: junk line is included in the header.
173
174
175 vacation will also not respond to mail from either postmaster or
176 Mailer-Daemon.
177
178
179 In addition to the above criteria, if a .vacation.filter file exists,
180 it is used to constrain further the set of addresses to which a reply
181 is sent. Each line in that file should be either a domain name, an
182 email address, a negated domain name or a negated email address. A
183 negated line starts with the single character !.
184
185
186 Each line is compared in the order listed to the sender address. A line
187 containing an email address matches if the sender address is exactly
188 the same except for case, which is ignored. A line containing a domain
189 name matches if the sender address is something@domain-name or some‐
190 thing@something.domain-name. A reply is sent if the first match is an
191 entry that is not negated. If the first match is a negated entry, or if
192 no lines match, then no reply is sent.
193
194
195 A sample filter file might look like the following:
196
197 !host.subdomain.sun.com
198 sun.com
199 !wife@mydomain.com
200 mydomain.com
201 onefriend@hisisp.com
202 anotherfriend@herisp.com
203
204
205
206
207 Blank lines and lines starting with "#" are ignored.
208
210 ~/.forward
211
212
213 ~/.vacation.filter
214
215
216 ~/.vacation.msg
217
218
219 A list of senders is kept in the dbm format files .vacation.pag and
220 .vacation.dir in your home directory. These files are dbm files and
221 cannot be viewed directly with text editors.
222
224 See attributes(5) for descriptions of the following attributes:
225
226
227
228
229 ┌─────────────────────────────┬─────────────────────────────┐
230 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
231 ├─────────────────────────────┼─────────────────────────────┤
232 │Availability │SUNWsndmu │
233 └─────────────────────────────┴─────────────────────────────┘
234
236 vi(1), sendmail(1M), dbm(3UCB), getusershell(3C), aliases(4),
237 shells(4), attributes(5)
238
239
240
241SunOS 5.11 20 Aug 2005 vacation(1)