13118b82aSMike Pritchard.\" Copyright (c) 1996 23118b82aSMike Pritchard.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved. 33118b82aSMike Pritchard.\" 43118b82aSMike Pritchard.\" Redistribution and use in source and binary forms, with or without 53118b82aSMike Pritchard.\" modification, are permitted provided that the following conditions 63118b82aSMike Pritchard.\" are met: 73118b82aSMike Pritchard.\" 1. Redistributions of source code must retain the above copyright 83118b82aSMike Pritchard.\" notice, this list of conditions and the following disclaimer. 93118b82aSMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright 103118b82aSMike Pritchard.\" notice, this list of conditions and the following disclaimer in the 113118b82aSMike Pritchard.\" documentation and/or other materials provided with the distribution. 123118b82aSMike Pritchard.\" 3. All advertising materials mentioning features or use of this software 133118b82aSMike Pritchard.\" must display the following acknowledgement: 143118b82aSMike Pritchard.\" This product includes software developed by Mike Pritchard and 153118b82aSMike Pritchard.\" contributors. 163118b82aSMike Pritchard.\" 4. Neither the name of the author nor the names of its contributors 173118b82aSMike Pritchard.\" may be used to endorse or promote products derived from this software 183118b82aSMike Pritchard.\" without specific prior written permission. 193118b82aSMike Pritchard.\" 203118b82aSMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 213118b82aSMike Pritchard.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 223118b82aSMike Pritchard.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 233118b82aSMike Pritchard.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 243118b82aSMike Pritchard.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 253118b82aSMike Pritchard.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 263118b82aSMike Pritchard.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 273118b82aSMike Pritchard.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 283118b82aSMike Pritchard.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 293118b82aSMike Pritchard.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 303118b82aSMike Pritchard.\" SUCH DAMAGE. 313118b82aSMike Pritchard.\" 322312341fSJoseph Koshy.\" $Id: forward.5,v 1.2 1997/03/07 03:28:00 jmg Exp $ 33ac5afce1SJohn-Mark Gurney.\" 343118b82aSMike Pritchard.Dd July 2, 1996 353118b82aSMike Pritchard.Dt FORWARD 5 363118b82aSMike Pritchard.Os 373118b82aSMike Pritchard.Sh NAME 383118b82aSMike Pritchard.Nm forward 393118b82aSMike Pritchard.Nd mail forwarding instructions 403118b82aSMike Pritchard.Sh DESCRIPTION 413118b82aSMike PritchardThe 423118b82aSMike Pritchard.Nm .forward 433118b82aSMike Pritchardfile contains a list of mail addresses or programs 443118b82aSMike Pritchardthat the user's mail should be redirected to. If the 453118b82aSMike Pritchardfile is not present, then no mail forwarding will be done. 463118b82aSMike PritchardMail may also be forwarded as the standard input to a program 473118b82aSMike Pritchardby prefixing the line 483118b82aSMike Pritchardwith the normal shell pipe symbol (|). If arguments 493118b82aSMike Pritchardare to be passed to the command, then the entire line 503118b82aSMike Pritchardshould be enclosed in quotes. For security reasons, the 513118b82aSMike Pritchard.Nm .forward 523118b82aSMike Pritchardfile must be owned by the user the mail is being sent to, 533118b82aSMike Pritchardor by root, and the user's shell must be listed in 543118b82aSMike Pritchard.Pa /etc/shells . 553118b82aSMike Pritchard.Pp 563118b82aSMike PritchardFor example, if a 573118b82aSMike Pritchard.Nm .forward 583118b82aSMike Pritchardfile contained the following lines: 593118b82aSMike Pritchard.Bd -literal -offset indent 603118b82aSMike Pritchardnobody@FreeBSD.org 613118b82aSMike Pritchard"|/usr/bin/vacation nobody" 623118b82aSMike Pritchard.Ed 633118b82aSMike Pritchard.Pp 643118b82aSMike PritchardMail would be forwarded to 653118b82aSMike Pritchard.Ar nobody@FreeBSD.org 663118b82aSMike Pritchardand to the program 673118b82aSMike Pritchard.Pa /usr/bin/vacation 683118b82aSMike Pritchardwith the single argument 693118b82aSMike Pritchard.Ar nobody . 702312341fSJoseph Koshy.Pp 712312341fSJoseph KoshyIf a local user address is prefixed with a backslash 722312341fSJoseph Koshycharacter, mail is delivered directly to the user's 732312341fSJoseph Koshymail spool file, bypassing further redirection. 742312341fSJoseph Koshy.Pp 752312341fSJoseph KoshyFor example, if user chris had a 762312341fSJoseph Koshy.Nm .forward 772312341fSJoseph Koshyfile containing the following lines: 782312341fSJoseph Koshy.Bd -literal -offset indent 792312341fSJoseph Koshychris@otherhost 802312341fSJoseph Koshy\echris 812312341fSJoseph Koshy.Ed 822312341fSJoseph Koshy.Pp 832312341fSJoseph KoshyOne copy of mail would be forwarded to 842312341fSJoseph Koshy.Ar chris@otherhost 852312341fSJoseph Koshyand another copy would be retained as mail for local user chris. 863118b82aSMike Pritchard 873118b82aSMike Pritchard.Sh FILES 883118b82aSMike Pritchard.Bl -tag -width $HOME/.forward -compact 893118b82aSMike Pritchard.It Pa $HOME/.forward 903118b82aSMike Pritchard 913118b82aSMike PritchardThe user's forwarding instructions. 923118b82aSMike Pritchard.El 933118b82aSMike Pritchard.Sh SEE ALSO 942312341fSJoseph Koshy.Xr aliases 5 , 953118b82aSMike Pritchard.Xr mailaddr 7 , 963118b82aSMike Pritchard.Xr sendmail 8 97