How do I turn off Talk and Write?
Type the command
% mesg n
If someone tries to use "talk" with you, they will get a "Your party is refusing messages" response. A "write" command will give them "write: Permission denied". You can put this command in your .login file (at the bottom) so that it will be set automatically every time you log in.
However, when you have messages turned off, you are not allowed to use "write" or "talk" yourself.
To allow talk and write messages to appear on your display, type
% mesg y
Unfortunately, there is no way to stop messages from a particular account, or to only allow mesages from a particular account. Your login session is either writable by everyone (via "write" and "talk"), or everyone (except the system administrater) is prohibited from writing to it. There is no way to specify which individuals may (or may not) write to your login session.
For more detailed information, consult the man page on "mesg".