Email forwarding: Difference between revisions

From YSTV Documentation Wiki
(Added a note to stop permissions SNAFUs in .forward files)
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==The Windows Way==
Email sent to YSTV accounts is primarily accessible using [[Webmail]], but you can receive it via other methods. The easiest method is [[Computing:How To Access Email Without Webmail|IMAP]] access, however some people prefer to forward their mail.  
1. Log in to a YSTV Windows machine as yourself.


2. Open up notepad.
Forwarding clones every email just before it reaches your Webmail mailbox - one copy proceeds to Webmail as normal, and a <code>.forward</code> file in your home directory tells the email system to send copies to any other email addresses you specify. To set this up, all you have to do is create the .forward file with the email address(es) you'd like to forward your mail to.


3. Enter your YSTV username, followed by additional email addresses to forward your mail to, with each on a new line, for example:
==On Windows==
  john.doe
# Log in to a YSTV Windows machine as yourself.
  jd500@york.ac.uk
# Open Notepad.
4. Do File->Save As...
# Enter your YSTV username, followed by any additional email addresses to forward your mail to on new lines, for example:
  john.smith
  js500@york.ac.uk
# Do ''File'' > ''Save As...''
# Enter <code>"H:\.forward"</code> (including the quotes and the .)
# Save the file
# Rejoice.


5. Enter "H:\.forward" (including the quotes)
==On Linux==
# Open up an SSH session to the [[web server]] (through PuTTY on Windows or a Terminal on Linux/Mac), using something like <code>ssh john.smith@ystv.co.uk</code> or entering ''john.smith@ystv.co.uk'' in the PuTTY Host Name field.
# Enter your password when prompted.
# Type <code>nano .forward</code> and hit Enter.
# Follow the instruction in step 3 above
# Press Ctrl-X and then hit Y to save and exit.
# Type <code>exit</code> to close the session.
# Rejoice.


6. Save the file
===A note for the Computing Team===
[[Exim]] gets upset if the .forward file isn't owned by the user and they won't get any mail. If the user creates their own .forward file it'll be fine, but if you create it for them, remember to
chown user:group .forward
once you're done. You'll also need to set permissions:
chmod 0600 .forward


7. Rejoice.
Mailboxes should be 0600, with the uid of the user, and any gid. The parent directory should have the execute flag set for the user, and the uid should be the user.


==The Linux Way==
1. Open up an SSH session to the webserver (through Putty on Windows or a terminal on Linux/Mac), using something like ssh john.doe@ystv.co.uk or entering john.doe@ystv.co.uk in the Putty Host Name field.


2. Enter your password when prompted.
[[Category:Email]]
 
[[Category:Tutorials]]
3. Type "nano .forward" (without the quotes) and hit enter.
 
4. Follow the instruction in step 3 above
 
5. Press Ctrl-X and then hit Y to save and exit.
 
6. Type exit to close the session.
 
7. Rejoice.
 
==A note for the Computing Team==
Exim gets upset if the .forward file isn't owned by the user and they won't get any mail. This won't be a problem logged in as that user, however using sudo/as root it will be, so remember to chown! Permissions should be mininal, 600 will do it.

Latest revision as of 09:08, 23 July 2021

Email sent to YSTV accounts is primarily accessible using Webmail, but you can receive it via other methods. The easiest method is IMAP access, however some people prefer to forward their mail.

Forwarding clones every email just before it reaches your Webmail mailbox - one copy proceeds to Webmail as normal, and a .forward file in your home directory tells the email system to send copies to any other email addresses you specify. To set this up, all you have to do is create the .forward file with the email address(es) you'd like to forward your mail to.

On Windows

  1. Log in to a YSTV Windows machine as yourself.
  2. Open Notepad.
  3. Enter your YSTV username, followed by any additional email addresses to forward your mail to on new lines, for example:
john.smith
js500@york.ac.uk
  1. Do File > Save As...
  2. Enter "H:\.forward" (including the quotes and the .)
  3. Save the file
  4. Rejoice.

On Linux

  1. Open up an SSH session to the web server (through PuTTY on Windows or a Terminal on Linux/Mac), using something like ssh john.smith@ystv.co.uk or entering john.smith@ystv.co.uk in the PuTTY Host Name field.
  2. Enter your password when prompted.
  3. Type nano .forward and hit Enter.
  4. Follow the instruction in step 3 above
  5. Press Ctrl-X and then hit Y to save and exit.
  6. Type exit to close the session.
  7. Rejoice.

A note for the Computing Team

Exim gets upset if the .forward file isn't owned by the user and they won't get any mail. If the user creates their own .forward file it'll be fine, but if you create it for them, remember to

chown user:group .forward

once you're done. You'll also need to set permissions:

chmod 0600 .forward

Mailboxes should be 0600, with the uid of the user, and any gid. The parent directory should have the execute flag set for the user, and the uid should be the user.