Is there a way to forward and keep mail?
Eric Peterson
epeterso at houligan.encore.com
Fri Oct 19 02:27:00 AEST 1990
mbonner at 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 at 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 at 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 at 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.
More information about the Comp.unix.questions
mailing list