Skip to end of metadata
Go to start of metadata

Forwarding NCMIR E-mail to an External E-mail Account


Submit a JIRA Ticket

Submit a JIRA Ticket assigned to Vicky Rowley.

Be sure to include:

  • Your current NCMIR e-mail address. (username@ncmir.ucsd.edu)
  • The e-mail address you would like your NCMIR e-mail to be forwarded to. (myoutsideemail@gmail.com)
  • Whether or not you would like to have a copy of your mail saved on the NCMIR server. (recommended)

Setup a Mail ".forward" File on the Mail Server

SSH into the NCMIR Mail Server

ssh username@mail.ncmir.ucsd.edu

Create a file called ".forward" in your home directory

vi .forward

If you would like a copy of your e-mail saved on the NCMIR mail servers (recommended), use the exact following syntax:

\username@mail.ncmir.ucsd.edu, myexternalemail@gmail.com

If you would not like a copy of your e-mail to be saved on the NCMIR mail servers, use the following syntax:

myexternalemail@gmail.com

Save the file and quit vi.

ESC :wq

Change the permission of the file

chmod 0664 .forward

Exit out of SSH. That's it!
Send a test message to your NCMIR e-mail address to verify the changes.


Create a procmail filter

To forward e-mail,
create a .procmailrc file in the users home directory.

.procmailrc
DEFAULT=/export/mail/username/   (make sure the trailing slash is here to specify maildir)
MAILDIR=/export/mail/username
LOG=$HOME/procmail.log

#  Anything from gmail.com domain will go in .gmail folder
:0:
\* ^From:.*@gmail.com
.gmail/

#  Anything you get is received normally and *also* forwarded to address@other.domain - the 'c' in ':0c' makes it keep a copy
:0c :
! address@other.domain

#rule for forwarding mail with "Warning" in the subject to another address 'c' means keep a copy, message is then auto-filed into Projects.SysOps.Alerts
# dopushmail is	for turning email into a pager type alert on an	iPhone
:0
* ^Subject:(.*)Warning(.*)
{
   :0c
   ! <username>@dopushmail.com
   :0
   .Projects.SysOps.Alerts/
}