'\" te .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .\" 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. .\" 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. .\" 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] .TH VACATION 1 "June 20, 2021" .SH NAME vacation \- reply to mail automatically .SH SYNOPSIS .nf \fBvacation\fR [\fB-I\fR] .fi .LP .nf \fBvacation\fR [\fB-a\fR \fIalias\fR] [\fB-e\fR \fIfilter_file\fR] [\fB-f\fR \fIdatabase_file\fR] [\fB-j\fR] [\fB-m\fR \fImessage_file\fR] [\fB-s\fR \fIsender\fR] [\fB-t\fR\fIN\fR] \fIusername\fR .fi .LP .nf \fBvacation\fR [\fB-f database_file\fR] \fB-l\fR .fi .SH DESCRIPTION The \fBvacation\fR utility automatically replies to incoming mail. .SS "Installation" The installation consists of an interactive program which sets up \fBvacation\fR's basic configuration. .sp .LP To install \fBvacation\fR, type it with no arguments on the command line. The program creates a \fB\&.vacation.msg\fR file, which contains the message that is automatically sent to all senders when \fBvacation\fR is enabled, and starts an editor for you to modify the message. (See USAGE section.) Which editor is invoked is determined by the \fBVISUAL\fR or \fBEDITOR\fR environment variable, or \fBvi\fR(1) if neither of those environment variables are set. .sp .LP A \fB\&.forward\fR file is also created if one does not exist in your home directory. Once created, the \fB\&.forward\fR file will contain a line of the form: .sp .LP One copy of an incoming message is sent to the \fIusername\fR and another copy is piped into \fBvacation\fR: .sp .in +2 .nf \e\fIusername\fR, "|/usr/bin/vacation \fIusername\fR" .fi .in -2 .sp .LP If a \fB\&.forward\fR file is present in your home directory, it will ask whether you want to remove it, which disables \fBvacation\fR and ends the installation. .sp .LP The program automatically creates \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR, which contain a list of senders when \fBvacation\fR is enabled. .SS "Activation and Deactivation" The presence of the \fB\&.forward\fR file determines whether or not \fBvacation\fR is disabled or enabled. To disable \fBvacation\fR, remove the \fB\&.forward\fR file, or move it to a new name. .SS "Initialization" The \fB-I\fR option clears the \fBvacation\fR log files, \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR, erasing the list of senders from a previous \fBvacation\fR session. (See OPTIONS section.) .SS "Additional Configuration" \fBvacation\fR provides configuration options that are not part of the installation, these being \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR, \fB-s\fR, and \fB-t\fR. (See OPTIONS section.) .SS "Reporting" \fBvacation\fR provides a reporting option, \fB-l\fR. See \fBOPTIONS\fR. .SH OPTIONS The following options are supported: .sp .ne 2 .na \fB\fB-I\fR\fR .ad .RS 6n Initializes the \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR files and enables \fBvacation\fR. If the \fB-I\fR flag is not specified, and a \fIuser\fR argument is given, \fBvacation\fR reads the first line from the standard input (for a \fBFrom:\fR line, no colon). If absent, it produces an error message. .RE .sp .LP Options \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR, \fB-s\fR, and \fB-t\fR are configuration options to be used in conjunction with \fBvacation\fR in the \fB\&.forward\fR file, not on the command line. For example, .sp .in +2 .nf \e\fIusername\fR, "|/usr/bin/vacation \fB-t1m\fR \fIusername\fR" .fi .in -2 .sp .LP repeats replies to the sender every minute. .sp .ne 2 .na \fB\fB-a\fR \fIalias\fR\fR .ad .RS 20n Indicates that \fIalias\fR is one of the valid aliases for the user running \fBvacation\fR, so that mail addressed to that alias generates a reply. .RE .sp .ne 2 .na \fB\fB-e\fR \fIfilter_file\fR\fR .ad .RS 20n Uses \fIfilter_file\fR instead of \fB\&.vacation.filter\fR as the source of the domain and email address filters. .RE .sp .ne 2 .na \fB\fB-f\fR \fIdatabase_file\fR\fR .ad .RS 20n Uses \fIdatabase_file\fR instead of \fB\&.vacation\fR as the base name for the database file. .RE .sp .ne 2 .na \fB\fB-j\fR\fR .ad .RS 20n Does not check whether the recipient appears in the \fBTo:\fR or the \fBCc:\fR line. Warning: use of this option can result in vacation replies being sent to mailing lists and other inappropriate places; its use is therefore strongly discouraged. .RE .sp .ne 2 .na \fB\fB-m\fR \fImessage_file\fR\fR .ad .RS 20n Uses \fB~/\fImessage_file\fR\fR as the message to send for the reply instead of \fB~/.vacation.msg\fR. \fImessage_file\fR is a relative path to the desired vacation message file. To prevent directory/file "not found" errors, \fImessage_file\fR should be on the same disk partition as \fB~/.forward\fR. .RE .sp .ne 2 .na \fB\fB-s\fR \fIsender\fR\fR .ad .RS 20n Replies to \fIsender\fR instead of the value read from the UNIX \fBFrom\fR line of the incoming message. .RE .sp .ne 2 .na \fB\fB-t\fR\fIN\fR\fR .ad .RS 20n Changes the interval between repeat replies to the same sender. The default is 1 week. A trailing \fBs\fR, \fBm\fR, \fBh\fR, \fBd\fR, or \fBw\fR scales \fIN\fR to seconds, minutes, hours, days, or weeks, respectively. .RE .sp .LP The \fB-l\fR option is neither for initialization nor configuration, but for reporting. The \fB-f\fR option can also be used in conjunction with \fB-l\fR. .sp .ne 2 .na \fB\fB-l\fR\fR .ad .RS 6n Lists the addresses to which a reply has been sent since the last invocation of \fBvacation -I\fR, along with a date and time stamp. .RE .SH USAGE \fB\&.vacation.msg\fR should include a header with at least a \fBSubject:\fR line (it should not include a \fBTo:\fR line). For example: .sp .in +2 .nf \fBSubject: I am on vacation I am on vacation until July 22. If you have something urgent, please contact Joe Jones (jones@fB0). --John\fR .fi .in -2 .sp .sp .LP If the string \fB$SUBJECT\fR appears in the \fB\&.vacation.msg\fR file, it is replaced with the subject of the original message when the reply is sent. Thus, a \fB\&.vacation.msg\fR file such as .sp .in +2 .nf \fBSubject: I am on vacation I am on vacation until July 22. Your mail regarding "$SUBJECT" will be read when I return. If you have something urgent, please contact Joe Jones (jones@fB0). --John\fR .fi .in -2 .sp .sp .LP will include the subject of the message in the reply. .sp .LP No message is sent if the \fBTo:\fR or the \fBCc:\fR line does not list the user to whom the original message was sent or one of a number of aliases for them, if the initial \fBFrom\fR line includes the string \fB\(miREQUEST@\fR, or if a \fBPrecedence:\fR \fBbulk\fR \fBor\fR \fBPrecedence:\fR \fBjunk\fR line is included in the header. .sp .LP \fBvacation\fR will also not respond to mail from either \fBpostmaster\fR or \fBMailer-Daemon\fR. .sp .LP In addition to the above criteria, if a \fB\&.vacation.filter\fR file exists, it is used to constrain further the set of addresses to which a reply is sent. Each line in that file should be either a domain name, an email address, a negated domain name or a negated email address. A negated line starts with the single character \fB!\fR. .sp .LP Each line is compared in the order listed to the sender address. A line containing an email address matches if the sender address is exactly the same except for case, which is ignored. A line containing a domain name matches if the sender address is \fIsomething\fR\fB@\fR\fIdomain-name\fR or \fIsomething\fR\fB@\fR\fIsomething.domain-name\fR. A reply is sent if the first match is an entry that is not negated. If the first match is a negated entry, or if no lines match, then no reply is sent. .sp .LP A sample filter file might look like the following: .sp .in +2 .nf !host.subdomain.sun.com sun.com !wife@mydomain.com mydomain.com onefriend@hisisp.com anotherfriend@herisp.com .fi .in -2 .sp .sp .LP Blank lines and lines starting with "\fB#\fR" are ignored. .SH FILES \fB~/.forward\fR .sp .LP \fB~/.vacation.filter\fR .sp .LP \fB~/.vacation.msg\fR .sp .LP A list of senders is kept in the \fBdbm\fR format files \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR in your home directory. These files are \fBdbm\fR files and cannot be viewed directly with text editors. .SH SEE ALSO \fBvi\fR(1), \fBsendmail\fR(1M), \fBgetusershell\fR(3C), \fBaliases\fR(4), \fBshells\fR(4), \fBattributes\fR(5)