1
2# [should have a bin/sh line and EZPATH/QMPATH added above by make]
3#
4# script to diagnose ezmlm lists
5# call as is for environment only, or as ezmlm-check 'DIR' for more info
6
7listsubscribers=yes
8if [ "$1" = '-S' ] ; then
9  listsubscribers=no
10  shift
11else
12    if [ "$1" = '-s' ] ; then
13      shift
14    fi
15fi
16
17QINJECT="${QMPATH}/bin/qmail-inject"
18EZLIST="${EZPATH}/ezmlm-list"
19MYNAME='ezmlm-check'
20MYDTLINE="Delivered-To: ${MYNAME}"
21FATAL="${MYNAME}: fatal:"
22EZERR="??? ERROR:"
23EZWARN="!!! Warning:"
24# This should be a ``grep'' that does regexps. Needs to recognize ^ and $.
25GREP='grep'
26CAT='cat'
27CUT='cut'
28ECHO='echo'
29# Needed to isolate some lines in the DIR/editor ... files
30HEAD='head'
31TAIL='tail'
32# needed to count characters in $USER
33WC='wc'
34# should mark executables with '*' and list one file per line
35LS='ls -F1'
36# should list links as: "... symlink -> file"
37LLS='ls -l'
38if [ ! -x "$QINJECT" ]; then
39  ${ECHO} "$FATAL edit script to for path to qmail-inject"
40  exit 100
41fi
42
43if [ -z "$SENDER" ] ; then
44	RCP="${CAT}"
45else
46	RCP="$QINJECT"
47	if ${CAT} - | ${GREP} "${MYDTLINE}" >/dev/null 2>&1
48	  then
49	    ${ECHO} "FATAL this message is looping: it already has my Delivered-To line (#5.4.6)"
50	    exit 100
51	fi
52fi
53
54if [ ! -z "$1" -a ! -d "$1" ]; then
55  ${ECHO} "$FATAL $1 is not a directory"; exit 100
56fi
57
58# reset variables
59GET=''; DIGEST=''; FLAGARCH=''; FLAGIND='';
60MANAGE=''; OUTLOCAL=''; OUTHOST=''; SPEC=''; SRESTRICT=''; STORE=''; REMOTE=''
61MODSUB=''; MODPOST=''; SPEC=''
62
63(
64	${ECHO} "Delivered-To: ezmlm-check"
65	${ECHO} "To: $SENDER"
66	${ECHO} "Subject: ${MYNAME} results"
67	${ECHO}
68	${ECHO} "Important environment variables:"
69	${ECHO}
70	${ECHO} "SENDER ='$SENDER'"
71	${ECHO} "NEWSENDER ='$NEWSENDER'"
72	${ECHO} "RECIPIENT ='$RECIPIENT'"
73	${ECHO} "USER ='$USER'"
74	${ECHO} "DEFAULT ='$DEFAULT'"
75	${ECHO} "LOCAL ='$LOCAL'"
76	${ECHO} "HOST ='$HOST'"
77	${ECHO} "---------------------------------------------------"
78	if [ ! -z "$1" ]; then
79	  ${ECHO} "Checking basic list setup:"
80	  ${ECHO}
81	  if [ ! -r "$1/mailinglist" ]; then
82	    ${ECHO} "$EZERR $1/mailinglist does not exist"
83	  fi
84	  if [ -e "$1/num" ]; then
85	    if [ ! -w "$1/num" ]; then
86	      ${ECHO} "$EZERR $1/num is not writable to $USER"
87	    else
88	      NUM=`${CAT} "$1/num" | ${HEAD} -1`
89	      ${ECHO} "... latest message was message # $NUM"
90            fi
91	  else
92	    ${ECHO} "... no num. This must be a new list ..."
93	  fi
94	  ${ECHO}
95	  if [ -e "$1/lock" -a ! -w "$1/lock" ]; then
96	    ${ECHO} "$EZERR User $USER does not have write premission to $1/lock"
97	  fi
98	  if [ -e "$1/lockbounce" -a ! -w "$1/lockbounce" ]; then
99	    ${ECHO} "$EZERR User $USER does not have write premission to $1/lockbounce"
100	  fi
101	  if [ ! -r "$1/outlocal" ]; then
102	    ${ECHO} "$EZERR $1/outlocal does not exist"
103	  else
104	    OUTLOCAL=`${CAT} "$1/outlocal"| ${HEAD} -1`
105	  fi
106	  if [ ! -r "$1/outhost" ]; then
107	      ${ECHO} "$EZERR $1/outhost does not exist"
108          else
109	      OUTHOST=`${CAT} "$1/outhost"| ${HEAD} -1`
110	  fi
111	  ${ECHO} "... The list is named ${OUTLOCAL}@${OUTHOST}"
112	  if [ ! -r "$1/editor" ]; then
113	      ${ECHO} "$EZERR $1/editor does not exist"
114	  else
115	    ${ECHO}
116	    ${ECHO} "$1/editor:"
117	    ${ECHO} "============================"
118	    ${CAT} "$1/editor"
119	    ${ECHO} "============================"
120	    ${ECHO}
121	  fi
122	  if [ ! -r "$1/manager" ]; then
123	      ${ECHO} "$EZERR $1/manager does not exist"
124	  else
125	    ${ECHO} "$1/manager:"
126	    ${ECHO} "============================"
127	    ${CAT} "$1/manager"
128	    ${ECHO} "============================"
129	    ${ECHO}
130	  fi
131	  if [ ! -r "$1/bouncer" ]; then
132	      ${ECHO} "$EZERR $1/bouncer does not exist"
133	  else
134	    ${ECHO} "$1/bouncer:"
135	    ${ECHO} "============================"
136	    ${CAT} "$1/bouncer"
137	    ${ECHO} "============================"
138	    ${ECHO}
139	  fi
140	  if [ ! -r "$1/owner" ]; then
141	      ${ECHO} "$EZERR $1/owner does not exist"
142	  else
143	    ${ECHO} "$1/owner:"
144	    ${ECHO} "============================"
145	    ${CAT} "$1/owner"
146	    ${ECHO} "============================"
147	    ${ECHO}
148	    OWNER=`${GREP} "@" < $1/owner`
149	  fi
150	  if [ ! -r "$1/headeradd" ]; then
151	      ${ECHO} "$EZERR $1/headeradd does not exist"
152	  else
153	    ${ECHO} "$1/headeradd:"
154	    ${ECHO} "============================"
155	    ${CAT} "$1/headeradd"
156	    ${ECHO} "============================"
157	    ${ECHO}
158	  fi
159	  if [ ! -r "$1/headerremove" ]; then
160	      ${ECHO} "$EZERR $1/headerremove does not exist"
161	  else
162	    ${ECHO} "$1/headerremove:"
163	    ${ECHO} "============================"
164	    ${CAT} "$1/headerremove"
165	    ${ECHO} "============================"
166	    ${ECHO}
167	  fi
168	  ${ECHO} "---------------------------------------------------"
169	  ${ECHO} "Checking standard options:"
170	  ${ECHO}
171	  if [ -r "$1/public" ]; then
172	    ${ECHO} "... public"
173	  else
174	    ${ECHO} "... not public"
175	  fi
176	  if [ -r "$1/archived" ]; then
177	    FLAGARCH='1'
178	    ${ECHO} "... archived"
179	  else
180	    ${ECHO} "... not archived"
181	  fi
182	  if [ -r "$1/indexed" ]; then
183	    FLAGARCH='1'
184	    FLAGIND='1'
185	    ${ECHO} "... indexed"
186	  else
187	    ${ECHO} "... not indexed"
188	  fi
189	  if [ ! -z "$FLAGARCH" ]; then
190            if [ ! -d "$1/archive" ]; then
191	      ${ECHO} "$EZERR $1/archive is not a directory"
192	    else
193	      if [ ! -z "$NUM" -a ! -r "$1/archive/0/index" \
194			-a ! -z "$FLAGIND" ]; then
195	        ${ECHO} "$EZWARN list is archived, but there is no index."
196	        ${ECHO} "    Please run ezmlm-idx!"
197	      fi
198            fi
199          fi
200          if [ ! -d "$1/bounce" ]; then
201	    ${ECHO} "$EZERR $1/bounce is not a directory"
202	  fi
203	  if [ -r "$1/prefix" ]; then
204	    PREFIX=`${HEAD} -1 "$1/prefix"`
205	    ${ECHO} "... using $1/prefix as subject prefix: $PREFIX"
206	    ${ECHO}
207	  fi
208	  if [ -r "$1/sublist" ]; then
209	    ${ECHO} "... this is a sublist for:"
210	    ${HEAD} -1 < "$1/sublist"
211	  else
212	    ${ECHO} "... not a sublist"
213	  fi
214          if [ ! -d "$1/text" ]; then
215	    ${ECHO} "$EZERR $1/text is not a directory"
216	  fi
217	  ${ECHO} "... Contents of $1/text not checked"
218	  ${ECHO}
219	  if [ ! -z "$OWNER" ]; then
220	    ${ECHO} "... Mail to owner goes to: $OWNER"
221	  else
222	    ${ECHO} "$EZWARN Mail to owner seems not to be forwarded."
223	    ${ECHO} "    Remember to check the mailbox once in a while!"
224	  fi
225	  ${ECHO}
226	  ${ECHO} "--------------------------------------------------"
227	  ${ECHO}
228	  ${ECHO} "... Links should be:"
229	  ${ECHO} "    ~/.qmail-{list} -> $1/editor"
230	  ${ECHO} "    ~/.qmail-{list}-default -> $1/manager"
231	  ${ECHO} "    ~/.qmail-{list}-owner -> $1/owner"
232	  ${ECHO} "    ~/.qmail-{list}-return-default -> $1/bouncer"
233	  if [ ! -z "$LIST" ]; then
234	    ${ECHO}
235	    ${ECHO} "    As far as I can see, '{list}' should be '$LIST'."
236	    ${ECHO} "    If so and if .qmail files should be in $HOME ..."
237	    BN="$HOME/.qmail-$LIST"
238	    FN="$BN"
239	    if ${LLS} "$FN" 2>/dev/null | ${GREP} "$1/editor$" >/dev/null ; then
240	      ${ECHO} "      $FN is OK"
241	    else
242	      ${ECHO} "???    $FN is BAD"
243	    fi
244	    FN="$BN-default"
245	    if ${LLS} "$FN" | ${GREP} "$1/manager$" >/dev/null ; then
246	      ${ECHO} "      $FN OK"
247	    else
248	      ${ECHO} "???    $FN is BAD"
249	    fi
250	    FN="$BN-owner"
251	    if ${LLS} "$FN" | ${GREP} "$1/owner$" >/dev/null ; then
252	      ${ECHO} "      $FN is OK"
253	    else
254	      ${ECHO} "???    $FN is BAD"
255	    fi
256	    FN="$BN-return-default"
257	    if ${LLS} "$FN" | ${GREP} "$1/bouncer$" >/dev/null ; then
258	      ${ECHO} "      $FN is OK"
259	    else
260	      ${ECHO} "???    $FN is BAD"
261	    fi
262	  fi
263	  ${ECHO} "--------------------------------------------------"
264	  ${ECHO} "Checking subscribers:"
265	  ${ECHO}
266          if [ ! -d "$1/subscribers" ]; then
267	    ${ECHO} "$EZERR $1/subscribers is not a directory"
268	  else
269            if [ ! -x "$EZLIST" ]; then
270	      ${ECHO} "$EZLIST is not available for listing"
271	    else
272	      if [ "$listsubscribers" = "yes" ] ; then
273		${ECHO} "... Subscribers are:"
274                if ${EZLIST} "$1" | ${GREP} '@' ; then
275	  	  :
276	        else
277	          ${ECHO} "$EZWARN no subscribers!"
278                fi
279	      else
280		if ${EZLIST} "$1" | ${GREP} '@' >/dev/null 2>&1 ; then
281		  ${ECHO} "... There are subscribers."
282		else
283		  ${ECHO} "$EZWARN no subscribers!"
284		fi
285	      fi
286            fi
287	  fi
288	  ${ECHO}
289	  ${ECHO} "--------------------------------------------------"
290	  ${ECHO} "Checking for digest:"
291	  ${ECHO}
292	  if ${GREP} 'ezmlm-tstdig' < $1/editor >/dev/null 2>&1 ; then
293            if ${GREP} -1 'ezmlm-tstdig' < $1/editor \
294		| ${TAIL} -1 | ${GREP} 'ezmlm-get' >/dev/null; then
295	      ${ECHO} "... integrated digest via $1/editor"
296	      DIGEST='1'
297	      ${ECHO}
298	    fi
299	  fi
300	  if [ -z "$DIGEST" ]; then
301	    ${ECHO} "... no digest via $1/editor"
302	  else
303	    ${ECHO} "... links should be:"
304	    ${ECHO} "    ~/.qmail-{list}-digest-return-default -> $1/bouncer"
305	    ${ECHO} "    ~/.qmail-{list}-digest-owner -> $1/owner"
306	    if [ ! -z "$LIST" ]; then
307	      ${ECHO}
308	      ${ECHO} "    As far as I can see, '{list}' should be '$LIST'."
309	      ${ECHO} "    If so and if .qmail files should be in $HOME ..."
310	      BN="$HOME/.qmail-$LIST"
311	      FN="$BN-digest-return-default"
312	      if ${LLS} "$FN" 2>/dev/null | \
313			${GREP} "$1/bouncer$" >/dev/null ; then
314		${ECHO} "      $FN is OK"
315	      else
316		${ECHO} "???    $FN is BAD"
317	      fi
318	      FN="$BN-digest-owner"
319	      if ${LLS} "$FN" 2>/dev/null | \
320			${GREP} "$1/owner$" >/dev/null ; then
321		${ECHO} "      $FN is OK"
322	      else
323		${ECHO} "???    $FN is BAD"
324	      fi
325	    fi
326	  fi
327	  if [ -d "$1/digest" ]; then
328	    if [ ! -d "$1/digest/subscribers" ]; then
329	      ${ECHO} "$EZERR $1/digest exists, but $1/digest/subscribers"
330	      ${ECHO} "$EZERR is not a directory"
331	      ${ECHO}
332	    else
333	      if [ ! -x "$EZLIST" ]; then
334  	        ${ECHO} "$EZLIST is not available for listing"
335	      else
336	        if [ "$listsubscribers" = "yes" ] ; then
337		  ${ECHO}
338		  ${ECHO} "... Digest subscribers are:"
339                  if ${EZLIST} "$1" | ${GREP} '@' ; then
340	  	    :
341	          else
342	            ${ECHO} "$EZWARN no subscribers!"
343                  fi
344	        else
345		  if ${EZLIST} "$1" | ${GREP} '@' >/dev/null 2>&1 ; then
346		    ${ECHO} "... There are digest subscribers."
347		  else
348		    ${ECHO} "$EZWARN no subscribers!"
349		  fi
350	        fi
351              fi
352	      ${ECHO}
353            fi
354	  fi
355	  ${ECHO} "---------------------------------------------------"
356	  ${ECHO} "Checking for subscription moderation/remote admin:"
357	  ${ECHO}
358	  if [ -r "$1/remote" ]; then
359	    FLAGMOD='1'
360	    ${ECHO} "... set up for remote administration"
361	    REMOTE=`${CAT} "$1/remote"| ${HEAD} -1`
362            if ${ECHO} "$REMOTE" | ${GREP} -G "^/" >/dev/null 2>&1
363              then
364	        MODDIR="$REMOTE"
365	      else
366	        MODDIR="$1/mod"
367	    fi
368	    REMOTE='1'
369	  else
370	    ${ECHO} "... no remote admin"
371          fi
372	  if [ -r "$1/modsub" ]; then
373	    FLAGMOD='1'
374	    ${ECHO} "... subscription moderated"
375	    MODSUB=`${CAT} "$1/modsub"| ${HEAD} -1`
376            if ${ECHO} "$MODSUB" | ${GREP} -G "^/" >/dev/null 2>&1
377	    then
378              MODDIR="$MODSUB"
379	    elif [ -z "$MODDIR" ]; then
380	      MODDIR="$1/mod"
381	    fi
382	  else
383	    ${ECHO} "... no subscription moderation"
384	  fi
385	  if [ "$FLAGMOD" = '1' ]; then
386	    ${ECHO}
387	    ${ECHO} "Mods/remote admins stored based in $MODDIR:"
388	    ${ECHO}
389	    if [ ! -d "$MODDIR" ]; then
390	      ${ECHO} "$EZERR moderator dir $MODDIR doesn't exist!"
391	    elif [ -e "$MODDIR/lock" -a ! -w "$MODDIR/lock" ]; then
392	      ${ECHO} "$EZERR $MODDIR/lock is not writable to user $USER"
393	    elif [ ! -x "$EZLIST" ]; then
394	      ${ECHO} "${EZLIST} not available for listing"
395	    else
396	      if ${EZLIST} "$MODDIR" | ${GREP} '@' ; then
397		  :
398	      else
399	          ${ECHO} "$EZERR no subscription moderators/remote admins!"
400	      fi
401	    fi
402	    ${ECHO}
403	  fi
404	  ${ECHO} "---------------------------------------------------"
405	  ${ECHO} "Checking for message moderation:"
406	  ${ECHO}
407	  if ${GREP} 'ezmlm-gate' < "$1/editor" > /dev/null 2>&1; then
408            GATE='1'
409	  fi
410	  if ${GREP} 'ezmlm-store' < "$1/editor" > /dev/null 2>&1; then
411            STORE='1'
412	  fi
413	  FLAGMOD=''
414	  if [ -r "$1/modpost" ]; then
415	    FLAGMOD='1'
416	    MODPOST=`${CAT} "$1/modpost" | ${HEAD} -1`
417            if ${ECHO} "$MODPOST" | ${GREP} -G "^/" >/dev/null 2>&1
418              then
419	      MODDIR="$MODPOST"
420	    else
421	      MODDIR="$1/mod"
422	    fi
423	  fi
424	  if [ "$STORE" = '1' -a -z "$FLAGMOD" ]; then
425	      ${ECHO} "??? it looks from $1/editor like the list is set up"
426	      ${ECHO} "    for message moderation. However, since $1/modpost"
427              ${ECHO} "    doesn't exist, ezmlm-store posts them directly. If"
428              ${ECHO} "    this is not intended, please create $1/modpost."
429	      ${ECHO}
430	      FLAGMOD='1'
431	      MODDIR="$1/mod"
432	  elif [ -z "$STORE" -a -z "$GATE" -a "$FLAGMOD" = '1' ]; then
433	      ${ECHO} "??? $1/modpost exists, leading me to think you'd like"
434	      ${ECHO} "    message moderation, but I can't find any call to"
435	      ${ECHO} "    ezmlm-store in $1/editor."
436	      ${ECHO}
437	  elif [ -z "$STORE" -a "$GATE" = '1' ]; then
438	      if [ -z "$FLAGMOD" ]; then
439		${ECHO} "??? The list is set up with ezmlm-gate in $1/editor."
440		${ECHO} "    However, since $1/modpost does not exist all"
441		${ECHO} "    messages will be accepted!"
442	        FLAGMOD='1'
443	        MODDIR="$1/mod"
444	      else
445		${ECHO} "... The list is set up with ezmlm-gate in $1/editor."
446		${ECHO} "    Since $1/modpost exists, subscriber messages"
447		${ECHO} "    will be accepted and others will be send for"
448		${ECHO} "    moderation."
449	      fi
450	  fi
451	  if [ "$FLAGMOD" = '1' ]; then
452	    ${ECHO} "... message moderated"
453	    ${ECHO}
454	    ${ECHO} "Message moderators based in $MODDIR:"
455	    ${ECHO}
456	    if [ ! -d "$MODDIR" ]; then
457	      ${ECHO} "$EZERR moderator dir $MODDIR doesn't exist!"
458	    elif [ -e "$MODDIR/lock" -a ! -w "$MODDIR/lock" ]; then
459	      ${ECHO} "$EZERR $MODDIR/lock is not writable to user $USER"
460	    elif [ ! -x "$EZLIST" ]; then
461	      ${ECHO} "${EZLIST} not available for listing"
462	    else
463	      if ${EZLIST} "$MODDIR" | ${GREP} '@' ; then
464		  :
465	      else
466	          ${ECHO} "$EZERR no message moderators!"
467	      fi
468	    fi
469	    ${ECHO}
470	    MT="120"
471	    if [ -r "$1/modtime" ]; then
472	      MODTIME=`${CAT} "$1/modtime" | ${HEAD} -1`
473	      if [ "$MODTIME" -eq 0 ]; then
474		MT="120"
475	      elif [ "$MODTIME" -lt 24 ]; then
476		MT="24"
477	      elif [ "$MODTIME" -gt 240 ]; then
478		MT="240"
479	      else
480		MT="${MODTIME}"
481	      fi
482	    fi
483	    ${ECHO} "... Messages awaiting moderation time out after $MT hours"
484	    if [ ! -d "$1/mod/pending" ]; then
485	      ${ECHO} "$EZERR $MODDIR/pending is not a directory"
486	    else
487	      MODNUM=`${LS} "$1/mod/pending" | ${GREP} -c '*'`
488	      ${ECHO} "... there are $MODNUM messages awaiting moderator action"
489	    fi
490	    if [ ! -d "$1/mod/accepted" ]; then
491	      ${ECHO} "$EZERR $MODDIR/accepted is not a directory"
492	    fi
493	    if [ ! -d "$1/mod/rejected" ]; then
494	      ${ECHO} "$EZERR $MODDIR/rejected is not a directory"
495	    fi
496	    if [ ! -r "$1/moderator" ]; then
497	      ${ECHO} "$EZERR $1/moderator is not readable to user $USER"
498	    else
499	      if ${GREP} 'ezmlm-moderate' < "$1/moderator" >/dev/null 2>&1
500	      then
501	        :
502	      else
503	        ${ECHO} "$EZERR $1/moderator lacks ezmlm-moderate entry"
504	      fi
505	      ${ECHO}
506	      ${ECHO} "$1/moderator:"
507	      ${ECHO} "============================"
508	      ${CAT} "$1/moderator"
509	      ${ECHO} "============================"
510	      ${ECHO}
511	    fi
512	    ${ECHO}
513	    ${ECHO} "... Links should be:"
514	    ${ECHO} "    ~/.qmail-{list}-accept-default -> $1/moderator"
515	    ${ECHO} "    ~/.qmail-{list}-reject-default -> $1/moderator"
516	    ${ECHO}
517	    if [ ! -z "$LIST" ]; then
518	      ${ECHO}
519	      ${ECHO} "    As far as I can see, '{list}' should be '$LIST'."
520	      ${ECHO} "    If so and if .qmail files should be in $HOME ..."
521	      BN="$HOME/.qmail-$LIST"
522	      FN="$BN-accept-default"
523	      if ${LLS} "$FN" 2>/dev/null | \
524			${GREP} "$1/moderator$" >/dev/null ; then
525		${ECHO} "      $FN is OK"
526	      else
527		${ECHO} "???    $FN is BAD"
528	      fi
529	      FN="$BN-reject-default"
530	      if ${LLS} "$FN" 2>/dev/null | \
531			${GREP} "$1/moderator$" >/dev/null ; then
532		${ECHO} "      $FN is OK"
533	      else
534		${ECHO} "???    $FN is BAD"
535	      fi
536	    fi
537          else
538	    ${ECHO} "... no message moderation"
539          fi
540	  ${ECHO}
541	  ${ECHO} "---------------------------------------------------"
542	  ${ECHO} "Checking for SENDER checks:"
543	  ${ECHO}
544	  if ${GREP} 'ezmlm-issubn -n' < "$1/editor" >/dev/null 2>&1 ; then
545	    ${ECHO} "... Some type of blacklisting in use"
546	    SRESTRICT='1'
547 	  fi
548	  if ${GREP} 'ezmlm-issubn' < "$1/editor" |\
549	    ${GREP} -v -- '-n' >/dev/null 2>&1 ; then
550	    ${ECHO} "... Some type of SENDER check in use for posts"
551	    SRESTRICT='1'
552	  fi
553	  if [ -z "$SRESTRICT" ]; then
554	    ${ECHO} "... no SENDER restrictions found for posts"
555	  fi
556	  ${ECHO}
557	  GET=` ${GREP} 'ezmlm-get' < "$1/manager" | \
558		${CUT} -d' ' -f2- | ${CUT} -d\' -f1`
559	  if ${ECHO} "$GET" | ${GREP} 's' >/dev/null ; then
560	    ${ECHO} "... Only subscribers may access the archive"
561	  else
562	    ${ECHO} "... no SENDER restrictions for archive access"
563	  fi
564	  ${ECHO}
565	  ${ECHO} "---------------------------------------------------"
566	  ${ECHO} "Checking for special options:"
567	  ${ECHO}
568	  MANAGE=` ${GREP} 'ezmlm-manage' < "$1/manager" | \
569		${CUT} -d' ' -f2- | ${CUT} -d\' -f1`
570	  if ${ECHO} "$MANAGE" | ${GREP} 'e' >/dev/null ; then
571	    ${ECHO} "... remote editing of $1/text/ files enabled"
572	    SPEC='1'
573	  fi
574	  if ${ECHO} "$MANAGE" | ${GREP} 'l' >/dev/null ; then
575	    ${ECHO} "... remote listing of subscribers enabled"
576	    SPEC='1'
577	  fi
578	  if [ "$SPEC" = '1' -a -z "$REMOTE" ] ; then
579	    ${ECHO} \
580	      "$EZERR but remote admin is not enabled, so this will not work!"
581	  fi
582	  ${ECHO} "---------------------------------------------------"
583	fi
584	${ECHO}
585	${ECHO} "EXT ='$EXT'"
586	${ECHO} "EXT1 ='$EXT1'"
587	${ECHO} "EXT2 ='$EXT2'"
588	${ECHO} "EXT3 ='$EXT3'"
589	${ECHO} "EXT4 ='$EXT4'"
590	${ECHO} "DTLINE = $DTLINE"
591	${ECHO} "RPLINE = $RPLINE"
592	${ECHO} "UFLINE = $UFLINE"
593	${ECHO} "---------------------------------------------------"
594	${ECHO}
595	${ECHO} "Hope that helps!"
596) | "$RCP" || exit 100
597
598exit 99
599
600