File: md_scripts

package info (click to toggle)
ifmail 2.14tx8.10-27
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,912 kB
  • sloc: ansic: 30,327; perl: 4,955; yacc: 838; makefile: 716; sh: 424; cpp: 235; lex: 206; awk: 24
file content (541 lines) | stat: -rw-r--r-- 16,795 bytes parent folder | download | duplicates (7)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
--- /dev/null
+++ ifmail-2.14tx8.10/md/fidosend
@@ -0,0 +1,33 @@
+#!/bin/sh
+##  SH script to send fido batches out trought ifmail.
+
+set -e
+
+VERBOSE=false
+if [ -e /usr/lib/news/innshellvars ]; then
+  . /usr/lib/news/innshellvars
+else
+  . /etc/news/innshellvars
+fi
+. /etc/ifmail/ifshellvars
+
+if [ ! -f $SERVERPID ]; then exit ;fi
+
+if [ $# -lt 1 ]; then
+  echo "$0 [$$]: Usage: $0 site"
+  exit 1
+else
+  SITE=$1
+fi
+
+if [ -s $BATCH/$SITE ]; then
+  mv $BATCH/$SITE $BATCH/$SITE.work
+  $NEWSBIN/ctlinnd -s -t30 flush $SITE
+  $NEWSBIN/batcher -b0 -v -p\
+    "$IFBIN/ifnews $2 $3 $4 $5 %s"\
+    $SITE $BATCH/$SITE.work \
+      && rm -f $BATCH/$SITE.work
+else
+  $VERBOSE && echo "$0 [$$]: no articles for $SITE"
+fi
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/sendmail.mc
@@ -0,0 +1,21 @@
+divert(-1)
+#
+# This is the m4 setup file for wonderland.linux.it
+# Copyright (C) 1996 by Marco d'Itri <md@linux.it>
+#
+divert(0)
+VERSIONID(`setup for wonderland (ifmail) 96/10/25')
+OSTYPE(debian)dnl
+dnl#
+dnl# fidonet things
+define(`IFMAIL_MAILER_MAX', 100000)dnl
+dnl#
+define(`confTRUSTED_USERS', ftn)dnl
+MAILER(local)dnl
+MAILER(smtp)dnl
+MAILER(ifmail)dnl
+dnl#
+dnl###########################################################################
+LOCAL_CONFIG
+Cwwonderland.linux.it wonderland.ils.org p10.f206.n332.z2.fidonet.org p10.f207.n332.z2.fidonet.org f102.n391.z42.guidenet.ftn
+divert`'dnl
--- /dev/null
+++ ifmail-2.14tx8.10/md/nlc
@@ -0,0 +1,22 @@
+#!/bin/sh
+# 
+# This script compiles the Italian fidonet nodelist received via TIC
+# Copyright (C) 1996 by Marco d'Itri, 2:332/206.10 / md@linux.it
+
+. /etc/ifmail/ifshellvars
+
+if [ -r $IFSPOOL/inb/region33.zip ]; then
+  unzip -L -o -p $IFSPOOL/inb/region33.zip \
+    | sed "s/^;Zone,2,/Zone,2,/1" > $IFNLD/region.033.NEW
+  { printf 'To: ftn\n'
+    diff --unified=0 $IFNLD/region.033 $IFNLD/region.033.NEW; } \
+  | sendmail -t
+  mv $IFNLD/region.033.NEW $IFNLD/region.033
+fi
+tail -f -n0 $IFLOG &
+TOKILL=$!
+$IFBIN/ifindex
+sleep 1
+kill $TOKILL
+mv  $IFSPOOL/inb/region33.zip  $IFSPOOL/inb/region33.OLD
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/ahbpoll
@@ -0,0 +1,80 @@
+#!/bin/sh
+# ahbpoll, poll the two lines of my boss node
+#
+# This script is based on the original ifpoll by Rasca Gmelch
+# Copyright (C) 1997 by Marco d'Itri, 2:332/206.10 / md@linux.it
+
+. /etc/ifmail/ifshellvars
+
+# Max number of failed polls
+MaxTry=8
+# delay between outgoing calls in seconds
+DELAY=60
+
+###############################################################################
+# start some tail(1)s and initialize the ^C handler
+{ tail -n0 -f $IFLOG > $INFO_TTY & }; TOKILL=$!
+##{ tail -n0 -f $IFLOG | grep "received" & }; TOKILL="$TOKILL $!"
+##{ tail -n0 -f $IFLOG | grep "sent" & }; TOKILL="$TOKILL $!"
+
+trap "killall -HUP ifcico; kill $TOKILL; echo -e 'Aborted\n'; exit 100;" INT
+
+# let's pack the fido stuff..
+$IFBIN/ifpack
+
+###############################################################################
+# loop until ifcico could connect the node or MaxTry is encountered
+i=1; errlv=1; alternate=0
+while [ $i -le $MaxTry -a $errlv != 0 ]; do
+  if   [ $alternate = 0 ]; then
+    NODE=f206.n332.z2.fidonet.org
+    alternate=1
+  elif [ $alternate = 1 ]; then
+    NODE=f207.n332.z2.fidonet.org
+    alternate=0
+  fi
+
+  echo -n "ahbpoll[$$]: $i. try ($NODE) "
+  $IFBIN/ifcico -r 1 $NODE
+  errlv=$?
+  case "$errlv" in
+  "0")
+      echo "ok :)"
+      ;;
+  "2")
+      echo 'failed: busy (rc 2)'
+      if [ $i != $MaxTry -a $alternate = 0 ]; then sleep $DELAY; fi
+      ;;
+  "3")
+      echo 'failed: system error (rc 3)'
+      ;;
+  "11")
+      echo 'failed: lost carrier (rc 11)'
+      if [ $i != $MaxTry -a $alternate = 0 ]; then sleep $(($DELAY+120)); fi
+      ;;
+  *)
+      echo "failed: ?? (rc $errlv)"
+      if [ $i != $MaxTry -a $alternate = 0 ]; then sleep $DELAY; fi
+      ;;
+  esac
+  i=$(($i+1))
+done
+
+###############################################################################
+# if the poll was ok, unpack
+if [ $errlv = "0" ]; then
+  if [ "`echo $IFSPOOL/inb/0000fff6.*`" != "$IFSPOOL/inb/0000fff6.*" ]; then
+    cp --force --link --preserve \
+       $IFSPOOL/inb/0000fff6.* $IFSPOOL/BAK
+  fi
+  $IFBIN/ifunpack
+  find $IFSPOOL/BAK  -mtime +3 -type f -exec rm -fv \{\} \; >/dev/null
+  find $IFSPOOL/outb -empty    -type f -exec rm -fv \{\} \; >/dev/null
+fi
+
+###############################################################################
+# Kill tail(s)
+kill $TOKILL
+
+# return the errorlevel of ifcico
+exit $errlv
--- /dev/null
+++ ifmail-2.14tx8.10/md/newsfeeds
@@ -0,0 +1,7 @@
+# 332/206 is my boss node.
+# It is the hub, so it has 332/200 in the PATH kludge.
+
+f206.n332/f200.n332\
+	:!*,fido.ita.*,fido.332.*,fido.200.*\
+	:Tf,Wfb:
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/mailertable
@@ -0,0 +1,18 @@
+# You really need to write there all the six zones.
+.z1.fidonet.org		ifmail:f206.n332
+.z2.fidonet.org		ifmail:f206.n332
+.z3.fidonet.org		ifmail:f206.n332
+.z4.fidonet.org		ifmail:f206.n332
+.z5.fidonet.org		ifmail:f206.n332
+.z6.fidonet.org		ifmail:f206.n332
+
+# This allows sending crashmail and hold mail
+# Do NOT uncomment it if you don't trust your users!
+# .crash.fidonet.org	ifmail-c:%1.fidonet.org
+# .hold.fidonet.org	ifmail-h:%1.fidonet.org
+
+# This is an othernet
+.guidenet.ftn		ifmail:f101.n391.z42
+
+# This is your smarthost
+.			smtp:mail.provider.it
--- /dev/null
+++ ifmail-2.14tx8.10/md/fido.daily
@@ -0,0 +1,136 @@
+#!/usr/bin/perl
+#
+# fido.daily -- resume your ifcico, iftoss, ifmail, and ifnews logs
+#
+# by Joaquim Baptista, px@fct.unl.pt
+#
+# Placed on the public domain.  If you make significant improvements on
+# this script, please send them to me so that I can mantain a "reference"
+# version.  This script works with ifmail28; future versions may break it.
+#
+# Example usage from cron, before rotating the logs:
+#     fido.daily iflog | mail -s 'Daily Fidonet report' sysop
+#
+# v1.1 -- Ignore "@somenet" in addresses like "2:362/42@fidonet" to avoid
+#         multiple entries for the same node.  Add -s option to select
+#         nodes.  Avoid dupplicate lines in the table of messages sent.
+#         Add report of period covered.
+#
+# v1.0 -- First release
+#
+# Modified by kao@linux.it
+#
+
+use Getopt::Std;
+getopts("s:") || die "usage: $0 [-s pattern] [file...]\n";
+if ($opt_s ne "") { $opt_s =~ s/([^a-zA-Z0-9\s])/\\$1/g; }
+
+$first="zzz 99";
+$last= "      ";
+while (<>) {
+  if (/^([A-Z][a-z][a-z] [ \d]\d )/) {
+    $date= substr($_,0,15);
+    if ($date lt $first) { $first=$date; }
+    if ($last lt $date ) { $last=$date; }
+  }
+
+  if    (/ifcico\[(\d+)\]: calling\s+([^\s@]+)/ ) {
+    $call{$1}=$2;
+    $attempts{$2}++;
+  }
+  elsif (/ifcico\[(\d+)\]: chat got "CONNECT"/) {
+    $conn{$call{$1}}++;
+  }
+  elsif (/ifcico\[(\d+)\]: chat got "BUSY"/) {
+    $busy{$call{$1}}++;
+  }
+  elsif (/ifcico\[(\d+)\]: chat got "NO CARRIER"/) {
+    $noca{$call{$1}}++;
+  }
+  elsif (/ifcico\[(\d+)\]: received (\d+) bytes in (\d+)/) {
+    $bytes_rcvd{$call{$1}} += $2;
+    $seconds_rcvd{$call{$1}} += $3;
+  }
+  elsif (/ifcico\[(\d+)\]: sent (\d+) bytes in (\d+)/) {
+    $bytes_sent{$call{$1}} += $2;
+    $seconds_sent{$call{$1}} += $3;
+  }
+  elsif (/iftoss\[(\d+)\]: packet from node ([^\s@]+)/) {
+    $toss{$1}= $2;
+  }
+  elsif (/iftoss\[(\d+)\]: No newsgroup for area tag (\S+)/) {
+    $toss_area{$2}++;
+  }
+  elsif (/iftoss\[(\d+)\]: end (\d+) echomail, (\d+)/) {
+    $tosskeys{$toss{$1}} ++;
+    $echomail{$toss{$1}} += $2;
+    $netmail{$toss{$1}}  += $3;
+  }
+  elsif (/ifmail\[(\d+)\]: route: ([^\s@]+)/) {
+    $ifmail{$2}++;
+  }
+  elsif (/ifnews\[(\d+)\]: route: ([^\s@]+)/) {
+    $snews{$1}= $2;
+  } 
+  elsif (/ifnews\[(\d+)\]: end input (\d+)/) {
+    $ifnewskeys{$snews{$1}} ++;
+    $ifnewscount{$snews{$1}} += $2; 
+  }
+  elsif (/ifcico\[(\d+)\]: start inbound/) {
+    $inb{$1} = $1;
+    $inbcount{$1}++;
+  }
+  elsif (/ifcico\[(\d+)\]: remote operator: ([\S ]*)/) { 
+    $inbkeys{$inb{$1}} = $2;
+  }
+  elsif (/ifcico\[(\d+)\]: remote     time: ([\S ]*)/) { 
+    $inbtime{$inb{$1}} = $2;
+  }
+}
+
+print "Report period:\n  From  $first\n  To    $last\n\n";
+
+print "Call-out systems (ifcico):\n";
+print "Attempts Busy NoCa Conn   Time   Received    Sent   System\n";
+for $s (sort keys %attempts) {
+  next  if  ($opt_s ne "") && ($s !~ /$opt_s/o);
+  printf("%7d  %3d  %3d  %3d %s   %6dKb  %4dKb   %s\n",
+         $attempts{$s}, $busy{$s}, $noca{$s}, $conn{$s},
+         &mmss($seconds_rcvd{$s}+$seconds_sent{$s}),
+         $bytes_rcvd{$s}/1024, $bytes_sent{$s}/1024, $s);
+}
+
+print "\n\nMessages received by system (iftoss):\nEchomail Netmail  Route\n";
+for $s (sort keys %tosskeys) {
+  next  if  ($opt_s ne "") && ($s !~ /$opt_s/o);
+  printf("%7d %7d   %s\n", $echomail{$s}, $netmail{$s}, $s);
+}
+
+print "\n\nMessages sent by system (ifnews+ifmail):\nEchomail Netmail  Route\n";
+%aux=(%ifmail, %ifnewskeys);
+for $s (sort (keys %aux)) {
+  next  if  ($opt_s ne "") && ($s !~ /$opt_s/o);
+  printf("%7d %7d   %s\n", $ifnewscount{$s}, $ifmail{$s}, $s);
+}
+
+print "\n\nCall-in systems (ifcico):\n";
+printf("%-20s%s\n","Time","Operator");
+for $s (sort keys %inbcount) {
+  next  if  ($opt_s ne "") && ($s !~ /$opt_s/o);
+  printf("%-20s%s\n",
+         $inbtime{$s}, $inbkeys{$s});
+}
+
+if (%toss_area) {
+  print "\n\nMessages not tossed for lack of area tag (iftoss):\nNumber  Area tag\n";
+  for $a (sort keys %toss_area) {
+    printf("%5d    %s\n", $toss_area{$a}, $a);
+} }
+
+exit 0;
+
+sub mmss {
+  local($s)= @_;
+  sprintf("%4d:%2.2d", $s/60, $s-int($s/60)*60);
+}
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/crontab.news
@@ -0,0 +1,3 @@
+# Every 30 minutes send outbound echomail to the gateway
+6,36 * * * *         /etc/news/scripts/fidosend f206.n332
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/ifpoll
@@ -0,0 +1,90 @@
+#!/bin/sh
+# ifpoll, poll my boss node or the node given as argument 1
+#
+# This script is based on the original ifpoll by Rasca Gmelch
+# Copyright (C) 1997 by Marco d'Itri, 2:332/206.10 / md@linux.it
+
+. /etc/ifmail/ifshellvars
+
+# my boss node (default address to poll)
+NODE="f206.n332.z2.fidonet.org"
+# Max number of failed polls
+MaxTry=8
+# delay between outgoing calls in seconds
+DELAY=60
+
+# argv[1] is the optional node to call
+if [ "$1" != "" ]; then
+  if [ "$1" = "-?" -o "$1" = "-h" ]; then
+    echo "usage: ifpoll [<node>]"
+    exit 3
+  else
+    NODE=$1
+  fi
+fi
+
+###############################################################################
+# start some tail(1)s and initialize the ^C handler
+if [ -n "$INFO_TTY" ]; then
+  { tail -n0 -f $IFLOG > $INFO_TTY & }; TOKILL=$!
+  ##{ tail -n0 -f $IFLOG | grep "received" & }; TOKILL="$TOKILL $!"
+  ##{ tail -n0 -f $IFLOG | grep "sent" & }; TOKILL="$TOKILL $!"
+
+  trap "killall -HUP ifcico; kill $TOKILL; echo -e 'Aborted\n'; exit 100;" INT
+else
+  trap "killall -HUP ifcico; echo -e 'Aborted\n'; exit 100;" INT
+fi
+
+# let's pack the fido stuff..
+$IFBIN/ifpack
+
+###############################################################################
+# loop until ifcico could connect the node or MaxTry is encountered
+i=1; errlv=1
+while [ $i -le $MaxTry -a $errlv != 0 ]; do
+  echo -n "ifpoll[$$]: $i. try ($NODE) "
+  $IFBIN/ifcico -r 1 $NODE
+  errlv=$?
+  case "$errlv" in
+  "0")
+      echo "ok :)"
+      ;;
+  "2")
+      echo 'failed: busy (rc 2)'
+      if [ $i != $MaxTry ]; then sleep $DELAY; fi
+      ;;
+  "3")
+      echo 'failed: system error (rc 3)'
+      ;;
+  "11")
+      echo 'failed: lost carrier (rc 11)'
+      if [ $i != $MaxTry ]; then sleep $(($DELAY+120)); fi
+      ;;
+  *)
+      echo "failed: ?? (rc $errlv)"
+      if [ $i != $MaxTry ]; then sleep $DELAY; fi
+      ;;
+  esac
+  i=$(($i+1))
+done
+
+###############################################################################
+# if the poll was ok, unpack
+if [ $errlv = "0" ]; then
+  if [ "`echo $IFSPOOL/inb/0000fff6.*`" != "$IFSPOOL/inb/0000fff6.*" ]; then
+    cp --force --link --preserve \
+       $IFSPOOL/inb/0000fff6.* $IFSPOOL/BAK
+  fi
+  $IFBIN/ifunpack
+  find $IFSPOOL/BAK  -mtime +3 -type f -exec rm -fv \{\} \; >/dev/null
+  find $IFSPOOL/outb -empty    -type f -exec rm -fv \{\} \; >/dev/null
+fi
+
+###############################################################################
+# Kill tail(s)
+if [ ! -z "$INFO_TTY" ]; then
+  kill $TOKILL
+fi
+
+# return the errorlevel of ifcico
+exit $errlv
--- /dev/null
+++ ifmail-2.14tx8.10/md/ifshellvars
@@ -0,0 +1,24 @@
+# user ifmail runs as
+IFUSER=ftn
+
+# where binaries like "ifcico" and "ifpack" reside
+IFBIN=/usr/lib/ifmail
+
+# spool directory for ftn packets where inbound and outbounds reside
+IFSPOOL=/var/spool/ftn
+
+# logfiles directory
+IFLOGDIR=/var/log/ifmail
+
+# logfile of ifcico
+IFLOG=$IFLOGDIR/iflog
+
+# default console for showing the log (used by ifpoll)
+INFO_TTY="/dev/tty24"
+
+# nodelists directory name
+IFNLDIRNAME=nl.d
+
+# nodelists directory
+IFNLD=$IFSPOOL/$IFNLDIRNAME
+
--- /dev/null
+++ ifmail-2.14tx8.10/md/ifmail.m4
@@ -0,0 +1,74 @@
+PUSHDIVERT(-1)
+ifdef(`IFMAIL_MAILER_PATH',, `define(`IFMAIL_MAILER_PATH', /usr/lib/ifmail/ifmail)')
+ifdef(`IFMAIL_MAILER_FLAGS',, `define(`IFMAIL_MAILER_FLAGS', `')')
+ifdef(`IFMAIL_MAILER_ARGS',, `define(`IFMAIL_MAILER_ARGS', `ifmail -r $h $u')')
+
+POPDIVERT
+#######################################
+###   IFMAIL Mailer specification   ###
+#######################################
+
+VERSIONID(`@(#)ifmail.m4	2.0 (Md) 97/08/23')
+
+Mifmail,	P=IFMAIL_MAILER_PATH, F=CONCAT(8mDFMuCS, IFMAIL_MAILER_FLAGS), S=11, R=21,ifdef(`IFMAIL_MAILER_MAX', ` M=IFMAIL_MAILER_MAX,')
+		_OPTINS(`IFMAIL_MAILER_CHARSET', `C=', `, ')T=X-FTN/RFC822/X-Unix, U=ftn:ftn,
+		A=IFMAIL_MAILER_ARGS
+Mifmail-c,	P=IFMAIL_MAILER_PATH, F=CONCAT(8mDFMuCS, IFMAIL_MAILER_FLAGS), S=11, R=21,ifdef(`IFMAIL_MAILER_MAX', ` M=IFMAIL_MAILER_MAX,')
+		_OPTINS(`IFMAIL_MAILER_CHARSET', `C=', `, ')T=X-FTN/RFC822/X-Unix, U=ftn:ftn,
+		A=IFMAIL_MAILER_ARGS -gc
+Mifmail-h,	P=IFMAIL_MAILER_PATH, F=CONCAT(8mDFMuCS, IFMAIL_MAILER_FLAGS), S=11, R=21,ifdef(`IFMAIL_MAILER_MAX', ` M=IFMAIL_MAILER_MAX,')
+		_OPTINS(`IFMAIL_MAILER_CHARSET', `C=', `, ')T=X-FTN/RFC822/X-Unix, U=ftn:ftn,
+		A=IFMAIL_MAILER_ARGS -gh
+dnl****************************************************************************
+LOCAL_CONFIG`'dnl
+ifdef(`FTN_POINTS',
+`# All our points. Each user must have the same point number on each network
+CD FTN_POINTS
+')dnl
+divert`'dnl
+dnl*
+dnl****************************************************************************
+LOCAL_NET_CONFIG`'dnl
+ifdef(`FTN_POINTS',
+`# Route mail for our fidotech points
+R$* < @ $=D . $=w . >  $*	$#ifmail $@ $2.$3 $: $1 < @ $2 . $3 > $4
+')dnl
+dnl*
+dnl+ Does not works on nodes which run uucp.
+ifdef(`IFMAIL_BOUNCE_UUCP',
+`# Bounce mail sent to the gateway without a To: pseudo header as first line
+RUUCP		$#error $@ 5.1.1 $: "you must provide a To: address"
+')dnl
+dnl*
+# send as normal email and not as netmail
+R$* < @ $+ .ip.fidonet.org. > $*	$: $1 < @ $2 .fidonet.org. > $3
+divert`'dnl
+dnl*
+ifdef(`FIDO_SMART_HOST',
+R$* < @ $+ .z1.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z1.fidonet.org > $3
+R$* < @ $+ .z2.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z2.fidonet.org > $3
+R$* < @ $+ .z3.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z3.fidonet.org > $3
+R$* < @ $+ .z4.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z4.fidonet.org > $3
+R$* < @ $+ .z5.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z5.fidonet.org > $3
+R$* < @ $+ .z6.fidonet.org . > $*	$#ifmail $@ FIDO_SMART_HOST $: $1 < @ $2 .z6.fidonet.org > $3
+')dnl
+dnl****************************************************************************
+LOCAL_RULE_0`'dnl
+# trying to guess real internet domains
+C{NotFtn} fidonet ftp www smtp mail ns ns2 whois
+R$* < @ $={NotFtn}.$+.fidonet.org. > $*	$: $1 < @ $2 . $3 .ip.fidonet.org. > $4
+divert
+dnl*
+dnl****************************************************************************
+LOCAL_RULE_3`'
+# canonize fidotech domains.
+R$* < @ $+ .z1.fidonet.org > $*	$: $1 < @ $2 .z1.fidonet.org. > $3
+R$* < @ $+ .z2.fidonet.org > $*	$: $1 < @ $2 .z2.fidonet.org. > $3
+R$* < @ $+ .z3.fidonet.org > $*	$: $1 < @ $2 .z3.fidonet.org. > $3
+R$* < @ $+ .z4.fidonet.org > $*	$: $1 < @ $2 .z4.fidonet.org. > $3
+R$* < @ $+ .z5.fidonet.org > $*	$: $1 < @ $2 .z5.fidonet.org. > $3
+R$* < @ $+ .z6.fidonet.org > $*	$: $1 < @ $2 .z6.fidonet.org. > $3
+#R$* < @ $+ .crash.fidonet.org > $*	$: $1 < @ $2 .crash.fidonet.org. > $3
+R$* < @ $+ .ftn > $*		$: $1 < @ $2 .ftn. > $3
+divert`'dnl
+dnl****************************************************************************