# Copyright 1989, 1990 Massachusetts Institute of Technology # # For copying and distribution information, see the file # "mit-copyright.h". # # $Source: /afs/rel-eng.athena.mit.edu/user/probe/newsrc/athena/athena.lib/zephyr.p4/zwgc/RCS/zwgc.desc,v $ # $Author: probe $ # $Id: zwgc.desc,v 1.11 93/11/19 15:04:46 probe Exp $ # # # Default WindowGram description file # # Opcode "ping" is used by sender programs to see if the message would # really get sent, or if the recipient has logged out. No useful # information is normally contained in these messages, so we discard them. #if (upcase($opcode) == "PING") then exit endif if (upcase($opcode) == "PING") then if (upcase($instance) == "PERSONAL") then print "]0;ZPING "+$sender+"" print "Ping from "+$sender+"\n" put #start appendport $log ".zwgc.log" put $log "Ping from "+$sender+"\n" closeport $log #end endif exit endif # # AUTHENTICATION information # # $auth can be either Yes, No, or Forged # # "Yes" means that the sender field present in the notice was verified by # Kerberos authentication # # "No" means that either the sender did not include any authentication # information, or the authentication information was not verified by the # Zephyr Server before the notice was sent to you. # # "Forged" means that the Server claims that the sender of the notice # was verified by Kerberos authentication, but your WindowGram client # could not verify this. This stage of verification is done by a cryptographic # checksum. The most probable cause of the failure of the checksum # provided by the Server to match the checksum generated by your # WindowGram client is that you changed Kerberos tickets, and the Server # was using an old value to compute the cryptographic checksum. You can # update the Server's value by typing 'zctl load' to your prompt. # # By default, notices which appear forged are labeled as 'UNAUTHENTIC' # to avoid confusion as to what 'Forged' really means. # To change this display, change the last word in the line following # 'match "forged" to something other than "UNAUTHENTIC". case $auth match "yes" set aval = "Authentic" match "no","forged" set aval = "@b(UNAUTHENTIC)" endcase case $class match "WG_CTL_CLASS" exit # # MAIL NOTIFICATION # # To receive mail notifications, you need to do the following: # # 1) subscribe to MAIL,POP messages. You do this by typing: # zctl add mail pop # to your prompt. By doing this, you will get a simple notice every # time you are logged in and more mail arrives for you at your post office. # # 2) If you wish to be notified of the sender, recipient and subject of the # new mail, remove the pound-signs from the beginning of the 10 lines below # between 'match "MAIL"' and 'exit', inclusive, and type the command # zctl add mail popret # to your prompt. match "MAIL" case $instance match "pop" set clustername = lbreak($fromhost,".0123456789") case $clustername match "leland","popserver","pobox" exec "biffhelper" exit endcase endcase exit match "message" case $instance match "PERSONAL" set type = "Personal" match "URGENT" set type = "Urgent" default set type = "Instance "+$instance endcase fields signature body if ($body == "") then set body = $signature set signature = "" endif if ($signature =~ "^[Ff]rom: .*") then set dummy = lany($signature,"From: ") endif if ($signature =~ "\n$") then set dummy = rany($signature,"\n") endif if ($signature == "") then set ftext = "From: @bold("+protect($sender)+")" else set ftext = "From: @bold("+protect($signature)+" <"+ protect($sender)+">)" endif # print "@center(@bold("+$aval+") "+$type+" message at "+$time+ # " on "+$date+"\n"+$ftext+" on "+$fromhost+"\nTo: "+ # $recipient+")\n\n" print "@bold("+$aval+") "+$type+" message at "+$time+ " on "+$date+"\n"+$ftext+" on "+$fromhost+"\nTo: "+ $recipient+"\n\n" print $body print "]0;ZWRITE "+$sender+"" #start appendport $log ".zwgc.log" put $log "From:" $signature "<"+$sender+">" $time $date $fromhost "\n"+$body "\n" closeport $log #end case $auth match "yes" put match "no","forged" set X_geometry="-0-80" put set X_geometry="" endcase exit match "login" case $opcode match "USER_LOGIN" set log = "logged in" match "USER_LOGOUT" set log = "logged out" match "USER_FLUSH" exit match "REALM-VISIBLE" exit match "REALM_VISIBLE" exit match "REALM-ANNOUNCED" exit default set log = "unknown opcode"+$opcode endcase fields host when tty print "@center(@bold("+$sender+") "+$log+")\n" print "@center(on @bold("+$host+") on "+$tty+")\n" print "@center(at "+$when+")" put exit match "printer" case $instance match "NOTIFY" print "\n\nFrom: @bold("+$sender+") on @bold("+$fromhost+")\n"+ $recipient+", your print job was rejected.\n"+ "You have exceeded your print quota.\n"+ "To check on your print quota, use the sweetquota command.\n\n\n" default print "@bold("+$sender+") on @bold("+$fromhost+")"+ "sent you a random message.\n" endcase put exit default #print "(Authentication: @bold("+$aval+") from host: "+$fromhost+")\n" #print substitute($default) put exit endcase