WHAT IS THIS? CHKMail is just a little ARexx script I whipped up one night. I just put it in a menu (using ToolsDaemon - nice program!), but you could run it from the CLI or put it on a Toolbar if you want. The program connects to a POP3 (Post Office Protocol) server and logs in with a given username and password. It then checks to see how many messages you have (if any). If there are messages in the mailbox, you have the option of viewing the headers of the messages (shows the date, time, From:, and Subject: lines). In its current form, CHKMail doesn't have any features for bringing your mail down to your computer - it just checks if you have any. I can add a feature to grab the mail instead of viewing it if there is interest, but until I find an Amiga mailreader I like better than Pine on the DEC Alpha I use, I probably won't need anything like that myself... :-) REQUIREMENTS A network (no, really?) AmiTCP (a version including the TCP: device) (I'm using 3.0beta, but it should work with others) REXXArpLib.library REXXReqTools.library INSTALLATION The installation is quite straightforward. First of all, copy the script to somewhere in your path (AmiTCP:bin or somewhere) for ease of use. If the script bit is not set, set it with the command "Protect CHKMail +s" so you can execute it just by typing the filename (under 2.04+). You need to make a modification to your AmiTCP:db/services file. The following line should be added: pop3 110/tcp ; postoffice version 3 Alternately, you could just switch 110 for pop3 in the script, but this is easier to change (central location) if something needs changing... CHKMail requires some information from you in the form of environment variables: POPHOST (required) - the address of your popmail host PAGER (required) - what pager do you want to use to view the message headers? USERNAME (optional) - your username on the mail host PASSWORD (optional) - your password on the mail host DEBUG (optional) - do you want to see the communications with the host? As shown above, POPHOST and PAGER are required. The script will report an error if any of these variables are missing. If the PASSWORD or USERNAME variables are missing, the script will put up a requester asking for the information (the Password requester won't echo your typing). If you want debugging information to be printed, set the DEBUG environment variable (the actual value doesn't matter, as long as it exists). USAGE If you have CHKMail in the path and the script bit is set, just type 'chkmail' at the prompt. Otherwise, use 'rx {path}/chkmail'. After getting the username and password (either from the environment or through requesters), the script will connect to the POP3 service on the specified server and ask for the number of messages present. If there is no mail, CHKMail will tell you so, and then exit. If there is mail, CHKMail will tell you how many messages there are, and give you the option of Viewing the headers or quitting. If you choose to view the headers, CHKMail will grab the headers of each message from the server and parse them so you can read them with your favorite pager. BUGS? What Bugs? Well, since this was put together one night (morning?) at around 3:00 AM, I imagine there are problems. If you have problems with the script, turn on the debugging output (set the DEBUG environment variable) and send me the transcript of the session, and I'll try to fix it. One possible problem is that this script uses a POP3 command that is described as Optional in the RFC describing the Post Office Protocol. The TOP function (which returns the message header and top n lines of a message) makes it possible to check the message header without having to grab the whole message. If your POP server doesn't implement the TOP function, you have a couple of options: - Hassle your sysadmin to get a newer/better POP3 implementation - Let me know, and I'll fix this up to use only Standard functions. The only thing is that it will mean downloading the entire message for each message instead of just the header, so you might as well just use AmiPOP or something. DISCLAIMER This program is freeware. I take no responsibility for any problems this program causes (I can't see any problems - the program doesn't delete the mail off the server or anything). You can distribute this program as you choose, but it may not be sold (except PD disk libraries, Fred Fish collection, etc). CHKMail may be included in other distributions (ie. the AmiTCP distribution, etc), but try to drop me an email at the address below. AUTHOR Matt White 316B - 815 Reid Road Saskatoon, SK, Canada S7N 2W8 (306) 249-3312 whitem@duke.usask.ca Matt.White@usask.ca If you use this program and like it (or don't like it), or are including it in another distribution, or want to laugh at my ARexx style (hey, I just started using ARexx), or just want to say hi, feel free to drop me a line - I love getting email. Matt White