Forwarding email

From NCEAS Knowledge Base

Jump to: navigation, search

Mail forwarding using .forward files(*)

Creating a .forward file

Login to jupiter to create a .forward file in your home directory. This file should contain, as the first and only line, the address where the mail should be forwarded. For example, "yourname@department.university.edu". You can create the .forward file with your favorite text editor, or you can create it with an echo command like this:

   echo 'yourname@department.university.edu' > .forward 

This will send the line "yourname@department.university.edu" into the file called .forward, thus creating a .forward file for you. As long as this file exists in your account space, all mail sent to this account will automatically go to yourname@department.university.edu.

Using a .forward to send mail to multiple accounts

If you put multiple addresses in a .forward file, a copy will be sent to each.

   yourname@department.university.edu, account@gmail.com, name@somewhere.else.org

If you want to keep a copy of each message in the original account without causing a .forward infinite loop, put a backslash in front of the account name. It's best to use a text editor for this. Otherwise you need to use special syntax to put a backslash in the .forward file.

   \starwars, yourname@department.university.edu

Warnings about mail loops

You must make sure to avoid creating loops in the mail transmission flow. If you create a .forward file that points to itself (or points to a .forward file that points back to the first one, creating a ping-pong effect), you obviously will not recieve the mail.

   Don't do this.
   \starwars, "|mail dvader" 

The intention here is to retain a copy for yourself AND mail a duplicate to the dvader account. At first this method appears to work okay, however if there is any type of problem delivering to dvader, the returned mail will keep bouncing and growing indefinitely.

Again, the proper way to do it is:

   \starwars, dvader

(*) copied from Academic Computing Services at UCSD and slightly modified to reflect our email services
http://www-acs.ucsd.edu/email/dotforward.php

Personal tools