Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!husc6!encore!houligan!epeterso From: epeterso@houligan.encore.com (Eric Peterson) Newsgroups: comp.unix.questions Subject: Re: Is there a way to forward and keep mail? Keywords: mail .forward Message-ID: Date: 18 Oct 90 16:27:00 GMT References: <303@oscar.UUCP> Sender: news@Encore.COM Reply-To: epeterson@encore.com (Eric Peterson) Organization: Encore Computer Corporation, Diagnostic Development Lines: 35 News-Software: NN 6.4.11 mbonner@oscar.UUCP (Matt Bonner) writes: | Okay, that subject isn't very well worded. What I want to do | is have incoming mail go to two places. For example, someone | mails me at this address (mbonner@oscar.hns.hac.com), and one | copy of the message will stay here, and one copy will go to | another account. This can be done quite easily if you're on a site that uses Sendmail, one of the most common mail transport agents in the Unix world. Simply create a file called ".forward" in your home directory that contains the following line (including the quotation marks): "| tee /usr/spool/mail/mbonner | mail other-acct@host.domain" This will do exactly what you want -- save a copy of your incoming message to your normal incoming mailbox as well as send a copy of that mail to another account. You can have Sendmail feed each message you get into any program you want using this construct. Just insert your favorite Unix command in place of the "tee ... | mail ..." part above. Just make sure that you put quotation marks around it and that the first character inside the quotes is "|". Apparently there are some versions of Sendmail that do not support this feature, although I don't know enough about Sendmail to be able to tell you by version number whether or not it would work. The best way to find out is to try it. Eric -- Eric Peterson <> epeterson@encore.com <> uunet!encore!epeterson Encore Computer Corp. * Ft. Lauderdale, Florida * (305) 587-2900 x 5208 Why did Constantinople get the works? Gung'f abobql'f ohfvarff ohg gur Ghexf.