1.\" $NetBSD: vacation.1,v 1.33 2023/04/11 10:34:52 hauke 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. 175.Pp 176No messages from 177.Dq ???-REQUEST , 178.Dq Postmaster , 179.Dq Tn UUCP , 180.Dq MAILER , 181or 182.Dq MAILER-DAEMON 183will be replied to (where these strings are 184case insensitive). 185.Pp 186No notification is sent if a 187.Dq Precedence: bulk 188.Dq Precedence: list 189.Dq Precedence: junk 190line or an 191.Dq Auto-Submitted: 192line with any qualifier except 193.Dq no 194are included in the mail headers. 195.Nm 196will include these headers in its response to avoid auto-responder loops. 197.Pp 198The people who have sent you messages are maintained as a 199.Xr db 3 200database in the file 201.Pa .vacation.db 202in your home directory. 203.Pp 204.Nm 205expects a file 206.Pa .vacation.msg , 207in your home directory containing a message to be sent back to each 208sender. 209It should be an entire message (including headers). 210If the message contains the string 211.Dv $SUBJECT 212then it will will be replaced with the subject of the original message. 213For example, it might contain: 214.Pp 215.Bd -literal -offset indent -compact 216From: eric@CS.Berkeley.EDU (Eric Allman) 217Subject: I am on vacation 218Delivered-By-The-Graces-Of: The Vacation program 219 220I am on vacation until July 22. 221Your mail regarding "$SUBJECT" will be read when I return. 222If you have something urgent, please contact Keith Bostic 223<bostic@CS.Berkeley.EDU>. 224--eric 225.Ed 226.Pp 227.Nm 228reads the first line from the standard input for a 229.Ux 230.Dq From 231line to determine the sender. 232.Xr sendmail 1 233includes this 234.Dq From 235line automatically. 236.Pp 237Fatal errors, such as calling 238.Nm 239with incorrect arguments, or with non-existent 240.Ar login Ns Ar s , 241are logged in the system log file, using 242.Xr syslog 3 . 243.Sh FILES 244.Bl -tag -width "vacation.dirxxx" -compact 245.It Pa ~/.vacation.db 246database file 247.It Pa ~/.vacation.msg 248message to send 249.El 250.Sh SEE ALSO 251.Xr sendmail 1 , 252.Xr syslog 3 253.Pp 254RFC 2076 , 255RFC 3834 256.Sh HISTORY 257The 258.Nm 259command appeared in 260.Bx 4.3 . 261.Sh BUGS 262Adding 263.Fl T Ar A 264or 265.Fl T Ar D 266should only be done for misconfigured or non-compliant MTAs. 267Doing so may auto-respond to messages that were not supposed to be replied to. 268