1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# Copyright 1989 Massachusetts Institute of Technology
#
# For copying and distribution information, see the file
# "mit-copyright.h".
#
# $Source$
# $Author$
# $Id$
#
#
# Default WindowGram description file
#
#
# 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"
set aval = "UNAUTHENTIC"
match "forged"
set aval = "UNAUTHENTIC"
endcase
case $class
match "WG_CTL_CLASS"
exit
#
# MAIL NOTIFICATION
#
# To receive mail notifications, you need to do several things:
# 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.
#
# Note: The use of the following lines is NOT necessary to receive
# notifications of new mail. The only effect of uncommenting these
# lines is to display on your screen the sender, recipient and subject
# of the mail (In addition, uncommenting these lines will add extra load
# to the post office servers, making them run slower.).
# If you do not wish this information to be displayed where other users
# might possibly read it, or you wish to avoid loading down the post
# office servers, you need not uncomment these lines. Just follow step
# 1 above.
#
#match "MAIL"
# case $instance
# match "pop"
# exec /usr/athena/zmailnotify
# exit
# endcase
# print "(Authentication: @bold("+$aval+"))\n"
# print substitute($default)
# put
# exit
match "message"
if (upcase($opcode) == "PING") then exit endif
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 =~ "From: .*") 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+"\n\n"
print $body
put
exit
match "login"
case $opcode
match "USER_LOGIN"
set log = "logged in"
match "USER_LOGOUT"
set log = "logged out"
default
set log = "unknown 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
default
print "(Authentication: @bold("+$aval+"))\n"
print substitute($default)
put
exit
endcase
|