So if you type "mail" or "pine" or similar commands on an NAS sandbox machine, you will be told that you have no mail (because there's nothing in /var/mail/yourname).
There is, however, a work-around. The work-around is to configure (via procmail) your CSLab mail to be delivered to a different file instead: one which can be mounted on the NAS sandbox machine. Specifically, we will deliver it to a file in a subdirectory of your home directory.
I can do the conversion of your account with you if you like. Or if you would like to do it yourself, or to know what's happening, here is a recipe.
But note that overall, I do not recommend this. I think that unless you really want to use an NAS sandbox machine to read your e-mail for some reason, it's best to keep it in the normal place at CSLab. You can run X-Windows programs over an ssh connection, e.g. instead of typing "thunderbird" you type "ssh apps0.cs thunderbird" (and you can put this in an alias, of course).
On the other hand, if you don't already have a directory named "mail" nor one named "Mail", you should probably create one at this point. Make sure to chmod it so that no one other than you can see into it (e.g. "chmod 700 mail").
I'll assume here that you already have a .procmailrc. If you don't, and you don't have a .forward either, you can edit and save your .procmailrc freely, and put in a .forward at the last minute rather than saving changes to your .procmailrc at the last minute.
We'll call your new inbox file "csinbox", to avoid confusion with the name which imap clients present as your "real" inbox.
Your .procmailrc probably ends with a recipe to deliver your e-mail to your normal inbox, most likely by mailing to username+@postbox.cs.toronto.edu (with the '+' in there). We will replace it with the following recipe, substituting your user name for the name "username" below (and possibly changing "mail" to "Mail" if applicable):
:0: /u/username/mail/csinbox
Most of your recipes have "*" lines, so this one will look strange. It's unconditional.
Note that the first line needs to be ":0:" rather than ":0", so that file locking is done. (The difference is the colon at the end. Your current final .procmailrc recipe probably lacks the colon because it is writing to a pipeline rather than saving to a file.)
Alternatively, perhaps your .procmailrc achieves delivery to your normal e-mail inbox by "falling off the end". In this case, you will want to append the above recipe to your .procmailrc without removing any existing recipes.
Remember not to save yet. If you did save changes to your .procmailrc, you can proceed with the following and just hope there's no mail loss (the probability is fairly low), or you can put it back first, or you can ask me for assistance...
mv -i /var/mail/username /u/username/mail/csinbox
Or, if you didn't have a .procmailrc or .forward before, get your .procmailrc all ready and then activate it by creating a .forward file which says:
"|/usr/bin/procmail -f-"(Various more-complicated invocations are no longer necessary. Amusing details upon request.)
setenv MAIL /u/$USER/mail/csinboxand remove any other settings of this variable. Also, if you set the "mail" variable in (t)csh to notify you of new mail, you will want to change "/var/mail/$USER" to "/u/$USER/mail/csinbox" in that setting as well.
pine will see "csinbox" as a mail "folder", if you put it in the "mail" subdirectory of your home directory, and you can read it there.
An imap client such as Thunderbird will also see "csinbox" as a mail folder if it is in the mail subdirectory. (Of course, there's no point following the above recipe if you're going to read your mail with Thunderbird, but you can do so if you want to be able to read your mail both ways.) Then you can tell it that it is your inbox (for better new-message handling).
CSLab's webmail will look for Mail by default. You can change this in the preferences setting.
On the other hand, if you did use the directory name "Mail", then you can get pine to look there with a symlink ("ln -s Mail mail", assuming you don't have a "mail" directory).
As always, please feel free to ask me for help with any of the above.
If you would like an oldmail facility to be available from an NAS sandbox machine, you can create it in a similar way to the above procedure for your normal inbox.
First, put a recipe near the top of your .procmailrc, before any spam filtering etc (assuming that the whole point here is that you want the ability to look for mail which might have been wrongly discarded). It will look something like this:
:0c: $HOME/mail/oldmail
This will copy all mail to your new "oldmail" file. Then, to "age" oldmail on a regular basis (so that it does not accumulate indefinitely), add a "crontab" entry to your personal crontab on apps0. I strongly recommend doing this on apps0, for a number of reasons; most of all, every machine (potentially) has a different crontab, and you don't want to have this running on two different machines, so let's standardize on apps0.
To add a crontab entry, type "crontab -e", which edits your crontab using your usual editor from the EDITOR environment variable. If you don't have a crontab (and if you didn't create one explicitly, you don't), it will start you off with a file containing only a comment reminding you of the order of the fields. Add this line:
0 4 * * Sun /p/na/bin/rotate-mailbox oldmail
The fields are minutes, hours, day of month, month, weekday, command. So this is 04:00 every Sunday.
More about crontab: Type "crontab -l" to see your crontab. As above, type "crontab -e" to edit it. To remove it, type "crontab -r".
This does not affect the CS oldmail facility. The CS oldmail facility will still be there for you too.