1*84e9c4d0Snjoly.\" $NetBSD: forward.5,v 1.3 2013/07/09 09:41:30 njoly Exp $ 2599cc15cSrtr.\" 3599cc15cSrtr.\" Copyright (c) 1996 4599cc15cSrtr.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved. 5599cc15cSrtr.\" 6599cc15cSrtr.\" Redistribution and use in source and binary forms, with or without 7599cc15cSrtr.\" modification, are permitted provided that the following conditions 8599cc15cSrtr.\" are met: 9599cc15cSrtr.\" 1. Redistributions of source code must retain the above copyright 10599cc15cSrtr.\" notice, this list of conditions and the following disclaimer. 11599cc15cSrtr.\" 2. Redistributions in binary form must reproduce the above copyright 12599cc15cSrtr.\" notice, this list of conditions and the following disclaimer in the 13599cc15cSrtr.\" documentation and/or other materials provided with the distribution. 14599cc15cSrtr.\" 3. All advertising materials mentioning features or use of this software 15599cc15cSrtr.\" must display the following acknowledgement: 16599cc15cSrtr.\" This product includes software developed by Mike Pritchard and 17599cc15cSrtr.\" contributors. 18599cc15cSrtr.\" 4. Neither the name of the author nor the names of its contributors 19599cc15cSrtr.\" may be used to endorse or promote products derived from this software 20599cc15cSrtr.\" without specific prior written permission. 21599cc15cSrtr.\" 22599cc15cSrtr.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 23599cc15cSrtr.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24599cc15cSrtr.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25599cc15cSrtr.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 26599cc15cSrtr.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27599cc15cSrtr.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28599cc15cSrtr.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29599cc15cSrtr.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30599cc15cSrtr.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31599cc15cSrtr.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32599cc15cSrtr.\" SUCH DAMAGE. 33599cc15cSrtr.\" 34599cc15cSrtr.\" $FreeBSD: /repoman/r/ncvs/src/share/man/man5/forward.5,v 1.8 2004/07/03 18:29:22 ru Exp $ 35599cc15cSrtr.\" 36599cc15cSrtr.Dd July 2, 1996 37599cc15cSrtr.Dt FORWARD 5 38599cc15cSrtr.Os 39599cc15cSrtr.Sh NAME 40599cc15cSrtr.Nm forward 41599cc15cSrtr.Nd mail forwarding instructions 42599cc15cSrtr.Sh DESCRIPTION 43599cc15cSrtrThe 44599cc15cSrtr.Nm .forward 45599cc15cSrtrfile contains a list of mail addresses or programs 46599cc15cSrtrthat the user's mail should be redirected to. 47599cc15cSrtrIf the 48599cc15cSrtrfile is not present, then no mail forwarding will be done. 49599cc15cSrtrMail may also be forwarded as the standard input to a program 50599cc15cSrtrby prefixing the line 51599cc15cSrtrwith the normal shell pipe symbol (|). 52599cc15cSrtrIf arguments 53599cc15cSrtrare to be passed to the command, then the entire line 54599cc15cSrtrshould be enclosed in quotes. 55599cc15cSrtrFor security reasons, the 56599cc15cSrtr.Nm .forward 57599cc15cSrtrfile must be owned by the user the mail is being sent to, 58599cc15cSrtror by root, and the user's shell must be listed in 59599cc15cSrtr.Pa /etc/shells . 60599cc15cSrtr.Pp 61599cc15cSrtrFor example, if a 62599cc15cSrtr.Nm .forward 63599cc15cSrtrfile contained the following lines: 64599cc15cSrtr.Bd -literal -offset indent 65f08f09f7Spookanobody@NetBSD.org 66599cc15cSrtr"|/usr/bin/vacation nobody" 67599cc15cSrtr.Ed 68599cc15cSrtr.Pp 69599cc15cSrtrMail would be forwarded to 70f08f09f7Spooka.Aq nobody@NetBSD.org 71599cc15cSrtrand to the program 72599cc15cSrtr.Pa /usr/bin/vacation 73599cc15cSrtrwith the single argument 74599cc15cSrtr.Ar nobody . 75599cc15cSrtr.Pp 76599cc15cSrtrIf a local user address is prefixed with a backslash 77599cc15cSrtrcharacter, mail is delivered directly to the user's 78599cc15cSrtrmail spool file, bypassing further redirection. 79599cc15cSrtr.Pp 80599cc15cSrtrFor example, if user chris had a 81599cc15cSrtr.Nm .forward 82599cc15cSrtrfile containing the following lines: 83599cc15cSrtr.Bd -literal -offset indent 84599cc15cSrtrchris@otherhost 85599cc15cSrtr\echris 86599cc15cSrtr.Ed 87599cc15cSrtr.Pp 88599cc15cSrtrOne copy of mail would be forwarded to 89599cc15cSrtr.Ar chris@otherhost 90599cc15cSrtrand another copy would be retained as mail for local user chris. 91599cc15cSrtr.Sh FILES 92599cc15cSrtr.Bl -tag -width $HOME/.forward -compact 93599cc15cSrtr.It Pa $HOME/.forward 94599cc15cSrtrThe user's forwarding instructions. 95599cc15cSrtr.El 96599cc15cSrtr.Sh SEE ALSO 97*84e9c4d0Snjoly.Xr sendmail 1 , 98599cc15cSrtr.Xr aliases 5 , 99*84e9c4d0Snjoly.Xr mailaddr 7 100