Email Forwarding

 Setting up forwarding with .forward

Mail forwarding is handled by the file .forward in your home directory. To start forwarding your mail, create this file, using any text editor and insert entries according to the following examples.

Assume your username at the IAS is ezeno, then to forward to your account elea@uom.gr and keep a local copy, you would use:

\ezeno, elea@uom.gr

The backslash(\) is used to "escape" the name that follows. This tells the mail program to deliver the message locally.
To forward your mail to the local account plato and still keep a copy for ezeno, you would use:

\ezeno, plato

To forward only to elea@uom.gr you would use:

elea@uom.gr

 

You can also filter the email before forwarding (to remove possible SPAM.  This is done with an exim filter.

 


Setting up forwarding with Horde

To set up forwarding with Horde Webmail:

  1. Login to http://mail.math.ias.edu
  2. In the left-hand column, under Mail, click on Filters
  3. Then click on Forward
  4. Type in the forwarding address next to the box "Address(es) to forward to:"
  5. If you want to keep a copy in your IAS mailbox, check off "Keep a copy of messages in this account?"

 

Setting up forwarding with dovecot

To set up forwarding with dovecot:

  1. Edit or create the file .dovecot-sieve
  2. Add the following lines: If you want to forward all mail without keeping a copy here:
    if true {
         redirect "elea@uom.gr";
    }
    
    

    If you want to forward all mail and keep a copy here:

    if true {
         redirect "elea@uom.gr";
         keep;
         stop;
    }
    
    

Setting up forwarding with procmail

To set up forwarding with procmail:

  1. Edit your .procmailrc file located in the root of your home directory
  2. Add the following lines: If you want to forward all mail without keeping a copy here:
    :0
    ! elea@uom.gr
    

    If you want to forward all mail and keep a copy here:

    :0c
    ! elea@uom.gr
    

The advantage of using .procmailrc over .forward is that mail is filtered first before forwarding takes place, eliminating forwarding of unwanted mail.


Dynamic Forwarding

.forward file may also be used to send your mail to an application for further processing.
This is the case with the vacation program that notifies senders when you are away from your email.

procmailalso works in a similar way, forwarding your mail to the procmail program for processing.
Procmail may be used to file and filter your mail according to several search criteria.