1.\" $NetBSD: vacation.1,v 1.32 2019/05/06 06:56:07 wiz Exp $ 2.\" 3.\" Copyright (c) 1985, 1987, 1990, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)vacation.1 8.2 (Berkeley) 4/28/95 31.\" 32.Dd May 6, 2019 33.Dt VACATION 1 34.Os 35.Sh NAME 36.Nm vacation 37.Nd return 38.Dq I am not here 39indication 40.Sh SYNOPSIS 41.Nm 42.Fl dIi 43.Op Fl f Ar databasefile 44.Op Fl m Ar messagefile 45.Op Fl r Ar interval 46.Op Fl t Ar interval 47.Nm 48.Fl dj 49.Op Fl a Ar alias 50.Op Fl F Ar F|R|S 51.Op Fl f Ar databasefile 52.Op Fl m Ar messagefile 53.Op Fl s Ar sender 54.Op Fl T Ar A|D 55.Ar login 56.Sh DESCRIPTION 57.Nm 58returns a message to the sender of a message telling them that you 59are currently not reading your mail. 60The intended use is in a 61.Pa .forward 62file. 63For example, your 64.Pa .forward 65file might have: 66.Bd -literal -offset indent 67\eeric, "|/usr/bin/vacation -a allman eric" 68.Ed 69which would send messages to you (assuming your login name was eric) and 70reply to any messages for 71.Dq eric 72or 73.Dq allman . 74.Pp 75Available options: 76.Bl -tag -width Ds 77.It Fl a Ar alias 78Handle messages for 79.Ar alias 80in the same manner as those received for the user's 81login name. 82.It Fl d 83Turn debugging on; don't send an actual message, but print it on stdout. 84.It Fl f Ar database_file 85Use the specified 86.Ar database_file 87prefix and append 88.Dv \.db 89to it instead of 90.Dv $HOME/.vacation.db . 91.It Fl F Ar F|R|S 92Make 93.Nm 94additionally look in From: (F), Return-Path: (R), or Sender: (S) headers 95to determine the From: field. 96.It Fl i 97.It Fl I 98Initialize the vacation database files. 99It should be used before you modify your 100.Pa .forward 101file. 102.It Fl j 103Do not check if the recipient is present in the 104.Dv To: 105or 106.Dv Cc: 107lines. 108Usage of this option is strongly discouraged because it will result in 109.Nm 110replying to mailing lists or other inappropriate places (e.g., messages that 111you have been 112.Dv Bcc 113to). 114.It Fl m Ar message_file 115Use 116.Ar message_file 117instead of 118.Dv $HOME/.vacation.msg . 119.It Fl s Ar sender 120Reply to 121.Ar sender 122instead of the value read from the message. 123.It Fl r Ar interval 124.It Fl t Ar interval 125Set the reply interval to 126.Ar interval 127days. 128If the 129.Ar interval 130number is followed by 131.Dv w , 132.Dv d , 133.Dv h , 134.Dv m , 135or 136.Dv s 137then the number is interpreted as weeks, days, hours, minutes, or seconds 138respectively. 139The default 140.Ar interval 141is one week. 142An 143.Ar interval 144of 145.Dq 0 146means that 147a reply is sent to each message, and an interval of 148.Dq Li infinite 149(actually, any non-numeric character) will never send more than 150one reply. 151It should be noted that intervals of 152.Dq Li \&0 153are quite 154dangerous, as it allows mailers to get into 155.Dq I am on vacation 156loops. 157.It Fl T Ar A|D 158Make 159.Nm 160additionally look in Apparently-To: (A) or Delivered-To: (D) headers 161to determine the To: field. 162.El 163.Pp 164No message will be sent unless 165.Ar login 166(or an 167.Ar alias 168supplied using the 169.Fl a 170option) is part of either the 171.Dq To: 172or 173.Dq Cc: 174headers of the mail. 175No messages from 176.Dq ???-REQUEST , 177.Dq Postmaster , 178.Dq Tn UUCP , 179.Dq MAILER , 180or 181.Dq MAILER-DAEMON 182will be replied to (where these strings are 183case insensitive) nor is a notification sent if a 184.Dq Precedence: bulk 185.Dq Precedence: list 186or 187.Dq Precedence: junk 188line is included in the mail headers. 189The people who have sent you messages are maintained as a 190.Xr db 3 191database in the file 192.Pa .vacation.db 193in your home directory. 194.Pp 195.Nm 196expects a file 197.Pa .vacation.msg , 198in your home directory, containing a message to be sent back to each 199sender. 200It should be an entire message (including headers). 201If the message contains the string 202.Dv $SUBJECT 203then it will will be replaced with the subject of the original message. 204For example, it might contain: 205.Pp 206.Bd -literal -offset indent -compact 207From: eric@CS.Berkeley.EDU (Eric Allman) 208Subject: I am on vacation 209Delivered-By-The-Graces-Of: The Vacation program 210Precedence: bulk 211 212I am on vacation until July 22. 213Your mail regarding "$SUBJECT" will be read when I return. 214If you have something urgent, please contact Keith Bostic 215<bostic@CS.Berkeley.EDU>. 216--eric 217.Ed 218.Pp 219.Nm 220reads the first line from the standard input for a 221.Ux 222.Dq From 223line to determine the sender. 224.Xr sendmail 1 225includes this 226.Dq From 227line automatically. 228.Pp 229Fatal errors, such as calling 230.Nm 231with incorrect arguments, or with non-existent 232.Ar login Ns Ar s , 233are logged in the system log file, using 234.Xr syslog 3 . 235.Sh FILES 236.Bl -tag -width "vacation.dirxxx" -compact 237.It Pa ~/.vacation.db 238database file 239.It Pa ~/.vacation.msg 240message to send 241.El 242.Sh SEE ALSO 243.Xr sendmail 1 , 244.Xr syslog 3 245.Sh HISTORY 246The 247.Nm 248command appeared in 249.Bx 4.3 . 250.Sh BUGS 251Adding 252.Fl T Ar A 253or 254.Fl T Ar D 255should only be done for misconfigured or non-compliant MTAs. 256Doing so may auto-respond to messages that were not supposed to be replied to. 257