CMAIL(6)

NAME
cmail - an email chess helper

SYNOPSIS
cmail [-c] [-w] [-v] [-[no]mail] [-[no]xboard] [-remail] [-game name ] [-me name ] [-opp name ] [-oppaddr address ] [-dir directory ] [-gamesfile file ] [-aliasesfile file ] [-logfile file ] [-td delay ]

DESCRIPTION

The cmail program will help you play chess by email with opponents of your choice using an X interface. To use it, you will need to be able to run xboard with which cmail is distributed, available by anonymous FTP from numerous sites around the world. It has been tested with xboard 3.0; it may require modification for other versions.

OPTIONS
You will usually run cmail without giving any options. See the next section for instructions.

-c  Shows the conditions of the GNU General Public License.

-w  Shows the warranty notice of the GNU General Public License.

-v  Provides verbose output useful for debugging.

-[no]mail
    Invokes or inhibits the sending of a mail message containing the move.

-[no]xboard
    Invokes or inhibits the running of xboard on the game file.

-remail
    Resends the last mail message for that game. This inhibits running xboard.

-game name
    The name of the game to be processed.

-me name
    The user's own alias. This defaults to the environment variable $CMAIL_ADDRESS or failing that the user's login name.

-opp name
    An alias for the opponent.

-oppaddr address
    The opponent's email address.

-dir directory
    The directory in which cmail keeps its files. This defaults to the environment variable $CMAIL_DIR or failing that $CHESSDIR, $HOME/Chess or ~/Chess. It will be created if it does not exist.

-gamesfile file
    A file containing a list of games with email addresses. This defaults to the environment variable $CMAIL_GAMES or failing that .cmailgames.

-aliasesfile file
    A file containing one or more aliases for a set of email addresses. This defaults to the environment variable $CMAIL_ALIASES or failing that

-logfile file
    A file in which to dump verbose debugging messages that are invoked with the -v option.

-td delay
    This is passed to xboard to set the speed at which the moves are displayed on start-up. It defaults to the environment variable $CMAIL_TIME_DELAY if set.

STARTING A GAME
Type cmail from a shell. After an opening message, you will be prompted for a game name, which is optional -- if you simply press return, the game name will take the form you-VS-opponent. You will next be prompted for the name of your opponent. If you haven't played this person before, you will also be prompted for his/her email address. cmail will invoke xboard. Make your first move and select Exit from the File menu. If all is well, cmail will mail a copy of the move to your opponent, and you will get a confirmation message. If you decide not to make a move after all, select Reset Game from the File menu and then select Exit.

ANSWERING A MOVE
When you get a message from an opponent containing a move in one of your games, simply pipe the message through cmail. In some mailers this is as simple as typing "| cmail" at the proper message, while in others you may have to save the message to a file and do "cmail < file" at the command line. In either case cmail will update the appropriate game log files, and start xboard. As before, simply make a move and select Exit from the File menu. If you want to look at a variation and play several moves, go ahead, but when you want to send your move, select Reload Same Game from the File menu to get back to the original position, then make the move you want and select Exit. Don't just undo the extra moves with Backward since those moves will still be sent with the message. Also as before, if you decide you aren't ready to make a move now, select Reset Game and then Exit.

When you decide you are ready to make a move it isn't necessary to pipe the message through cmail again. You can use cmail from the command line just as when starting the game. But this time you only need to type in the name of the game. Note that you don't have to be in the cmail directory when you run it from the command line.

LIMITATIONS
cmail currently doesn't provide much error checking. If you exit from xboard without either moving or selecting Reset Game, or if you make more than one move before you exit (without using Reload Same Game to undo the extra moves as described above), or if you go back and change the previous game history, or if you exit when the display does not show the current game position, cmail will send a bogus message to your opponent.

FILES
".cmailgames" contains a list of games with the email addresses of the opponents.

".cmailaliases" contains one or more aliases for a set of email addresses.

BUGS
No known bugs.

BUG REPORTS
I make no promises but if you send bug reports/suggestions to welsh@epcc.ed.ac.uk I'll do my best to fix/implement them.

COMMENTS
This perl script was hacked together over a period of a few months and perhaps it should really be converted to C at some point.

AUTHOR
Copyright (C) 1993 Free Software Foundation, Inc.

cmail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

cmail is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with cmail; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Author:	Evan Welsh <welsh@epcc.ed.ac.uk>
	Edinburgh Parallel Computing Centre
	JCMB, Kings Buildings
	The University of Edinburgh
	Edinburgh EH9 3JZ
	Scotland

CONTRIBUTORS

Patrick Surry helped with design, testing and documentation.

Tim Mann helped integrate cmail with xboard.

SEE ALSO
xboard(1)