ifmail-2.14tx8.10.orig/ 40755 1751 50 0 6701151722 12052 5ustar mdsrcifmail-2.14tx8.10.orig/Makefile100644 1751 50 3034 6540753002 13607 0ustar mdsrc# Copyright (c) Eugene G. Crosser, 1993-1997 # Top-level makefile for ifmail package include CONFIG TARFILE = ifmail-${VERSION}.tar.gz DIRS = iflib ifgate ifcico ifeq (yes,${USE_NLS}) DIRS += po endif all install depend man: for d in ${DIRS}; do (cd $$d && echo $$d && ${MAKE} $@) || exit; done; directories: for i in ${BINDIR} `dirname ${CONFIGFILE}` ${MAPTABDIR} \ `dirname ${DEBUGFILE}` `dirname ${LOGFILE}` ; do \ if [ ! -d $${i} ]; then \ mkdir -p $${i}; \ chown ${OWNER}.${GROUP} $${i}; \ chmod 0750 $${i}; \ fi; \ done chmod 0755 ${BINDIR} chmod 0755 ${MAPTABDIR} install_config: directories ${INSTALL} -o ${OWNER} -g ${GROUP} -m 0640 misc/config `dirname ${CONFIGFILE}` ${INSTALL} -o ${OWNER} -g ${GROUP} -m 0640 misc/Areas `dirname ${CONFIGFILE}` for i in misc/maptabs/* ; do \ ${INSTALL} -o ${OWNER} -g ${GROUP} -m 0644 $${i} ${MAPTABDIR} ; \ done clean: rm -f .filelist ${TARFILE} for d in ${DIRS}; do (cd $$d && echo $$d && ${MAKE} $@) || exit; done; tar: ${TARFILE} ${TARFILE}: filelist cd ..; ${TAR} cvTf ifmail/.filelist - | gzip >ifmail/${TARFILE} filelist: echo ifmail/Makefile >.filelist echo ifmail/CONFIG >>.filelist echo ifmail/README >>.filelist echo ifmail/README.charset >>.filelist echo ifmail/README.first >>.filelist echo ifmail/LSM >>.filelist echo ifmail/LSM.TX >>.filelist echo ifmail/misc >>.filelist echo ifmail/Changelog.TX >>.filelist echo ifmail/Credits.TX >>.filelist for d in ${DIRS}; do (cd $$d && echo $$d && ${MAKE} filelist && \ cat filelist >>../.filelist) || exit; done; ifmail-2.14tx8.10.orig/CONFIG100644 0 0 50533 6701151722 13521 0ustar rootroot# Compile-time configuration for ifmail FidoNet mailer and gateway COPYRIGHT = "Eugene G. Crosser, 1993-1997" ############################################################## # Included a lot of code from version 2.8c-JE13JUL1995 # # which is copyrighted by Tsuneo Tanaka # # # # Included code from ifcico-3.0.cm which is copyrighted # # by Christof Meerwald and under # # the GPL license. that applies to create_freqlist() in # # filelist.c, ifinfo.c, ttyio_cm.h, ifreq.c and the related # # man pages. # # see http://www.cosy.sbg.ac.at/~cmeer/ifcico/ for more # # details on ifcico-3.0.cm # # # # The HYDRA protocol is copyrighted by Arjen G. Lentz, # # LENTZ SOFTWARE-DEVELOPMENT and Joaquim H. Homrighausen. # # see the file ifcico/hydra.LICENSE.DOC for the full license # # # # conversion code for japanese in charconv_jp.c # # is copyrighted by Ken Lunde # # conversion code for chinese in charconv_hz.c # # is copyrighted by Fung F. Lee # # # # Programs in misc/contrib are copyrighted by their authors # # # # The "tx" versions also includes ideas and patches from # # several other people, see file Credits.TX # # # # Other modifications are from me. # # ( Pablo Saratxaga ) # ############################################################## VERSION = "2.14-tx8.10" #SHVER = 2.14tx # Where to put binaries BINDIR = $(DESTDIR)"/usr/lib/ifmail" # Main configuration file. This default may be overwritten by -I key. CONFIGFILE = $(DESTDIR)"/etc/ifmail/config" # Where translations tables reside MAPTABDIR = $(DESTDIR)"/usr/lib/ifmail/maptabs" # Debug messages turned on by -x key are written here. # Some error messages may occationally appear here too. # This may be changed in the 'config' file. DEBUGFILE = $(DESTDIR)"/var/log/ifmail/ifdebug" # Procession log. Usually gets several lines for each invocation. # Also look for error diagnostics here. If HAS_SYSLOG defined, # only stdout and stderr from the packers and unpackers go to this # file, while actual logging is done via syslog() calls. # This may be changed in the 'config' file. LOGFILE = $(DESTDIR)"/var/log/ifmail/iflog" # Use syslog() facility codes for mail gate, news gate and ifcico. # Define -DHAS_SYSLOG (see below) #MAILLOG = LOG_MAIL MAILLOG = LOG_LOCAL0 #NEWSLOG = LOG_NEWS NEWSLOG = LOG_LOCAL0 #CICOLOG = LOG_UUCP CICOLOG = LOG_LOCAL0 # Directory where UUCP lock files reside. #LOCKDIR = $(DESTDIR)"/var/spool/uucp" LOCKDIR = $(DESTDIR)"/var/lock" # Directory from which file requests are resolved. # This may be changed from the 'config' file. #PUBDIR = $(DESTDIR)"/home/ftp/pub" PUBDIR = $(DESTDIR)"/var/spool/uucppublic" # News spool directory (to check space only) #NEWSSPOOL = $(DESTDIR)"/usr/spool/news" NEWSSPOOL = $(DESTDIR)"/var/spool/news" # Fake directory where resultant files go if `-N' key used (trailing slash # needed) FAKEDIR = $(DESTDIR)"/tmp/ifmail/" # Uses libintl for internationalizing some strings. Interactive messages are # printed in your language, according to LC_MESSAES or LANG variable) # # po/Makefile and nls implementation idea copied from rpm-2.4.3 # USE_NLS = yes # REFERENCES_MSC96 keep track of MSGID / Message-ID couples, and when a # a ^aREPLY arrives that correspond to those MSGID, it is expanded back to # the correct References: line # see iflib/ref.c for more complete info # REFERENCES_MSC96 = yes # use a shared lib for common functions ? # Does not work yet. #SHARED = yes # Compile-time system-dependant options. # If you specify "-DHAS_NDBM_H", ndbm calls will be used instead # of dbm ones, and the feature will be activated of Cnews log processing # to add entries to SEEN-BY if echo message is exported to several FTN # nodes by Cnews mechanism. This works with INN too. # If you specify "-DHAS_STATFS" or "-DHAS_STATVFS", statfs() (or statvfs() # respectivly) call will be used to check available disk space. For statfs() # call, you must also specify which .h file to use: "-DSTATFS_IN_VFS_H" or # "-DSTATFS_IN_STATFS_H" or "-DSTATFS_IN_STATVFS_H" or "-DSTATFS_IN_MOUNT_H". # For statvfs() call, statvfs.h is included. # define -DSCO_STYLE_STATFS if your statfs() call requires 4 arguments. # If you specify "-DHAS_SETSID", setsid() call is used to detach from the # control terminal. Otherwise setpgrp() call is used, and in this case you # may specify "-DBSD_SETPGRP" to use BSD-style call. Used in ifcico only. # If you specify "-DDONT_HAVE_TM_GMTOFF", timezone offset will be calculated # from the difference between the results of localtime() and gmtime() calls # instead of using tm_gmtoff field of struct tm. # If you specify "-DDONT_HAVE_GETOPT", local definitions for getopt will # be used (but not the function itself) # For ifcico, you must specify -DHAS_TERMIOS_H (preffered), -DHAS_TERMIO_H # or -DHAS_SGTTY_H to use POSIX-y, SysV-ish of BSD-ish terminal control. # in SVR4 you should specify -DHAS_DIAL (and maybe -DHAS_DIAL_H) to use # dial() library function instead of regular open(). Lock files are # not used in this case. # for uucp lock files, you must specify either -DASCII_LOCKFILES or # -DBINARY_LOCKFILES # define -DHAS_FSYNC if there is a fsync() system call (to update .flo # files) # define -DPARANOID if you want iftoss to deny packets with wrong password. # define -DRELAXED if you want iftoss to accept packets that are not # addressed to your node. # define -DFORCEINTL if you want ifmail to create ^aINTL even if this is # not an inter-zone netmail. # define -DNEED_UUCPFROM if your MTA needs a uucp "From" line in mail. # define -DHAS_TCP if you want ifmail to be able to originate outgoing # connections over TCP/IP (socket library needed) # define -DHAS_TERM if you want ifmail to be able to originate outgoing # connections over TERM (TCP "extention", client.a needed) # define -DHAS_REGEX_H or -DHAS_LIBGEN_H if you have either of these # header files for regular expression handlers. # define -DHAS_SYSLOG to use syslog() instead of logging to files. # Files are necessary anyway, external programs' stdout and stderr # are redirected there. # define -DNEED_BSY if you want ifpack and ifcico to create .bsy # files preventing simultaneous processing of the same node. # This is *not* necessary, ifcico will work without such locking. # define -DNEED_FORK if your system is uncapable of getting rid of the # control terminal unless you are running not as a group leader. # as of June 1994, FreeBSD has a nasty bug in the kernel lseek() code: # if you make lseek() to a point before the start of the file, it # succeeds and the writing point becomes negative. Fortunately, # subsequent write()s fail :-). To overwork this, define # -DNEGATIVE_SEEK_BUG, this will add an extra fseek() to restore # zero writing point where necessary. # define -DNEED_TRAP if you want debugging information when the programs # are aborted with segmentation fault etc. Currently tested and works # only with Linux, and only with kernels >= 1.1.20. # define -DSLAVE_SENDS_NAK_TOO if you have problems answering incoming # EMSI sessions originated by FrontDoor. FrontDoor does not follow # EMSI specifications when originating calls, this is a workaround. # define -DBELEIVE_ZFIN=1 if you cannot get files sent by Terminate. # Original Zmodem source does not beleive first ZFIN packet when # receiving file, and sends more than one ZFIN while sending. But # it seems that Terminate Zmodem only send one ZFIN. I could not # check this myself. If not defined, BELEIVE_ZFIN will be assumed # 2, that is, skip 1st ZFIN but acknowledge second. # define -DDONT_HAVE_DIRENT if there is no working opendir()/readdir() # etc. in your libc. You will also need to add "dirent.o" to the NEEDED # (see below). # define -DHAS_BSD_SIGNALS if your SIGALRM does not interrupt system # calls by default. Note that this also needed on Linux with glibc2 # (libc6.x.x) # define -DDONT_HAVE_DBMCLOSE if your dbm implementation does not have # dbmclose() / dbm_close() function. # define -DHAS_BSD_DB if you have BSD `db' package instead of usual # [nsg]dbm. We use ndbm compatibility interface of `db', so you also # need to specify -DHAS_NDBM_H. `ndbm compatibility' interface of BSD # db is not fully ndbm compatible, this is a workaround. # specify -DINT32= which type corresponds to 32bit and # -DINT16= - which type corresponds to 16bit integer on your # system, usually "-DINT32=long -DINT16=short" # ### Defines from ifcico 3.0.cm # define HAS_SELECT if you have select() system call. alarm() will not # be used for timed reads and bidirectional protocols. # define -DHAS_SYS_SELECT_H if your select() prototype is in sys/select.h # (otherwise assumed to be in sys/time.h) # define -DSELECT_NEED_SYS_TIMES_H if #include needed to # use select() (maybe some SCO versions) # define -DSELECT_NEED_BSDTYPES_H if #include needed to # use select() # ### Defines from version 2.8c-JE # define -DIGNORE_SOFTCR if you need to treat SoftCR (0x8d) as a printable # character. # define -DKEEP_TEARLINES_CLEAN if you want to keep tearlines clean. # define -DREPLACE_TEARLINES_WITH=\""ifmail 2.8b-JE for 1BM OSF/2"\" if you # want to replace tearlines with "ifmail 2.8b-JE for 1BM OSF/2." # define -DRESTAMP_FUTURE_POSTINGS if your news transport agent # refuses/rejects 'future postings.' # define -DMACHIGAI to not be fooled whith those lines like "John:\n" etc, # some FTN editors use. This option tells ifmail not to consider those lines # as rfc headers lines, so avoiding that INN rejects the messages for # "non colon space in header" reason. # ### Defines in TX versions # define -DPUDDLE_GATE handle Newsgroups: line generated by puddle.fidonet.org # (the different newsgroups are separated by ", " instead of ","), in the ftn # messages. If you don't receive gated echoareas from there you don't need it. # define -DPCBOARD_GATE to recognize lines generated by usenet-> PcBoard -> ftn # gateways (I only know one, the 2:320/7) # -DALLOW_CONTROL allows Control: headers to be gated, and Control: cancel # to be be created from their ftn counterparts and vice-versa # -DFORCE_REPLYTO forces REPLYTO and REPLYADDR lines # -DFORCE_REPLYTO_LOCAL use address local (bestaka), even if a REPLYTO # with another address already exists. # So your downlinks only saw gated mail as being from your machine # -DRNEWSB; when compiled with it, the result of ifnews -N is an # rnews readable file. (otherwise it puts "#!/bin/sh\nrnews <<__EOF__\n" # at the beginning). This allows moving the file to news in.coming directory # and running "rnews -U"; without this option, you have to shell-execute the # file, and you have problems with characters of special meaning for the shell # ( \, `, $, etc.). # define -DRESTAMP_OLD_POSTINGS=XX if you want to allow your news transport # agent to accept articles older tan 15 days (but not more than XX). # This can be necessary because of the low velocity of FTN routing. # define -DDONT_REGATE if you don't want ifmail to gate a message # that was originally gated by another gateway system. # -DKEEP_MSGID_ON_SPLIT keeps the Message-ID on splitted FTN messages. # so they are not gated back to usenet on another gateway if the original # rfc article reached the site first. # -DAREAS_HACKING allows you to define Areas.fidosite files which # are scanned for a given fidosite. If the file doesn't exist, then it # defaults to Areas. # -DLEVEL=X sets the level for ^aRFC- kludges. If not set 1 is the default. # it determines the amount of info from rfc headers that is kept when gating # -1: really nothing is gated, not recommended at all ! # 0: only intended for points or end-leaf nodes that have only an FTN link # 1: normal level inteded for normal gateways and nodes (points) # 2: keeps almost everything, including lots of non relevant headers. # 3: hey! same as 2 but in plain text, no ^aRFC- kludge is used. # I recommend you to leave the default value of 1 if you don't _really_ know # what you are doing. # -DFSC_0047 implements fsc-0047 ^aSPLIT kludges for splitted messages # !!! NOT WORKING YET !!!! # If someone can take a look at it and really implement it I'll highly appreciate # !!! NOT WORKING YET !!!! # -DDEFAULT_ORIGIN=\"string\" to specify the string to put in Origin lines # for messages which haven't one nor an Organisation: header. # The default is "Unknown". # -DTERMAIL_HACK tries to correct a bug in TerMail 4 which sometimes reports # incorrect charsets (ie: puts "LATIN-1 2" while the message use in fact # "IBMPC 2". Hoping that version 5 will repair it. # -DFSCHTML text/html support from fsc proposal of Lee Kindness (2:259/7.1) # # -DPGP_LIKE_DASHES compiles the Eugene's code that changes "---" to "- ---" # I prefer not tu use it until I don't do the reverse, it will also mess up # the PGP signatures... # -DPKT_2_2 creates outbound packets in the 2.2 pkt format, # instead of 2+ format. take a look at iflib/packet.c for the differences # between those two formats # -DGATEBAU_MSGID uses Gatebau rules for MSGID <-> Message-ID conversion # instead of the ifmail rules. ** USE IT WHITH CARE ** # -DADD_PID adds a ^aPID kludge when gating to FTN whit the name of the # user program used by the message author (if that can be retrieved; if not # the ^aPID isn't added) #General options: # These are not machine dependent, and describe only ifmail/ifcico features OPTS = -DFORCE_REPLYTO -DTERMAIL_HACK -DTPUT_STATUS_HACK \ -DDONT_REGATE -DSLAVE_SENDS_NAK_TOO \ -DPUDDLE_GATE -DPCBOARD_GATE -DRNEWSB -DJE \ -DRESTAMP_OLD_POSTINGS=25 -DBELEIVE_ZFIN=1 \ -DKEEP_MSGID_ON_SPLIT -DIGNORE_SOFTCR \ -DRELAXED -DFORCEINTL -DHAS_TCP -DAREAS_HACKING \ -DRESTAMP_FUTURE_POSTINGS -DFSCHTML -DMACHIGAI \ -DALLOW_RETURNPATH -DGATEBAU_MSGID \ -DDIRTY_CHRS \ -DAREAS_NUMERAL_COMMENTS # -DAREAS_NUMERAL_COMPATIBILITY # -DALLOW_CONTROL # -DPARANOID -DNEED_UUCPFROM # Linux/x86: # (If you use glibc2 aka libc6.x add -DHAS_BSD_SIGNALS) # (If you use libc5 remove -DHAS_BSD_SIGNALS) OPTS += -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \ -DDONT_HAVE_TM_GMTOFF -DHAS_TERMIOS_H -DASCII_LOCKFILES \ -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_REGEX_H \ -DHAS_SYSLOG -DNEED_BSY -DNEED_TRAP \ -DNEED_FORK -DHAS_BSD_SIGNALS -DHAS_SELECT \ -DINT32=long -DINT16=short # 386BSD, FreeBSD: #OPTS += -DHAS_STATFS -DSTATFS_IN_MOUNT_H -DHAS_SETSID -DHAS_NDBM_H \ # -DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC -DHAS_IOCTL_H \ # -DHAS_REGEX_H -DHAS_SYSLOG \ # -DNEED_BSY -DNEED_FORK -DNEGATIVE_SEEK_BUG \ # -DHAS_SYS_ERRLIST -DHAS_BSD_SIGNALS -DHAS_SELECT \ # -DINT32=long -DINT16=short # SVR4: #OPTS += -DHAS_STATVFS -DDONT_HAVE_TM_GMTOFF -DHAS_SETSID -DHAS_NDBM_H \ # -DHAS_TERMIOS_H -DHAS_DIAL -DHAS_DIAL_H -DASCII_LOCKFILES \ # -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_LIBGEN_H -DHAS_SELECT \ # -DHAS_SYSLOG -DINT32=long -DINT16=short # Solaris #OPTS += -DHAS_STATVFS -DDONT_HAVE_TM_GMTOFF -DHAS_SETSID -DHAS_NDBM_H \ # -DHAS_TERMIOS_H -DHAS_DIAL -DHAS_DIAL_H -DASCII_LOCKFILES \ # -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_LIBGEN_H -DNEED_BSY \ # -DHAS_SELECT -DHAS_SYSLOG -DINT32=long -DINT16=short # RISCOS5: #OPTS += -DHAS_STATVFS -DDONT_HAVE_TM_GMTOFF -DHAS_SETSID -DHAS_NDBM_H \ # -DHAS_TERMIOS_H -DHAS_DIAL -DHAS_DIAL_H -DASCII_LOCKFILES \ # -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_LIBGEN_H \ # -DHAS_SYSLOG \ # -DCRTSFL_COMMAND=\"${BINDIR}/rtscts\" \ # -DMIPS_RTSCTS_HACKING=\"${BINDIR}/rtscts\" \ # -DMIPS_DATE_HACKING -DMIPS_SPEED_HACKING \ # -DINT32=long -DINT16=short # SunOS: #OPTS += -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \ # -DDONT_HAVE_GETOPT -DHAS_TERMIOS_H -DASCII_LOCKFILES \ # -DHAS_FSYNC -DHAS_SYSLOG -DHAS_SELECT \ # -DINT32=long -DINT16=short # SCO Unix 3.2v4.2 #OPTS += -DHAS_STATFS -DSTATFS_IN_STATFS_H -DSCO_STYLE_STATFS \ # -DHAS_TERMIOS_H -DDONT_HAVE_TM_GMTOFF -DDO_NEED_TIME \ # -DDONT_HAVE_GETOPT -DASCII_LOCKFILES -DHAS_IOCTL_H \ # -DHAS_SYSLOG \ # -DINT32=long -DINT16=short # ISC Unix 3.2 v3.0 #OPTS += -DHAS_STATFS -DSTATFS_IN_STATFS_H -DHAS_TERMIO_H \ # -DDONT_HAVE_TM_GMTOFF -DDONT_HAVE_GETOPT \ # -DASCII_LOCKFILES -DHAS_IOCTL_H -DSCO_STYLE_STATFS \ # -DUSE_POLL -DHAS_NET_ERRNO_H -DSHORT_PID_T \ # -DHAS_SYSLOG \ # -DINT32=long -DINT16=short # On ISC, if you are suing gcc, you can run into a trouble with sscanf() # function. It appears that sscanf(string,"%d.%d",&int1,&int2) where # string is a constant segfaults unless you specify "-fwritable-strings" # to gcc. I would say that this is a bug in ISC libc. If nessecary, # add this to the defines above. If you have ISC version 4.0 or later, # you can add "-posix", remove "-DSHORT_PID_T" and specify "-DHAS_TERMIOS" # to get benefit of posix terminal control. # AIX 3.2.5 #OPTS += -DDONT_HAVE_TM_GMTOFF -DDO_NEED_TIME \ # -DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC \ # -DHAS_IOCTL_H -DHAS_STATFS -DSTATFS_IN_STATFS_H \ # -DNEED_BSY -DINT32=long -DINT16=short # NeXTSTEP #OPTS += -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID \ # -DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC -DHAS_IOCTL_H \ # -DHAS_REGEX_H -DHAS_SYSLOG \ # -DNEED_BSY -DNEED_FORK -DNEGATIVE_SEEK_BUG \ # -DDONT_HAVE_GETOPT -DINT32=long \ # -DINT16=short # Digital UNIX 3.2 (formerly OSF/1) #OPTS += -DHAS_NDBM_H -DHAS_STATVFS -DHAS_SETSID -DNEED_FORK \ # -DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC -DHAS_SYSLOG \ # -DHAS_REGEX_H -DDONT_HAVE_GETOPT \ # -DNEED_BSY -DSLAVE_SENDS_NAK_TOO -DINT32=int -DINT16=short # for make install, where to put binaries and what owner to set # (owner should be a `trusted user' for your MTA) OWNER = fnet GROUP = fnet MODE = 0711 SMODE = 4710 MANDIR = $(DESTDIR)"/usr/man" MANOWNER = man MANGROUP = man MANMODE = 0644 INSTALL = install AR = ar RANLIB = ranlib #RANLIB = touch SHELL = /bin/sh ECHO = echo -e CC = gcc #YACC = bison -y YACC = yacc #LEX = flex LEX = lex AWK = awk TAR = tar #CFLAGS = -g -Wall # Linux, 386BSD, FreeBSD, SunOS: CFLAGS = -O2 -Wall # SVR4: #CFLAGS = -O -Xa # NeXTSTEP #CFLAGS = -O2 -Wall -posix -g #LDFLAGS = -g -L/usr/gnu/lib -nostartfiles /lib/posixcrt0.o # DgUX #CFLAGS= -migrate -O5 -ifo -g0 #LDFLAGS = -s LDFLAGS += # For LIBS, you may need to add "-lfl" if you are using flex 2.4.x # If you need TERM also add e.g. "/usr/src/term112/client.a" # Linux # add -lresolv if you use libc6 (aka glibc 2) # remove -lresolv if you use libc5 LIBS = -lgdbm -lresolv # SunOS: #LIBS = # 386BSD, FreeBSD: #LIBS = -lgdbm -lcompat # SVR4 #LIBS = -ldbm -lform -lnsl -lsocket -lc -L/usr/ucblib -lucb # Solaris #LIBS = -ldbm -lform -lresolv -lsocket -lc -L/usr/ucblib # SCO #LIBS = -ldbm -lsocket -lintl # ISC #LIBS = -lcposix -lmalloc -ldbm -linet -lPW # NeXTSTEP #LIBS = -lgdbm -lposix INCLUDES = -I${INCDIR} # ISC #INCLUDES = -I/usr/include/rpcsvc -I${INCDIR} # What programs are absent at your system? ## !!! tx version uses a lot the strcasestr() function. I have had comments ## on only Linux and 386BSD, so I don't know if others need to add it or ## already have in their standard libc. Check out and tell me - P.Saratxaga #NEEDED = strcasestr.o strncasecmp.o strcasecmp.o rename.o mkdir.o usleep.o \ # regexpr.o strerror.o # Linux NEEDED = strcasestr.o # SVR4 #NEEDED = regexpr.o strcasestr.o # Solaris # tmpfile.o places temporary file to /tmp, instead of /var/tmp. # This greatly increase performanece of iftoss. #NEEDED = regexpr.o strcasestr.o tmpfile.o # SCO #NEEDED = strcasestr.o strncasecmp.o strcasecmp.o usleep.o regexpr.o # SunOS and 386BSD and FreeBSD #NEEDED = signal.o strcasestr.o # ISC #NEEDED = usleep.o regexpr.o vsyslog.o # AIX #NEEDED = strcasestr.o strncasecmp.o strcasecmp.o # confitional stuff ifeq (yes,${USE_NLS}) # uncomment this line if you use libc5 # comment out this line if you use glibc #LIBS += -lintl NLSDIR=/usr/share/locale NLSPACKAGE=ifmail OPTS += -DHAVE_LOCALE_H -DNLS_CAT_NAME=\"${NLSPACKAGE}\" \ -DNLS_LOCALE_PATH=\"${NLSDIR}\" endif ifeq (yes,${REFERENCES_MSC96}) OPTS += -DREFERENCES_MSC96 endif ifmail-2.14tx8.10.orig/README100644 1751 50 4246 6420407564 13043 0ustar mdsrcCopyright (c) 1993-1997 by Eugene G. Crosser This is a README file for ifmail - Internet to FidoNet gateway and transport package. You may do virtually what you wish with this software, as long as the explicit reference to its original author is retained: Eugene G. Crosser , 2:5020/230@FidoNet THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE. This is freeware. Except for the modules taken from the other packages, (which may be subject to different distributing policy), you may use this software for any purpose, commercial or noncommercial, including even selling it, without paying anything. The package consists of two major parts: ifgate (gateway programs, analog of FidoNet tosser/packer), and ifcico (transport agent, analog of FidoNet mailer), each in its own subdirectory. Routines common to these programs are in the iflib subdirectory. In the top-level subdirectory are: README (this file), CONFIG (your system configuration definition) and top-level Makefile. There is also a "misc" subdirectory with examples of configuration, some useful scripts, FAQ list etc. Each of the subdirectories (ifgate, ifcico, iflib and misc) contains its own README file, refer to them for more technical details. To install the package, edit the CONFIG file to match your configuration and run "make" and (if you are satisfied) "make install". There is a mailing list for ifmail-related discussions. To subscribe, send request to: (this is a SmartList program). Just put a word `subscribe' into subject, message body is irrelevant. Likewise, to unsubscribe, send mail to with a word `unsubscribe' in the subject. The HTML-ized archieve of the mailing list is available on the WWW at http://www.average.org/ifmail/maillist/ The official home for the package is: http://www.average.org/ifmail/ or ftp://ftp.average.org/pub/ifmail/ -- Eugene G. Crosser ; 2:5020/230@fidonet Voice: +7 095 214 7492; http://www.average.org/~crosser/ Moscow, Russia ifmail-2.14tx8.10.orig/README.charset100644 0 0 32566 6573551267 15166 0ustar rootrootPreamble ======== FTN networks are mainly MS-DOS based, when rfc ones are generally UNIX based. Things could have been simple, but as you know "simple" is an unknown word whe talking about charsets. As you know, the charsets used for MS-DOS and for UNIX are different (there is also others !), we need a way to change the coding when gating messages. From time to time I wrote comments like "should I change this ?" or "what is better ?", etc. I will higly appreciate any comments from you about that. Thanks. January 13th, 1996 Pablo Saratxaga 2:293/2219@fidonet How it works ? ============== I think the most effective way is to search for headers lines that tell us which one is used. For FTN networks there is: "^aCHRS: " or "^aCHARSET: " (which is obsolescent) Theres is also a codage, comparable to quoted printable, called fsc-0051, and indicated with "^aI51". However as I never saw a message using it I won't support it for now. For rfc networks, it is done with: Content-Type: ....; charset= [ ..... ] I've only added charset support for "text/plain" types. (charset support for "video/avi" is somewhat difficult :-) If we can't found a known charset like this, then ifmail will search if there isn't a line corresponding to the other side that can tell us this. In other words it will then search for X-FTN-CHRS: or ^aRFC-Content-Type: text/plain; charset= If a charset isn't found yet, and if you compiled ifmail with -DJE, it will at the Areas file (look further at "JE compatibility") If we still haven't a charset, it will be guessed (ifmail will look at Message-ID, if it doesn't end with ".ftn>" (it should be an rfc message) then the code will be set to CHRS_DEFAULT_RFC. Otherwise to CHRS_DEFAULT_FTN CHRS_DEFAULT_RFC and CHRS_DEFAULT_FTN are configurables in iflib/charconv.h We now have a charset for the message that will be gated. We need to know to which charset eventually convert. If you've compiled it with -DJE it will be found in Areas file (look at "JE compatibility"). If it is not found there, or if you don't compile with -DJE, the functions getincode() or getoutcode() will be called. These functions will return the other code according to the one of the message. The decision table is hardcoded you probably will want to custom it. For that you have to edit iflib/charset.c getincode() and getoutcode() functions (In a future version it may be configurable by a run time readable file) Well, now we have incode and outcode. We can then translate the text strings (headers and body) from one to the other charset. Two case can be distinguished: 8 and 16 charsets. a) 8 bits charsets ------------------ This is the easier. The only thing to do to support a new 8bits transcodage is to add a maptable in the directory pointed by maptabdir keyword. And of course add the recognition of these charsets to the sources, if it isn't done yet. Maybe in the future will I add a runtime configurable way of recognising 8 bits characters. Something like this: charset charset filename a) 16 bits character -------------------- This is theorically possible to as 8bit ones; but it isn't funny to deal with maptables of 65,000+ lines :) The 16 bits translations are hardcoded so. 16 bits codes have also special codes (like iso-2022-* ESC sequences) that allow mixing of various codages (8 and 16 bits), differents charsets, etc. So is not possible to have a simple maptable. MIME support ============ MIME (Multipurpose Internet Mail Extensions) is a way of allowing data to be put in 7-bit characters format, to fit in email messages than can pass trough (old) mail gateways. MIME is not only limited to text, and can also encode video, sound, etc. However for what ifmail is concerned, only text ("text/plain" more precissely) will be handled. There are three ways of sending mail/articles: a) send them "as is". (more and more mail gateways accept 8bits messages without stripping the 8th bit). b) encode it with "quoted-printable" scheme. This is usefull if there are few 8 bit chars with a lot of ASCII ones (like in latin-alphabets languages). It is mostly readable without decoding. c) encode it with "base64" scheme. This is usefull for non-latin languages, where 8bit chars are the majority. Is absolutely unreadable without decoding. Ifmail can recognize those MIME messages, and decode them to plain 8bit when gating to FTN networks, so texts will be readable by FTN mail readers Messages are passed without coding from FTN to usenet/email (should I change this ? ) MIME headers ------------ There is a special coding for headers. As an exemple is better than a long explanation, there is how mime-coded headers look: From: =?US-ASCII?Q?Keith_Moore?= To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= There are two codages "B" (which is in fact base64) and "Q" (which is quoted- printable). Those headers are recognized and decoded to 8bit when gating to FTN networks. Also, the charset used in the header being written, and as it can be different of the one used in the text body; the translation routines took the incode value from there. JE compatibility ================ All that charset stuff has been possible thanks to the help of TANAKA Tsuneo (tt@efnet.com), who had modified ifmail to add handling of Japanese charsets. The way the JE version retrieved the charsets is by looking in the Areas file, where two supplementary fields were added: rfc-charset and FTN-CHRS. When I found it better to look at the message itself to try finding the charset used, I thing it is a great idea to have a per ECHO/newsgroups default. So I added support for that feature. That also allow people using the JE version to use this one (TX) without having to modify (much) their configuration. You must compile with -DJE for supporting this. Recognized charsets =================== This is an exhaustive list of recognized charsets. rfc-charset is the representation used for this charset in the usenet/email side (in MIME headers, "Content-Type: " line, 4th field of JE's Areas file) FTN-CHRS is the representation used for that same charset in the FTN side (CHRS: and CHARSET: kludge lines, 5th field of JE's Areas file). Note than in CHRS: and CHARSET: kludge lines the "FTN-CHRS" is followed by a digit, telling the "level" of that coding. Ex: "^aCHRS: LATIN-1 2", "^aCHRS: IBMPC 2" (refer to fsc-0054 for more information about that). Ifmail doesn't look that digit, it can even not be there, the kludge line will be handled correctly. Strings in parenthesis are aliases, they are recognized in messages, headers and JE's Areas; but are never used when writting the CHRS: or Content-Type: lines) ------------------------------- ----------------------------------- EUC-jp (x-EUC-jp) UJIS (EUC-JP, EUC) EUC-kr EUC-KR iso-2022-cn ISO-2022-CN iso-2022-jp JIS (Kanji) iso-2022-kr ISO-2022-KR iso-2022-tw ISO-2022-TW iso-8859-1 (iso8859-1) LATIN-1 (8859, ISO-8859) iso-8859-2 Latin-2 iso-8859-3 Latin-3 iso-8859-4 Latin-4 iso-8859-5 Cyrillic iso-8859-6 Arabic iso-8859-7 Greek iso-8859-8 Hebrew iso-8859-9 Latin-5 iso-8859-10 Latin-6 iso-8859-11 (x-tis620) Thai koi8-r KOI8-R (KOI8) koi8-u KOI8-U utf-7 utf-8 us-ascii ASCII x-cp424 CP424 x-cp437 IBMPC (PC-8, CP437) x-cp852 CP852 x-cp862 CP862 x-cp866 CP866 x-cp895 CP895 x-CN-Big5 (x-x-big5) BIG5 x-CN-GB (x-gb2312) GB x-FIDOMAZOVIA (x-MAZOVIA) FIDOMAZ (MAZOVIA,FIDOMAZOVIA) x-HZ HZ x-mac-roman (macintosh) MAC x-mik-cyr (x-MIK) MIK-CYR (MIK) x-NEC-JIS NEC x-sjis SJIS (CP932, CP942) x-zW ZW and a special one: AUTODETECT AUTODETECT This last one only appears in Areas file. Configuration ============= In the config file /etc/ifmail/config set the keywords defaultrfcchar and defaultftnchar to the appropriate values for your country The recognized values can be found in the list above Use: * Western languages : defaultftnchar cp437 defaultrfcchar iso-8859-1 * Poland: defaultftnchar FIDOMAZOVIA defaultrfcchar iso-8859-2 * Chechia and Slovakia defaultftnchar cp895 defaultrfcchar iso-8859-2 * other Latin-alphabet Eastern Europe countries defaultftnchar cp852 defaultrfcchar iso-8859-2 * Russia defaultftnchar cp866 defaultrfcchar koi8-r * Bulgaria defaultftnchar MIK-CYR defaultrfcchar iso-8859-5 * Ukrainia defaultftnchar cp866 defaultrfcchar koi8-u * Japan defaultftnchar SJIS defaultrfcchar iso-2022-jp * Israel defaultftnchar cp862 defaultrfcchar iso-8859-8 Conversion tables ================= Not all charset conversions are possible, I only included the ones for which I have the data; and of course inconsistent conversions (like cyrillic --> korean) aren't even dealt. |B|G|E|E|H|i|i|i|i|i|i|i|i|i|i|i|i|i|i|k|k|m|M|u|c|c|c|c|c|c|M|S| |i|u|U|U|Z|s|s|s|s|s|s|s|s|s|s|s|s|s|s|o|o|a|I|s|p|p|p|p|p|p|A|h| |g|o|C|C| |o|o|o|o|o|o|o|o|o|o|o|o|o|o|i|i|c|K|-|4|4|8|8|8|8|Z|i| |5|B|-|-| |-|-|-|-|-|-|-|-|-|-|-|-|-|-|8|8|i|-|a|2|3|5|6|6|9|O|f| | |i|j|k| |2|2|2|2|8|8|8|8|8|8|8|8|8|8|-|-|n|C|s|4|7|2|2|6|5|V|t| | |a|p|r| |0|0|0|0|8|8|8|8|8|8|8|8|8|8|r|u|t|Y|c| | | | | | |I|_| | |o| | | |2|2|2|2|5|5|5|5|5|5|5|5|5|5| | |o|R|i| | | | | | |A|J| | | | | | |2|2|2|2|9|9|9|9|9|9|9|9|9|9| | |s| |i| | | | | | | |I| | | | | | |-|-|-|-|-|-|-|-|-|-|-|-|-|-| | |h| | | | | | | | | |S| | | | | | |c|j|k|t|1|2|3|4|5|6|7|8|9|1| | | | | | | | | | | | | | | | | | | |n|p|r|w| | | | | | | | | |0| | | | | | | | | | | | | | -----------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Big5 |X| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GuoBiao | |X| | |X| | | | | | | | | | | | | | | | | | | | | | | | | | | | EUC-jp | | |X| | | |X| | | | | | | | | | | | | | | | | | | | | | | | |X| EUC-kr | | | |X| | | |p| | | | | | | | | | | | | | | | | | | | | | | | | HZ | |X| | |X| | | | | | | | | | | | | | | | | | | | | | | | | | | | iso-2022-cn| | | | | |X| | | | | | | | | | | | | | | | | | | | | | | | | | | iso-2022-jp| | |X| | | |X| | | | | | | | | | | | | | | | | | | | | | | | |X| iso-2022-kr| | | |p| | | |X| | | | | | | | | | | | | | | | | | | | | | | | | iso-2022-tw| | | | | | | | |X| | | | | | | | | | | | | | | | | | | | | | | | iso-8859-1 | | | | | | | | | |X| | | | | | | | | | | |p| | | |X| | | | | | | iso-8859-2 | | | | | | | | | | |X| | | | | | | | | | | | | | | |X| | |X|X| | iso-8859-3 | | | | | | | | | | | |X| | | | | | | | | | | | | | | | | | | | | iso-8859-4 | | | | | | | | | | | | |X| | | | | | | | | | | | | | | | | | | | iso-8859-5 | | | | | | | | | | | | | |X| | | | | |X|X| |p| | | | | |X| | | | iso-8859-6 | | | | | | | | | | | | | | |X| | | | | | | | | | | | | | | | | | iso-8859-7 | | | | | | | | | | | | | | | |X| | | | | | | | | | | | | | | | | iso-8859-8 | | | | | | | | | | | | | | | | |X| | | | | | | |X| | |X| | | | | iso-8859-9 | | | | | | | | | | | | | | | | | |X| | | | | | | | | | | | | | | iso-8859-10| | | | | | | | | | | | | | | | | | |X| | | | | | | | | | | | | | koi8-r (1) | | | | | | | | | | | | | | | | | | | |X|X| |p| | | | | |X| | | | koi8-u (1) | | | | | | | | | | | | | | | | | | | |X|X| |p| | | | | |X| | | | macintosh | | | | | | | | | |X| | | | | | | | | | | |X| | | |X| | | | | | | MIK-CYR | | | | | | | | | | | | | |p| | | | | |p|p| |X| | | | | | | | | | utf-[78] | | | | | | | | | |X| | | |X|X|X|X| | |X|X| |X| |X|X| |X|X| | | | us-ascii(2)|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X| cp424 | | | | | | | | | | | | | | | | |X| | | | | | | |X| | |X| | | | | cp437 | | | | | | | | | |X| | | | | | | | | | | |X| | | |X| | | | | | | cp852 | | | | | | | | | | |X| | | | | | | | | | | | | | | |X| | | |X| | cp862 | | | | | | | | | | | | | | | | |X| | | | | | | |X| | |X| | | | | cp866 | | | | | | | | | | | | | |X| | | | | |X|X| | | | | | | |X| | | | cp895 | | | | | | | | | | |X| | | | | | | | | | | | | | |X|p| | |X|p| | MAZOVIA | | | | | | | | | | |X| | | | | | | | | | | | | | | |X| | |p|X| | Shift-JIS | | |X| | | |X| | | | | | | | | | | | | | | | | | | | | | | | |X| iso-11 (3) | | | | | | | | | |X| | | | | | | | | | | | | | | | | | | | | | | iso-4 (3) | | | | | | | | | |X| | | | | | | | | | | | | | | | | | | | | | | iso-60 (3) | | | | | | | | | |X| | | | | | | | | | | | | | | | | | | | | | | zW | |X| | |X| | | | | | | | | | | | | | | | | | | | | | | | | | | | X : already implemented. p : planned, help welcome. (1) koi8-u is a fully compatible superset of koi8-r, so ifmail-tx doesn't distinguish them during conversion. (2) us-ascii being 7 bit only all charsets are supersets of it, so us-ascii can be "converted" to anything. (3) those are almost never used, they where very old charsets, from the time when only 7-bit existed and [ \ ] etc were replaced by some accentuated characters. INFO WANTED: on charsets used in both usenet and fido in Greece, Turkye, Arabic countries, Korea, Taiwan, Thailand and India. ifmail-2.14tx8.10.orig/README.first100644 0 0 10615 6573551267 14653 0ustar rootroot************************************************ * Warning ! Warning ! Warning ! Warning ! * ************************************************ The config file isn't completely compatible between 2.11 and tx versions. There are the differences. -- P.Saratxaga These keywords are no longer valid: ----------------------------------- intab outtab These keywords are new: ----------------------- maptabdir tell the directory for 8-bit character conversion tables. defaultrfcchar tell the default charset for rfc messages, read README.charsets defaultftnchar tell the default charset for FTN messages, read README.charsets toftnchar tell the charset to force translation of _outgoing_ FTN messages if the rfccharset of the message equals defaultrfcchar (so it is different of the -DDIRTY_CHRS option which forces conversion regardless of the rfc charset value) packetpasswd same format as "password" ones but for packets only. If it isn't used for a given address, and a "password" exists for that one, then password for packet is take there modemaftercall a modem initstring to send after the call is done. refdbm enables the references database (and tell where to keep it) unsqz,unhpk,unjar tell the command pathname and parameters to use unuc2,unhap,unha those unarchivers. However I haven't found them in UNIX version until now. reqmap Mapping file which maps shortnames of files to fullnames with path. The files are sent under their shortnames. dirtychrs same format as "password". While tossing pkts from a given node it forces the charset to the one specified (ex: "dirtychrs 2:293/2219.5 CP437"). It is intended to handle pkt coming whith erroneous info on CHRS kludge, it needs compilation whith -DDIRTY_CHRS to be available. gatebaugroup list newsgroup(s) to be gated using the gatebau rules for MSGID <-> Message-ID conversion. ftnmsgidstyle tells a machine name which, if appears in Message-ID, makes the produced MSGID use FTN addresses only. eg: if "ftnmsgidstyle news.chanae.stben.be" is used and the Message-ID is of the form <*@news.chanae.stben.be> it wont be kept, but the FTN MSGID will be built from the best aka, like "MSGID: 2:293/2219@fidonet 123456ab" instead of "MSGID: news.chanae.stben.be cdef0123" you need level < 1 ********************************** Q: When I try to poll my node I have the error message: " no free matching ports... " A: check in CONFIG file that the value $(LOCKDIR) matches the one used in your system: # Directory where UUCP lock files reside. LOCKDIR = "/var/lock" #LOCKDIR = "/var/spool/uucp" ************************************* I've changed permissions of ifmail/ifnews to rws--x--- fnet.uucp If you use sendmail, in sendmail.cf verify that the mailer definition for fnet transport has in its flags list (F=...) the 'S' letter (that stands for setUID) and that U=fnet:uucp; like this: Mfnet, P=/usr/lib/ifmail/ifmail, F=8mDFMuCS, U=fnet:uucp, S=11, R=21, A=ifmail -r $h -g h $u For Smail I don't know... Then edit /etc/group and verify that group uucp has "news" and "root" as members, like this: uucp::14:uucp,fnet,news,root Then it would work fine, and only authorized programs (sendmail, news stuff) will be able to run ifmail/ifnews, avoiding security holes (wonder if a user routes his mail trough Indonesia... and you live in Argentina :) ). Of course tou can set ifmail/ifnews executable by anybody, but this is a great security hole... ************************************* DO NOT USE the "s" flag (F=s) in the fnet definition (Mfnet ...) of sendmail. This flags tells sendmail to stripp off the quotes ("quoted string" ---> quoted string). That can lead to problems. ************************************* cleanup_ref cleans the references database, run it regularly from cron ************************************* For those of you that are interessted ther is mini, mini, mini, mailing-list about "tx" versions, write to or "ifmail-tx-request" (2:293/2219) to suscribe. I can also send patches by email automatically for those who want. There is also home sites for "tx" versions: http://www.z2.fidonet.org/ifmail-tx/ ftp://ftp.z2.fidonet.org/pub/linux/Fido/ ************************************** This is the first time you install ifmail ? do a "make install_config" to install sample config files and to create automatically and whith the right permissions the directories needed. ifmail-2.14tx8.10.orig/LSM100644 1751 50 1630 6540753002 12525 0ustar mdsrcBegin3 Title: ifmail - FidoNet(r) support package for UN*X platform Version: 2.14 Entered-date: 18SEP97 Description: FidoNet(r) transport and gateway for UN*X platform. Delivers Fidonet mail packets over telephone lines and TCP/IP connections; converts Fidonet net- and echomail to RFC-822/RFC-1036 compliant mail and news and vice versa. In cooperation with MTA and netnews packages allows to run a FidoNet node (or point) on a UN*X machine. Official homepage: http://www.average.org/ifmail/ Keywords: fidonet,netmail,echomail,mail,news,gateway Author: crosser@average.org (Eugene Crosser) Maintained-by: crosser@average.org (Eugene Crosser) Primary-site: ftp.average.org /pub/ifmail 312658 ifmail-2.14.tar.gz Alternate-site: tsx-11.mit.edu /pub/linux/sources/usr.bin Alternate-site: sunsite.unc.edu /pub/Linux/system/Fido Platform: Linux, *BSD, SunOS, SCO, ISC, some others Copying-policy: Free End ifmail-2.14tx8.10.orig/LSM.TX100644 0 0 2210 6573551267 13525 0ustar rootrootBegin3 Title: ifmail - FTN package for UN*X - `` TX '' diffs Version: 2.14-tx8.9 Entered-date: 23JUL98 Description: FidoNet(r) transport and gateway for UN*X platform. Delivers Fidonet mail packets over telephone lines and TCP/IP connections; converts Fidonet net- and echomail to RFC-822/RFC-1036 compliant mail and news and vice versa. In cooperation with MTA and netnews packages allows to run a FidoNet node (or point) on a UN*X machine. Official homepage: http://www.average.org/ifmail/ The "TX" versions have some improvements over 2.14, like charset support, MIME quoted printable support, better MSGID management, References handling, and some PGP recognition. The diff against plain 2.14 adds those functionalities. Keywords: fidonet,netmail,echomail,mail,news,gateway,MIME,charset,PGP Author: crosser@average.org (Eugene Crosser) Maintained-by: (for the TX ver) Pablo Saratxaga Primary-site: ftp.z2.fidonet.org /pub/linux/Fido/ 260Kb ifmail-2.14_to_2.14-tx8.8.tgz Alternate-site: sunsite.unc.edu /pub/Linux/system/fido Platform: Linux, *BSD, SunOS, SCO, ISC, some others Copying-policy: Free End ifmail-2.14tx8.10.orig/misc/ 40755 1751 50 0 6540755243 13016 5ustar mdsrcifmail-2.14tx8.10.orig/misc/config100644 1751 50 33326 6540753002 14321 0ustar mdsrc# Configuration file for ifmail (ifgate+ifcico) package by Eugene Crosser # Compile-time default name of this file may be overridden by -I key. # Lines with the first nonblank character '#' are comments. # Log file name. Overrides compile-time default. logfile /var/log/ifmail/iflog # Debug file name. Overrides compile-time default. debugfile /var/log/ifmail/ifdebug # Debugging verbosity (is overidden by -x key). Default is 0. verbose 0 # Main address: address 2:5020/230@fidonet # AKAs: address 2:5020/6.14@fidonet address 2:5020/23.14@fidonet address 2:5020/49.14@fidonet address 100:5020/23.14@dummynet # Passwords for connections. checked by ifcico. # Inserted into EMSI and yoohoo packets. #password 2:5929/6 QWERY #password 2:5929/23 ASDFG # Passwords for packets. # iftoss will tell you if the password of the packet doesn't match. (and it # won't be tossed if -DPARANOID specified at compile-time) # Inserted into outgoing mail packets. # If for a given node no packetpasswd is specified, password will be used. #packetpasswd 2:5929/6 AZERTY # Include config extention file (here: file with real passwords). # Includes may be nested. If the nesting is cyclic, the program cycles too. # You are warned. include /etc/ifmail/passwds # System alias file - try to fetch ftn-style aliases from there. # If "from" address of a message from FidoNet matches _right_ side # of some entry in sysalias file, then the Reply-To: header is created # in the RFC message with the name part taken from the left side of the # sysalis entry and domain part taken from myfqdn (below). E.g., if a # fidonet message comes from "John Smith of 1:234/567.89@fidonet" and # there is an entry in the sysalias file: # "jsmith: John.Smith@p89.f567.n234.z1.fidonet.org" # and fqdn value is "pccross.msk.su", then the resulting message will # contain a line: "Reply-To: jsmith@pccross.msk.su". sysalias /usr/lib/smail/aliases # This host fully qualified domain name to add to the alias above myfqdn pccross.msk.su # If this is specified, The "To:" line at the beginning of the fidonet message # will be kept in consideration _only_ if the message is addresses to the name # specified. Thus, defining a magicname prevents the problems of different # adresses in To: line and enveloppe. This is specially the case in mailing # lists. Without defining a magicname if you are in a mailing list messages # will be bounced back as the To: line doesn't show your address but the ML one magicname UUCP # Directory for incoming packets/files: inbound /var/spool/ifmail/inb # Directories for "listed" and "protected" sessions listinbound /var/spool/ifmail/inb protinbound /var/spool/ifmail/inb # Directory for outgoing packets (default domain and zone): # other zones will be like "/usr/spool/ifmail/outb.003", # other domains will be like "/usr/spool/ifmail/." # I prefer to name the default outbound as "fidonet", so it is consistent # with the naming pattern of the other domains. outbound /var/spool/ifmail/fidonet # If you specify this, outgoing arcmail files will go to `outbound', # but be reffered as being in `dosoutbound' in the .flo files #dosoutbound h:\spool\ifmail\outb # Directory from which the file requests are satisfied public /var/spool/uucppublic # Mapping file which maps shortnames of files to fullnames with path. # Every line should include the shortname, some whitespaces and/or tabs # and then the fullname. If the fullname does not begin with '/' # the publicdir will be prepended to it. One fullname can be mapped # to many shortnames without problems. If one shortname points to many # fullnames, all matches are sent. The files are sent under their # shortnames. reqmap /usr/local/lib/fnet/reqmap # Directory with executables to satisfy "magic" file requests # if requested a file present in this directory, it will be # executed and stdout sent to the remote system. If the file # is not executable, it is read line by line and the lines are # processed as if they were received file requests (recusively). # Execution of commands may compromize security! You are warned. magic /usr/lib/ifmail/magic # Primary nodelist (serves "outbound" directory and domain from the # first "address" statement). Name expanded with ".NNN" if neccessary. nodelist /var/spool/ifmail/nl.d/nodelist # Secondary nodelists and nodelists for other domains. # use directory name from the first "nodelist" statement. # filename originating address #nodelist pnt5020.ndl 2:5020/0@fidonet #nodelist chatlist 100:0/0@chateaunet nodelist private.ndl 2:5020/0@fidonet # domain translations, just context substitution. Leading dot recommended. # May contain '@'-sign too. First matching used. # NOTE: If you specify at least one domtrans line, there will be _NO_ # default for fidonet <--> fidonet.org. Don't forget to specify it # explicitly as a last line. # FTN side Internet side # fidonet (zones 1 -> 6 ) domtrans .n5020.z2.fidonet .fido.pccross.msk.su domtrans .n5030.z2.fidonet .fido.tctube.spb.su domtrans .z1.fidonet .z1.fidonet.org domtrans .z2.fidonet .z2.fidonet.org domtrans .z3.fidonet .z3.fidonet.org domtrans .z4.fidonet .z4.fidonet.org domtrans .z5.fidonet .z5.fidonet.org domtrans .z6.fidonet .z6.fidonet.org # domain names domtrans .beginnet .beginnet.ftn domtrans .n320.z101.francom .belgique.fm.alphanet.ch domtrans .n352.z101.francom .luxembourg.fm.alphanet.ch # zone numbers (fidonet is added by default) domtrans .n320.z101.fidonet .belgique.fm.alphanet.ch domtrans .n352.z101.fidonet .luxembourg.fm.alphanet.ch domtrans .z140.fidonet .z140.beginnet.ftn # default (the rest) domtrans .fidonet .ftn # Automatically updated alias database. If omitted or inaccessible, # ^aREPLYADDR and ^aREPLYTO kludges are generated in fido messages. database /var/spool/ifmail/ifdbm # Sequencer file (used to generate unique IDs) sequencer /var/spool/ifmail/seq # Areas file (format: "AREA newsgroup distribution") areas /etc/ifmail/Areas # Bad groups prefixes - do not pass to fido if appear in Newsgroups header # This is NOT the same as "!news.group" in the cnews "sys" file. badgroup relcom.ads. badgroup relcom.commerce. # Groups for which the Gatebau-style of MSGID<-->Message-ID conversion # must be done. Same syntax as badgroup lines. *** USE WHITH CARE *** gatebaugroup fido.ger. #gatebaugroup de. # Maximum allowed number of groups in the Newsgroups header, article will # not be gated if exeeds. If zero or omitted - no limit. # Another way of limiting the number of messages gated is to not define a # general line in the Areas file, so messages are generated only for areas # explicitely defined. # Is better to not define maxgroups and don't define a generic ng -> ECHO # gating rule in Areas #maxgroups 10 # Directory where character translation tables (for eight-bit charsets) are. # # The format of the files is as follows: # # # # (one character in a line). and can be specified # in one of four notation styles: # - character itself in single quotes (e.g. 'a') # - decimal number (e.g. 123) # - octal number (e.g. 0123) # - hexadecimal number (e.g. 0x7f) # # Crosshatch ('#') denotes start of comment; space, tab and crosshatch # characters cannot be specified using the first (character) notation. # maptabdir /usr/lib/ifmail/maptabs # Default charsets to be used when ifmail can't found info in the message # see the file README.charsets for a list of available values and for # values to use for several countries. # defaultftnchar cp437 defaultrfcchar iso-8859-1 # The "defaultftnchar" keyword defines the default charset for incoming # FTN messages. "toftnchar" is to force translation of _outgoing_ FTN # messages. By default ifmail doesn't translate when doing rfc->FTN # gating due to the complexit to find the right charset, and the fact # that in most FTN networks the charset used in rfc is also valid. # If your FTN network require a given charset define it here. # #toftnchar cp437 # Transport programs for mail and news, used by iftoss # for sendmail, $F expands to "from" address, $T - to "to" address. sendmail /usr/sbin/sendmail -oi -f $F $T rnews /usr/lib/news/rnews # Toss program, used by ifunpack iftoss /usr/lib/ifmail/iftoss # Unpackers, used by ifunpack. # $F expands to archive file name unzip /usr/bin/unzip -Lojq $F unarj /usr/lib/ifmail/unarj e $F unlzh /usr/bin/lha xiq $F unarc /usr/bin/arc x $F unzoo /usr/bin/zoo -extract $F unrar /usr/lib/ifmail/unrar e $F # Packer program, used by ifpack # $F expands to archieve file name, $P - to list of packet names packer /usr/bin/zip -q9 $F $P # Maximum arcmail file size, ifpack will start new arcmail file if exceeds maxfsize 500000 # Maximum packet size, ifmail/ifnews will start new packet if exeeds. # *.?ut files are NOT created if nonzero specified, you must run ifpack # to make packets go out. maxpsize 30000 # Maximum message size when splitting big messages of usenet origin # default is 12300 bytes maxmsize 12300 # Flavors that should not be subject to packet size limiting. These # flavors will be put into `ready to send' packets and not packed # by ifpack. Special flavor 'm' means "all netmail". nonpacked cm # cnews log file and (temporary) database for seen-bys newslog /usr/lib/news/log msgidbm /tmp/ifmsgids # MSGID <-> Message-ID database, for creating correct References when gating # if commented out this feature isn't activated refdbm /tmp/ref_db # From this line on, values may be prefixed by a logical expression in # round brackets. Operators are: '!', '&', '|', 'Xor'. # Possible elements are: # - Nodelist flags (like "CM", "MNP", "V32" etc.) # - speed # where is '=', '!=', '<', '>', '<=', '>=' # - address # where is a (possibly incomplete) fidonet address, # e.g. "5020/*" # - time [,,...] # where is a day spec. with optional time spec., e.g. # Wk2000-0900,Sat1800-0000,Sun # - phone # e.g. "phone 7-095-" # Dialing parameters # of multiple "ModemPort", "ModemReset", "ModemDial", "ModemHangup" lines, # first matching is used. # of multiple "PhoneTrans", "ModemConnect", "ModemError" lines, all matching # are used. # In send and expect strings, following substitutions are made: # \\ '\' character # \r carriage return (0x0d) # \n new line (0x0a) # \t tab (0x09) # \b backspace (0x08) # \s space (0x20) # \NNN (where N is an octal digit) - character with octal code NNN # \d 1 second delay (send strings only) # \p 1/4 second pause (send strings only) # \T translated telephone no. (send strings only) # \D untranslated telephone no. (send strings only) # ModemPort present a blank-separated list of ports with possible speed # extention (separated by colon); if speed is prefixed with 'L', it is # a "locked" port speed, otherwise it is a maximum speed to be set, while # actual speed is taken from the nodelist. If speed is omitted (or set # to zero), previous port speed is not changed. #ModemPort (time Any0000-0900,Sat,Sun) cua0 ModemPort ttyS1:L38400 # PhoneTrans lines provide rules to change phone prefixes to make local # or long-distance calls. In the example below, my country code is 7, # and local dialing area is 095. From the numbers starting with "7-095-" # the prefix is stripped and the 7-digit remainder is dialed. For # the numbers starting with "7-" but not with "7-095-", the country prefix # "7-" is stripped and the long-distance dialing prefix "8W" substituted. # For the numbers not matching any of the above, international # call is performed: international dialing prefix "8W10" is prepended # to the unmodified 11-digit number. Generally, the syntax is: # "PhoneTrans / " PhoneTrans 32-4 / PhoneTrans 32- / 0 PhoneTrans / 00 ModemReset ATZ\r ModemDial (time Any0800-2200 & address 2:5020/49) AT&M5&N4DP\T\r ModemDial (address 2:5020/49) AT&M5&N6DP\T\r ModemDial (speed < 4800) AT&N3DP\T\r ModemDial ATDP\T\r ModemHangup ATZ\r ModemOK OK ModemConnect CONNECT ModemError BUSY ModemError NO\sCARRIER ModemError NO\sDIAL ModemError RING\r ModemError ERROR # Timeouts to wait for "OK" and "CONNECT", cannot be prefixed by logical # expression. TimeoutReset 3 TimeoutConnect 70 # Delay in seconds before every call in "automatic" mode. Ignored # if explicit list of addresses specified in the command string. DialDelay 0 # Call options (time, address and nodelist flag dependant) # All matching are applied in the order they are specified. # Possible options are "[No]Call", "[No]Hold", "[No]PUA", "[No]EMSI", # "[No]WaZOO", "[No]Freqs", "[No]Zmodem", "[No]ZedZap", "[No]Janus", # "[No]Hydra". Here, WaZOO stands for YooHoo/2U2 handshake, not for # the transfer scheme. FTS-0001 handshake and DietIFNA scheme cannot # be disallowed (because they are mandatory by standart). "Hold" # means really hold "hold" type packets and files: do not send them # if our system initiated the session, "NoHold" means send "hold" # packets when our system initiated the session. "NoPUA" stands for # "No PickUp All", i.e. PUP ("Pick Up Primary"). NoCall means do not # perform outbound call. This flag has no effect on the nodes # explicitly specified in the command line. # Default options are "everything allowed". options (time Any0000-2359) NoHold # This line is no longer need as now ifcico supports the U,Txy flag #options ((!CM) & time Any0700-0200) Nocall #options (time Any0900-2100 & ! address 2:5020/*) Nocall # EMSI data for this node # From this line on values CANNOT be prefixed with logical expression Name == Oriental BBS == Location Liège Belgium SysOp Pablo Saratxaga Phone 32-4-3445020 Speed 14400 Flags XA,V32B,V42B ifmail-2.14tx8.10.orig/misc/Areas100644 1751 50 16103 6420407564 14107 0ustar mdsrc Conversion of areatags to newsgroups (with distribution) and back. Lines starting with a whitespace are comments. This is because areatags may contain a hash ('#') character which would otherwise be sutable as a comment designator. AREATAG newsgroup distribution modtype:moderator If you compile with -DJE, the format is: AREATAG newsgroup distribution rfc-charset FTN-CHRS modtype:moderator "rfc-charset" is the charset used in the rfc (usenet/email) side. It must be in the format used in MIME headers (ex: iso-8859-1, koi8-r, EUC-kr,...) "FTN-CHRS" is the charset used in the FTN side. It must be in the format used in ^aCHRS: kludges, whitout de level number (ex: LATIN-1, KOI8, EUC-KR) See file README.charset for a list of recognized rfc-charset and FTN-CHRS "moderator" is an rfc address of the moderator. "modtype" is either "umod","fro" or "fstd". umod stands for usenet moderated, messages arriving in a pkt are converted to email for the defined moderator. fro stands for fido read-only; when the gated area is defined as (Moderated) it create correct "Approved:" lines. fstd stands for fido standart way of moderation, (does nothing yet) exemple (with -DJE): COMERZ fido.commerz world iso-8859-1 CP437 fro:Jan.Smith@f1.n2.z3.fidonet.org ### [ There is the list I use for belgian newsgroups ] ### [ I don't use Distribution field, I see no need to add one... ] ### [ only for a few fido-only distributed areas ] ########### be.* BE.ANNOUNCE be.announce BE.COMMERCIAL be.commercial BE.COMP be.comp BE.FORSALE be.forsale BE.JOBS be.jobs BE.MISC be.misc BE.POLITICS be.politics BE.SCIENCE be.science BE.TV be.tv ########### fido.belg.* 3DSTUDIO.B fido.belg.3dstudio AIDS.B fido.belg.aids ALLFIX.B fido.belg.allfix.general ALLFIX_SUP.B fido.belg.allfix.support AMIGA.B fido.belg.amiga ASTRONOM.B fido.belg.astronomy AUTO.B fido.belg.auto AVONTUUR.B fido.belg.avontuur BABEL.B fido.belg.babel BACKBONE.B fido.belg.backbone FAKEUSER.B fido.belg.bbs.fake-users BBSADV.B fido.belg.bbsadv BEER.B fido.belg.beer BEURS.B fido.belg.beurs BEURS-DATA.B fido.belg.beurs-data BIJBEL.B fido.belg.bijbel BOEKEN.B fido.belg.boeken CDROM.B fido.belg.cdrom CLIPPER.B fido.belg.clipper CLUBS.B fido.belg.clubs COMICS.B fido.belg.comics DBHULP.B fido.belg.dbridge.support DVNET.B fido.belg.dvnet ELEKTRON.B fido.belg.electron FILES.B fido.belg.files ########### fido.belg.fra.* ASM-TUTORIAL.BF fido.belg.fra.asm-tutorial AUTOMOBILE.BF fido.belg.fra.automobile C_ECHO.BF fido.belg.fra.c CLIPPER.BF fido.belg.fra.clipper COMMERCE.BF fido.belg.fra.commerce COMMS.BF fido.belg.fra.communications COMPNEWS.B fido.belg.fra.compuserve.news ED-MSG.BF fido.belg.fra.editeurs_msg FIDONET.BF fido.belg.fra.fidonet FILE-SEARCH.B fido.belg.fra.files.search FILE-SEARCH.B fido.belg.fra.files.search FILM.BF fido.belg.fra.film GENEALOGY.BF fido.belg.fra.genealogy GENERAL.B fido.belg.fra.general HARD.BF fido.belg.fra.hardware INTERNET.BF fido.belg.fra.internet ISDN.BF fido.belg.fra.isdn LINUX.BF fido.belg.fra.linux MAXIMUS.BF fido.belg.fra.maximus OCCASES.BF fido.belg.fra.occases OS2.BF fido.belg.fra.os2 RELIGION.BF fido.belg.fra.religion RTFM fido.belg.fra.rtfm SCIENCES.BF fido.belg.fra.sciences SOFT.BF fido.belg.fra.soft SONS.BF fido.belg.fra.sons SYSTEMES.BF fido.belg.fra.systemen WIN.BF fido.belg.fra.windows ########### fido.belg.* (2) FDHELP.B fido.belg.frontdoor.support FRUSTRATIE.B fido.belg.frustratie FSFAN.B fido.belg.fsfan FUNPROG.B fido.belg.funprog GAMING.B fido.belg.gaming GOLDED.B fido.belg.golded HAM.B fido.belg.ham HOUSE.B fido.belg.house HP48.B fido.belg.hp48 INTERNET.B fido.belg.internet JOB.B fido.belg.jobs KEUKEN.B fido.belg.keuken KINDEREN.B fido.belg.kinderen K.U.LEUVEN fido.belg.kuleuven LAN.BF fido.belg.lan LASERDISC.B fido.belg.laserdiscs LINUX.B fido.belg.linux SIMENON.B fido.belg.literature.simenon LOSTKIDS.B fido.belg.lostkids LOTTO.B fido.belg.lotto LUKRAAK.B fido.belg.lukraak MACBEL.B fido.belg.macbel MATH.B fido.belg.math MAX.B fido.belg.maximus MEDIA.B fido.belg.media MODEL_MAKING.B fido.belg.model_making MODEM.B fido.belg.modem MODERATORS.B fido.belg.moderators MUZIEK.B fido.belg.music NATSYSOP.B fido.belg.natsysop fido ########### fido.belg.ned.* ALGEMEEN.B fido.belg.ned.algemeen ALLES.BN fido.belg.ned.alles DIER.B fido.belg.ned.animals DAMES.B fido.belg.ned.computer.widows COMPUTER&RECHT fido.belg.ned.computer_recht DWARZ.B fido.belg.ned.dragon.warz FILM.B fido.belg.ned.films GRAP.B fido.belg.ned.grappen HANDEL.B fido.belg.ned.handel FOTO.B fido.belg.ned.photography PROBOARD.B fido.belg.ned.proboard SYSTEMEN.BN fido.belg.ned.systemen WINDOWS.BN fido.belg.ned.windows ########### fido.belg.* (3) OS2.B fido.belg.os2 OS2COM.B fido.belg.os2com OUWEZAK.B fido.belg.ouwezak P-DOMAIN.B fido.belg.p-domain PARAVISIE.B fido.belg.paravisie PGP.B fido.belg.pgp POINTS.B fido.belg.points POLITIC.B fido.belg.politics PROBOARD.029 fido.belg.proboard PROJECT.B fido.belg.project QB.B fido.belg.quickbasic RA_SUP.B fido.belg.ra.support RAM.B fido.belg.ram RAY_FRA_ANI.B fido.belg.ray_fra_ani RECHT.B fido.belg.recht RPG.B fido.belg.rpg SATELLITE.B fido.belg.satellite SEX.B fido.belg.sex SJACHEL.B fido.belg.sjachel SOUND_CORNER.B fido.belg.sound_corner STUDENTEN.B fido.belg.studenten TABOE fido.belg.taboe RAIL.B fido.belg.trains UFO.B fido.belg.ufo UITGAAN.B fido.belg.uitgaan UNIX.B fido.belg.unix VIRTUAL.B fido.belg.virtual_reality VIRUS.B fido.belg.virus VUB fido.belg.vub BNET.B fido.belg.vzw.bnet IMPACT fido.belg.vzw.impact WAPEN.B fido.belg.wapen WELZIJN.B fido.belg.welzijn WETENSCHAP.B fido.belg.wetenschap ZYXEL.B fido.belg.zyxel Line with a single '*' in the "newsgroup" field defines default areatag. '*' in the "AREA" field, if present, is expanded to the original newsgroup (converted to uppercase). (Distribution is insignificant). If you define it, an FTN message will be generated for each newsgroup in the Newsgroups: header, even if you're not linked to it, and an ECHO doesn't really exist for it. Is better not to define. U_* * Line with a single '*' in the "AREA" field defines default newsgroup and distribution. '*' in the "newsgroup" field, if present, is expanded to the original areatag (converted to lowcase). * fido.* fido You can specify a line with a single asterisk in the "AREA" field and a single asterisk in the "newsgroup" field. It will cause a reversible conversion - areatag will be an uppercased newsgroup, and a newsgroup will be a lowercased areatag. This is not recommended. * * world ifmail-2.14tx8.10.orig/misc/FAQ100644 1751 50 31577 6463053353 13477 0ustar mdsrcQ: Is there any documentation for ifgate and ifcico? A: No, sorry. Only README files and example configuration file. And this FAQ list, of course. Q: Will ifcico work in multiline environment? A: Hopefully yes, though the mechanism of skipping locked files is not well tested. Q: How do I create a nodelist? A: You need not. Take a fresh nodelist from a nearby FidoNet node. Q: How do I compile the nodelist? A: With ifindex program. You also need to keep the original nodelists. Q: How do I compile a nodediff? A: With nlpatch program. Q: The diffs to getty_ps do not fit, and besides that, ifcico cannot originate call while uugetty is active on the dialin line. Any ideas? A: Take getty_ps version later than 2.0.7c, versions prior to 2.0.7b are unusable. Q: When I start ifcico without parameters, it displays banner and does noting. Ctrl-C, Ctrl-\ etc. do not help. What's on? A: This is correct behavior in slave mode. To make outgoing calls, start it with "-r1" parameter. If you unintentionally started it in slave mode, just wait several minutes, and it will finish. Q: Do directories in config file need ending "/" ? A: No. But it won't do any harm. Q: How do I create an alias in the database? A: You need not. It is created automatically as mail goes from Internet to FidoNet. Q: In fact, I think I did not understood at all what alias (ifdbm) is for. When do you built it ? When do you use it ? A: When a message from "jsmith@some.where.net (John Smith)" passes from Internet to Fidonet, fidonetters see the message from "John Smith of your:fido/addr". When fidonetters make replies, their replies go to "John Smith of your:fido/addr". To forward the message to the correct Internet address, ifmail needs to remember that "John Smith" is actually "jsmith@some.where.net". That's why the database is needed. When messages pass from Internet to Fidonet, it is filled, and when replies come from Fidonet, it is used to forward them to Internet. Q: How do I monitor as the things happen? A: tail -f or if you use syslog logging, direct log_local0 to a virtual screen (see man 5 syslog.conf) Q: How do I tell ifcico to poll a node? A: Either create an empty .flo or start ifcico with the node address in the command line. Q: How do I arrange a coninious poll of a node until a successfull session occurs? A: #!/bin/sh while : do if /usr/lib/ifmail/ifcico f123.n456 then exit 0 fi sleep 30 done Q: How do I send a message with just this specific AKA in the From:? A: Either modify your config file to make it primary address, or forge customized "From:" header in the RFC-822 message before feeding it to MTA (or ifmail). Q: When I run ifunpack (iftoss) packets disapper but nothing is passed to sendmail/rnews. What's on? A: You probably specified -N. Your mail/newsbatches are now in /tmp/ifmail directory. Q: Why doesn't ifmail accept addresses in fido-format (2:283/315.38) ? A: Because. Q: Why do I get a warning about the out-of-date nodelist index so often? A: The warning is issued when any of the source nodelists *OR* any of the config files is younger than the index. Q: How can I allow file request from outside people ? A: Define the public keyword in config file to a directory at which ifcico can read. Q: When ifcico receives a file request, does it perform a subdirectory seach? A: No. But remember that in UN*X files may have more than one link. But you can have sub-directories; the requestor has to include them (eg: Linux/communications/ifmail-2.8c-tx2.tar.gz). The "root" (/) in requests is relative to the directory defined by the public keyword. Q: How can I define magic words ? A: define the magic directory in config file; then write a file, with the name you want to be the magic one. The file must be readable (but not executable) by ifcico. The content of the file is tha same as what the requestor should have written in his *.req file to receive the final(s) file(s). (eg: fidonet/nodelists/nodediff.z55 ) Q: How do I create a file request? A: Make an FTS-0006 compatible file in the outbound directory with the name XXXXYYYY.req, where XXXX is a hexadecimal net number, and YYYY is a hexadecimal node number. In the simplest case, it would contain just file names (one at a line). Or just use the ifman utility. Q: How do I create a file attach? A: Either send a mail with the header "X-FTN-FLAGS: ATT" and the file name in the subject (path starting from the `public' directory, and it should be on its place until sent), or put the file name (full path, starting from `/') into the file XXXXYYYY.flo in the outbound directory, where XXXX is a hexadecimal net number, and YYYY is a hexadecimal node number. Q: I put "X-FTN-FLAGS: ATT" but the file isn't attached A: You _must_ have the file in a directory defined in ifgate/attach.c (protinbound and public. If you compile with -DRELAXED there is all the other inbounds too), path relative to it. All the directories must be executables for the user that sends the mail (chmod a+x .... should do the trick), and finally, the file must be readable by that user. Q: How do I specify the "To:" field in the news article to be passed to FidoNet? A: Use "X-Comment-To:" header (or simply "Comment-To:") Q: How do I get rid of the RFC headers converted to that silly kludges in the FidoNet messages? A: You cannot. The author insists on *always* keeping the header information. There is a Good Reason to keep them, trust me! The root idea of ifmail gateway is that the gateway has no right to drop information that it does not understand. If you like, think of it as of my religious views. I am pretty convinced that the best thing you can do with someone other's information that you agreed to carry is to pass it untouched. If a guy chose to put his telephone number into X-Phone: header, he has a right to have it delivered to the readers, no difference if they are on "this" or "that" side of the gateway. Of course, there are many and many cases when this requirement is not met. For example, in the former Soviet Union the KGB thought that it had a right to prelustrate mail (real "paper" mail), and decide if the particular letter should be delivered or not. That was common practice for international mail. But you should agree that this is unfair practice. Another example: open the cowling of your car (or case of your VCR) and remove details which function you do not understand. Q: But the other sysops are complaing about the unnecessary (for them) load, they will simply kick me out of Fido! A: They have no right to do it. You do not violate any standarts. You do not violate policy. So, there is no legal reason for punishment. If they take action against you, complain to the superior coordinator, and you have a good chance to win. Q: How do I achieve default FidoNet routing - either "direct" or "host", "hub", "zonegate" routing? A: Generally, this is MTA's responcibility. ifroute program, that can be used as a "queryprogram" in Smail, is under development (and very well may stay in this state forever). Q: When I link ifcico, I get an unresolved reference: yy???.o. Any hints? A: Try adding "-ll" (or "-lfl" if you are using flex) to the LIBS in the CONFIG file. Q: All articles I receive from my FidoNet uplink are routed back (as I see in the cnews log, and in the cnews "togo" file). Why? A: Because in the cnews "sys" you specified the site name in a format other than recommended "fNNN.nMMM" (or "pLLL.fNNN.nMMM"). Q: Is it possible to have FidoNet correspondents look like internettes in Internet, i.e. have "From: User.Name@Inter.net.domain" instead of "From: User.Name@pNN.fMM.nLL.zX.something.org"? A: In many cases this can be done with the "domtrans" configuration verb. Q: After calling a Fido node I find these lines in iflog: "tcsetattr(0,TCSADRAIN,clocal) return -1 \n\terrno=5 : I/O error" Should I be worried about these errors? A: No. On some systems, kernel does not allow any tty I/O after hangup, thus preventing ifcico from resetting the modem after call. Q: On SCO UNIX, ifcico cannot obtain device for dialout. What's on? A: Probably this is a permission problem creating a LCK file: either make /usr/spool/uucp world-writable or make uucico owned by uucp. Q: The first name and surname of the netmail recipients are always starting with lower case although I enter them with upper case. What's wrong? A: Ifmail does not change the case of the recipients name. Probably it is your MTA. In case of sendmail this can be changed by adding the 'u' flag to the flag list (F=....) in the definiton of your fido mailer specs (in sendmail.cf). Q: My fidonet neighbours are complaining about the format on ^aMSGID kludge in my messages. They ask me to put my FTN address there. Should I do it, and if yes, how? A: Probably you should not. If you do, a single message of Internet origin will get _different_ ^aMDGID's when gatewayed to Fidonet at different gateways, which is incorrect. Also, the FTS standart says that the ^aMSGID should contain the address of the originating network, which won't be true if the gateway's address is substituted. Q: When I poll a node, even though the session is competely correct, ifcico considers the call as failed (apparently, there is a problem with a SIGHUP coming too early...). A: Some fidonet mailers do not finish Zmodem session cleanly, with ZFIN. If they don't, there is *no* way to distinguish accidental hangup from the session completion. Ifcico prefers to be suspitions and interpret unclear situation as failure. Q. I just found a bug in ifmail: when there is only a *.req file in outb, ifcico won't call the destination node. A. This is not a bug, this is a feature :-) If you need to poll the node to get a file, create an empty .flo together with a .req. If you get thru to the node, but it says that it does not support freqs at the moment, the .req file stays in the queue (so you don't need to create it again next time), but the .flo file is deleted (as the session was successfull), so ifcico does not continiously poll the node (which would be annoying). Q: First I want to say that I read FAQ and know about tty_put status error message :) But... Who can explain me why sometimes ifcico continues writing to the log file during the night and in the morning one can find out that the size of log file is over 300 Mb? A: This happens when ifcico does not catch SIGHUP. That may happen if you have wrong modem setup (AT&C0), or wrong cable (with CD signal always ON), or wrong device management (e.g. old-style getty keeping the serial line open while ifcico tries to use it). Q: On my Linux XXX, I cannot compile with HAS_NDBM_H because ndbm.h appears to be missing. Where can I get it? A: It seems that some linux distribution has ndbm.h file missing. Just install it in /usr/include (it can be taken from any gdbm distribution). Also note that if some distributions ndbm.h is either broken or is from BSD DB rather than gdbm. You need gdbm, or you should specify -DHAS_BSD_DB and compile with bsd db library. Q: On my Linux XXX compilation fails due to "already defined" macros, ndbm.h being included more than one time. A: It is a problem of some distributions of ndbm, the ndbm.h isn't protected against more than one inclusion. To solve it edit the /usr/include/ndbm.h file and add, at the very top of the file, these two lines: #ifndef _NDBM_H_ #define _NDBM_H_ and at the very end of the file this single one: #endif /* _NDBM_H_ */ then all programs including ndbm.h should compile fine. Q: When I connect over TCP/IP to a node running a fidonet mailer on OS/2 with vmodem, session is established normally, but file transfers fail with CRC error or such. What's up? A: That's vmodem. Ifcico uses clean TCP stream, while vmodem provides telnet(1) stream emulation, in which some codes are escaped. There are a few `hack' solutions of the problem floating around, including patches to ifcico source and wrapper programs. The "right" solution is to convince vmodem author to provide transparent mode of operation with his program. A TCP mailer for OS/2 exists, called Fmailerd. Its author is Jean-Louis Noel Q: When I compile Linux whith IP_MASQUERADING support ifcico on TCP/IP doesn't work anymore. Why ? A: IP_MASQUERADING assignes several ports for itself; by default it takes from 60000 on; but ifcico uses 60179 ! So you need to edit the file linux/include/net/ip_masq.h and change the value of PORT_MASQ_BEGIN to a value greater than the greater port you use. A value of 6200 should be good enough. (It is fixed on Linux 2.0.22) Q: Will ifmail ever run on MS/DOS? A: No. ifmail-2.14tx8.10.orig/misc/TODO100644 1751 50 1072 6142110070 13560 0ustar mdsrcRewrite Zmodem using state machine and avoiding static variables Write janus, hydra? Support BSD terminal control Check available space when receiving Check if there is mail before calling Option to generate a gatewayed "reply-to" with a fixed domain Lock if[un]pack against simultaneous execution Execute ifunpack when ifcico finishes receiving Check Xmodem bug in openfile(), check for the presence of the file in inbound Change timeout checking in protocols Move space checking to a separate module Make system independant file locking (working over NFS) ifmail-2.14tx8.10.orig/misc/FILES100744 1751 50 342 5476742200 13654 0ustar mdsrc# This is a sample "magic" file request processor echo Dear $1! echo "" echo This is what you asked echo "" ls -lL /usr/spool/uucppublic echo "" echo Report produced in responce to $* echo "" echo Thank you for using ifcico. ifmail-2.14tx8.10.orig/misc/inn/ 40755 1751 50 0 6101427306 13567 5ustar mdsrcifmail-2.14tx8.10.orig/misc/inn/send-ifmail100754 1751 50 4047 6337075212 16014 0ustar mdsrc#! /bin/sh ## $Revision: 1.11 $ ## SH script to send UUCP batches out. ## =()<. @<_PATH_SHELLVARS>@>()= if [ -r /etc/news/innshellvars ]; then . /etc/news/innshellvars else if [ -r /usr/lib/news/innshellvars ]; then . /usr/lib/news/innshellvars else exit 5 fi fi PROGNAME=`basename $0` LOCK=${LOCKS}/LOCK.${PROGNAME} LOG=${MOST_LOGS}/${PROGNAME}.log MAXJOBS=200 UUXFLAGS="- -r -gd" ## Start logging. test ! -f ${LOG} && touch ${LOG} chmod 0660 ${LOG} exec >>${LOG} 2>&1 echo "${PROGNAME}: [$$] begin `date`" cd ${BATCH} ## Anyone else there? trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15 shlock -p $$ -f ${LOCK} || { echo "${PROGNAME}: [$$] locked by [`cat ${LOCK}`]" exit 0 } ## Who are we sending to? if [ -n "$1" ] ; then LIST="$*" else LIST=`ls ${BATCH}|egrep "f[0-9]*\.n[0-9]*\.z[0-9]\.fidonet\.org$"` LIST=$LIST\ `ls ${BATCH}|egrep "f[0-9]*\.n[0-9]*\.z[0-9]*\.[^\.]*\.ftn$"` LIST=$LIST\ `ls ${BATCH}|egrep "f[0-9]*\.n[0-9]*\.z[0-9]*$"` LIST=$LIST\ `ls ${BATCH}|egrep "f[0-9]*\.n[0-9]*$"` fi case ${HAVE_UUSTAT} in DONT) TEMP=${TMPDIR}/uuq$$ uuq -h |tr -d : >${TEMP} ;; esac ## Do the work... for SITE in ${LIST}; do ## See if any data is ready for host. BATCHFILE=${SITE}.uucp if [ -f ${SITE}.work ] ; then cat ${SITE}.work >>${BATCHFILE} rm -f ${SITE}.work fi mv ${SITE} ${SITE}.work ctlinnd -s -t30 flush ${SITE} || continue cat ${SITE}.work >>${BATCHFILE} rm -f ${SITE}.work if [ ! -s ${BATCHFILE} ] ; then echo "${PROGNAME}: [$$] no articles for ${SITE}" rm -f ${BATCHFILE} continue fi ## Get the compression flags. echo "${PROGNAME}: [$$] begin ${SITE}" case "${SITE}" in f456.n23.z1.fidonet.org) IFNEWS_OPTIONS="-gc" ;; *) IFNEWS_OPTIONS="-gh" ;; esac time batcher \ -p"/usr/lib/ifmail/ifnews ${IFNEWS_OPTIONS} -r ${SITE} %s" \ ${SITE} ${BATCHFILE} echo "${PROGNAME}: [$$] end ${SITE}" done case ${HAVE_UUSTAT} in DONT) rm -f ${TEMP} ;; esac ## Remove the lock file. rm -f ${LOCK} echo "${PROGNAME}: [$$] end `date`" ifmail-2.14tx8.10.orig/misc/inn/newsfeeds100644 1751 50 540 5576264006 15564 0ustar mdsrc# Gateway to FidoNet (ifmail) f49.n5020\ :alt.fan.tolkien,rec.arts.books.tolkien,rec.games.frp.dnd\ :Tf,Wfb,B4096/1024: f155.n5020/f35.n5020\ :fido7.spb.efl,fido7.spb.exchange\ :Tf,Wfb,B4096/1024: # if you are on another network, say, "othernet" with zone 69: f88.n77.z69.othernet/f88.n77\ :othernet.sysop,comp.sys.ibmpc\ :Tf,Wfb,B4096/1024: ifmail-2.14tx8.10.orig/misc/README100644 1751 50 1610 6050144345 13760 0ustar mdsrcThis directory contains configuration examples and other files related to ifmail --- Misc documentation files FAQ DEBUG --- Example ifmail configuration files config Areas --- Example MTA/news agents configuration files smail/* sendmail/* zmailer/* cnews/* inn/* --- example TCP/IP configuration files tcp/* --- Example "magic" file request processor FILES --- Contributed scripts and programs contrib/* --- some conversion tables (maptab) for eight bit conversions maptabs/* --- Thanks to beta-testers: gert@greenie.muc.de (Gert Doering) mbravo@tctube.spb.su (Michael Bravo) cm@htu.tuwien.ac.at (Christian Mock) jan@gondor.gun.de (Jan Niehusmann) nikki@dialnet.msk.su (Nikki Chumakov) mj@dfv.rwth-aachen.de (Martin Junius) eugen@gw.zgik.zaporizhzhe.ua (Eugene Polovnikov) rasca@marie.physik.tu-berlin.de (Matthias Gmelch) marcs@alive.ersys.edmonton.ab.ca (Marc Slemko) and many others. ifmail-2.14tx8.10.orig/misc/tcp/ 40755 1751 50 0 6463053453 13602 5ustar mdsrcifmail-2.14tx8.10.orig/misc/tcp/inetd.conf100644 1751 50 171 6463053353 15627 0ustar mdsrcfido stream tcp nowait fnet /usr/lib/ifmail/ifcico ifcico tfido stream tcp nowait fnet /usr/lib/ifmail/ifcico ifcico -t1 ifmail-2.14tx8.10.orig/misc/tcp/services100644 1751 50 150 6463053353 15420 0ustar mdsrcfido 60179/tcp # the standard ifmail port (TCP) tfido 60177/tcp # (telnet fido) port used in Russia ifmail-2.14tx8.10.orig/misc/smail/ 40755 1751 50 0 6101427306 14110 5ustar mdsrcifmail-2.14tx8.10.orig/misc/smail/routers100644 1751 50 426 5376222754 15632 0ustar mdsrcsmarthost: driver=smarthost,transport=uux; path=phreak uuname: driver=uuname,transport=uux; cmd=/usr/local/bin/uuname,domain=uucp pathalias: driver=pathalias,transport=uux; file=paths,proto=dbm ifmail: driver=pathalias,transport=ifmail; file=ftnpaths,proto=lsearch ifmail-2.14tx8.10.orig/misc/smail/transports100644 1751 50 454 5377723050 16343 0ustar mdsrcuux: from,received,max_addrs=5,max_chars=200, driver=pipe; pipe_as_sender, cmd="/usr/local/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)" ifmail: from,received,max_addrs=5,max_chars=200, driver=pipe; pipe_as_sender, cmd="/usr/local/lib/fnet/ifmail -r$host $((${strip:user})$)" ifmail-2.14tx8.10.orig/misc/smail/ftnpaths100644 1751 50 221 5376223206 15740 0ustar mdsrc.f103.n5020.z2.fidonet.org f103.n5020.z2.fidonet.org!%s .n5030.fidonet.org f2.n5030.z2.fidonet.org!%s .fidonet.org f6.n5020.z2.fidonet.org!%s ifmail-2.14tx8.10.orig/misc/sendmail/ 40755 1751 50 0 6573551267 14620 5ustar mdsrcifmail-2.14tx8.10.orig/misc/sendmail/sendmail.cf-1100644 1751 50 1332 6352733511 17145 0ustar mdsrc# Example for sendmail.cf contributed by Krzysztof Halasa # Personally I am not good in sendmail, and I did not try it. =E.C. ###################################### ### Ruleset 0 -- Parse Address ### ###################################### #[deleted] #You must define your Fidonet routing here: R$*<@$+.fidonet.org.>$* $#fido $@$2 $:$1<@$2.fidonet.org>$3 # ^^^ # this dot may be important because of name server behavior #[deleted] ##################################### ### FIDO Mailer specification ### ##################################### Mfido, P=/usr/lib/ifmail/ifmail, F=mSDFMuC, S=11, R=21, U=fnet:uucp, A=ifmail -r $h $u #"-r $h" is required as ifmail requires packet routing address. ifmail-2.14tx8.10.orig/misc/sendmail/sendmail.cf-2100644 1751 50 13545 6352733550 17202 0ustar mdsrc# Contributed by Christoph Lameter # The provided sendmail config file does not canonicise the .fidonet.org names # and therefore messages end up being send into the UUCP domain instead of # Fidonet. I include some parts of sendmail.cf for reference. It contains also some # examples for routing. ###################################################################### ###################################################################### ##### ##### SENDMAIL CONFIGURATION FILE ##### [...] ################## # local info # ################## Cwlocalhost waterf waterf.uucp p1.n961.n102.z1.fidonet.org #Important: Lists all aliases of your system! [...] CPz1.fidonet.org z2.fidonet.org z3.fidonet.org z4.fidonet.org z5.fidonet.org z6.fidonet.org ftn uucp # pseudo-domains, used to not call DNS for them (however you can not to define # them as pseudo domains if you have defined correctly a DNS and MX's) # note that simply "fidonet.org" is wrong, because there are names like # puddle.fidonet.org or ftp.fidonet.org, etc. and we can't call ifmail for them # pseudo domain .ftn is really "pseudo" it doesn't exist, so I can be sure that # they won't be passed to the internet, by making a domain ftn which is local [...] ###################################################################### ###################################################################### ##### ##### REWRITING RULES ##### ###################################################################### ###################################################################### ########################################### ### Rulset 3 -- Name Canonicalization ### ########################################### S3 [...] ################################################ ### Ruleset 96 -- bottom half of ruleset 3 ### ################################################ # At this point, everything should be in a "local_part<@domain>extra" format. S96 # handle special cases for local names R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr # if really UUCP, handle it immediately # try UUCP traffic as a local address R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3 # pass to name server to make hostname canonical ( ~P is all other domains than # those defined in CP ). R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4 ## If you have only FTN connections, put this instead (and we will route later ## to a fido/internet gate): #R$* < @ $* $~P > $* $: $1 < @ $2 $3 . > $4 # local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 R$* < @ $* . . > $* $1 < @ $2 . > $3 # if this is the local hostname, make sure we treat is as canonical R$* < @ $j > $* $: $1 < @ $j . > $2 # Insert this: if this is fidonet take it as canonized R$+ < @ $+ . fidonet . org > $* $@ $1 < @ $2 . fidonet . org . > $3 R$+ < @ $+ . fidonet > $* $@ $1 < @ $2 . fidonet . org . > $3 R$+ < @ $+ . fido > $* $@ $1 < @ $2 . fidonet . org . > $3 ################################################## ### Ruleset 4 -- Final Output Post-rewriting ### ################################################## S4 [...] ###################################### ### Ruleset 0 -- Parse Address ### ###################################### S0 [...] # forward other UUCP traffic straight to UUCP R$* < @ $+ .UUCP. > $* $#uucp $@ $2 $: $1 < @ $2 .UUCP. > $3 user@host.UUCP #You must define your Fidonet routing here: # Routing for my Boss is always direct R$* < @ $* f961 . n102 . z1 . fidonet . org . > $* $#fido $@ f961.n102 $: $1 < @ $2 f961.n102.z1.fidonet.org > $3 # Brian gets all my other direct mailings since he is a hub and a local call. R$* < @ $+ . fidonet . org . > $* $#fido $@ f851.n102 $: $1 < @ $2 . fidonet . org > $3 # ^^^ # this dot may be important because of name server behavior ## If you have no other way than passing through a fido/internet gate for non ## FTN networks. Say the gate is 1:23/45@fidonet #R$* < @ $* . > $* $#fnet $@ f45.n23 $: $1 % $2 < @f45.n23.z1.fidonet.org > $3 ## ifmail when it receives an e-mail to user%domain@fXX.nYY.zZZ.domain.ftn ## makes a netmail to ZZ:YY/XX with "user@domain" in the 'To' field of the ## FTN header # pass names that still have a host to a smarthost (if defined) R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name ###################################################################### ###################################################################### ##### ##### MAILER DEFINITIONS ##### ###################################################################### ###################################################################### [...] ##################################### ### FIDO Mailer specification ### ##################################### Mfido, P=/usr/lib/ifmail/ifmail, F=mSDFMuC, S=11, R=21, U=fnet:uucp, A=ifmail -r $h $u #"-r $h" is required as ifmail requires packet routing address. ##################################### ### UUCP Mailer specification ### ##################################### [...] ----- End sendmail.cf ----- I hope this helps a bit. I do not have any logs like you suggested in a response to my problems. I hate handling huge amounts of output for nothing. So forgive me if I have fixed my problems on my own. Christoph In /etc/sendmail.cf search for the "OG" line, make it to be True ("OGTrue") so that mail addressed to the name rather than the loggin is correctly delivered. (eg: mail to John.Smith@.... rather than jsmith@....) Pablo Saratxaga ifmail-2.14tx8.10.orig/misc/sendmail/ifmail.m4-bosman100644 1751 50 6032 6352733246 17670 0ustar mdsrcReturn-Path: demos!kremvax.demos.su!jm.paco.sfos.ro!tudor Received: from demos by pccross.msk.su with uucp (Smail3.1.29.1 #2) id m0sQJnc-0006U3C; Mon, 26 Jun 95 23:26 MSD Received: by kremvax.demos.su (uumail v3.1/D); Mon, 26 Jun 1995 16:57:21 +0400 Received: from root@[193.230.36.1] by kremvax.demos.su with ESMTP id QAA09110; (8.6.9/D) Mon, 26 Jun 1995 16:56:22 +0400 Received: from paco.paco.sfos.ro (paco.paco.sfos.ro [193.230.36.3]) by palat.pcnet.ro (8.6.11/8.6.9) with ESMTP id QAA06171 for ; Sun, 25 Jun 1995 16:11:10 +0300 Received: (from jm@localhost) by paco.paco.sfos.ro (8.6.11/8.6.9) with UUCP id OAA00809 for crosser@pccross.msk.su; Sun, 25 Jun 1995 14:54:37 +0300 Received: (from tudor@localhost) by jm.paco.sfos.ro (8.6.12/8.6.11) id NAA00781 for crosser@pccross.msk.su; Sun, 25 Jun 1995 13:46:19 +0300 From: Tudor Bosman Message-Id: <199506251046.NAA00781@jm.paco.sfos.ro> Subject: ifmail - sendmail patch To: crosser@pccross.msk.su Date: Sun, 25 Jun 1995 13:46:18 +0300 (EET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1877 Hello ! I have been using ifmail for a while on my Linux box and I found your proposed way of patching /etc/sendmail.cf directly quite "non-standard" and certainly hard to use for non-gurus. So I wrote a FIDO mailer specification, for direct use with sendmail 8.6.10 or higher with the m4 configuration files. Here it is, for inclusion in future releases of ifmail (if you consider so). Suppose the sendmail files are unpacked in . I am running a UUCP machine only, but adding dns lookup and/or smtp mail forwarding should be easy : just start from the linux-smtp.cf file instead of linux-uucp.cf, then adjust as needed -- and remove the ". uucp-dom:paco" line from the mailertable section of jm.mk. There should be no problem in adding more routing information in jm.mk, that is if you are a node in a complex network, not a final Fido point like I am. --- cf/mailer/fido.m4 PUSHDIVERT(-1) ifdef(`FIDO_MAILER_PATH',,`define(`FIDO_MAILER_PATH', /usr/local/lib/ifmail/ifmail)') ifdef(`FIDO_MAILER_USER',, `define(`FIDO_MAILER_USER', `fnet:uucp')') POPDIVERT ############################# # FIDO Mailer specification # ############################# Mfido, P=FIDO_MAILER_PATH, F=mSDFMuC, S=52/31, R=21, U=FIDO_MAILER_USER, A=ifmail $u -r$h --- cf/cf/jm.mc (my configuration file) include(`../m4/cf.m4') VERSIONID(`linux for setup with uucp which uses domain names')dnl OSTYPE(linux) FEATURE(nodns)dnl FEATURE(always_add_domain)dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp)dnl MAILER(fido)dnl FEATURE(mailertable) --- cf/cf/jm.mk (executable to compile the sendmail cf) #!/bin/sh m4 < jm.mc > /etc/sendmail.cf cat << EOF > /etc/mailertable .fidonet.org fido:f7.n530.z2.fidonet.org . uucp-dom:paco EOF makemap hash /etc/mailertable < /etc/mailertable Regards, Tudor ... The champion has retired after eight undefeated victories. -- Tudor Bosman phone: +40 (0)1 653-7086 E-mail: tudor@jm.paco.sfos.ro FidoNet: Tudor Bosman@2:530/7.77 ifmail-2.14tx8.10.orig/misc/sendmail/ifmail.m4-butler100644 1751 50 10132 6352733365 17724 0ustar mdsrcReturn-Path: srcc!gw!jadpc.jd.com!ifmail Received: from srcc by pccross.msk.su with uucp (Smail3.1.29.1 #2) id m0sHcLD-0006Tga; Fri, 2 Jun 95 23:25 MSD Received: by gamma.srcc.msu.su; Fri, 2 Jun 1995 21:09:16 +0400 Received: from jadpc.jd.com (jadpc.nosc.mil [128.49.236.12]) by gw.srcc.msu.su (8.6.12/8.6.12) with SMTP id VAA09782; Fri, 2 Jun 1995 21:08:17 +0400 Received: from jadpc by jadpc.jd.com with smtp (Smail3.1.29.1 #21) id m0sHZgC-0001Nya; Fri, 2 Jun 95 09:34 PDT Date: Fri, 2 Jun 95 09:34 PDT Message-Id: <199506021632.CAA27880@asstdc.scgt.oz.au> Errors-To: jdeitch@jadpc.jd.com Reply-To: imb@scgt.oz.au Originator: ifmail@jadpc.jd.com Sender: ifmail@jadpc.jd.com Precedence: bulk From: michael butler To: ifmail@jadpc.jd.com Subject: Re: ifmail/sendmail/UUCP X-Comment: This is the ifmail mailing list Ian S. White writes: > If there is somebody who is running the above combination successfullly, I > would very much appreciate it if you could send me all of the relevant > configuration. The docs for everything are very limiting, and i can get > sendmail and ifmail to work, or sendmail and uucp, but I can't get both. > help! My O/S configuration is probably not the same as yours (I run FreeBSD -current) but, with sendmail 8.6.12, I highly recommend that you use the "m4" files to generate sendmail.cf .. it works and it's comprehensible (for a nice change :-)). I created an ".mc" file (in sendmail/cf/cf) containing .. divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # [ .. more copyright stuff .. ] # include(`../m4/cf.m4') VERSIONID(`$Id$') OSTYPE(bsd4.4) MASQUERADE_AS(scgt.oz.au)dnl FEATURE(notsticky)dnl define(`UUCP_MAX_SIZE', 2000000) define(`FIDO_MAX_SIZE', 12000) define(`confCW_FILE', /etc/sendmail.cw) define(`confMIME_FORMAT_ERRORS', False) define(`confCOPY_ERRORS_TO', postmaster) define(`confMCI_CACHE_SIZE', 4) FEATURE(use_cw_file) FEATURE(always_add_domain) define(`UUCP_RELAY', `uunet.uu.net') define(`BITNET_RELAY', `bitnet.mailgate.cs.mu.oz.au') define(`LOCAL_MAILER_PATH', /usr/local/bin/procmail) define(`LOCAL_MAILER_ARGS', `procmail -d $u') define(`UUCP_MAILER_ARGS', `uux - -r -z -a$f. $h!rmail ($u)')dnl MAILER(`local') MAILER(`smtp') MAILER(`uucp') MAILER(`ifmail') FEATURE(mailertable) SITECONFIG(`uucp.asstdc', `asstdc', `U') LOCAL_RULE_3 UUCPSMTP(techpac, techpac.com.au) UUCPSMTP(kate, kate.asstdc.com.au) UUCPSMTP(eagle, eagle.asstdc.com.au) UUCPSMTP(mcc, mcc.com.au) UUCPSMTP(active, active.asstdc.com.au) UUCPSMTP(matp, matp.asstdc.com.au) UUCPSMTP(speakezy, speakezy.asstdc.com.au) UUCPSMTP(bbs, bbs.asstdc.com.au) LOCAL_RULE_0 R$+ < @ eagle . asstdc . com . au . > $#uucp $@ eagle $: $1 R$+ < @ bbs . asstdc . com . au . > $#uucp $@ bbs $: $1 .. then, under sendmail/cf/mailer, a file called "ifmail.m4" and fleshed out from uucp.m4, as follows .. PUSHDIVERT(-1) # ifdef(`FIDO_MAILER_PATH',, `define(`FIDO_MAILER_PATH', /usr/local/lib/fnet/ifmail)') ifdef(`FIDO_MAILER_ARGS',, `define(`FIDO_MAILER_ARGS', `ifmail -r $h $u')') ifdef(`FIDO_MAILER_USER',, `define(`FIDO_MAILER_USER', `fnet:uucp')') ifdef(`FIDO_MAILER_FLAGS',, `define(`FIDO_MAILER_FLAGS', `')') ifdef(`FIDO_MAX_SIZE',, `define(`FIDO_MAX_SIZE', 100000)') POPDIVERT ifdef(`_MAILER_smtp_', `# domain-ized FIDO mailer Mfido, P=FIDO_MAILER_PATH, F=CONCAT(mSDFMhu, FIDO_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), U=FIDO_MAILER_USER, A=FIDO_MAILER_ARGS Mrfido, P=FIDO_MAILER_PATH, F=CONCAT(mSDFMhu, FIDO_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'),M=FIDO_MAX_SIZE, U=FIDO_MAILER_USER, A=FIDO_MAILER_ARGS') .. and, under sendmail/cf/siteconfig, a file called "uucp.asstdc.m4" looking like .. SITE(techpac kate eagle active) SITE(matp mcc speakezy bbs) .. now you probably may not need procmail but you can probably prune it down from there. With Taylor UUCP, you MUST have config files (/etc/uucp/sys in particular) that matches sendmail or else _strange_ things start to happen .. none of them desirable, michael ifmail-2.14tx8.10.orig/misc/sendmail/ifmail.m4-selig100644 1751 50 14555 6352733453 17545 0ustar mdsrc# Return-Path: srcc!gw!valley.muc.de!mas # Received: from srcc by pccross.msk.su with uucp # (Smail3.1.29.1 #2) id m0sHcLG-0006TbC; Fri, 2 Jun 95 23:25 MSD # Received: by gamma.srcc.msu.su; Fri, 2 Jun 1995 21:15:21 +0400 # Received: from colin.muc.de (root@colin.muc.de [193.174.4.1]) by gw.srcc.msu.su (8.6.12/8.6.12) with SMTP id VAA09890 for ; Fri, 2 Jun 1995 21:13:38 +0400 # Received: from valley by colin.muc.de with UUCP id <25613-2>; Fri, 2 Jun 1995 19:13:19 +0200 # Received: (from mas@localhost) by valley.muc.de (8.6.12/8.6.12) id RAA13876 for crosser@pccross.msk.su; Fri, 2 Jun 1995 17:16:53 +0200 # From: "Marc A. Selig" # Message-Id: <199506021516.RAA13876@valley.muc.de> # Subject: ifmail 2.8c and sendmail 8.6.12 # To: crosser@pccross.msk.su # Date: Fri, 2 Jun 1995 17:16:42 +0200 # X-Mailer: ELM [version 2.4 PL23] # Content-Type: text # Content-Length: 5260 # # Hello! # # I have been a content user of your ifmail package for about # a year now. Except for two TIMEOUTs that lasted for several # hours, I have never experienced any serious trouble with it # and recommend the package to anyone asking me on how to go # about installing a FTN package under Linux. Many thanks for # the really good work you have done! # # # However, when installing sendmail on my system some days ago, # I had to do some figuring out to make the package work again. # The reason for this is that, although you did include some # help on how to install ifmail with sendmail in the contrib # directory, the instructions given there are meant for direct # modification of /etc/sendmail.cf, which is, IMHO, a Bad Thing # To Do with the new sendmail versions that are much easier # configured using m4 macros. # # Well, I finally found my way around the beast :) and managed # to make ifmail work with sendmail configured via m4. Maybe # you want to include the necessary files in the distribution # of ifmail so others will be spared the few hours I (as a non- # expert on sendmail) had to spend on this. Anyway, here they # are: # # # This has to go in file "cf/mailer/fido.m4". I do not know # about licensing information and Trouble With The Law :), # so I simply included the corresponding section from the # other mailer drivers. # ------------------------- PUSHDIVERT(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the University of # California, Berkeley and its contributors. # 4. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ifdef(`IFMAIL_MAILER_PATH',, `define(`IFMAIL_MAILER_PATH', /usr/lib/ifmail/ifmail)') ifdef(`FIDO_MAILER_USER',, `define(`FIDO_MAILER_USER', `fnet:uucp')') POPDIVERT ##################################### ### FIDO Mailer specification ### ##################################### VERSIONID(`@(#)ifmail.m4 0.0 (Marc A. Selig) 5/25/95') Mfido, P=IFMAIL_MAILER_PATH, F=mSDFMuC, S=11, R=21, U=FIDO_MAILER_USER, A=ifmail -r $h $u # "-r $h" is required as ifmail requires packet routing address. ------------------------- This has to be added to "cf/cf/.mc": ------------------------- MAILER(fido) [...] # Add all your host names here. Cwlocalhost valley valley.muc.de f902.n106.z142.sfnet [...] LOCAL_RULE_3 # if this is fidonet take it as canonized # note: insert any domains here that should be passed to ifmail! R$+ < @ $+ . fidonet . org > $* $@ $1 < @ $2 . fidonet . org . > $3 R$+ < @ $+ . fidonet > $* $@ $1 < @ $2 . fidonet . org . > $3 R$+ < @ $+ . sfnet . org > $* $@ $1 < @ $2 . sfnet . > $3 R$+ < @ $+ . sfnet > $* $@ $1 < @ $2 . sfnet . > $3 LOCAL_RULE_0 # Rewrite local addresses so they get sent to user@my.f.q.d.n instead of # being routed through the FTN. (Replace f902.n106.z142 by your FTN address.) # I had to do this since everything would be routed to my FTN boss without it. # Maybe I'm just plain stupid, but this works at least. # You can insert more than one of these if you have more addresses. R$* < @ f902 . n106 . z142 . sfnet . > $* $#local $: $1 ## Routing for 1:102/961 is always direct ## This is an untested example. #R$* < @ $* f961 . n102 . z1 . fidonet . org . > $* # $#fido $@ f961.n102 $: $1 < @ $2 f961.n102.z1.fidonet.org > $3 # Everything else gets sent to 142:106/900 # (Replace this by your boss.) R$* < @ $+ . sfnet . > $* $#fido $@ f900.n106.z142 $: $1 < @ $2 . sfnet > $3 # ------------------------- # # # Hope this might help somebody. And I hope it is not too wrong. :) # Well, at least it seems to work on my system, and it does not care # about whether the rest of your connections are via uucp or smtp or # whatever. # # cu # Marc # # -- # mselig@sun1.cip.fak14.uni-muenchen.de phone ++49-8745-1535 ifmail-2.14tx8.10.orig/misc/sendmail/fnet.m4100644 0 0 3673 6573551267 16560 0ustar rootrootPUSHDIVERT(-1) ifdef(`FIDO_MAILER_FLAGS',, `define(`FIDO_MAILER_FLAGS', `8mDFMuSC')') ifdef(`FIDO_MAILER_PATH',, `define(`FIDO_MAILER_PATH', /usr/lib/ifmail/ifmail)') ifdef(`FIDO_MAILER_USER',, `define(`FIDO_MAILER_USER', `fnet:fnet')') ifdef(`FIDO_MAILER_ARGS_H',, `define(`FIDO_MAILER_ARGS_H', `ifmail -r $h -g h $u')') ifdef(`FIDO_MAILER_ARGS_C',, `define(`FIDO_MAILER_ARGS_C', `ifmail -r $h -g c $u')') ifdef(`FIDO_MAILER_ARGS_B',, `define(`FIDO_MAILER_ARGS_B', `ifmail -b -r $h -g h $u')') ifdef(`FIDO_MAILER_ARGS_P',, `define(`FIDO_MAILER_ARGS_P', `ifmail -l-3 -r $h -g h $u')') POPDIVERT ############################# # FIDO Mailer specification # ############################# VERSIONID(`@(#)fnet.m4 1.02 (srtxg@f2219.n293.z2.fidonet.org) 8/8/98') # normal fnet mailer, pkt as hold Mfnet, P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21, _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER, ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_H # This is for crash mail just in case you need it * USE WHITH CARE * Mfnet-crash, P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21, _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER, ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_C # This doesn't split messages when writting in pkt, of course the node # receiving the pkt must be able to handle arbitrary size messages. # if the other end uses ifmail too use this. Mfnet-big, P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21, _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER, ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_B # This one uses a "kludge verbosity" of level -3, that is nothing is kept # from usenet/email infos. Mfnet-poor, P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21, _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER, ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_P ifmail-2.14tx8.10.orig/misc/sendmail/ifmail.mc100644 0 0 10471 6573551267 17156 0ustar rootrootdivert(-1) include(`../m4/cf.m4') OSTYPE(`linux') dnl ########################## dnl # Configurable options # dnl ########################## dnl ### Your ISP smtp host (leave blank if none) dnl ### the brackets ( [ ] ) avoid calling the DNS; usefull if you dnl ### are not connected to the internet 24h/24 define(`SMART_HOST', ``[smtp.your.provider.com]'') dnl ### The fidonet address of your uplink; that is the default ftn route define(`FIDO_SMART_HOST', ``f1.n2.z3.fidonet.org'') dnl ### The fidonet --> internet gateway define(`FIDO_GATEWAY', ``f4.n5.z6.fidonet.org'') dnl ### define or undefine depending if you want to use the gateway or dnl ### not (if you ave a real email access undefine it) define(`USE_FGATE') dnl ### This is needed if you don't have permanent access to DNS dnl ### (that is if you are not 24h/24 wired; if you are you can remove it) FEATURE(accept_unresolvable_domains) FEATURE(nodns)dnl dnl dnl #################################### dnl # End of configurable section # dnl #################################### dnl define(`confDEF_USER_ID',``8:12'') define(`confMATCH_GECOS',`True') define(`confTRY_NULL_MX_LIST',`True') define(`confTO_QUEUEWARN', `2d') define(`confTO_QUEUERETURN', `8d') define(`confUSE_ERRORS_TO',`True') define(`confTRUSTED_USERS',`fnet') define(`confCT_FILE', ` -o /etc/mail/sendmail.ct')dnl define(`confCW_FILE', ` /etc/mail/sendmail.cw')dnl define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')dnl define(`confSTATUS_FILE',`/var/run/sendmail.st')dnl define(`ALIAS_FILE',`/etc/mail/aliases,/etc/mail/majordomo')dnl define(`HELP_FILE',`/etc/mail/sendmail.hf')dnl define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl define(`STATUS_FILE',`/var/run/sendmail.st')dnl undefine(`UUCP_RELAY')dnl undefine(`BITNET_RELAY')dnl FEATURE(access_db, hash -o /etc/mail/access)dnl FEATURE(always_add_domain)dnl FEATURE(blacklist_recipients)dnl dnl FEATURE(limited_masquerade)dnl dnl FEATURE(masquerade_entire_domain)dnl FEATURE(masquerade_envelope)dnl FEATURE(local_procmail)dnl FEATURE(redirect)dnl FEATURE(relay_based_on_MX)dnl FEATURE(relay_entire_domain)dnl FEATURE(relay_local_from)dnl FEATURE(use_ct_file)dnl FEATURE(use_cw_file)dnl FEATURE(`domaintable',`hash -o /etc/mail/domaintable')dnl FEATURE(`genericstable',`hash -o /etc/mail/genericstable')dnl GENERICS_DOMAIN_FILE(confCW_FILE)dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl FEATURE(nocanonify)dnl MAILER(procmail)dnl MAILER(smtp)dnl MAILER(fnet)dnl MAILER(usenet)dnl MAILER(uucp)dnl LOCAL_CONFIG # Pseudo-domains (don't call the DNS on them) CPz1.fidonet.org z2.fidonet.org z3.fidonet.org z4.fidonet.org CPz5.fidonet.org z6.fidonet.org ftn # for fidonet address, don't send trough fnet mailer addresses like # smtp.z2.fidonet.org, www.z2.fidonet.org, etc CFfidonet ns ns2 mail smtp www ftp # email address on other domains that we redirect Kpirateo hash -o /etc/mail/pirateo LOCAL_RULE_0 # pirateo R$+ < @ $+ . > $* $: < $(pirateo $1 @ $2 $: $) > $1 < @ $2 . > $3 R$+ < @ $+ $~. > $* $: < $(pirateo $1 @ $2 $3 $: $) > $1 < @ $2 $3 > $4 R< $+ > $+ < @ $+ > $* $@ $>97 $1 $4 R<> $+ < @ $+ > $* $: $1 < @ $2 > $3 LOCAL_NET_CONFIG # ************ FIDONET.ORG *********** # for nodes allways put leading $* if you want to route his points too # routed trough default smart host FIDO_SMART_HOST R$* < @ $~F $+ .z1.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z1.fidonet.org > $4 R$* < @ $~F $+ .z2.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z2.fidonet.org > $4 R$* < @ $~F $+ .z3.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z3.fidonet.org > $4 R$* < @ $~F $+ .z4.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z4.fidonet.org > $4 R$* < @ $~F $+ .z5.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z5.fidonet.org > $4 R$* < @ $~F $+ .z6.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z6.fidonet.org > $4 # all the remaining FTN's (via fido smart host FIDO_SMART_HOST) R$* < @ $+ .ftn . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 .ftn > $3 # If you don't have internet connectivity comment out this line # to send through the gateway FIDO_GATEWAY # (packets will go to your default uplink FIDO_SMART_HOST) ifdef(`USE_FGATE',`',`#')R$* < @ $* > $* $#fnet $@ FIDO_SMART_HOST $: $1 % $2 < @ FIDO_GATEWAY > $3 ifmail-2.14tx8.10.orig/misc/sendmail/ifmail.mc.README100644 0 0 13222 6573551267 20107 0ustar rootrootHello, In order to facilitate the configuration of sendmail I made a little m4 script, it replaces the ugly SENDMAIL.sh :) It needs fnet.m4 that is included in last tx and that goes in ..../sendmail-cf/mailer/ while the ifmail.mc goes in ..../sendmail-cf/cf/ You have to configure a few lines in ifmail.mc then do m4 ifmail.mc > /etc/sendmail.cf and you have a good sendmail.cf You need the m4 macros for sendmail (come whith the sendmail sources, or you can have sendmail-cf.blabla.rpm; sure other distrib schemes have their equivalent packages too) NOTES: * it has anti-spam support (trough the /etc/mail/access database) * it assumess you use *.fidonet.org domain for fidonet and *.ftn for othernets * it uses a "mailertable" database for special routings (others than internet smart host and FTN smart host) * it uses "revaliases" database to masquerade From: lines; putting the real email on them. * it uses a "pirateo" database to redirect messages to addresses on other domains than yours (that is useful to avoid sending to internet mail write on your machine to users that are also on your machine) What is configurable ? Only these lines : define(`SMART_HOST', ``[smtp.your.provider.com]'') define(`FIDO_SMART_HOST', ``f1.n2.z3.fidonet.org'') define(`FIDO_GATEWAY', ``f4.n5.z6.fidonet.org'') define(`USE_FGATE') FEATURE(accept_unresolvable_domains) FEATURE(nodns) SMART_HOST defines your ISP smart host, that is the machine you sent email to. That is a machine accessible by smtp (when you connect t othe internet throug PPP do "sendmail -q" and it delivers the mail). enclose the name whith [ ] if you are not connected 24h/24h, otherwise problems will happen. FIDO_SMART_HOST your fido uplink address, that is where you send pkt to. FIDO_GATEWAY the fidonet -> internet gateway nearest to you USE_FGATE this one is a little different. If you have *NO* internet connectivity at all, that is if you rely on the fidonet gateway, put this line: define(`USE_FGATE') however, if you can connect to the internet to send to a smart host put this one instead : undefine(`USE_FGATE') accept_unresolvable_domains and nodns features are defined if you don't have a 24h/24 internet connection. That's all for a simple setup ! run (m4 ifmail.mc > /etc/sendmail.cf) ========================================================================= Don't forget to put in /etc/mail/sendmail.cw the list of all your machine local addresses (either uucp name if one, fidonet, other FTN,...). Exemple I have : # sendmail.cw - include all aliases for your machine here. chanae.stben.be linux.chanae.stben.be f2219.n293.z2.fidonet.org p29.f1.n850.z4.fidonet.org f4120.n320.z101.francom.ftn ========================================================================= If you are connected to other FTN networks or if you want some routing other than trough FIDO_SMART_HOST and/or SMART_HOST edit the file /etc/mail/mailertable to add some special routings, using the syntax : domain transport:trough.system ex: f2219.n293.z2.fidonet.org fnet:f2219.n293.z2.fidonet.org sends direct to 2:293/2219 trough fnet. NOTE: points aren't handled, for that you will also need: .f2219.n293.z2.fidonet.org fnet:f2219.n293.z2.fidonet.org note the leading dot ! For *your* points put (assming you are f15.n2.z3.fidonet.org) : .f15.n2.z3.fidonet.org fnet:%1.f15.n2.z3.fidonet.org (again note the leading dot, and the %1) for othernets is the same, ex: .maxwellnet.ftn fnet:f12.n34.z555.maxwellnet.ftn and for other transports too: .some.uucp uucp-dom:barney .some.smtp smtp:[local.networked.machine] each time you modify /etc/mail/mailertable you need to recompile it running: makemap hash /etc/mail/mailertable < /etc/mail/mailertable ========================================================================= To masquerade From: addresses edit /etc/mail/genericstable and add lines like localuser login@somewhere to masquerade the local user "localuser" as "login@somewhere". each time you modify /etc/revaliases you need to recompile it running: makemap hash /etc/mail/genericstable < /etc/mail/genericstable ========================================================================= To redirect mail to specific users of other domains add in /etc/mail/pirateo lines like: someuser@somewhere someother@other.place user@domain localuser For exemple if you use "peter" as your login on your linux box; and your email at your ISP is psmith@aol.com; then you can put: psmith@aol.com peter so if someone sends mail to psmith@aol.com it isn't sent to internet but directly sent to local user peter. each time you modify /etc/mail/pirateo you need to recompile it running: makemap hash /etc/mail/pirateo < /etc/mail/pirateo ========================================================================= sendmail 8.9.* has powerfull anti-spam features; if you want to reject mail from given addresses, hosts or domains you can add them in /etc/mail/access whith the keyword REJECT. Other keywords are OK which overrides all other cases and allow the given address, RELAY, to accept relaying and DISCARD to simply ignore the message. If you want to act as a gateway to internet for your FTN network you should allow relaying for fidonet.org and ftn. I also suggest you allways accept mail from postmaster@* and abuse@* so the file should be like: abuse@ OK postmaster@ OK fidonet.org RELAY ftn RELAY somespammer@aol.com REJECT cyberpromo.com REJECT mail.for.u DISCARD If you are connected 24h/24 you should consider the Real-time Black List. see http://maps.vix.com/ after any modification of /etc/mail/access you must rebuild it makemap hash /etc/mail/access < /etc/mail/access -- A bientôt, Pablo Saratxaga ifmail-2.14tx8.10.orig/misc/zmailer/ 40755 1751 50 0 6101427307 14447 5ustar mdsrcifmail-2.14tx8.10.orig/misc/zmailer/sm.conf100644 1751 50 627 5526460424 16026 0ustar mdsrc# Do not edit this file, instead edit /local/src/zmailer/proto/sm.conf # # M F = P = A = # the following entries are in active use at this site: uucp Um /usr/bin/uux uux - -r -a$g -ghigh $h!rmail ($u) fnet Um /usr/local/lib/fnet/ifmail ifmail -r$h -gn $u fneth Um /usr/local/lib/fnet/ifmail ifmail -r$h -gh $u fnetc Um /usr/local/lib/fnet/ifmail ifmail -r$h -gc $u ifmail-2.14tx8.10.orig/misc/zmailer/scheduler.conf100644 1751 50 363 5526460424 17362 0ustar mdsrc# crash mail fnetc/* maxchannel=5 byhost command="sm -c $channel fnetc" # hold fneth/* maxchannel=5 byhost command="sm -c $channel fneth" # normal fnet/* maxchannel=5 byhost command="sm -c $channel fnet" ifmail-2.14tx8.10.orig/misc/zmailer/routes100644 1751 50 2157 5526460236 16025 0ustar mdsrc#a This *entire* file must be kept sorted (comments included!) #b entries in this file are checked first by router.cf. they have the form #c name channel!next_destination #d A leading . on the name indicates that all subdomains match as well .f1.n5020.z2.fidonet.org fnet!f1.n5020.z2.fidonet.org .z1.fidonet.org fnet!f23.n5020.z2.fidonet.org .z2.fidonet.org fnet!f23.n5020.z2.fidonet.org .z3.fidonet.org fnet!f23.n5020.z2.fidonet.org .z4.fidonet.org fnet!f23.n5020.z2.fidonet.org .z5.fidonet.org fnet!f23.n5020.z2.fidonet.org .z6.fidonet.org fnet!f23.n5020.z2.fidonet.org .zelax.zgrad.su uucpa!zelax f230.n5020.z2.fidonet.org fnet!f230.n5020.z2.fidonet.org f7.n464.z2.fidonet.org fnet!f7.n464.z2.fidonet.org p19.f18.n5020.z2.fidonet.org fneth!p19.f18.n5020.z2.fidonet.org p44.f28.n5020.z2.fidonet.org fneth!p44.f28.n5020.z2.fidonet.org p46.f78.n5020.z2.fidonet.org fneth!p46.f78.n5020.z2.fidonet.org pccross uucpa!pccross pccross.msk.su uucpa!pccross ifmail-2.14tx8.10.orig/misc/cnews/ 40755 1751 50 0 6463053453 14133 5ustar mdsrcifmail-2.14tx8.10.orig/misc/cnews/sys100644 1751 50 364 5576263620 14757 0ustar mdsrc# gateway to FidoNet (ifmail) # f6.n5020:fido7/all:f: f103.n5020:alt.fan.tolkien,rec.arts.books.tolkien/all:f: # # if you are on another network, say, "othernet" with zone 69: # f88.n77.z69.othernet/f88.n77:othernet.sysop,comp.sys.ibmpc/all:f: ifmail-2.14tx8.10.orig/misc/cnews/batchparms100644 1751 50 1523 6463053353 16277 0ustar mdsrc# site size queue builder muncher sender # ---- ---- ----- ------- ------- ------ /default/ 65535 32 batcher compcun viauux # # FidoNet gateway (ifmail) # you should have either a link to ifmail progfam in $NEWSBIN/batch # or have a script there calling ifmail with appropriate parameters. # You may omit "-n" key if the program name is "ifnews" and you can # omit -r key if $NEWSSITE environment variable is set. # ifmail (ifnews) must run setuid owner of fidonet directories # f6.n5020 32767 8 batcher nocomp ifnews f103.n5020 32767 8 batcher nocomp ifnews # # According to Urko Lusa : # For newer version of cnews, you may want to put something like this: # #103.n5020 f 32767 8 batcher | ifnews -r f103.n5020 # # and run "sendbatches -c f" to pack echoes for all your Fido feeds # if you have more than one. ifmail-2.14tx8.10.orig/misc/contrib/ 40755 1751 50 0 6701151723 14446 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/ifpoll100755 1751 50 6367 6420407565 16000 0ustar mdsrc#!/bin/sh Ver=0.9h # ifpoll, poll my boss node or the node given as argument 1 # # i start this shell script every day by "crond", but you can # start it also by hand :) start it as the owner of ifcico. # rasca, berlin 1993,97 (Rasca Gmelch, 2:2410/305.4) # # configuration part, change this to reflect your installation # where "ifcico" and "ifpack" reside FIDOPATH=/usr/local/lib/fnet # ifcico config file # IFCONFIG=$FIDOPATH/config IFCONFIG=/etc/fido/ifmail.cfg # logfile of ifcico IFLOG=/var/log/fido/iflog # where to log processing - file or tty/console # LOGGING=/var/log/fido/ifpoll.log LOGGING=/dev/tty1 # protected inbound directory PINBOUND=`grep ^protinbound $IFCONFIG | cut -c 13-` # owner of "ifcico" IFCICO_OWNER=uucp # who should be informed when the calling failed IFCICO_SYSOP=rasca@lupo # my boss node (default address to poll) NODE="f305.n2410.z2.fidonet.org" # how often should i try to call NODE? MaxTry=4 # delay between outgoing calls in seconds DELAY=240 # end of configuration part ------------------- echo "`date \"+%b %d %T\"` ifpoll[$$]: starting (ifpoll v$Ver)" >> $LOGGING # remember me, not to run as root.. # if [ `whoami` != "$IFCICO_OWNER" ]; then echo "*** run $0 as the owner of ifcico ***" echo "`date \"+%b %d %T\"` ifpoll[$$]: wrong uid (rc 2)" >> $LOGGING exit 2 fi # # argv[1] is the optional node to call # if [ "$1" != "" ]; then if [ "$1" = "-?" ] || [ "$1" = "-h" ]; then echo -e "\nusage: ifpoll []" echo -e "default node: $NODE\n" exit 3 else NODE=$1 fi fi # # first let's pack the fido stuff.. # $FIDOPATH/ifpack # -I$IFCONFIG # # loop until ifcico could connect the node or MaxTry is encountered # i=1; errlv=1 while (expr $i \<= $MaxTry && expr $errlv != 0 ) >/dev/null do echo -n "`date \"+%b %d %T\"` ifpoll[$$]: $i. try ($NODE) " >> $LOGGING # # start ifcico in master mode .. # if [ "$NODE" != "-" ]; then $FIDOPATH/ifcico -I$IFCONFIG -r 1 $NODE errlv=$? else errlv=0 fi if [ $errlv != "0" ]; then echo "failed" >> $LOGGING if [ $i != $MaxTry ]; then sleep $DELAY fi i=`expr $i + 1` else echo "ok :)" >> $LOGGING fi done # # if the poll was fine, let's unpacking.. # if [ $errlv = "0" ]; then # echo "`date \"+%b %d %T\"` ifpoll[$$]: unpacking.. " >> $LOGGING $FIDOPATH/ifunpack -I$IFCONFIG # if [ $NODE = "f305.n2410.z2.fidonet.org" ] || \ [ "$NODE" = "-" ]; then # # do this only when calling my boss node # # adjust the system time # /usr/local/sbin/fnet/trxset >> $LOGGING # if [ -s "$PINBOUND/22410305.lzh" ]; then chmod 644 $PINBOUND/22410305.lzh fi # # nodelist stuff # for pl in 4dpoint.bln pointlst.bln do if [ -s "$PINBOUND/$pl" ]; then mv -f $PINBOUND/$pl /usr/fido/nodelist fi done # cd $PINBOUND && { if find nodediff.a[0-9][0-9] 2> /dev/null then for diff in nodediff.a[0-9][0-9] do arc -ie $diff >> $LOGGING && { mv $diff ../Nodelist/ } done nice /usr/local/sbin/fnet/differ.sh >> $LOGGING nice $FIDOPATH/ifindex fi } fi else # write me a mail about the failed poll tail --lines=20 $IFLOG | elm -s "ifpoll: failed" $IFCICO_SYSOP >/dev/null fi echo "`date \"+%b %d %T\"` ifpoll[$$]: finished (rc $errlv)" >> $LOGGING # return the errorlevel of ifcico exit $errlv ifmail-2.14tx8.10.orig/misc/contrib/ifreq100755 1751 50 5253 5616531434 15611 0ustar mdsrc#!/usr/bin/perl $ver = "0.4"; # # this perl script is designed for the ifmail package by eugene grosser. # # request a file (first argument) from a fido-node (second argument), # don't forget to quote if you use wildcards, e.g.: # ifreq 'files*' 2:2410/305 # or # ifreq 'files newfile' 2:2410/305 # # this perl script does only add an entry to the corresponding flo-file, # the mailer ifcico is not started! # # rasca, berlin 1994 (rasca@marie.physik.tu-berlin.de, 2:2410/305.4) # # multi-zone support added by # Roland Rosenfeld 15.05.1994 (roland@p13.flokiste.fido.de, 2:2450/300.13) # ifcico-config-file: $config = "/usr/local/lib/fnet/config"; # change this to the default node, where requests should go to. $node = "2:2410/305"; # this is the base directory, where the req-files are stored and the # default outbound $flo_path = "/var/spool/fnet"; $outbound = "/out"; # don't be confused, it means "/var/spool/fnet/out" # end of configuration ############################################# # main() # if ((@ARGV < 1) || @ARGV > 2 || $ARGV[0] eq "-?") { &usage; } elsif ($ARGV[1] ne "") { $node = $ARGV[1]; } $file = $ARGV[0]; if (! ($node =~ /\d+:\d+\/\d+/)) { die "Wrong address: $node!!!"; } ($zone, $netnode) = split (/:/, $node); $reqfile = sprintf("%04x%04x", split(/\//, $netnode)); if ($reqfile eq "00000000") { print ("can't resolve the fido address \"$node\"\n"); &usage; } else { if ( $zone == 2 ) { $reqfile = $flo_path . $outbound . "/" . $reqfile . ".req"; } elsif ( $zone < 7 ) { $reqfile = $flo_path . $outbound . ".00$zone/" . $reqfile . ".req"; } else { $outbound = ""; open (CONFIG, "< $config") || die "can't open $config"; while ($_ = ) { if ( /^address.*$zone:.*\@(\w*)/ ) { $outbound = $1; } } if ( $outbound eq "" ) { die "No Zone $zone found in $config"; } $reqfile = $flo_path . "/$outbound/" . $reqfile . ".req"; } # seperate the file names of the first argument @files = split (/\s+/, $ARGV[0]); # open the flofile for appending open(FLOFILE, ">>" . $reqfile) || die "can't open $reqfile"; while (@files) { print (FLOFILE shift(@files), "\n"); } close(FLOFILE); print ("--- fido request $ver ---------------------------\n"); print ("requesting \"$file\" from fido-node $node\n"); print ("--- executing ifstat .. ------------------------\n"); system("ifstat"); } # # subroutine "usage" # sub usage { printf ("--- fido request %s -------------\n", $ver); printf ("usage: ifreq [<3-d address>]\n"); printf ("e.g. : ifreq FILES 2:2410/305\n"); exit 1; } ifmail-2.14tx8.10.orig/misc/contrib/ifman100755 1751 50 10612 6463053353 15610 0ustar mdsrc#! /usr/bin/perl # # This is a utility script to manipulate Fidonet-related issues # using Eugene Crosser's ifmail package # # Version 0.1 # # (C) Michael Bravo and The Communication Tube, 1994 # # You can do whatever you want with this script. I take no responsibility # whatsoever in anything related to this script. If you make some useful # additions to this, please think of sending them to me so I could partake # of your wisdom. # # This script was written to help attaching and requesting files from the # commandline, much like you do with Squish under DOS or OS/2. It is certainly # not perfect - I used it as an exercise in Perl. It also probably lacks # some other useful features, like ability to specify trunc/sent or kill/sent # attributes etc etc. If you really want this or some other features # implemented, write me at mbravo@tctube.spb.su or mbravo@octopus.spb.su # and I will try to do what I can. # # Note - files don't get copied to any spool dir, so if you move attached # files somewhere, they won't get sent. # # This script is supposed to read ifmail's config to determine where outbound # directory and logfile are. The only two parameters to modify in most cases # are below. ### modified by P. Saratxaga on 28 Jun 1996 # when _requesting_ it musn't append $PWD to the file name. So I move that # code to execute only if it is send mode. $cfgfile="/etc/ifmail/config"; # where the config is $ifowner="fnet"; # who is the owner of the ifmail if ( getpwuid($<) ne $ifowner ) { print "You must be owner of ifmail\n"; exit 1; } if ( (@ARGV < 3) || $ARGV[0] eq "-?" || $ARGV[0] eq "-h" ) { &usage; } $ARGV[0] =~ tr/A-Z/a-z/; $ARGV[3] =~ tr/A-Z/a-z/; &parsecfg; if ( $logfile ne "" ) { open(LOG, ">>".$logfile) || die "Can't open logfile"; } if ($ARGV[3] eq "" || $ARGV[3] eq "normal") { $flavour = 'f'; } elsif ($ARGV[3] eq "crash") { $flavour = 'c'; } elsif ($ARGV[3] eq "hold") { $flavour = 'h'; } else { print "Unknown flavour, assuming normal\n"; $flavour = 'f'; } if ($ARGV[0] eq "send") { if (substr($ARGV[1], 0, 1) ne "/") { $cwd=`pwd`; chop $cwd; $ARGV[1] = $cwd."/".$ARGV[1]; } &attach($ARGV[1], $ARGV[2]); } elsif ($ARGV[0] eq "get") { &request($ARGV[1], $ARGV[2]); } else { print "Unknown command, try ifman -h\n"; exit 1; } close(LOG); exit 0; ####################################################################### sub attach { local($fspec, $address) = @_; $floname = &resolve($address); open(FLO, ">>".$outbound."/".$floname) || die "Can't open flo-file $outbound/$floname"; open(FIND, "find $fspec -print |") || die "Can't generate list of files"; if ( eof(FIND) ) { print "No matching files, nothing to send\n"; exit 1; } while () { chop; $datestamp = `date \"+%D %T\"`; chop $datestamp; printf LOG "%s %s %s\n", $datestamp, $$, "ifman: sending $_ to $address"; printf FLO "%s\n", $_; } close(FLO); close(FIND); } sub request { local($fspec, $address) = @_; $reqname = &resolve($address); $reqname =~ s/\.[fch]lo/\.req/; open(REQ, ">>".$outbound."/".$reqname) || die "Can't open req-file"; $datestamp = `date \"+%D %T\"`; chop $datestamp; printf LOG "%s %s %s\n", $datestamp, $$, "ifman: requesting $fspec from $address"; printf REQ "%s\n", $fspec; close(REQ); } sub resolve { local($addr) = @_; if ( index($addr, ":") >=0 ) { print "I cannot resolve addresses with zones!\n"; exit 1; } elsif ( index($addr, "/") == -1 ) { print "Not a valid address!\n"; exit 1; } ($net, $node, $point) = split(/\/|\./, $addr); if ( defined $point ) { $pointdir = sprintf("%04x%04x.pnt", $net, $node); if ( ! -e $outbound."/".$pointdir ) { mkdir ($outbound."/".$pointdir, 0755) || die "Can't create point directory"; } $flo = sprintf("0000%04x.%01slo", $point, $flavour); return $pointdir."/".$flo; } else { $flo = sprintf("%04x%04x.%01slo", $net, $node, $flavour); return $flo; } } sub usage { print "ifmail manager script\n"; print "usage: ifman
[flavour]\n"; print " commands: send, get\n"; print " flavours: normal, crash, hold. Default is normal.\n"; print "Only 2d addresses with points are supported - no zones!\n"; exit 1; } sub parsecfg { open(CFG, $cfgfile) || die "Can't open ifmail config file"; while () { chop; if (/^#/) { next; } if (/^outbound\s+(\S+)/) { $outbound = $1; } if (/^logfile\s+(\S+)/) { $logfile = $1; } } close(CFG); } ifmail-2.14tx8.10.orig/misc/contrib/mmdf/ 40755 1751 50 0 5665314237 15402 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/mmdf/Makefile100755 1751 50 553 5643274756 17134 0ustar mdsrc# Makefile for the "g3 tools" subtree # of mgetty+sendfax # # SCCS: @(#)Makefile 1.2 94/01/13 Copyright (c) Gert Doering # CC=cc CFLAGS=-O -I../../../iflib OBJS= fidonet.o route.o UTLIB= ../../../iflib/utlib.a all: fidonet fidonet: $(OBJS) $(CC) -o fidonet $(OBJS) $(UTLIB) $(CFLAGS) route.o: route.c fidonet.o: fidonet.c clean: rm -f *.o install: all ifmail-2.14tx8.10.orig/misc/contrib/mmdf/README100644 1751 50 2272 5642530734 16357 0ustar mdsrc FIDO<->Internet GATE on MMDF System ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vitaly Lev V1.0 Betta. Some functions for this programm give from utlib.a utlib.a - libriry from ifmail by Eugene Crosser. This is example of fidonet chanel for MMDF delivering system. this chanel will give full gate uucp<->fidonet. in file mmdftailor write: ; ; FIDO Configuration info ; MTBL fchn, file="fidonet.chn", show="FIDO Channel" MCHN fidonet, show="FIDO Delivery", pgm=fidonet, tbl=fchn, mod=imm, auth=outlog, level=FST, ap=822 --- in file root.dom will write fidonet.org: fidonet --- will create patch: /usr/spool/mmdf/lock/home/q.fidonet --- Will create file /usr/mmdf/table/fidonet.chn In file fidonet.chn will write: fidonet: %s --- In file fidonet.c write Your FIDO NET Address & path to route config file. run make. in dir /usr/mmdf/chans write file fidonet ----- Next, run /usr/mmdf/table/dbmbuild ----- in config ifmail file write: sendmail /usr/lib/mail/execmail ---- Example of route file: 462/40 462/40.* 462/60 462/60.* 462/80 462/80.* 462/70.* 462/30.* 462/* 463/61 */* --------------------------------------------- Vitaly Lev, 2:462/10@fidonet.org vitaly@ccrd.lviv.ua ifmail-2.14tx8.10.orig/misc/contrib/mmdf/config.h100644 1751 50 3305 5636352002 17104 0ustar mdsrc#ifndef _CONFIG_H #define _CONFIG_H #include "ftn.h" #ifndef AREA_LIST_TYPE #define AREA_LIST_TYPE typedef struct _area_list { struct _area_list *next; char *name; } area_list; #endif typedef struct _modem_string { struct _modem_string *next; char *line; char *expr; } modem_string; typedef struct _dom_trans { struct _dom_trans *next; char *ftndom; char *intdom; } dom_trans; extern char *configname; extern char *nlbase; extern fa_list *whoami; extern fa_list *pwlist; extern fa_list *nllist; extern dom_trans *domtrans; extern modem_string *modemport; extern modem_string *phonetrans; extern modem_string *modemreset; extern modem_string *modemdial; extern modem_string *modemhangup; extern modem_string *modemok; extern modem_string *modemconnect; extern modem_string *modemerror; extern modem_string *options; extern area_list *badgroups; extern long configverbose; extern long configtime; extern long maxfsize; extern long speed; extern char intab[]; extern char outtab[]; extern char *name; extern char *location; extern char *sysop; extern char *phone; extern char *flags; extern char *inbound; extern char *norminbound; extern char *listinbound; extern char *protinbound; extern char *outbound; extern char *database; extern char *aliasfile; extern char *myfqdn; extern char *sequence; extern char *sendmail; extern char *rnews; extern char *iftoss; extern char *packer; extern char *unzip; extern char *unarj; extern char *unlzh; extern char *unarc; extern char *unzoo; extern char *areafile; extern char *newslog; extern char *msgidbm; extern char *public; extern char *magic; extern char *debugfile; extern char *routefile; int readconfig(void); int confopt(int,char*); void confusage(char*); #endif ifmail-2.14tx8.10.orig/misc/contrib/mmdf/fidonet.c100644 1751 50 3761 5665314050 17273 0ustar mdsrc/* FIDO<->Internet Gate Vitaly Lev V1.1 */ #include #include #include #include "fidonet.h" /* #define test */ extern char *route(char *); static char *version = {"@(#) fido.c 1.0.1 94/06/09 Lviv, (C)opyright by Alexander Trofimov, mod Vitaly Lev 94/07/30"}; static char cmd1[1024]; static char fqueue[30]; int tc=0; #define NCH 5 #define ADR_DONE '*' main(int c, char **v) { FILE *p0; char fname[15],c1[40]; int i,j; #ifndef test chdir(LOCKDIR); sprintf(c1,"ls %s",QDIR); p0 = popen(c1,"r"); while(fgets(fname,15,p0) != NULL) { fname[strlen(fname) - 1] = '\0'; #else strcpy(fname, "./xxx"); #endif send_mail(fname); #ifndef test if (tc!=1) { chdir(MSGDIR); system(cmd1); chdir(LOCKDIR); } tc=0; } pclose(p0); #endif exit(0); } send_mail(char *f) { char adr[255], via[255]; char str[200], *p, *p1; FILE *f0; long tpos,ppos; adr[0] = '\0'; via[0] = '\0'; #ifndef test sprintf(fqueue,"%s/%s",QDIR,f); f0 = fopen(fqueue,"r+"); #else f0 = fopen(f,"r"); #endif while(fgets(str,200,f0) != NULL) { tpos = ftell(f0); if (strstr(str,"fidonet") == NULL) { ppos=tpos; continue; } fseek(f0,ppos+2,SEEK_SET); if(getc(f0) == ADR_DONE) { tc=1; return(0); } fseek(f0,ppos+2,SEEK_SET); putc(ADR_DONE,f0); fseek(f0,tpos,SEEK_SET); ppos=tpos; if (strstr(str,"fidonet") == NULL) { ppos=tpos; continue; } ppos=tpos; if((p=strchr(str,':')) == NULL) continue; if((p1=strchr(str,',')) == NULL) { p++; *strchr(p,'"')= '\0'; strcpy(adr,"\0"); strcat(adr,p); p=via; p=route(adr); strcpy(via,p); #ifndef test sprintf(cmd1,"/usr/local/lib/fnet/ifmail -r%s %s < %s\0",via,adr,f); #else printf("/usr/local/lib/fnet/ifmail -r%s %s\n",via,adr); #endif } else { p++; *strchr(p,'"')= '\0'; p1+=2; *strchr(p1,':')='\0'; strcat(via," "); strcat(via,p1); strcat(adr," "); strcat(adr,p); sprintf(cmd1,"/usr/local/lib/fnet/ifmail -r%s %s < %s\0",via,adr,f); } } } ifmail-2.14tx8.10.orig/misc/contrib/mmdf/fidonet.h100644 1751 50 133 5615751144 17252 0ustar mdsrc#define LOCKDIR "/usr/spool/mmdf/lock/home" #define QDIR "q.fidonet" #define MSGDIR "msg" ifmail-2.14tx8.10.orig/misc/contrib/mmdf/route.c100644 1751 50 3261 5643275154 17003 0ustar mdsrc#include #include #include #include "ftn.h" #include "version.h" char my_addr[]="462/10"; char ROUTE_CFG[]="/etc/ifmail/route.cfg"; /* global constants */ char adr[100][100]; char *a[100]; faddr *tfaddr=NULL; /* routines */ char *routea(char *); usage(){}; char *route(char *adr0) { FILE *f1; char *a1; int i=0; char adr1[100]; char *adr2=adr1; char *adrp; char *routeadr; tfaddr=parsefaddr(adr0); adr2=ascfnode(tfaddr, 0x6); if (strcmp(adr2, my_addr) == 0) return(adr0); f1=fopen(ROUTE_CFG,"r"); while(fgets(adr[i],100,f1) != NULL) { a[i]=adr[i]; i++; } if(i==0) i++; a[i]=NULL; /* i=0; while(a[i]!=NULL) printf("%s",a[i++]); */ fclose(f1); /* printf("\n%s\n", adr2);*/ if ((adrp=strchr(adr2, '.')) != NULL) *adrp='\0'; if ((routeadr=routea(adr2)) == NULL) { adrp=(strchr(adr2, '/')); *(adrp+1)='*'; *(adrp+2)='\0'; if ((routeadr=routea(adr2)) == NULL) { strcpy(adr2, "*/*"); if ((routeadr=routea(adr2)) == NULL) { printf("\nerror in route table\n"); } } } if (routeadr != NULL) { strcpy(adr1, routeadr); tfaddr=parsefnode(adr1); routeadr=adr1; routeadr=ascinode(tfaddr, 0x6); } /* printf("\nrouteaddr = %s\n", routeadr);*/ return(routeadr); } char *routea(char *adr) { char *adrp1, *adrp2; int i; /* printf("\n%s\n", adr);*/ i=0; while (a[i] != NULL && (adrp1=strstr(a[i], adr)) == NULL) { /* printf("i=%i\n", adrp1);*/ i++; } if (a[i] != NULL) { if (adrp1 != a[i]) adrp1=a[i]; if ((adrp2=strpbrk(adrp1, " \t\n")) != NULL) *adrp2='\0'; /* printf("str=%s\n", adrp1);*/ } else { adrp1=NULL; /* printf("found NULL\n");*/ } return(adrp1); } ifmail-2.14tx8.10.orig/misc/contrib/mmdf/route.cfg100644 1751 50 137 5636306120 17265 0ustar mdsrc462/30 462/30.* 462/40 462/40.* 462/60 462/60.* 462/80 462/80.* 462/70 462/30 462/* 463/61 */* ifmail-2.14tx8.10.orig/misc/contrib/mmdf/version.h100644 1751 50 133 5642521146 17304 0ustar mdsrcchar *version="1.0"; char *copyright="Vitaly Lev 1994"; char *reldate="29 September 1994"; ifmail-2.14tx8.10.orig/misc/contrib/mmdf/xxx100644 1751 50 142 5637352136 16225 0ustar mdsrc779992768m0 vitaly@ccrd.lviv.ua - * fidonet fidonet "@fidonet:Victor@p10.f11.n462.z2.fidonet.org" ifmail-2.14tx8.10.orig/misc/contrib/sumlog100755 1751 50 1571 6540753002 16002 0ustar mdsrc#!/usr/bin/perl ### Modified by P.Saratxaga on 28 Jun 1996 # changed the pattern matching to match what is logged trough syslogd. # original patter was /.* (.*) ([0-9]*) calling/ and # /.* (.*) ([0-9]*) call to ([^ ]*) ([^ ]*)/ #Execute: "sumlog iflog" #Outputs: address starttime enddtime result (seconds) while ( <> ) { if (/.* (.*) .* .*\[([0-9]*)\]: calling/) { print "start time $1 id $2\n"; $str{$2} = $1; } if (/.* (.*) .* .*\[([0-9]*)\]: call to ([^ ]*) ([^ ]*)/) { print "end time $1 id $2\n"; if ($st = $str{$2}) { delete $str{$2}; $tot=&diff($1,$st); print "$3 $st $1 $4 ($tot)\n"; } } } sub diff { local($res); local($h1,$m1,$s1,$h2,$m2,$s2); ($h1,$m1,$s1) = split(/:/,@_[0]); ($h2,$m2,$s2) = split(/:/,@_[1]); $res = $h1*3600+$m1*60+$s1-$h2*3600-$m2*60-$s2; if ($res < 0) { $res = 86400 + $res; } #print "@_[0] - @_[1] = $res\n"; $res; } ifmail-2.14tx8.10.orig/misc/contrib/logstat/ 40755 1751 50 0 6540755243 16133 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/logstat/README100644 1751 50 425 6540753002 17060 0ustar mdsrcStatistics gathering program for ifmail. For it to work correctly my patch should be applied to ifmail, or otherwise don't use -DHAS_SYSLOG. Also separations of sessions' and tossing logs is desirable (different configs). - Serg Oskin (2:5020/20 [.10], serg@oskin.msk.ru). ifmail-2.14tx8.10.orig/misc/contrib/logstat/README.rus100644 1751 50 433 6540753002 17667 0ustar mdsrcðÒÏÇÒÁÍÍÁ ÐÏÄÓÞÅÔÁ ÓÔÁÔÉÓÔÉËÉ ÄÌÑ ifmail. äÌÑ ÅÅ ÐÒÁ×ÉÌØÎÏÊ ÒÁÂÏÔÙ ifmail ÄÏÌÖÅÎ ÂÙÔØ ÐÒÏÐÁÔÞÅÎ ÍÏÉÍ ÐÁÔÞÅÍ, ÉÎÁÞÅ ÐÒÉ ËÏÍÐÉÌÑÃÉÉ ÎÅ ÉÓÐÏÌØÚÕÊÔÅ -DHAS_SYSLOG. ôÁËÖÅ ÖÅÌÁÔÅÌØÎÏ ÒÁÚÄÅÌÅÎÉÅ ÌÏÇÏ× ÓÅÓÓÉÊ É ÔÏÓÓÉÎÇÁ (ÒÁÚÎÙÅ ËÏÎÆÉÇÉ). -- Serg Oskin (2:5020/20[.10], serg@oskin.msk.ru). ifmail-2.14tx8.10.orig/misc/contrib/logstat/inoutstat.pl100644 1751 50 20415 6540753002 20630 0ustar mdsrc#!/usr/bin/perl # Statistics gathering program for ifmail. # Created by Serg Oskin (2:5020/20 [.10], serg@oskin.msk.ru) # # Modified by me (P.Saratxaga srtxg@f2219.n293.z2.fidonet.org) # on Thu Mar 5 21:05:59 CET 1998 to make it handle only one logfile, # so to include it in ifmail rpm package; also changed the semi-graphical # chars to plain ascii. # # you only need to configure the following line to tell where reports # are to be poted. and what to put in From line. @PostNewsGroup = ( "local.test" ); $From = ( "Spy " ); ################################################ @LogFiles = ( "/var/log/ifmail/messages" ); #@LogFiles = ( # "/var/log/ifmail/OLD/inb.1.iflog", # "/var/log/ifmail/OLD/inb.2.iflog.0", # "/var/log/ifmail/OLD/inb.tcp.iflog.0", # "/var/log/ifmail/OLD/out.iflog.0", # "/var/log/ifmail/OLD/out.tcp.iflog.0" ); #@LogFiles = ( # "/var/log/ifmail/inb.1.iflog", # "/var/log/ifmail/inb.2.iflog", # "/var/log/ifmail/inb.tcp.iflog", # "/var/log/ifmail/out.iflog", # "/var/log/ifmail/out.tcp.iflog" ); #@PostNewsGroup = ( # "fido7.20.ROBOTS", # "fido7.20.ROBOTS", # "fido7.20.ROBOTS", # "fido7.20.ROBOTS", # "fido7.20.ROBOTS" ); @Subjects = ( "Ifmail traffic" ); #@Subjects = ( # "Inbound, line 1", # "Inbound, line 2", # "Inbound, TCP/IP", # "Outbound, lines 1,2", # "Outbound, TCP/IP" ); #@InOuts = ( # 1, # 1, # 1, # 2, # 2 ); @RepFiles = ( "| /usr/lib/news/inews -h" ); #@RepFiles = ( # "| /usr/lib/news/inews -h", # "| /usr/lib/news/inews -h", # "| /usr/lib/news/inews -h", # "| /usr/lib/news/inews -h", # "| /usr/lib/news/inews -h" ); #@RepFiles = ( # ">t/inb.1.news", # ">t/inb.2.news", # ">t/inb.tcp.news", # ">t/out.news", # ">t/out.tcp.news" ); #main { for( $i = 0; $i <= $#LogFiles; $i++ ) { $LogFile = $LogFiles[$i]; $PostGroup = $PostNewsGroup[$i] if( defined( $PostNewsGroup[$i] )); $Subject = $Subjects[$i] if( defined( $Subjects[$i] )); # $InOut = $InOuts[$i]; $RepFile = $RepFiles[$i]; &ProcessLog(); } #} sub ProcessLog { local( $start, $first, $sys ); local( $Mon, $Day, $Time, $Host, $Pid, $Text ); local( %Systems, %Times, %Sessions ); local( %InBytes, %OutBytes, %InFiles, %OutFiles, %InCPS, %OutCPS, %Speed ); local( $sTime, $eTime ); local( @Syst, $i, $CurSpeed, @Speeds, @SortSpeeds ); undef( %Systems ); undef( %Times ); undef( %Sessions ); undef( %InBytes ); undef( %OutBytes ); undef( %InFiles ); undef( %OutFiles ); undef( %InCPS ); undef( %OutCPS ); undef( %Speed ); undef( @Speeds ); undef( @SortSpeeds ); return 1 if( ! -r $LogFile ); if( !open( flog, $LogFile )) { print "Cannot open $LogFile. $!\n"; return 0; } $start = 0; $TimeFirst = ""; $TimeLast = ""; $CurSpeed = "unknown"; while( ) { chop; ( $Mon, $Day, $Time, $Host, $Pid, $Text ) = split( /[ \t]+/, $_, 6 ); if( $TimeFirst eq "" ) { $TimeFirst = "$Mon $Day $Time"; } if( $start == 0 ) { if( $Text =~ /^connect/ ) { $Text =~ /^connect "CONNECT ([0-9]+).*$/; $CurSpeed = $1; next; } # if((( $InOut == 1 ) && ( $Text =~ /^start inbound/ )) || # (( $InOut == 2 ) && ( $Text =~ /^start outbound/ ))) { if(( $Text =~ /^start inbound/ ) || ( $Text =~ /^start outbound/ )) { $start = 1; $sys = ""; $Time =~ /^(..):(..):(..)$/; $sTime = ( $1 * 60 + $2 ) * 60 + $3; } next; } if( $start != 0 ) { if( $Text =~ /^remote[ \t]+address:/ ) { next if( $sys ne "" ); $Text =~ /^.+:[ \t]+([0-9:.\/]+).*$/; $sys = $1; if( !defined( $Systems{$sys} )) { $Systems{$sys} = 0; $Times{$sys} = 0; $Sessions{$sys} = 0; $InBytes{$sys} = 0; $OutBytes{$sys} = 0; $InFiles{$sys} = 0; $OutFiles{$sys} = 0; $InCPS{$sys} = 0; $OutCPS{$sys} = 0; } $Sessions{$sys}++; next; } elsif( $Text =~ /listed system$/ ) { $Systems{$sys} = 1; next; } elsif( $Text =~ /protected EMSI/ ) { $Systems{$sys} = 2; next; } elsif( $Text =~ /^received [0-9]+ bytes in/ ) { $Text =~ /^received ([0-9]+).*\(([0-9]+).*$/; $InBytes{$sys} += $1; $InCPS{$sys} += $2; $InFiles{$sys} ++; next; } elsif( $Text =~ /\+Rcvd-H[ \t]+CPS/ ) { $Text =~ /^.*CPS:[ \t]+([0-9]+)[ \t]+.*\(([0-9]+).*$/; $InBytes{$sys} += $2; $InCPS{$sys} += $1; $InFiles{$sys} ++; next; } elsif( $Text =~ /^sent [0-9]+ bytes in/ ) { $Text =~ /^sent ([0-9]+).*\(([0-9]+).*$/; $OutBytes{$sys} += $1; $OutCPS{$sys} += $2; $OutFiles{$sys} ++; next; } elsif( $Text =~ /\+Sent-H[ \t]+CPS/ ) { $Text =~ /^.*CPS:[ \t]+([0-9]+)[ \t]+.*\(([0-9]+).*$/; $OutBytes{$sys} += $2; $OutCPS{$sys} += $1; $OutFiles{$sys} ++; next; } elsif(( $Text =~ /calls\, maxrc=/ ) || ( $Text =~ /got SIGHUP/ ) || ( $Text =~ /tcsetattr.+save/ )) { $Time =~ /^(..):(..):(..)$/; $eTime = ( $1 * 60 + $2 ) * 60 + $3; $Times{$sys} += $eTime - $sTime; $Times{$sys} += 86400 if(( $eTime - $sTime ) < 0 ); $sys = ""; $start = 0; $Speed{$CurSpeed} = 0 if( !defined( $Speed{$CurSpeed} )); $Speed{$CurSpeed}++; $CurSpeed = "unknown"; next; } } } $TimeLast = "$Mon $Day $Time"; @Syst = sort( keys( %Systems )); return 1 if( $#Syst < 0 ); if( !open( rep, $RepFile )) { print "Cannot open $RepFile. $!\n"; return 0; } print rep "From: ".$From."\n"; print rep "Newsgroups: ".$PostGroup."\n"; print rep "Subject: ".$Subject."\n"; print rep "MIME-Version: 1.0\n"; print rep "Content-Type: text/plain; charset=koi8-r\n"; print rep "Content-Transfer-Encoding: 8bit\n"; print rep "\n"; select( rep ); # $~ = NULLS; # write( rep ); $~ = BEGIN; write; local( $ses, $tim, $ibyte, $obyte, $icps, $ocps ); local( $ases, $atim, $aibyte, $aobyte, $aicps, $aocps, $aises, $aoses ); $ases = 0; $atim = 0; $aibyte = 0; $aobyte = 0; $aicps = 0; $aocps = 0; $aises = 0; $aoses = 0; $~ = EACH; for( $i = 0; $i <= $#Syst; $i++ ) { $sys = $Syst[$i]; $ses = $Sessions{$sys}; $ases += $ses; $tim = sprintf( "%d.%02d", int( $Times{$sys} / 60 ), $Times{$sys} % 60 ); $atim += $Times{$sys}; $ibyte = $InBytes{$sys}; $aibyte += $ibyte; $obyte = $OutBytes{$sys}; $aobyte += $obyte; if( $InFiles{$sys} > 0 ) { $icps = int( $InCPS{$sys} / $InFiles{$sys} ); $aicps += $icps; $aises++; } else { $icps = 0; } if( $OutFiles{$sys} > 0 ) { $ocps = int( $OutCPS{$sys} / $OutFiles{$sys} ); $aocps += $ocps; $aoses++; } else { $ocps = 0; } write; } $atim = sprintf( "%d.%02d", int( $atim / 60 ), $atim % 60 ); if( $aises > 0 ) { $aicps = int( $aicps / $aises ); } else { $aicps = 0; } if( $aoses > 0 ) { $aocps = int( $aocps / $aoses ); } else { $aocps = 0; } $~ = END; write; # # $sk = "unknown"; # if( defined( $Speed{$sk} )) { # $sc = $Speed{$sk}; # write; # undef( $Speed{$sk} ); # } @Speeds = sort srtspeed keys( %Speed ); # @Speeds = sort { $a <=> $b } keys( %Speed ); # @Speeds = sort( keys( %Speed )); # @Speeds = keys( %Speed ); $~ = EACH_CONN; for( $i = 0; $i <= $#Speeds; $i++ ) { $sk = $Speeds[$i]; $sc = $Speed{$sk}; write; } close( rep ); return 1; } sub srtspeed { if(( $a !~ /[0-9]+/ ) || ( $b !~ /[0-9]+/ )) { $a cmp $b; } else { $a <=> $b; } } format NULLS = . format BEGIN = +------------------+----------------------------------+------------------+ | @<<<<<<<<<<<<<< | Session Calls & Transfers | @>>>>>>>>>>>>>> | $TimeFirst, $TimeLast +--------------+---+-----+---------+------------------+------+-----------+ |Zone:Net/Node |Telephone| Tran | Bytes | CPS Avg | | Number | Calls | Min | Incoming | Outgoing | In | Out | +--------------+---------+---------+------------+------------+-----+-----+ . format EACH = |@<<<<<<<<<<<<< @>>> @>>>>>>>> @>>>>>>>>>> @>>>>>>>>>> @>>>> @>>>>| $sys, $ses, $tim, $ibyte, $obyte, $icps,$ocps . format END = +------------------------------------------------------------------------+ | TOTAL @>>> @>>>>>>>> @>>>>>>>>>> @>>>>>>>>>> @>>>> @>>>>| $ases, $atim, $aibyte, $aobyte, $aicps,$aocps +------------------------------------------------------------------------+ ** Tran -- ×ÒÅÍÑ ÎÁ ÌÉÎÉÉ. CPS -- "ÞÉÓÔÙÊ" CPS ÐÒÉ ÐÅÒÅÄÁÞÅ/ÐÒÉÅÍÅ (ÎÅ (Incoming+Outgoing)/Tran ). Connects . format EACH_CONN = @>>>>>>> @>>> $sk, $sc . ifmail-2.14tx8.10.orig/misc/contrib/README100644 1751 50 3770 6540753002 15431 0ustar mdsrcperl4/ perl4 versions of the scripts; anyone willing to update them to perl5 ? mmdf/ MMDF fidonet channel by Vitaly Lev news_via_mail/ Scripts to run all this without cnews/INN installed by Andrew Chernov tic/ ALPHA .tic (fileecho) processor by Cees de Groot fdpass/ FrontDoor to ifmail password config file convertor by Christos Ricudis iftelnetd/ Proxy to call ifcico on telnet protocol socket (useful when the other side uses VMODEM under OS/2) by Vadim Zaliva Gecho2newsfeeds/ perl script to create a newsfeeds file (for INN) from a Gecho config and an Areas file cutnl-0.1/ program that extracts zone or region from the main full nodelist. unrar, unarj little scripts that call /usr/bin/unarj and /usr/bin/unrar but discards the output (those two unarchivers allways send verbose info; which clutters the ifmail log files) areafix-0.5.07/ an Areafix-like program; can add/remove areas for downlinks into the newsfeeds (INN) file. Work very well if you don't use '*' '@' or '!' in the newsfeeds file ifman a little script to request/send files to/from FTN nodes sumlog scans the logfile and outputs the sum of online time cnews-msgids changes to Cnews to make it produce FTN-like Message-ID's fido.daily Yet another log summary script genreqmap Reads an old reqmap (mapping file for patched ifcico) and an old noreq (list of files in pubdir, which should not inserted to reqmap) and generates a new reqmap.new and noreq.new getnodelist Check if we got a fresh nodediff, unpack and apply it and rebuild index. ifinfo.pl this is a simple perl script to extract informations from the nodelist about a given sysop name. ifpoll ifpoll, poll my boss node or the node given as argument 1 ifreq request a file (first argument) from a fido-node u-tic/ another *.TIC processor; this includes a filefix too logstat/ Statistics gathering program for ifmail. rtscts/ Must be called by any RISCos SVR4 program wanting to use RTS/CTS flow control while dialing out (RISCos SVR4 is broken in this aspect) ifmail-2.14tx8.10.orig/misc/contrib/cnews-msgids100644 1751 50 3647 5646050740 17107 0ustar mdsrcFrom: millar@cix.compulink.co.uk (Matt Millar) Subject: Re: Ftn MSGID's Date: 9 Oct 1994 12:52:31 -0500 Message-Id: Author-Reply-To: millar@cix.compulink.co.uk To: ifmail@fidogate.nuars.nwu.edu (Ifmail mailing list) Reply-To: ifmail@fidogate.nuars.nwu.edu (Ifmail mailing list) Precedence: bulk Status: RO In-Reply-To: from "Eugene Crosser" at Oct 3, 94 04:20:38 am I have come up with some mods for cnews to allow ftn MSGID's to be created, whilst still retaining internet from addressing. Make the following mods bin/inject/anne.jones -------------------------------------------- # This should already exist if test -r $NEWSCTL/mailname; then mailname="`tr -d ' \11' <$NEWSCTL/mailname`" else mailname="`newshostname`" case "$mailname" in *.*) ;; # not a uucp host name *) mailname="$mailname.uucp" ;; # probably a uucp host name esac fi # End of the existing part # Add this after the above if test -r $NEWSCTL/ftnname; then ftnname="`tr -d ' \11' <$NEWSCTL/ftnname`" else ftnname=$mailname fi # End of the new part ------------------------------------------------- Then to the end of anne.jones look for this: ------------------------------------------------- awk -f $NEWSBIN/inject/defhdrs.awk defpath="$badsites$USER" deffrom="$FROM" \ deforg="$deforg" defdate="$defdate" defexpiry="$expiry" \ defmsgid="`set $date; echo \<$6$2$3.\` echo $4 | tr -d : \`.$$@$ftnname\>`" \ me="`newshostname`" $tmp ------------------------------------------------- In the the line beginning " defmsgid" ends with "`.$$@$host\>`" It should be "`.$$@$ftnname" as above. Then create a file "ftnname" in your /usr/local/lib/news or equivalent, with the internet style fido address in, for example p26.f325.n250.z2.fidonet.org This should generate Message-ID:'s with the ftn address. Works for me at least! -- Matthew.Millar@p26.f325.n2052.z2.fidonet.org millar@cix.compulink.co.uk ifmail-2.14tx8.10.orig/misc/contrib/u-tic/ 40755 1751 50 0 6420407714 15471 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/u-tic/MAKE.CONFIG100644 1751 50 562 6420407565 17161 0ustar mdsrc# Config for making u-tic & u-fix VERSION = 0.9.09 # Where to place configuration files CONFPATH = /etc/ifmail/u-tic # Where to place executables and Perl libraries EXECPATH = /usr/local/lib/ifmail/u-tic # owner and group for files to be installed OWNER = fnet GROUP = news # C name and flags CC = shlicc2 CCFLAGS = -Wall -O # Misc utilities TAR = tar INSTALL = install ifmail-2.14tx8.10.orig/misc/contrib/u-tic/Makefile100644 1751 50 2777 6420407565 17247 0ustar mdsrc.include "MAKE.CONFIG" VERSION = "0.9.09" TARFILE = u-tic_$(VERSION).tar.gz CONFFILES = config feeds passwd restricted areas felist help outaltkoi8 SRCFILES = queuemail.c crc.c makeflock.c u-tic.pl u-fix.pl xfutil.pl \ ftn.pl semaphore.pl misc.pl make_machdep.pl ctlfiles.pl \ hacks.pl u-attach.pl MISCFILES = README Makefile MAKE.CONFIG TOOLS = ALLFILES = $(CONFFILES) $(SRCFILES) $(MISCFILES) $(TOOLS) EXECFILES = crc u-tic.pl u-fix.pl xfutil.pl ftn.pl semaphore.pl\ misc.pl machdep.pl ctlfiles.pl hacks.pl u-attach.pl queuemail all: queuemail crc u-tic.pl u-fix.pl install: all for dir in $(CONFPATH) $(EXECPATH); do; if [ ! -e $$dir ]; then; mkdir -p $$dir; fi; done for file in $(EXECFILES); do; $(INSTALL) -c -o $(OWNER) -g $(GROUP) $$file $(EXECPATH)/$$file; done world: install for file in $(CONFFILES); do; $(INSTALL) -c -o $(OWNER) -g $(GROUP) $$file $(CONFPATH)/$$file; done u-tic.pl: machdep.pl u-fix.pl: machdep.pl machdep.pl: makeflock make_machdep.pl ./make_machdep.pl $(CONFPATH)/config $(VERSION) > machdep.pl || (rm -f machdep.pl; exit 2) makeflock: makeflock.c $(CC) $(CCFLAGS) -o makeflock makeflock.c crc: crc.c $(CC) $(CCFLAGS) -o crc crc.c queuemail: queuemail.c $(CC) $(CCFLAGS) -o queuemail queuemail.c clean: rm -f makeflock machdep.pl crc queuemail tar: $(TARFILE) $(TARFILE): filelist cd ..; $(TAR) cvf - `cat u-tic/.filelist` | gzip > u-tic/$(TARFILE) filelist: rm .filelist; for file in $(ALLFILES); do; echo u-tic/$$file >> .filelist; done ifmail-2.14tx8.10.orig/misc/contrib/u-tic/README100644 1751 50 2232 6420407565 16451 0ustar mdsrcIMPORTANT!!! An u-attach.pl utility has been added. When using u-tic at heavily loaded node u-tic hanged for many hours waiting for .?LO having been unlocked because of it's manner of file processing. Now u-tic.pl just links files to fileecho outbound directories, and u-attach.pl then tries to attach the files to the downlink each time it is started (and leaves the files if the node is locked or the .?LO is locked) -------------- How to install: 1. edit MAKE.CONFIG 2. run 'make world' 3. edit configuration files 4. add alias for filefix as |"/queuemail " (don't forget that sendmail throws unquoted spaces away) 5. add u-fix.pl and u-tic.pl and u-attach.pl to fnet's crontab What u-tic & u-fix can already do: - almost all that U wait from TICK processor and filefix :) - not to waste time by copying files - all file movement and distribution is implemented with link(2)/rename(2); - to replace files with the same name and their TICKs both in fileecho outbound directory and .flo; - to preserve comments between records in config files being modified by u-fix What it cannot yet do well: - to purge and clean it's filebase ifmail-2.14tx8.10.orig/misc/contrib/u-tic/areas100644 1751 50 263 6420407565 16571 0ustar mdsrc# # UNIX TICK-processor (u-tic) area list. # # The format is obvious: # # PNTLIST PNT5020 Z2-DIFF USYSLNX NET5020 R50-LIST R50ROUTE MBLIST XOFCFELST DFTNAFIX FILELIST ifmail-2.14tx8.10.orig/misc/contrib/u-tic/config100644 1751 50 5053 6420407565 16765 0ustar mdsrc# # UNIX TICK-processor (u-tic) configuration file # # # Your FIDONet address # Address 2:5020/118@fidonet # # Domains<->zones table # Domain fidonet.org fidonet 1 Domain fidonet.org fidonet 2 Domain fidonet.org fidonet 3 Domain fidonet.org fidonet 4 Domain fidonet.org fidonet 5 Domain fidonet.org fidonet 6 # # Paths section. Use FULL paths please. # # Binkley-style outbound directory for your zone # Outbound outb # # Inbound directory # Inbound inb # # Fileecho outbound - the directory in which u-tic places files for links # Because of the restrictions of hard links mechanism must be on the same # FS where your inbound resides # FE_outbound feoutb # # The list of active areas at your node # Areas areas # # The list of fileechoes w/descriptions. Can be obtained from # officical package of FE lists. # FE_List felist # # The list of your feeds # Feeds feeds # # The list of links' passwords. # Passwd passwd # # The list of restricted areas # Restricted restricted # # The directory where to place miscellaneous semaphores # Semaphore /tmp # # Sequencer file. Seems to be Ifmail sequencer file compatible. # Sequencer useq # # The directory for your filebase. If commented out a filebase is # not created. # It must be on the same filesystem with your inbound directory # It is of alpha quality, so use it on your own risk. # #Filebase filebase Filebase fb # # The queue of messages for filefix # Queue queue # # The command for sending mail. # "|prog" - pipe to 'prog' # ">file" - write to 'file' # ">>file" - append to 'file' # #Mail_Command |/usr/sbin/sendmail -t Mail_Command >outmail # # The command for announcing new files to the world # #Announce_Command |/news/bin/inews -S -t "New files" -n fido7.local.400.files Announce_Command >outnews # # The table for converting Desc's to your encoding # Intab outaltkoi8 # # The file to be sent on %HELP command # Help help # # External utility that prints to stdout the CRC32 of its stdin # CRC_utility ./crc # # Inbound and outbound statistics files. Comment out to disable # Instat instat Outstat outstat # # Miscellaneous parameters section # # Flavor for ?LO's made by u-tic. Can be "h","f" or "c". # Flavor h # # Umask for files being created by u-tic # Umask 022 # # Mode which the files in your filebase are chmoded to # FileBase_Mode 644 # # Syslog facility that will be used by u-tic in your system # See syslog.conf(5) # Log_Facility local2 # # The default description for new files in filebase if Desc field is absent # Default_Description No description ifmail-2.14tx8.10.orig/misc/contrib/u-tic/crc.c100644 1751 50 12212 6420407565 16523 0ustar mdsrc/* First, the polynomial itself and its table of feedback terms. The */ /* polynomial is */ /* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */ /* Note that we take it "backwards" and put the highest-order term in */ /* the lowest-order bit. The X^32 term is "implied"; the LSB is the */ /* X^31 term, etc. The X^0 term (usually shown as "+1") results in */ /* the MSB being 1. */ /* Note that the usual hardware shift register implementation, which */ /* is what we're using (we're merely optimizing it by doing eight-bit */ /* chunks at a time) shifts bits into the lowest-order term. In our */ /* implementation, that means shifting towards the right. Why do we */ /* do it this way? Because the calculated CRC must be transmitted in */ /* order from highest-order term to lowest-order term. UARTs transmit */ /* characters in order from LSB to MSB. By storing the CRC this way, */ /* we hand it to the UART in the order low-byte to high-byte; the UART */ /* sends each low-bit to hight-bit; and the result is transmission bit */ /* by bit from highest- to lowest-order term without requiring any bit */ /* shuffling on our part. Reception works similarly. */ /* The feedback terms table consists of 256, 32-bit entries. Notes: */ /* */ /* The table can be generated at runtime if desired; code to do so */ /* is shown later. It might not be obvious, but the feedback */ /* terms simply represent the results of eight shift/xor opera- */ /* tions for all combinations of data and CRC register values. */ /* */ /* The values must be right-shifted by eight bits by the "updcrc" */ /* logic; the shift must be unsigned (bring in zeroes). On some */ /* hardware you could probably optimize the shift in assembler by */ /* using byte-swap instructions. */ #include unsigned long crc32tab[] = { /* CRC polynomial 0xedb88320 */ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; void main(void) { int ch; unsigned long crc=0xffffffffL; while((ch=getchar())!=EOF) crc=crc32tab[((int)crc^ch)&0xff]^((crc>>8)&0x00ffffff); printf("%lX\n",~crc); } ifmail-2.14tx8.10.orig/misc/contrib/u-tic/ctlfiles.pl100644 1751 50 13552 6420407565 17762 0ustar mdsrcsub read_config { local($n); &xopen(CFG,$CONFIG) || die; &xlock(CFG,&F_RDLCK) || die; $n=0; $UMASK=022; $FLAVOR="f"; $MAIL_COMMAND="|sendmail -t"; $ROBOT_NAME="filefix-service"; while () { $n++; next if /^\s*(#.*)?$/; $ADDRESS=&canonize($1), next if m|^Address\s+(\d+:\d+/\d+(\.\d+)?(@\S+)?)|i; $ROBOT_NAME=$1, next if /^Robot_Name\s+(\S+)/i; $OUTBOUND=$1, next if /^Outbound\s+(\S+)/i; $INBOUND=$1, next if /^Inbound\s+(\S+)/i; $FE_OUTBOUND=$1, next if /^FE_outbound\s+(\S+)/i; $AREAS=$1, next if /^Areas\s+(\S+)/i; $FELIST=$1, next if /^FE_List\s+(\S+)/i; $FEEDS=$1, next if /^Feeds\s+(\S+)/i; $RESTRICTED=$1, next if /^Restricted\s+(\S+)/i; $QUEUE=$1, next if /^Queue\s+(\S+)/i; $MAIL_COMMAND=$1, next if /^Mail_Command\s+(\S(.*\S)?)\s*$/i; $ANNOUNCE_COMMAND=$1, next if /^Announce_Command\s+(\S(.*\S)?)\s*$/i; $INTAB=$1, next if /^Intab\s+(\S+)/i; $INSTAT=$1, next if /^Instat\s+(\S+)/i; $OUTSTAT=$1, next if /^Outstat\s+(\S+)/i; $HELP=$1, next if /^Help\s+(\S+)/i; $UMASK=oct($1), next if /^Umask\s+(\d+)/i; $FB_MODE=oct($1), next if /^FileBase_Mode\s+(\d+)/i; $FLAVOR=$1, $FLAVOR=~tr/A-Z/a-z/, next if /^Flavor\s+([hfc])/i; $SEQUENCER=$1, next if /^Sequencer\s+(\S+)/i; $PASSWD=$1, next if /^Passwd\s+(\S+)/i; $LOG_FACILITY=$1, next if /^Log_Facility\s+(\S+)/i; $SEMAPHORE=$1, next if /^Semaphore\s+(\S+)/i; $DEFAULT_DESC=$1, next if /^Default_Description\s+(\S.*\S)\s*$/i; $FILEBASE=$1, next if /^FileBase\s+(\S+)/i; $EXT_CRC=$1, next if /^CRC_utility\s+(\S+)/i; $FULL_DOMAINS{$3}=$1, $DOMAINS{$3}=$2, next if /^Domain\s+(\S+)\s+(\S+)\s+(\d+)/i; print STDERR "Bad config line $n:\n$_"; } close(CFG); die "Incomplete config file" unless defined($ADDRESS) && defined($OUTBOUND) && defined($INBOUND) && defined($FE_OUTBOUND) && defined($AREAS) && defined($FEEDS) && defined($PASSWD) && defined($SEQUENCER) && defined($SEMAPHORE) && defined($QUEUE) && defined($LOG_FACILITY); } sub read_felist { local($n); &xopen(F,$FELIST) || die; &xlock(F,&F_RDLCK) || die; $n=0; while () { $n++; next if /^\s*(#.*)?$/; $FELIST{&upcase($1)}=$2, next if /^(\S+)\s+(\S.*\S)\s*$/; &syslog('err',"Bad line $n in $FELIST"); } close(F); } sub read_areas { local($n); &xopen(F,$AREAS) || die; &xlock(F,&F_RDLCK) || die; $n=0; while () { $n++; next if /^\s*(#.*)?$/; push(@AREAS,&upcase($1)), next if /^(\S+)/; &syslog('err',"Bad line $n in $AREAS"); } close(F); } sub read_feeds { local($addr,$flags,$n,$f,$comment); &xopen(F,$FEEDS) || die; &xlock(F,&F_RDLCK) || die; $n=0; while () { $n++; $comment.=$_, next if /^\s*(#.*)?$/; if (/^(\S+)/) { $addr=&canonize($1); $FEEDS_COMMENT{$addr}=$comment; $comment=""; push(@FEEDS_ADDRESSES,$addr); #to keep order next; } $PATTERNS{$addr}.=$1." ", next if /^\s+(\S+)/; &syslog('err',"Bad line $n in $FEEDS"); } $FEEDS_LAST_COMMENT=$comment; close(F); } sub write_feeds { local($addr,$area); &xopen(F,">".$FEEDS) || die; &xlock(F,&F_WRLCK) || die; foreach $addr (@FEEDS_ADDRESSES) { print F $FEEDS_COMMENT{$addr}; print F $addr."\n"; foreach $area (split(/\s+/,$PATTERNS{$addr})) { print F "\t$area\n"; } } print F $FEEDS_LAST_COMMENT; close(F); } sub read_passwd { local($addr,$flags,$n,$comment); &xopen(F,$PASSWD) || die; &xlock(F,&F_RDLCK) || die; $n=0; while () { $n++; $comment.=$_, next if /^\s*(#.*)?$/; if (/^(\S+)\s+(\S+)(\s+)?(\S+)?/) { $PASSWORDS{$addr=&canonize($1)}=&upcase($2); $flags=$4; $PASSIVE{$addr}=$flags=~/P/i; $ANNOUNCE{$addr}=$flags=~/A/i; $ALLOW_CREATE{$addr}=$flags=~/C/i; $NO_FLO{$addr}=$flags=~/N/i; $PASSWD_COMMENT{$addr}=$comment; $comment=""; push(@PASSWD_ADDRESSES,$addr); # to keep order next; } &syslog('err',"Bad line $n in $PASSWD"); } $PASSWD_LAST_COMMENT=$comment; close(F); } sub write_passwd { local($addr,$flags); &xopen(F,">".$PASSWD) || die; &xlock(F,&F_WRLCK) || die; foreach $addr (@PASSWD_ADDRESSES) { undef $flags; $flags.="P" if $PASSIVE{$addr}; $flags.="C" if $ALLOW_CREATE{$addr}; $flags.="A" if $ANNOUNCE{$addr}; $flags.="N" if $NO_FLO{$addr}; print F $PASSWD_COMMENT{$addr}; print F "$addr\t$PASSWORDS{$addr}\t$flags\n"; } print F $PASSWD_LAST_COMMENT; close(F); } sub read_restricted { local($n,$area_patt,$addr_patt); &xopen(F,$RESTRICTED) || die; &xlock(F,&F_RDLCK) || die; $n=0; while () { $n++; next if /^\s*(#.*)?$/; if (($area_patt,$addr_patt)=/^(\S+)\s+(\S+)/) { &wildmat2regexp($area_patt); &wildmat2regexp($addr_patt); $RESTRICTED{$area_patt}=$addr_patt; next; } &syslog('err',"Bad line $n in $RESTRICTED"); } close(F); } sub read_help { &xopen(F,$HELP) || die; &xlock(F,&F_RDLCK) || die; undef $HELP; $HELP.=$_ while ; close(F); } sub read_stats { if ($INSTAT && open(F,$INSTAT)) { &xlock(F,&F_RDLCK) || die; while () { $INSTAT_FILES{$1}=$2, $INSTAT_BYTES{$1}=$3 if /^(\S+)\s+(\d+)\s+(\d+)/; } close(F); } if ($OUTSTAT && open(F,$OUTSTAT)) { &xlock(F,&F_RDLCK) || die; while () { $OUTSTAT_FILES{$1}=$2, $OUTSTAT_BYTES{$1}=$3 if /^(\S+)\s+(\d+)\s+(\d+)/; } close(F); } } sub write_stats { if ($INSTAT && open(F,">".$INSTAT)) { &xlock(F,&F_WRLCK) || die; foreach $i (keys(%INSTAT_FILES)) { print F $i."\t".$INSTAT_FILES{$i}."\t".$INSTAT_BYTES{$i}."\n"; } close(F); } if ($OUTSTAT && open(F,">".$OUTSTAT)) { &xlock(F,&F_WRLCK) || die; foreach $i (keys(%OUTSTAT_FILES)) { print F $i."\t".$OUTSTAT_FILES{$i}."\t".$OUTSTAT_BYTES{$i}."\n"; } close(F); } } sub read_intab { if ($INTAB && &xopen(F,$INTAB)) { &xlock(F,&F_RDLCK) || die; while () { next if /^\s*(#.*)?$/; $INTAB[hex($1)]=hex($2) if /^\s*0x([0-9a-f]+)\s+0x([0-9a-f]+)/i; $INTAB[$1]=$2 if /^\s*(\d+)\s+(\d+)/; } close(F); } } 1; ifmail-2.14tx8.10.orig/misc/contrib/u-tic/feeds100644 1751 50 1456 6420407565 16611 0ustar mdsrc# # UNIX TICK-processor (u-tic) feed list # # The file consists of feed records. # The first line of the record is feed's address. It must start # at the beginning of a line. # Other lines of the record are the feed's subscription list. # They must have a space or tab as the first character. # Each line contains one area name. The name may contain wildcard # characters "*" and "?". If it starts with "!" the name after "!" # is used to exclude areas _from_the_list_above_the_name_, i.e. # if there is a record # # 6:66/66.66 # * # !*PIC* # PICSYSOP* # !PICSYSOP.NUDE # # 6:66/66.66 will be subscribed to all FEs except those which contain "PIC" # in their name except PICSYSOP* that will be included in its subscription list, # but PICSYSOP.NUDE will not. # # 2:5020/118.118 !* # 2:5020/208 PNTLIST FOOBAZ ifmail-2.14tx8.10.orig/misc/contrib/u-tic/felist100644 1751 50 365 6420407565 16767 0ustar mdsrc# # UNIX TICK-processor (u-tic) fileecho list. # # The format is obvious: # # MFE.OS2 OS2-related PNTLIST Poinlists NODEDIFF Nodediffs FILELIST BBS filelists UUTLLNX UNIX linux MBLIST Moscow BBS list ifmail-2.14tx8.10.orig/misc/contrib/u-tic/ftn.pl100644 1751 50 5344 6420407565 16724 0ustar mdsrcsub bsy { return (&point($_[0])?sprintf("%4.4x%4.4x.",0,&point($_[0])):sprintf("%04x%04x.",&net($_[0]),&node($_[0])))."bsy"; } sub flo { return (&point($_[0])?sprintf("%4.4x%4.4x.",0,&point($_[0])):sprintf("%04x%04x.",&net($_[0]),&node($_[0]))).$FLAVOR."lo"; } sub outb_path { return $OUTBOUND.(&point($_[0])?sprintf("/%04x%04x.pnt",&net($_[0]),&node($_[0])):""); } sub attach { local($addr,$file,$dir)=@_; &nodelock($addr) || return 0; $dir=&outb_path($addr); &xmkdir($dir) || return 0 unless -e $dir; &xopen(F,">>".$dir."/".&flo($addr)) || return 0; &xlock(F,&F_WRLCK) || return 0; print F $file."\n"; close(F); &nodeunlock($addr); return 1; } sub ftn2domain { local($d,$s)=@_; $d=~m|^(\d+):(\d+)/(\d+)|; $s="f$3.n$2.z$1"; $s="p$1.$s" if $d=~/\.(\d+)/; return $s; } sub ftn2fqdn { local($d,$s)=@_; $d=~m|^(\d+):(\d+)/(\d+)|; $s="f$3.n$2.z$1"; $s.=".".$FULL_DOMAINS{$1}; $s="p$1.$s" if $d=~/\.(\d+)/; return $s; } sub domain2ftn { local($d,$s,$z)=@_; $d=~/f(\d+)\.n(\d+)\.z(\d+)/; $z=$3; $s="$3:$2/$1"; $s.=".$1" if $d=~/^p(\d+)/; return $s; } sub zone { return $_[0]=~m|^(\d+):|; } sub net { return $_[0]=~m|:(\d+)/|; } sub node { return $_[0]=~m|/(\d+)|; } sub point { return $_[0]=~m|\.(\d+)|; } sub canonize { local($s)=@_; $s=~s/@.*$//; $s=~s/\.0$//; return $s; } sub add_domain { local($s,$z)=@_; $z=$s=~/^(\d+):/; $s.="@".$DOMAINS{$z} if defined($DOMAINS{$z}); return $s; } sub ftn_eq { return &canonize($_[0]) eq &canonize($_[1]); } sub NL_WAIT {0;} sub NL_NOWAIT {1;} sub nodelock { local($link,$mode,$outb,$bsy,$c)=@_; $outb=&outb_path($link); $bsy="$outb/".&bsy($link); &xmkdir($outb) || next unless -e $outb; &xopen(BSY,">$bsy.$$") || return 0; print BSY $$; close(BSY); $c=0; $rc=1; while (!link("$bsy.$$",$bsy)) { unless ($! == &EEXIST) { &syslog('err',"link($bsy.$$,$bsy): $!"); $rc=0; last; } $rc=0, last if $c>0 && $mode==&NL_NOWAIT; unless (open(BSY,$bsy)) { if ($! == &ENOENT) { next; } else { &syslog('err',"open($bsy): $!"); $rc=0; last; } } $pid=; close(BSY); unless ($pid>0 && kill(0,$pid)) { unless (unlink($bsy) || $!==&ENOENT) { &syslog('err',"unlink($bsy): $!"); $rc=0; last; } } elsif ($mode==&NL_NOWAIT) { $rc=0; last; } else { sleep(10); } $c++; } &xunlink("$bsy.$$"); return $rc; } sub nodeunlock { local($link,$bsy,$pid)=@_; $outb=&outb_path($link); $bsy="$outb/".&bsy($link); &xopen(BSY,$bsy) || return 0; $pid=; close(BSY); if (!$pid) { &syslog('warning',"Bad PID in bsy '$bsy'"); return 0; } elsif ($pid==$$) { &xunlink($bsy); return 1; } else { &syslog('warning',"Trying to remove bsy for PID $pid"); return 0; } } 1; ifmail-2.14tx8.10.orig/misc/contrib/u-tic/hacks.pl100644 1751 50 105 6420407565 17174 0ustar mdsrcsub _POSIX_C_SOURCE {0;} # for .ph's from GCC 2.7.x include files 1; ifmail-2.14tx8.10.orig/misc/contrib/u-tic/help100644 1751 50 2162 6420407565 16446 0ustar mdsrc 1. Subscribing/unsubscribing [+] Subscribe to all areas that match the pattern - Unsubscribe from all areas that match the pattern You may use '*' symbol in the patterns. 2. Control/info commands 1) %HELP - get this message :) 2) %LIST - get the list of areas present on our node 3) %QUERY %LINKED - get your subscription list 4) %UNLINKED - get the list of echoes that you are NOT subscribed to 5) %PASSIVE %PAUSE - make your subscription passive. It means that you will receive no echoes until you send %ACTIVE command, but you do not loose your subscription list on our node 6) %ACTIVE %RESUME - make your subscription active. You will get echoes again 7) %SEND - attach file 'file' from filebase to you. Note that your boss may have filebase support disabled 8) %PASSWD - set your password to 'passwd' 9) %ANNOUNCE {ON|OFF} - whether to send you mails about new files in the areas unlinked from you 10) %QUIT - stop processing your message and skip everything below the line ifmail-2.14tx8.10.orig/misc/contrib/u-tic/make_machdep.pl100644 1751 50 672 6420407565 20512 0ustar mdsrc#!/usr/bin/perl ($ARGV[0] && $ARGV[1]) || exit(2); print qq|\$CONFIG="$ARGV[0]";\n|; print qq|\$VERSION="$ARGV[1]";\n|; open(F,"./makeflock|") || exit(2); while () { print STDERR "Bad makeflock\n", exit(2) unless /^([lisc])\s+(\S+)/; $fmt.=$1; push(@arglist,$2); } $arglist=join(",",@arglist); print < #include #include void t2c(int); void main(void) { struct flock fl; char *tmp, *p[]={(char*)&fl.l_type,(char*)&fl.l_whence, (char*)&fl.l_start,(char*)&fl.l_len,(char*)&fl.l_pid}; int i,j,min,n[]={0,1,2,3,4}; for (i=0;i<4;i++) { for (j=i+1,min=i,tmp=p[i];j<5;j++) if (p[j]=lengths[i]) break; len/=lengths[i]; ch=letters[i]; for (i=0;i; close(F); } &xopen(F,">".$SEQUENCER) || die; print F (++$seq_val)."\n"; close(F); return $seq_val; } sub basename { return $_[0]=~m|([^/]+)$|; } sub gmtoff { local(@lt,@gt,$dh,$dm); @lt=localtime(0); @gt=gmtime(0); $dh=$lt[2]-$gt[2]; $dh+=24 if $lt[3]!=$gt[3]; $dm=$lt[1]-$gt[1]; $dm+=60, $dh>0?$dh--:$dh++ if ($lt[2]>$gt[2] && $lt[1]<$gt[1])||($lt[2]<$gt[2] && $lt[1]>$gt[1]); return ($dm+100*$dh); } sub upcase { local($s)=@_; $s=~tr/a-z/A-Z/; return $s; } #$TAB[0x30]=0x31; #print &xcode("oo001234567",@TAB); 1; ifmail-2.14tx8.10.orig/misc/contrib/u-tic/outaltkoi8100644 1751 50 3424 6420407565 17623 0ustar mdsrc# Channel map for translation PC-alternate codes to KOI8 codes # (Russian language) # (c) Eugene Crosser (2:5020/230) # # Internal value Output character 0x80 0xE1 0x81 0xE2 0x82 0xF7 0x83 0xE7 0x84 0xE4 0x85 0xE5 0x86 0xF6 0x87 0xFA 0x88 0xE9 0x89 0xEA 0x8A 0xEB 0x8B 0xEC 0x8C 0xED 0x8D 0xEE 0x8E 0xEF 0x8F 0xF0 0x90 0xF2 0x91 0xF3 0x92 0xF4 0x93 0xF5 0x94 0xE6 0x95 0xE8 0x96 0xE3 0x97 0xFE 0x98 0xFB 0x99 0xFD 0x9A 0xFF 0x9B 0xF9 0x9C 0xF8 0x9D 0xFC 0x9E 0xE0 0x9F 0xF1 0xA0 0xC1 0xA1 0xC2 0xA2 0xD7 0xA3 0xC7 0xA4 0xC4 0xA5 0xC5 0xA6 0xD6 0xA7 0xDA 0xA8 0xC9 0xA9 0xCA 0xAA 0xCB 0xAB 0xCC 0xAC 0xCD 0xAD 0xCE 0xAE 0xCF 0xAF 0xD0 0xB0 0x80 0xB1 0x81 0xB2 0x82 0xB3 0x83 0xB4 0x84 0xB5 0x85 0xB6 0x86 0xB7 0x87 0xB8 0x88 0xB9 0x89 0xBB 0x8B 0xBC 0x8C 0xBD 0x8D 0xBE 0x8E 0xBF 0x8F 0xC0 0x90 0xC1 0x91 0xC2 0x92 0xC3 0x93 0xC4 0x94 0xC5 0x95 0xC6 0x96 0xC7 0x97 0xC8 0x98 0xC9 0x99 0xCA 0x9A 0xCB 0xBF 0xCC 0x9C 0xCD 0x9D 0xCE 0x9E 0xCF 0x9F 0xD0 0xB9 0xD1 0xA1 0xD2 0xA2 0xD3 0xB0 0xD4 0xA4 0xD5 0xA5 0xD6 0xA6 0xD7 0xA7 0xD8 0xA8 0xD9 0xA9 0xDA 0xAA 0xDB 0xAB 0xDC 0xAC 0xDD 0xAD 0xDE 0xAE 0xDF 0xAF 0xE0 0xD2 0xE1 0xD3 0xE2 0xD4 0xE3 0xD5 0xE4 0xC6 0xE5 0xC8 0xE6 0xC3 0xE7 0xDE 0xE8 0xDB 0xE9 0xDD 0xEA 0xDF 0xEB 0xD9 0xEC 0xD8 0xED 0xDC 0xEE 0xC0 0xEF 0xD1 0xF0 0xB3 0xF1 0xA3 0xF2 0xB2 0xF3 0xB1 0xF4 0xB4 0xF5 0xB5 0xF6 0xB6 0xF7 0xB7 0xF8 0xB8 0xF9 0xA0 0xFA 0x8A 0xFB 0xBB 0xFC 0xBC 0xFD 0xBD 0xFE 0xBE 0xFF 0x9B ifmail-2.14tx8.10.orig/misc/contrib/u-tic/passwd100644 1751 50 473 6420407565 17002 0ustar mdsrc# # UNIX TICK-processor (u-tic) password file # # The format is : #
[Flags] # # Valid flags are: # P - passive # A - send announces to this node # C - allow autocreate from this node # N - do not create .flos for this node (e.g., for ftp feed) # 2:5020/208 FOOBAR PC 2:5020/118.118 HEHE A ifmail-2.14tx8.10.orig/misc/contrib/u-tic/queuemail.c100644 1751 50 1753 6420407565 17733 0ustar mdsrc/* A little program that places incoming letters to a queue. It's only parameter is the full name of the directory where the queue is to reside. The program's executable must be suid and sgid to "fnet" or a similar user in your system to avoid "Permission denied"s. Your MTA's alias 'areafix' or 'filefix' or something else must point to the program. Example for sendmail: areafix: "|/usr/lib/ifmail/queuemail /var/spool/ifmail/aqueue" */ #include #include #include #include #include int main(int argc,char **argv) { int c; FILE *f; char s1[1024],s2[1024],name[32]; if (argc<2) return 2; sprintf(name,"%d%d",(int)getpid(),(int)time(NULL)); sprintf(s1,"%s/%s",argv[1],"tmp"); if (mkdir(s1,0700)==-1 && errno!=EEXIST) return 2; sprintf(s1,"%s/%s",s1,name); sprintf(s2,"%s/%s",argv[1],name); if ((f=fopen(s1,"w"))==NULL) return 2; while ((c=getchar())!=EOF) putc(c,f); fclose(f); if (rename(s1,s2)==-1) return 2; return 0; } ifmail-2.14tx8.10.orig/misc/contrib/u-tic/restricted100644 1751 50 203 6420407565 17640 0ustar mdsrc# # UNIX TICK-processor and filefix restricted area list # # Format: # # FOOBAR.* 2:5020/118.* ifmail-2.14tx8.10.orig/misc/contrib/u-tic/semaphore.pl100644 1751 50 2112 6420407565 20106 0ustar mdsrcsub semaphore_on { local($name,$oldpid)="$SEMAPHORE/".&basename($0).".pid"; if ( -e $name ) { &xopen(SEM,$name) || die; $oldpid=; close(SEM); die &syslog('err',"Bad PID in semaphore file $name") unless ($oldpid>0); if (!kill(0,$oldpid)) { &syslog('warning',"Dead semaphore (PID=$oldpid) found"); &xunlink($name) || die; } elsif (time()-(stat($name))[9]>86400) # 1 day { die &syslog('err',"Possibly hung process (PID=$oldpid)"); } else { &syslog('warning',"Overlapping with [$oldpid] - exiting"); exit; } } open(SEM,">".$name); print SEM $$; close(SEM); } sub semaphore_off { &xunlink("$SEMAPHORE/".&basename($0).".pid") || die; } sub semlock { local($name,$oldpid)=@_; &xopen(SEM,">$name.$$") || die; print SEM $$; close(SEM); while (!link("$name.$$",$name)) { $!==&EEXIST || die &syslog("Someone killed my temporary file"); if (&xopen(SEM,$name)) { $oldpid=; close(SEM); unless (kill(0,$oldpid)) { &syslog('warning',"Dead lock $name (PID=$oldpid) found"); &xunlink($name) || die; } } } } 1; ifmail-2.14tx8.10.orig/misc/contrib/u-tic/u-attach.pl100644 1751 50 4264 6420407565 17643 0ustar mdsrc#!/usr/bin/perl # Filebox manager for U-Tic push(@INC,$0=~m|^(.*)/[^/]+$|); require "hacks.pl"; require "fcntl.ph"; require "stdio.ph"; require "errno.ph"; require "syslog.pl"; require "machdep.pl"; require "xfutil.pl"; require "misc.pl"; require "semaphore.pl"; require "ftn.pl"; require "ctlfiles.pl"; &uattach(); sub uattach { &init(); &semaphore_on(); &process(); &done(); &semaphore_off(); } sub init { $CONFIG=$ARGV[0] if defined($ARGV[0]); &read_config(); &openlog('u-attach','cons,pid',$LOG_FACILITY); #&syslog('info',"Startup"); &read_passwd(); umask($UMASK); } sub done { &closelog(); } sub process { local($link,$flo,$file,$outb_dir,$outb_file,$outb,@flo,%tix); foreach $link (keys(%PASSWORDS)) { $outb_dir="$FE_OUTBOUND/".&ftn2domain($link); next unless -d $outb_dir; next if $NO_FLO{$link}; $outb=&outb_path($link); $flo="$outb/".&flo($link); &xmkdir($outb) || next unless -e $outb; &nodelock($link,&NL_NOWAIT) || next; undef @flo; undef %tix; &xopen(IN,"+>>$flo") || next; &xlock(IN,&F_WRLCK,1) || (close(IN), next); seek(IN,0,&SEEK_SET); push(@flo,$_) while (); foreach $outb_file (<$outb_dir/*.[tT][iI][cC]>) { next if grep($_ eq "^$outb_file\n",@flo); &xopen(T,$outb_file) || next; &xlock(T,&F_RDLCK,1) || next; undef $file; while () { $file=$1, last if /^File[:\s]?\s*(\S+)/i; } close(T); if ($file) { $tix{$file}=$outb_file; } else { &syslog('warning',"skipping tic w/o 'FILE' ".&basename($outb_file)." for $link"); } } foreach $outb_file (<$outb_dir/*>) { next if $outb_file=~/\.[tT][iI][cC]$/; next if grep($_ eq "^$outb_file\n",@flo); push(@flo,"^$outb_file\n"); &syslog('info',&basename($outb_file)." attached to $link"); $file=&basename($outb_file); if (defined($tix{$file})) { push(@flo,"^$tix{$file}\n"); &syslog('info',&basename($tix{$file})." attached to $link"); delete $tix{$file}; } } foreach $outb_file (values(%tix)) { push(@flo,"^$outb_file\n"); &syslog('info',&basename($outb_file)." attached to $link"); } seek(IN,0,&SEEK_SET); truncate(IN,0); print IN @flo; close(IN); &nodeunlock($link); } } ifmail-2.14tx8.10.orig/misc/contrib/u-tic/u-fix.pl100644 1751 50 20711 6420407565 17200 0ustar mdsrc#!/usr/bin/perl # FileFix for UN*X push(@INC,$0=~m|^(.*)/[^/]+$|); require "hacks.pl"; require "fcntl.ph"; require "stdio.ph"; #require "syslog.ph"; require "errno.ph"; require "syslog.pl"; require "machdep.pl"; require "xfutil.pl"; require "misc.pl"; require "semaphore.pl"; require "ftn.pl"; require "ctlfiles.pl"; &ufix(); sub ufix { &init(); &semaphore_on(); &process(); &done(); &semaphore_off(); } sub init { $CONFIG=$ARGV[0] if defined($ARGV[0]); &read_config(); &openlog('u-fix','cons,pid',$LOG_FACILITY); #&syslog('info',"Startup"); &read_felist(); &read_areas(); &read_passwd(); &read_feeds(); &read_restricted(); &read_help(); umask($UMASK); dbmopen(DBM_BASE,"$FILEBASE/fbdbm",0644) || die &syslog('err',"Cannot open $FILEBASE/fbdbm: $!") if $FILEBASE; } sub done { &write_feeds() if $FEEDS_CHANGED; &write_passwd() if $PASSWD_CHANGED; dbmclose(%DBM_BASE) if $FILEBASE; #&syslog('info',"End"); &closelog(); } sub process { local($message); foreach $message (<$QUEUE/*>) { next unless -f $message; &xopen(MESSAGE,$message) || next; unless (&process_header()) { &xmkdir("$QUEUE/bad") || next unless -d "$QUEUE/bad"; &xrename($message, "$QUEUE/bad/".&basename($message)); &syslog('warning',"Bad header in message ".&basename($message)); next; } &syslog('info',"Processing message from $FROM_NAME, $FROM_ADDR"); &xopen(REPLY,$MAIL_COMMAND) || die; print REPLY "From: $ROBOT_NAME@".&ftn2fqdn($ADDRESS)."\n"; print REPLY "To: ".(defined($REPLY_TO)?$REPLY_TO:$FROM)."\n"; print REPLY "Subject: Reply from $ROBOT_NAME\n\n"; if (&check_passwd()) { &syslog('info',"$FROM_ADDR gave correct password"); &process_body(); } else { &syslog('notice',"$FROM_ADDR gave incorrect password $PW"); &write_passwd_flame(); } close(REPLY); close(MESSAGE); &xunlink($message); } } sub check_passwd { return defined($PASSWORDS{$FROM_ADDR}) && $PW eq $PASSWORDS{$FROM_ADDR}; } sub write_passwd_flame { print REPLY <) { last if /^\s*$/; $FROM=&parse_addr($1), next if /^From:\s*(\S.*\S)\s*$/i; $REPLY_TO=&parse_addr($1), next if /^Reply-To:\s*(\S.*\S)\s*$/i; $PW=&upcase($1), next if /^Subject:\s*(\S+)\s*$/i; } return 0 unless defined($FROM); ($FROM_NAME,$FROM_ADDR)=split(/@/,$FROM); $FROM_NAME=~s/[\._]/ /g; $FROM_ADDR=&domain2ftn($FROM_ADDR); return 1; } sub parse_addr { local($from)=@_; return $1 if ($from=~/^[^<]*<(\S+@\S+)>/ || $from=~/^(\S+@\S+)/); return undef; } sub process_body { local($cmd); while() { last if /^---/; next if /^\s*$/; $cmd=$_; $cmd=~s/%/%%/g; &syslog('info',"Processing '$cmd' command"); last if /^%QUIT/i; &list(), next if /^%LIST/i; &query(), next if /^(%QUERY|%LINKED)/i; &unlinked(), next if /^%UNLINKED/i; &passive(), next if /^(%PASSIVE|%PAUSE)/i; &active(), next if /^(%ACTIVE|%RESUME)/i; &set_passwd($1), next if /^%PASSWD\s+(\S+)/i; &set_announce_mode($1), next if /^%ANNOUNCE\s+(ON|OFF)/i; &send_file($1), next if /^%SEND\s+(\S+)/i; &help(), next if /^%HELP/i; &bad_cmd(), next if /^%/i; &unsubscribe($1), next if /^-(\S+)/; &subscribe($1), next if /^\+?(\S+)/; } } sub subscribe { local($area,@areas,@patts)=@_; &syslog('info',"Processing subscribe operation"); @patts=split(/\s+/,$PATTERNS{$FROM_ADDR}); $area=~tr/a-z/A-Z/; &wildmat2regexp($area); if (@areas=grep(/$area/,@AREAS)) { foreach $area (@areas) { unless (grep($area eq $_,@patts)) { unless (&is_restricted($area)) { &syslog('info',"Remote subcribed to $area"); print REPLY "+$area - subscribed\n"; push(@patts,$area); $FEEDS_CHANGED=1; } else { &syslog('info',"Remote attempted to subscribe to restricted area $area"); print REPLY "+$area - $area is restricted for you\n"; } } else { &syslog('info',"Remote already subscribed $area"); print REPLY "+$area - already subscribed\n"; } } } else { &syslog('info',"+$_[0] - no such area(s)"); print REPLY "+$_[0] - no such area(s) here\n"; } $PATTERNS{$FROM_ADDR}=join(' ',@patts); unless (grep($FROM_ADDR eq $_,@FEEDS_ADDRESSES)) { push(@FEEDS_ADDRESSES,$FROM_ADDR); $FEEDS_COMMENT{$FROM_ADDR}="#\n"; } } sub unsubscribe { local($area,@areas,@patts)=@_; &syslog('info',"Processing unsubscribe operation"); @patts=split(/\s+/,$PATTERNS{$FROM_ADDR}); $area=~tr/a-z/A-Z/; &wildmat2regexp($area); if (@areas=grep(/$area/,@patts)) { @patts=grep(!/$area/,@patts); foreach $area (@areas) { unless (&is_restricted($area)) { &syslog('info',"Remote unsubcribed from $area"); print REPLY "-$area - unsubscribed\n"; } else { &syslog('info',"Remote attempted to unsubscribe from restricted area $area"); print REPLY "-$area - $area is restricted for you\n"; push(@patts,$area); } } $FEEDS_CHANGED=1; } else { &syslog('info',"-$_[0] - no match in remote subscription"); print REPLY "-$_[0] - not subscribed\n"; } $PATTERNS{$FROM_ADDR}=join(' ',@patts); } sub passive { &syslog('info',"Remote requested PASSIVE status"); unless ($PASSIVE{$FROM_ADDR}) { $PASSIVE{$FROM_ADDR}=1; &syslog('info',"Remote made passive"); print REPLY "%PASSIVE - made passive\n"; $PASSWD_CHANGED=1; } else { &syslog('info',"Remote is already passive"); print REPLY "%PASSIVE - already passive\n"; } } sub active { &syslog('info',"Remote requested ACTIVE status"); if ($PASSIVE{$FROM_ADDR}) { $PASSIVE{$FROM_ADDR}=0; &syslog('info',"Remote made active"); print REPLY "%ACTIVE - made active\n"; $PASSWD_CHANGED=1; } else { &syslog('info',"Remote is already active"); print REPLY "%ACTIVE - already active\n"; } } format AREALIST= @<<<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $area, $description . sub query { local($area,$description,$oldfh); &syslog('info',"Remote requested QUERY"); print REPLY "%QUERY\n"; $oldfh=select(REPLY); $~=AREALIST; foreach $area (sort(split(/\s+/,$PATTERNS{$FROM_ADDR}))) { $description=defined($FELIST{$area})?$FELIST{$area}:$DEFAULT_DESC; write; } select($oldfh); print REPLY "\n"; } sub list { local($area,$description,$oldfh); &syslog('info',"Remote requested LIST"); print REPLY "%LIST\n"; $oldfh=select(REPLY); $~=AREALIST; foreach $area (sort(@AREAS)) { $description=defined($FELIST{$area})?$FELIST{$area}:$DEFAULT_DESC; write; } select($oldfh); print REPLY "\n"; } sub unlinked { local($area,$description,$oldfh,@patts); &syslog('info',"Remote requested UNLINKED"); print REPLY "%UNLINKED\n"; @patts=split(/\s+/,$PATTERNS{$FROM_ADDR}); $oldfh=select(REPLY); $~=AREALIST; foreach $area (sort(@AREAS)) { unless (grep($area eq $_,@patts)) { $description=defined($FELIST{$area})?$FELIST{$area}:$DEFAULT_DESC; write; } } select($oldfh); print REPLY "\n"; } sub set_passwd { local($pw)=@_; &syslog('info',"Remote changed password"); print REPLY "%PASSWD $pw - password changed successfully\n"; $PASSWORDS{$FROM_ADDR}=$pw; $PASSWD_CHANGED=1; } sub set_announce_mode { local($mode)=@_; &syslog('info',"Remote changed announce mode to $mode"); print REPLY "%ANNOUNCE $mode - announce mode set to $mode\n"; $ANNOUNCE{$FROM_ADDR}=$mode=~/^ON$/i; $PASSWD_CHANGED=1; } sub send_file { local($file)=@_; $file=~tr/A-Z/a-z/; if ($FILEBASE) { if (defined($DBM_BASE{$file})) { &syslog('info',"Remote requested file '$file'"); if (&attach($FROM_ADDR,"$FILEBASE/$DBM_BASE{$file}/$file")) { print REPLY "%SEND $file - file attached\n"; &syslog('info',"File attached OK"); } else { print REPLY "%SEND $file - cannot attach (system error)\n"; &syslog('warning',"Cannot attach file"); } } else { &syslog('info',"Remote requested nonexistent file '$file'"); print REPLY "%SEND $file - no such file here\n"; } } else { &syslog('info',"Remote tried to request file"); print REPLY "%SEND $file - filebase is not supported on $ADDRESS\n"; } } sub help { &syslog('info',"Remote requested HELP"); print REPLY "%HELP -\n$HELP\n"; } sub bad_cmd { &syslog('info',"Remote issued bad command $_[0]"); print REPLY "$_[0] - unknown command. Try %HELP\n"; } sub is_restricted { local($area,$area_patt)=@_; foreach $area_patt (keys(%RESTRICTED)) { return 1 if $area=~/$area_patt/ && $FROM_ADDR=~/$RESTRICTED{$area_patt}/; } return 0; } ifmail-2.14tx8.10.orig/misc/contrib/u-tic/u-tic.pl100644 1751 50 24466 6420407565 17204 0ustar mdsrc#!/usr/bin/perl # TIC procesor for UN*X push(@INC,$0=~m|^(.*)/[^/]+$|); require "hacks.pl"; require "fcntl.ph"; require "stdio.ph"; require "errno.ph"; require "syslog.pl"; require "machdep.pl"; require "xfutil.pl"; require "misc.pl"; require "semaphore.pl"; require "ftn.pl"; require "ctlfiles.pl"; &utic(); sub utic { &init(); &semaphore_on(); &process(); &done(); &semaphore_off(); } sub init { $CONFIG=$ARGV[0] if defined($ARGV[0]); &read_config(); &openlog('u-tic','cons,pid',$LOG_FACILITY); #&syslog('info',"Startup"); &read_areas(); &read_passwd(); &read_feeds(); &build_subscription_fast(); undef %PATTERNS; umask($UMASK); dbmopen(DBM_BASE,"$FILEBASE/fbdbm",0644) || die &syslog('err',"Cannot open $FILEBASE/fbdbm: $!") if $FILEBASE; &read_stats(); &read_intab(); } sub done { dbmclose(DBM_BASE) if $FILEBASE; close(INEWS) if $INEWS_OPEN; &write_stats(); #&syslog('info',"End"); &closelog(); } sub process { local($tic,$file); foreach $tic (<$INBOUND/*.[Tt][Ii][Cc]>) { if (&read_tic($tic) && (!defined($TO) || &ftn_eq($TO,$ADDRESS))) { if (defined($FILE) && defined($CRC)) { $FILE=~tr/A-Z/a-z/; $INBFILE=$FILE; unless ( -e "$INBOUND/$INBFILE" ) { undef $INBFILE; foreach $file (<$INBOUND/*>) { $INBFILE=$file, last if -f $file && hex(`$EXT_CRC < '$file'`)==hex($CRC); } unless ($INBFILE) { &syslog('warning',"TIC w/o file: $tic - skipping"); next; } $INBFILE=$1 if $INBFILE=~m|/([^/]+)$|; } } if (&check_tic($tic) && &check_pw($tic) && &check_area($tic) && &check_crc($tic)) { &syslog('info',"Processing TIC ".&basename($tic)." from $FROM"); &syslog('info',"AREA: $AREA FILE: $FILE"); &make_path(); &make_seenby(); &process_file(); &xunlink($tic); } else { &move_bad($tic); } } else { #&syslog('notice',"Transit TICK from $FROM to $TO"); } } } sub process_file { local($link,$inb_file,$outb_file,$outb_dir,$tic,$outb,$flo,@linked,$bsy,$pid,$koidesc); $inb_file="$FE_OUTBOUND/tmp/$FILE"; &xmkdir("$FE_OUTBOUND/tmp") || return 0 unless -e "$FE_OUTBOUND/tmp"; &xunlink($inb_file) || return 0 if -e $inb_file; &xcplink("$INBOUND/$INBFILE",$inb_file) || return 0; $SIZE=(stat($inb_file))[7]; $INSTAT_FILES{$AREA}++; $INSTAT_BYTES{$AREA}+=$SIZE; @linked=split(/\s+/,$SUBSCRIPTION{$AREA}); foreach $link (keys(%PASSWORDS)) { if (grep($link eq $_,@linked)) { $outb_dir="$FE_OUTBOUND/".&ftn2domain($link); $outb_file="$outb_dir/$FILE"; unless (&seen($link)) { &syslog('info',"Forwarding to $link"); &xmkdir($outb_dir) || next unless -e $outb_dir; if ( -e $outb_file ) { foreach $tic (<$outb_dir/*.[tT][iI][cC]>) { &xopen(T,"+<".$tic) || next; &xlock(T,&F_WRLCK) || next; while () { if (/^File[:\s]\s*(\S+)/i && $1 eq $FILE) { &xunlink($tic); &syslog('debug',"unlinked old TIC ".&basename($tic)." for $FILE"); last; } } close(T); } &xunlink($outb_file) || next; } &xlink($inb_file,$outb_file) || next; $tic=&make_tic($link) || next; &syslog('debug',"Forwarded with TIC ".&basename($tic)); $OUTSTAT_FILES{$link}++; $OUTSTAT_BYTES{$link}+=$SIZE; } else { &syslog('debug',"Already seen by $link"); } } elsif ($FILEBASE && $ANNOUNCE{$link}) { &xopen(F,$MAIL_COMMAND) || next; print F "From: ".$ROBOT_NAME."@".&ftn2fqdn($ADDRESS)."\n"; print F "To: sysop@".&ftn2fqdn($link)."\n"; print F "Subject: New file at $ADDRESS\n\n"; $koidesc=&xcode(defined($DESC)?$DESC:$DEFAULT_DESC,@INTAB); print F <) { $AREA=$1, next if /^Area[:\s]\s*(\S+)/i; $FILE=$1, next if /^File[:\s]\s*(\S+)/i; (defined($DESC) || ($DESC=$1)), next if /^Desc[:\s]\s*(\S.*\S)/i; $FROM=&canonize($1), next if m|^From[:\s]\s*(\d+:\d+/\d+(\.\d+)?)|i; $TO=&canonize($1), next if m|^To[:\s].*(\d+:\d+/\d+(\.\d+)?)|i; $REPLACES=$1, next if /^Replaces[:\s]\s*(\S+)/i; next if /^Magic[:\s]/i; next if /^Created\s+/i; $CRC=$1, next if /^Crc[:\s]\s*([0-9A-F]+)/i; $PW=&upcase($1), next if /^Pw[:\s]\s*(\S+)/i; $ORIGIN=$1, next if /^Origin[:\s]\s*(\S+)/i; push(@PATH,$1), next if /^Path[:\s]\s*(\S.*\S)/i; push(@SEENBY,$1), next if /^Seenby[:\s]\s*(\S.*\S)/i; s/[\n\r]+$/\r\n/; push(@UNIDENTIFIED,$_); } close(TIC); return 1; } sub make_path { local($t,@lt); $t=time(); @lt=localtime($t); push(@PATH,$ADDRESS." ".$t.sprintf(" %02d%02d%02d.%02d%02d UTC%+05d",$lt[5],$lt[4],$lt[3],$lt[2],$lt[1],&gmtoff())); } sub check_tic { local($tic_name)=&basename($_[0]); &syslog('warning',"No File: in TICK $tic_name"), return 0 unless defined($FILE); &syslog('warning',"No Area: in TICK $tic_name"), return 0 unless defined($AREA); &syslog('warning',"No From: in TICK $tic_name"), return 0 unless defined($FROM); &syslog('warning',"No Origin: in TICK $tic_name"), return 0 unless defined($ORIGIN); &syslog('warning',"No Crc: in TICK $tic_name"), return 0 unless defined($CRC); &syslog('warning',"No Pw: in TICK $tick_name"), return 0 unless defined($PW); return 1; } sub make_tic { local($node,$tic_name,$TIC,$s)=@_; $tic_name="$FE_OUTBOUND/".&ftn2domain($_[0]).sprintf("/%08x.tic",&sequencer()); &xopen(TIC,">".$tic_name) || return undef; print TIC "Area $AREA\r\n"; print TIC "Areadesc $AREADESC\r\n" if defined($AREADESC); print TIC "File $FILE\r\n"; print TIC "Replaces $REPLACES\r\n" if defined($REPLACES); print TIC "Desc $DESC\r\n" if defined ($DESC); print TIC "Origin $ORIGIN\r\n"; print TIC "From ".$ADDRESS."\r\n"; #print TIC "To ".&add_domain($node)."\r\n"; print TIC "Crc $CRC\r\n"; print TIC "Created by U-Tic v$VERSION (C) Yar Tikhiy (2:5020/118)\r\n"; print TIC @UNIDENTIFIED; foreach $s (@PATH) { print TIC "Path $s\r\n"; } foreach $s (sort(@NEW_SEENBY)) { print TIC "Seenby $s\r\n"; } print TIC "Pw $PASSWORDS{$node}\r\n"; close(TIC); return $tic_name; } sub make_seenby { local($link); @NEW_SEENBY=@SEENBY; foreach $link (split(/\s+/,$SUBSCRIPTION{$AREA})) { push(@NEW_SEENBY,$link) unless &seen($link); } } sub add_to_base { local($dir,$file,$tfile,%base,$n)=("$FILEBASE/$AREA","$FILEBASE/$AREA/$FILE"); &xmkdir($dir) || return 0 unless -e $dir; &xunlink($file) || return 0 if -e $file; if (defined($REPLACES)) { $REPLACES=~tr/A-Z/a-z/; foreach $tfile (<$dir/$REPLACES>) { next unless -e $tfile; &xunlink($tfile) || next; &syslog('debug',"Replaced file ".&basename($tfile)); } } if ((stat($FILEBASE))[0]==(stat($FE_OUTBOUND))[0]) { &xlink("$FE_OUTBOUND/tmp/$FILE",$file) || return 0; } else { &xcplink("$INBOUND/$INBFILE",$file) || return 0; } chmod($FB_MODE,$file) if defined($FB_MODE); $DBM_BASE{$FILE}=$AREA; &xopen(F,"+>>$dir/files.bbs") || return 0; &xlock(F,&F_WRLCK) || (close(F),return 0); seek(F,0,&SEEK_SET); $n=0; while () { $n++; $base{$1}=$2, next if /^(\S+)\s+(\S.*\S)/; &syslog('err',"Bad line $n in $dir/files.bbs"); } $base{$FILE}=&xcode(defined($DESC)?$DESC:$DEFAULT_DESC,@INTAB); seek(F,0,&SEEK_SET); truncate(F,0); foreach $n (keys(%base)) { printf F "%-16s%s\n",$n,$base{$n}; } close(F); &syslog('debug',"File $FILE has been added to the filebase"); if ($ANNOUNCE_COMMAND) { unless ($INEWS_OPEN) { &xopen(INEWS,$ANNOUNCE_COMMAND) || die; $INEWS_OPEN=1; print INEWS "File\t\tSize(bytes)\tArea\t\tDescription\n"; } printf INEWS "%-16s%-16d%-16s%s\n",$FILE,$SIZE,$AREA,$base{$FILE}; } return 1; } sub move_bad { local($bad_dir)=("$FE_OUTBOUND/bad"); &xmkdir($bad_dir) || return 0 unless -e $bad_dir; &xcprename("$INBOUND/$INBFILE","$bad_dir/$FILE"); &xcprename($_[0],"$bad_dir/".&basename($_[0])); return 1; } sub check_pw { local($tic_name)=&basename($_[0]); if ($PASSWORDS{$FROM}=~/^$PW$/i) { return 1; } else { &syslog('notice',"$FROM gave incorrect password $PW for $tic_name"); return 0; } } sub check_crc { return 1 unless defined($CRC) && defined($EXT_CRC); if (hex($CRC)==hex(`$EXT_CRC<'$INBOUND/$INBFILE'`)) { return 1; } else { &syslog('notice',"Bad CRC of file $FILE, TICK ".&basename($_[0])); return 0; } } sub check_area { local($tic)=&basename($_[0]); if (grep($_ eq $AREA,@AREAS)) { return 1; } elsif ($ALLOW_CREATE{$FROM}) { push(@AREAS,$AREA); &xopen(F,">>".$AREAS) || return 0; &xlock(F,&F_WRLCK) || (close(F), return 0); print F "$AREA\n"; close(F); undef(%FEEDS); &read_feeds(); &build_subscription(); &syslog('notice',"Area $AREA has been autocreated"); return 1; } else { &syslog('notice',"Unknown area $AREA in TICK $tic"); return 0; } } sub seen { local($node,$seenby)=@_; foreach $seenby (@SEENBY) { return 1 if &ftn_eq($node,$seenby); } return 0; } sub build_subscription { local(@list,$addr,$patt,$s); foreach $addr (keys(%PATTERNS)) { next if $PASSIVE{$addr}; foreach $patt (split(/\s+/,$PATTERNS{$addr})) { @list=(); if ($patt=~/^!(\S+)/) { &wildmat2regexp($s=$1); @list=grep(!/$s/,@list); } else { &wildmat2regexp($s=$patt); push(@list,grep(/$s/,@AREAS)); } foreach $s (@list) { $SUBSCRIPTION{$s}.=$addr." "; } } } } sub build_subscription_fast { local(@list,$addr,$patt,$pattern,$s,%areas_hash); %areas_hash=&scalar2assoc(@AREAS); while (($addr,$pattern)=each(%PATTERNS)) { next if $PASSIVE{$addr}; @list=(); foreach $patt (split(/\s+/,$pattern)) { if ($patt!~/^!/ && $patt!~/\*/) { if ($areas_hash{$patt}) { push(@list,$patt); } else { #&syslog('warning',"%s subscribed to %s which is not active",$addr,$patt); } } elsif ($patt=~/^!(\S+)/) { &wildmat2regexp($s=$1); @list=grep(!/$s/,@list); } else { &wildmat2regexp($s=$patt); push(@list,grep(/$s/,@AREAS)); } } foreach $s (@list) { $SUBSCRIPTION{$s}.=$addr." "; } } } ifmail-2.14tx8.10.orig/misc/contrib/u-tic/xfutil.pl100644 1751 50 2722 6420407565 17445 0ustar mdsrcsub xlog { &syslog($_[0],$_[1]); return 0; } sub xopen { return open($_[0],$_[1]) || &xlog('err',"open($_[1]): $!"); } sub xmkdir { return mkdir($_[0],0777) || &xlog('err',"mkdir($_[0]): $!"); } sub xrename { return rename($_[0],$_[1]) || &xlog('err',"rename($_[0],$_[1]): $!"); } sub xunlink { return unlink($_[0]) || &xlog('err',"unlink($_[0]): $!"); } sub xlock { return &f_lock($_[0],$_[1],$_[2]) || &xlog('err',"fcntl(): $!"); } sub xlink { return link($_[0],$_[1]) || &xlog('err',"link($_[0],$_[1]): $!"); } sub xcplink { local(@st1,@st2,$lndir); ($lndir)=$_[1]=~m|^(.*)/[^/]+$|; if ((@st1=stat($_[0])) && (@st2=stat($lndir))) { if ($st1[0]==$st2[0]) #device ID { return link($_[0],$_[1]) || &xlog('err',"link($_[0],$_[1]): $!"); } else { return ©($_[1],$_[0]); } } else { return 0; } } sub xcprename { local(@st1,@st2,$lndir); ($lndir)=$_[1]=~m|^(.*)/[^/]+$|; if ((@st1=stat($_[0])) && (@st2=stat($lndir))) { if ($st1[0]==$st2[0]) #device ID { return rename($_[0],$_[1]) || &xlog('err',"rename($_[0],$_[1]): $!"); } else { return ©($_[1],$_[0]) && &xunlink($_[0]); } } else { return 0; } } sub copy { local($c,$buf); &xopen(SRC,$_[1]) || return 0; &xlock(SRC,&F_RDLCK) || (close(SRC), return 0); &xopen(DEST,">".$_[0]) || (close(SRC), return 0); &xlock(DEST,&F_WRLCK) || (close(SRC), close(DEST), return 0); print DEST $buf while read(SRC,$buf,65536); close(SRC); close(DEST); return 1; } 1; ifmail-2.14tx8.10.orig/misc/contrib/tic/ 40755 1751 50 0 6540755243 15235 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/tic/config/ 40755 1751 50 0 5701550310 16464 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/tic/config/Areas100644 1751 50 3342 5701550310 17541 0ustar mdsrc# # Areas File # # # Tag Group Dir Own Group Mode Posting # Description (leading spaces removed) Area NODEDIFF F /pub/fido/nodelist x fido 0640 None FidoNet Weekly Nodediffs Area AV241 F /pub/virus x adm 0644 Local Antivirus Software Area PNOF P /pub/pnof x pnof 0640 Local PNoF Nodelists and info Area 24000 F /pub/fido/24000 x adm 0644 None Region 24000 Pointlist/diffs Area FIDONEWS F /pub/fido x adm 0644 None Your weekly Fidonews newsletter Area X11 F /pub/X11 x adm 0644 Local Generic X11 software Area CYBER F /pub/cyber x adm 0644 Local About hacking, phreaking, etcetera Area DEVELOP F /pub/develop x adm 0644 Local Software and sources for developers Area FAQ F /pub/doc/faq x adm 0644 Local Frequently Asked Questions Area GNU_DIST F /pub/gnu/dist x adm 0644 Local GNU distributions Area GNU_MSDOS F /pub/gnu/ports/msdos x adm 0644 Local GNU MS-DOS ports Area GRAPHICS F /pub/graphic x adm 0644 Local Graphics tools Area CUTCP F /pub/msdos/cutcp x adm 0644 Local Columbia University TCP/IP for MessyDos Area UNIX F /pub/unix x adm 0644 Local Unix software Area VMS F /pub/vms x adm 0644 Local VMS software Area LINUX L /pub/linux x adm 0644 Local Linux general Area LX_KERN L /pub/linux/kernel x adm 0644 Local Linux Kernel sources Area LX_TEXT L /pub/linux/textfiles x adm 0644 Local Linux Textfiles Area LX_X11 L /pub/linux/X11 x adm 0644 Local Linux X11 Specific things. Area LX_APP L /pub/linux/applications x adm 0644 Local Linux Applications Area LX_COMM L /pub/linux/communications x adm 0644 Local Linux Communications Area LX_SLACK L /pub/linux/slack x adm 0644 Local Linux selected files from Slackware distributions. (Currently 1.1.0) ifmail-2.14tx8.10.orig/misc/contrib/tic/config/Config100644 1751 50 2326 5701550310 17714 0ustar mdsrc# # A sample configuration file. This simply says where directories are # to be expected. The path to this file must be hard-coded in the # Tic-scripts # # # Who Am I. XXX Need Aka-matching. # MainAka 241:10000/1512 # # Where the configuration files and the dbm databases will reside # ConfigDir /home/cg/src/mine/tic/config # # Home point of the Filebase. Some special files will be created here # #FileBase /pub FileBase /tmp # # Where the .tic and .flo files will be put # Outbound /tmp # # Where we go to look for .tic files # #Inbound /var/spool/fido/file Inbound /home/cg/src/mine/tic # # Sequencer name for outgoing tics. Created in $FileBase # Sequencer .tic_sequence # # Names for various configuration files. # AreaFileName Areas NodeFileName Nodes ProcessorFileName Processor TriggerFileName Trigger PostingFileName Postings # # I like these to start with a dot, because they are completely # maintained/generated by the programs # AreaNodesFileName .AreaNodes FilesBBSFileName .files.bbs HistFileName .history ToPostFileName .topost # # How long to keep the dupe history around (in days) # KeepHistory 90 # # What program will accept our news messages # NewsInput /usr/local/news/bin/relay/relaynews -r ifmail-2.14tx8.10.orig/misc/contrib/tic/config/Nodes100644 1751 50 657 5701550310 17544 0ustar mdsrc# # # Nodes file. Should be protected because the passwords are in here! # # Everything between 'Node' lines is interpreted as a link of groups. # # Node PW Groups Processor Node 241:10000/1500 QWERTY PF fido PNOF,AV241,24000,NODEDIFF,FIDONEWS #Node helliconia1 HITHERE F uucp # AV241 # # A couple of fake entries to test # #Node 241:10000/1599 ABCDEF PF fido # PNOF #Node 241:10000/1598 KJLSHDF P uucp # PNOF ifmail-2.14tx8.10.orig/misc/contrib/tic/config/Postings100644 1751 50 175 5701550310 20275 0ustar mdsrc# # Postings Posting templates for announcements # #Tag Frequency Newsgroup Template Local Daily tricbbs.general TRICBBS ifmail-2.14tx8.10.orig/misc/contrib/tic/config/Processor100644 1751 50 350 5701550310 20441 0ustar mdsrc# # Processors - How to forward tic files. # # Note: Extra Data fields: # $1 Full Pathname of file # $2 SystemName # $3 Basename of file # # Method Extra Data # fido FIDO /var/spool/fido/outbound uucp EXEC uucp $1 $2!~/$3 ifmail-2.14tx8.10.orig/misc/contrib/tic/config/TRICBBS.frm100644 1751 50 1317 5701550310 20361 0ustar mdsrcformat TRICBBS_TOP = Path: tricbbs Newsgroups: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $Board Distribution: local Subject: New files Date: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $GetDate From: Cees de Groot $AtKludge Message-ID: $CurCrc,$AtKludge New files arrived on TricBBS: ========================================================================= . format TRICBBS = Area : @<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CurArea File: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (@>>>>>>>> bytes) $CurFile, $CurSize ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CurDesc . 1; ifmail-2.14tx8.10.orig/misc/contrib/tic/config/Trigger100644 1751 50 342 5701550310 20066 0ustar mdsrc# # Trigger Triggers for special files # # Comments: # 'X' in Area means: don't care. # #Filename Area Trigger # ....diff.[a-z][0-9][0-9] X /usr/fido/bin/copy_diff $1 fidonews.* FIDONEWS mail -s "Fidonews arrived" cg ifmail-2.14tx8.10.orig/misc/contrib/tic/config/global.hdr100644 1751 50 1363 5701550310 20523 0ustar mdsrc============================================================================== TricBBS File List ============================================================================== PNoF 241:10000/1512, SysOp Cees de Groot Access info: Data: +49 7532 2532 Voice: +49 7532 5131 14400/V42bis On-line 24 four hours a day Guest Accounts: Interactive: login 'guest', password 'guest' UUCP: login 'nuucp', password 'guest' ============================================================================= Special Files: /pub/group_L.lst Linux file list /pub/group_F.lst Normal file list /pub/group_P.lst PNoF file list ============================================================================= ifmail-2.14tx8.10.orig/misc/contrib/tic/config/group_L.hdr100644 1751 50 343 5701550310 20647 0ustar mdsrc This is the filelist with Linux software only. The software in this list is ported to Linux already, and thus may be easy to install. If you are interested in UNIX software in general, please consult the main file list too. ifmail-2.14tx8.10.orig/misc/contrib/tic/Changelog100644 1751 50 344 5701550310 17107 0ustar mdsrc /home/repository/mine/tic/Changelog,v 1.1 1994/03/19 16:34:40 cg Exp Changelog,v # Revision 1.1 1994/03/19 16:34:40 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # ifmail-2.14tx8.10.orig/misc/contrib/tic/README100644 1751 50 13366 5701550310 16225 0ustar mdsrc/home/repository/mine/tic/README,v 1.1 1994/03/19 16:34:42 cg Exp # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # This is LT, The Linux Tic Processor. ==================================== And let's call it version 0.1beta. Just for reference. Intro ----- Being a very early release, it is written almost exclusively in Perl. I did this for several reasons: - You can prototype and develop *much* faster with Perl than with C. I wrote the first version in one evening! - I wanted to learn Perl ;-) Here is what it does now: - It reads incoming .tic files, and checks them. For the check to be complete, a program crc32 must be in the PATH (I included the C-source). This is the only part written in C (actually, I didn't even write it, I just stole it from /linux/zBoot/misc.c, which was stolen from gzip ;-)); - It moves the associated file in it's Area-directory, and plays with the modes and ownership as it was told to do. This is a neat feature for sensitive data. It also updates a file '.files.bbs' in the target directory; - It looks which nodes are in the area list, compares it with the seenby's, and puts every node which didn't see the file on the outbound; - Then, it starts creating .tic and .flo files. Basically, most things that you need *badly*. Here is what it doesn't do (yet): - Stuff like Pre-releases and Replaces. Never got any, ergo no priority; - Although the configuration file is there, the quick hack version currently doesn't support multiple processors. The idea is to be flexible enough to send out .tic files through every known medium (but let's start on FTN, then do UUCP, then the rest of the universe ;-)); - Dupe-processing and the likes. See 'Pre-releases'; - Make pretty reports. Top of the list - haven't got the time yet. Should be a matter of hours to implement it, though. - Do it's work fast. See below. Here is below: - I also released this in perl, because I think it is easier for many persons to make quick hacks on. Of course, the first >= 1.0a release will be in C - I'll start translating in C as soon as I think that the functionality is stable**. In the mean time, I hope lots of patches will arrive...; - After that, I'll change IFmail and Waffle UUCP in order to use a magic filebase for filerequests. I'm still looking for ideas here, especially how to handle protection/privileges. ** This is only valid when the performance is below standards. Otherwise, I'd be happy to leave the stuff in perl... Let's see how it develops Baseline: use it, hack at it, and mail any ideas back to me. I don't want to write a simple .Tic-processor (I already done that, you're reading the readme now ), I want to expand it into a full-fledged filebase manager (Anybody know a database package with the GNU license on it ?). Installing ---------- make crc32, and put it in something like /usr/local/bin. That should be easy enough. Besides, it is a handy thing to have around. Better than good ol' sum, anyway. Put the perl-files somewhere. Files ending with .pl are executable scripts, files ending with .pli are required include files - all should reside in the same dir, while the main scripts try to load them from there. Set mode to executable for all .pl files, if they got munched in the distribution. Edit the configuration files. I put a template set into .../config, you can put them anywhere you like, as long as you change .../config/Config and config.pli accordingly. I don't think that such limited configuration files for such a limited program need further explanation for people who got Linux (and presumable IFmail or Fidogate) running :-). When you're happy with the configuration files, compile them into their dbm equivalents with makeconfig.pl. I won't start discussions about this: I think it's the best of two worlds - easy readable files to edit for you, and fast access for the program. The hard part is editing the templates. Take a close look at my example, and at the source code (poster.pl). Then, you're on your own. Using ----- Call process_tics, as an appropriately privileged person, and wait. Todo ---- Apart from the 'What it doesn't do' list: - More error handling. It currently trusts the filesystem too much... - Multiple inbounds in order to support /var/spool/uucppublic and other incoming stuff. The idea is to generate dummy tics for incoming files (a small program and a template should do it), so you can process them with the package. - Aka-Matching. Sigh. License ------- As the file COPYING would almost double the distribution, I left it out. Nevertheless, the GNU license applies. I wrote this stuff for Linux (although it will run on other Unixes too), so I expect everyone to have a license lying around. The Author ---------- You can contact me in several ways. I'll list them in order of my preference, but won't flame you if you don't pick the first: FidoNet: Cees de Groot%241:10000/1512 2:2/241 (this is a zonegate address. Put name and %... in the Name field, and 2:2/241 in the Node field. Don't worry, it works). Mailbox: +49 7532 2532 (14k4/v.42bis) InterNet: de_groot@decus.decus.de Phone: +49 7532 5131 (evenings, I'm GMT-1) Snail: Ortstrasse 1a 88718 Daisendorf Germany Famous Last Words ----------------- Have fun, and please send me feedback! Thanks to the standard bunch of persons: Linus, Larry, Eugene, Brian & Dennis ;-) ifmail-2.14tx8.10.orig/misc/contrib/tic/checker.pl100754 1751 50 4746 5701550310 17272 0ustar mdsrc#!/usr/bin/perl # # checker.pl Consistency checker for the filebase # # checker.pl,v 1.1 1994/03/19 16:34:43 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This perl script checks wheither the .files.bbs files are consistent # with what's on the disk. # # # Find out where the .pli's should live. # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; &ReadConfig; # # Loop through all areas # dbmopen(Areas,"$ConfigDir/$AreaFileName", 0644); while (($Key, $Value) = each %Areas) { ($Junk, $AreaDir, $Junk) = split(/:/, $Value); # # Read the .files.bbs. Build a list of the contents, and # check wheither the files are there. # undef %FileList; open(ListFile, "$AreaDir/$FilesBBSFileName"); while () { ($FKey, $FVal) = split(/:/, $_); $FileList{$FKey} = $FVal; if (! -e "$AreaDir/$FKey") { print "File not on disk: $AreaDir/$FKey\n"; } } close(ListFile); # # Check 2: Walk the directory and see if all files in the directory # are in the file list # opendir(TheDir, $AreaDir); while (($CheckFile = readdir(TheDir))) { if ($CheckFile =~ /^\./) { next; } if (-d "$AreaDir/$CheckFile") { next; } $CheckFile =~ s|/.*/(.*)$|$1|; if (!defined($FileList{$CheckFile})) { print "File not in list: $AreaDir/$CheckFile\n"; } } closedir(TheDir); } close(Areas); # # checker.pl,v # Revision 1.1 1994/03/19 16:34:43 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/config.pli100644 1751 50 3572 5701550310 17276 0ustar mdsrc# # config.pli Configuration Data # # config.pli,v 1.1 1994/03/19 16:34:44 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1993 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # Point to the configuration file # $ConfigFile = "/home/cg/src/mine/tic/config/Config"; # # Subroutine to read the configuration file # sub ReadConfig { local($PlLine); local($Var); local($Value); # # Read the configuration file, ignore comments and empty lines, # evaluate the rest as Perl statements. # open (ConfigFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; ($Var, $Value) = split(/[ \t]+/, $_, 2); $PlLine = '$' . $Var . '= "' . $Value . '"'; #print "Evaluating \"$PlLine\"\n"; eval $PlLine; warn $@ if $@; } close (ConfigFile) } 1; # # config.pli,v # Revision 1.1 1994/03/19 16:34:44 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/crc32.c100644 1751 50 4446 6540753002 16411 0ustar mdsrc/* crc32.c Calculate CRC-32 on stdin, write result on stdout /home/repository/mine/tic/crc32.c,v 1.2 1994/04/21 18:50:56 cg Exp */ #include extern unsigned long crc_32_tab[]; /* crc table, defined below */ void makecrc(); void main() { unsigned long crc; char c; long count; makecrc(); crc = 0xFFFFFFFFL; count = 0; while (1) { c = getchar() & 0xff; if (feof(stdin)) break; count++; #if 0 crc = crc_32_tab[((int)crc^(c)) & 0xff] ^ ((crc>>8) & 0x00ffffff); #else crc = crc_32_tab[((int)crc ^ (c)) & 0xff] ^ (crc >> 8); #endif } printf("%08lX\n", crc ^ 0xffffffffL); } /* =========================================================================== * Run a set of bytes through the crc shift register. If s is a NULL * pointer, then initialize the crc shift register contents instead. * Return the current crc in either case. */ unsigned long updcrc(s, n) unsigned char *s; /* pointer to bytes to pump through */ unsigned n; /* number of bytes in s[] */ { register unsigned long c; /* temporary variable */ static unsigned long crc = (unsigned long)0xffffffffL; /* shift register contents */ if (s == NULL) { c = 0xffffffffL; } else { c = crc; while (n--) { c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8); } } crc = c; return c ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ } /* * Code to compute the CRC-32 table. Borrowed from * gzip-1.0.3/makecrc.c. */ unsigned long crc_32_tab[256]; void makecrc(void) { /* Not copyrighted 1990 Mark Adler */ unsigned long c; /* crc shift register */ unsigned long e; /* polynomial exclusive-or pattern */ int i; /* counter for all possible eight bit values */ int k; /* byte being shifted into crc apparatus */ /* terms of polynomial defining this crc (except $x^{32}$): */ static int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; /* Make exclusive-or pattern from polynomial */ e = 0; for (i = 0; i < sizeof(p)/sizeof(int); i++) e |= 1L << (31 - p[i]); crc_32_tab[0] = 0; for (i = 1; i < 256; i++) { c = 0; for (k = i | 256; k != 1; k >>= 1) { c = c & 1 ? (c >> 1) ^ e : c >> 1; if (k & 1) c ^= e; } crc_32_tab[i] = c; } } ifmail-2.14tx8.10.orig/misc/contrib/tic/getdate.pli100644 1751 50 3600 5701550310 17436 0ustar mdsrc# # getdate.pli - Get a parseable date back. # # getdate.pli,v 1.1 1994/03/19 16:34:46 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This module contains the routine GetDate, which will leave the # current date in $GetDate, in the format: # Day, DD Mon YY HH:MM:SS GMT # sub GetDate { local(@Days) = ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); local(@Months) = ("XXX", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); local(@FillTwo) = ('00'..'99'); local($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time()); $GetDate = "$Days[$wday], $FillTwo[$mday] $Months[$mon] $year " . "$FillTwo[$hour]:$FillTwo[$min]:$FillTwo[$sec] GMT"; } 1; # # getdate.pli,v # Revision 1.1 1994/03/19 16:34:46 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/lister.pl100754 1751 50 10450 5701550310 17175 0ustar mdsrc#!/usr/bin/perl # # lister.pl Master file generator. # # lister.pl,v 1.2 1994/04/21 18:50:57 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This module contains a perl script which processes all areas for # a certain group. From it, it creates a master listing in the base # dir. # # # Find out where the .pli's should live. # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; require "$MyDir/getdate.pli"; &ReadConfig; # # A form for the FILES.BBS lines # format GroupListFile = @<<<<<<<<<<<< @>>>>>> @>>>>>>>@^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CurFile, $CurSize, $CDate, $NewFlag, $CurDesc ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CurDesc . # # First, sort the areas according to their group tags # dbmopen(Areas, "$ConfigDir/$AreaFileName", 0644); while (($Key,$Value) = each %Areas) { ($Group, $Junk) = split(/:/, $Value); $GroupList{$Group} .= "$Key:"; print "Added Area $Key in group $Group\n"; } # # Now, for every group, create the master listing # while (($CurGroup, $CurList) = each %GroupList) { print "Processing $CurGroup ($CurList)\n"; # # Open the file for the group # open(GroupListFile, ">$FileBase/group_$CurGroup.lst"); $OldFD = select(GroupListFile); # # Get the global header and write it to the listing # open(GlobHeader, "$ConfigDir/global.hdr"); while () { print; } close(GlobHeader); # # Get the group header and write it to the listing # open(GroupHeader, "$ConfigDir/group_$CurGroup.hdr"); while () { print; } close(GroupHeader); # # Walk through the areas, and process them. We could have done # this with templates, but W.T.H. # $TotalCount = 0; $TotalSize = 0; AreaLoop: while (1) { ($CurArea, $CurList) = split(/:/, $CurList, 2); if ($CurArea eq '') { last AreaLoop } print STDOUT "Processing $CurArea (left: $CurList)\n"; ($AreaGroup, $AreaDir, $AreaFOwn, $AreaFGroup, $AreaFMode, $AreaPost, $AreaDesc) = split(/:/, $Areas{$CurArea}); # # Print a header for the area # print "\n"; print "=" x 78; print "\n"; print "Area: $CurArea, $AreaDesc\n"; print " ($AreaDir)\n"; print "=" x 78; print "\n"; # # Open the files.bbs, and write out every line # open(FilesBBS, "$AreaDir/$FilesBBSFileName"); while () { ($CurFile, $CurDesc) = split(/:/, $_); ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $CurSize, $atime, $mtime, $ctime, $blksize, $blocks) = stat("$AreaDir/$CurFile"); ($sec,$min,$hour,$mday,$mon,$year,$wday,$isdst) = gmtime($mtime); $CDate = sprintf("%02d-%02d-%02d", $mday, $mon, $year); if (time() - $mtime < (14 * 24 * 3600)) { $NewFlag = "*"; } else { $NewFlag = " "; } write; $TotalCount++; $TotalSize += $CurSize; } close(FilesBBS); } print "=" x 78; print "\n"; print "Grand Total of $TotalCount files, $TotalSize bytes\n"; close(GroupListFile); select($OldFD); } dbmclose(Areas); # # lister.pl,v # Revision 1.2 1994/04/21 18:50:57 cg # This one works for me - I activated all `unsafe' statements, and it # processes LinuxNet; that's the primary goal, of course ;-) # # Revision 1.1 1994/03/19 16:34:47 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/makeconfig.pl100754 1751 50 16473 5701550310 20011 0ustar mdsrc#!/usr/bin/perl # # makeconfig.pl Generate configuration database # # makeconfig.pl,v 1.1 1994/03/19 16:34:48 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; # # This module contains a number of routines, one per type of configuration # file, which convert the configuration files into dbm-databases under the # same name. This so we can use them more easily from a number of modules. # &ReadConfig; &ReadNodes("$ConfigDir/$NodeFileName"); &ReadAreas("$ConfigDir/$AreaFileName"); &ReadProcessors("$ConfigDir/$ProcessorFileName"); &ReadTriggers("$ConfigDir/$TriggerFileName"); &ReadPostings("$ConfigDir/$PostingFileName"); # # Now, it gets a little bit harder: we make a dbm-database which # connects Nodes to Areas. # dbmopen(%Areas, "$ConfigDir/$AreaFileName", 0644); @AreaList = keys(%Areas); dbmclose(%Areas); if ( -f "$ConfigDir/$AreaNodesFileName.pag" ) { unlink("$ConfigDir/$AreaNodesFileName.pag"); unlink("$ConfigDir/$AreaNodesFileName.dir"); } dbmopen(%AreaNodes, "$ConfigDir/$AreaNodesFileName", 0644); for ($Counter = 0; $Counter <= $#AreaList; $Counter++) { $CurArea = $AreaList[$Counter]; print "Looking for nodes connected to $CurArea\n"; dbmopen(%Nodes, "$ConfigDir/$NodeFileName", 0644); while (($CurNode,$NodeData) = each %Nodes) { if ($NodeData =~ $CurArea) { print "$CurNode "; $AreaNodeList .= "$CurNode,"; } } print "\n"; dbmclose(%Nodes); $AreaNodeList =~ s/,$//; $AreaNodes{$CurArea} = $AreaNodeList; $AreaNodeList = ""; } dbmclose(%Areas); dbmclose(%AreaNodes); sub ReadAreas { local($AreaFile) = @_; local($Junk, $Tag, $Groups, $Dir, $FOwn, $FGroup, $FMode, $Posting); local($CurArea); # For debugging only # # Read the Area file, ignore comments and empty lines. # Between the Area-lines, there are description lines # open (AreaFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; if (/^Area/) { # # We got an Area-statement. Add it to the list # ($Junk, $Tag, $Groups, $Dir, $FOwn, $FGroup, $FMode, $Posting) = split(/[ \t]+/, $_); $AreaList[$#AreaList + 1] = $Tag; $AreaGroupsList{$Tag} = $Groups; $AreaDirList{$Tag} = $Dir; $AreaFOwnList{$Tag} = $FOwn; $AreaFGroupList{$Tag} = $FGroup; $AreaFModeList{$Tag} = $FMode; $AreaPostingList{$Tag} = $Posting; } else { # # Non-empty line - assume it is the Area Comment # s/[ \t]*//; $AreaDescList{$Tag} = $_; } } close (AreaFile); # # Convert the whole stuff into a dbm-database # if ( -f "${AreaFile}.pag" ) { unlink($AreaFile . ".pag"); unlink($AreaFile . ".dir"); } dbmopen(%Areas, $AreaFile, 0644); for $CurArea (@AreaList) { # # Convert the user/group names to numbers # $Uid = getpwnam($AreaFOwnList{$CurArea}); $Gid = getgrnam($AreaFGroupList{$CurArea}); $Areas{$CurArea} = join(':', $AreaGroupsList{$CurArea}, $AreaDirList{$CurArea}, $Uid, $Gid, $AreaFModeList{$CurArea}, $AreaPostingList{$CurArea}, $AreaDescList{$CurArea} ); } dbmclose(%Areas); } sub ReadNodes { local($NodeFile) = @_; local($Junk, $Node, $Password, $Groups, $Processor); local($CurNode); # For debugging only # # Read the Nodes file, ignore comments and empty lines. # Between the Nodes-lines, there are comma-separated lists of # areas they're attached to # open (NodeFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; if (/^Node/) { # # We got a node-statement. Add the node to the list # ($Junk, $Node, $Password, $Groups, $Processor) = split(/[ \t]+/, $_); $NodeList[$#NodeList + 1] = $Node; $NodePwList{$Node} = $Password; $NodeGroupList{$Node} = $Groups; $NodeProcessorList{$Node} = $Processor; } else { # # Non-empty line - assume it is a list of Areas. # s/[ \t]*//g; $NodeAreaList{$Node} .= $_ . ','; } } close (NodeFile); # # Convert the whole stuff into a dbm-database # if ( -f "${NodeFile}.pag" ) { unlink($NodeFile . ".pag"); unlink($NodeFile . ".dir"); } dbmopen(%Nodes, $NodeFile, 0644); for $CurNode (@NodeList) { $NodeAreaList{$CurNode} =~ s/,$//; $Nodes{$CurNode} = join(':', $NodePwList{$CurNode}, $NodeGroupList{$CurNode}, $NodeProcessorList{$CurNode}, $NodeAreaList{$CurNode} ); } dbmclose(%Nodes); } sub ReadTriggers { local($TriggerFile) = @_; local($FileName, $Area, $Trigger); # # Read the Triggers file, ignore comments and empty lines. # As these have a simple one-line format, we can do them # in one pass. # if ( -f "${TriggerFile}.pag" ) { unlink($TriggerFile . ".pag"); unlink($TriggerFile . ".dir"); } dbmopen(%Triggers, $TriggerFile, 0644); open (TriggerFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; ($FileName, $Area, $Trigger) = split(/[ \t]+/, $_, 3); if ($Area eq "X") { $Area = ""; } $Triggers{$FileName} = join(':', $Area, $Trigger); } close (TriggerFile); dbmclose(%Triggers); } sub ReadProcessors { local($ProcessorFile) = @_; local($Tag, $Method, $Data); local($CurProcessor); # For debugging only # # Read the Processors file, ignore comments and empty lines. # Write them into the dbm database. # if ( -f "${ProcessorFile}.pag" ) { unlink($ProcessorFile . ".pag"); unlink($ProcessorFile . ".dir"); } dbmopen(Processors, $ProcessorFile, 0644); open (ProcessorFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; ($Tag, $Method, $Data) = split(/[ \t]+/, $_, 3); $Processors{$Tag} = join(':', $Method, $Data); } close (ProcessorFile); dbmclose(%Processors); } sub ReadPostings { local($PostingFile) = @_; local($Tag, $Frequency, $NewsGroup, $Template); local($CurPosting); # For debugging only # # Read the Postings file, ignore comments and empty lines. # Write them into the dbm database. # if ( -f "${PostingFile}.pag" ) { unlink($PostingFile . ".pag"); unlink($PostingFile . ".dir"); } dbmopen(%Postings, $PostingFile, 0644); open (PostingFile); while () { /^#/ && next; /^[ \t]*$/ && next; chop; ($Tag, $Frequency, $NewsGroup, $Template) = split(/[ \t]+/, $_, 4); $Postings{$Tag} = join(':', $Frequency, $NewsGroup, $Template); } close (PostingFile); dbmclose(%Postings); } # # makeconfig.pl,v # Revision 1.1 1994/03/19 16:34:48 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/poster.pl100754 1751 50 7467 6105556014 17213 0ustar mdsrc#!/usr/bin/perl # # poster.pl Process outstanding postings # # poster.pl,v 1.2 1994/04/21 18:50:58 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This module contains a perl script which processes all outstanding # postings. It should be called with a posting frequency as $ARGV[0]. # # # Find out where the .pli's should live. # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; require "$MyDir/getdate.pli"; &ReadConfig; # # Go through all the lines in the file # dbmopen(PostData, "$ConfigDir/$PostingFileName", 0644); dbmopen(ToPost, "$FileBase/$ToPostFileName", 0644); while (($Key,$Val) = each %ToPost) { # # Split it up and check the type # ($FileArea, $FileName, $PostType) = split(/:/, $Val); ($Freq, $Board, $Form) = split(/:/, $PostData{$PostType}); if ($Freq eq '') { print "No such posting type $PostType!\n"; next; } # # If the frequency matches, store the data # print "Checking $Freq/$Board/$Form\n"; if ($Freq eq $ARGV[0]) { print "Will do $FileArea/$FileName\n"; $PostingList[$#PostingList + 1] = "$PostType:$FileArea:$FileName:$Key"; } } # # Now sort the array, and go through it. # dbmopen(Areas, "$ConfigDir/$AreaFileName", 0644); sort @PostingList; $LastType = ''; for ($Counter = 0; $Counter <= $#PostingList; $Counter++) { ($CurType, $CurArea, $CurFile, $CurCrc) = split(/:/, $PostingList[$Counter]); if ($CurType ne $LastType) { # # We changed types. Send the article, setup the next # if ($LastType ne "") { close(Article); select($OldFD); } ($Freq, $Board, $Form) = split(/:/, $PostData{$CurType}); open(Article,"|$NewsInput"); $OldFD = select(Article); $LastType = $CurType; } # # Get the Area Data # ($AreaGroup, $AreaDir, $AreaFOwn, $AreaFGroup, $AreaFMode, $AreaPost, $AreaDesc) = split(/:/, $Areas{$CurArea}); # # Get the File Data # open(FilesBBS, "$AreaDir/$FilesBBSFileName"); while () { if (/^$CurFile/) { ($Junk, $CurDesc) = split(/:/, $_, 2); last; } } close(FileBBS); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$CurSize, $atime,$mtime,$ctime,$blksize,$blocks) = stat("$AreaDir/$CurFile"); # # Get the form. Barf. # require "$ConfigDir/$Form.frm"; $~ = $Form; $^ = "${Form}_TOP"; &GetDate; $AtKludge = "@"; # # Write all kinds of stuff, and delete it. # print STDOUT "Filedescription = $CurDesc\n"; print STDOUT "Forms are: $~ / $^ \n\n"; write; delete $ToPost{$CurCrc}; } close(Article); select($OldFD); dbmclose(PostData); dbmclose(ToPost); # poster.pl,v # Revision 1.2 1994/04/21 18:50:58 cg # This one works for me - I activated all `unsafe' statements, and it # processes LinuxNet; that's the primary goal, of course ;-) # # Revision 1.1 1994/03/19 16:34:49 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/process_tics.pl100754 1751 50 16115 5701550310 20377 0ustar mdsrc#!/usr/bin/perl # # process_tics.pl - Process .TIC files # # process_tics.pl,v 1.2 1994/04/21 18:51:00 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # Find out where the .pli's should live. # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; require "$MyDir/readtick.pli"; require "$MyDir/sequencer.pli"; &ReadConfig; print "ConfigDir = $ConfigDir\n"; print "FileBase = $FileBase\n"; print "Inbound = $Inbound\n"; chdir($Inbound); TickFile: for $CurTic (<*.tic>) { print "Reading $CurTic\n"; $Status = &ReadTickFile($CurTic); print "status = $Status\n"; if (!$Status) { print "Error was : $ReadTickError\n"; next TickFile; } # # Dupe checking. # dbmopen(Dupes, "$FileBase/$HistFileName", 0644); ($DupeArea, $DupeFile, $Junk) = split(/:/, $Dupes{$FileContents{'Crc'}}); if (($DupeArea eq $FileContents{'Area'}) && ($DupeFile eq $FileContents{'File'})) { print "Duplicate file, ignored\n"; next TickFile; } $Dupes{$FileContents{'Crc'}} = join(':', $FileContents{'Area'}, $FileContents{'File'}, time()); dbmclose(Dupes); # # Tick is OK. Fine, move it to the destination directory # system "mv $FileContents{'File'} $AreaDir"; $ProcessFile = "$AreaDir/$FileContents{'File'}"; $TarOwn = ($AreaFOwn eq "") ? $> : $AreaFOwn; $TarGroup = ($AreaFGroup eq "") ? $) : $AreaFGroup; chown $TarOwn, $TarGroup, $ProcessFile; print "chown $TarOwn, $TarGroup, $ProcessFile\n"; $TarMode = ($AreaFMode eq "") ? 0644 : $AreaFMode; chmod oct($TarMode), $ProcessFile; print "chmod $TarMode, $ProcessFile\n"; # # Update the .files.bbs. .Files.bbs has a colon-separated format, # possibly it could be dbm later on. # open(DescFile, ">>$AreaDir/$FilesBBSFileName"); print DescFile "$FileContents{'File'}:@FileDesc\n"; close(DescFile); # # Look if some posting applies. When yes, write out the file # data so it may be reported later on. We write it into a dbm # database, so partial postings easily can remove the work done. # key is Area/Crc (to be sure it is a little bit unique). # if ($AreaPosting ne "None") { dbmopen(PostList, "$FileBase/$ToPostFileName", 0644); $PostList{"$FileContents{'Crc'}"} = join(':', $FileContents{'Area'}, $FileContents{'File'}, $AreaPosting); dbmclose(PostList); } # # Look if some trigger applies # dbmopen(Triggers, "$ConfigDir/$TriggerFileName", 0644); while (($CurTrig, $CurTrigData) = each %Triggers) { if ($FileContents{'File'} =~ $CurTrig) { print "Found match on trigger $CurTrig\n"; ($TrigArea, $TrigCommand) = split(/:/, $CurTrigData); if (($TrigArea eq "") || ($TrigArea eq $FileContents{'Area'})) { print ".. and Area matches/is empty\n"; $CurTrigData =~ s/\$1/$ProcessFile/; # # Strange. If Area is empty, the leading ':' isn't dropped. # we can filter it anyway, a command can start with it. # $CurTrigData =~ s/^://; print "executing: $CurTrigData\n"; system $CurTrigData; } } } # # Now, build a list of nodes to copy it to. # First get all possible nodes. # dbmopen(AreaNodes, "$ConfigDir/$AreaNodesFileName", 0644); $OutgoingNodes = $AreaNodes{$FileContents{'Area'}}; @OutgoingNodes = split(/,/, $OutgoingNodes); print "Sending to nodes: \"@OutgoingNodes\"\n"; # # Now, check the Seen-by list from the Ticfile # for $CurSeenby (@FileSeenby) { for $CurCheck (@OutgoingNodes) { if ($CurCheck eq $CurSeenby) { print "Node $CurCheck already seen, purging\n"; $CurCheck = ''; } } } print "Sending to @OutgoingNodes\n"; # # Append them to the Seen-by list # for $CurSeenby (@OutgoingNodes) { if ($CurSeenby gt '') { @FileSeenby[$#FileSeenby + 1] = $CurSeenby; } } # # Append myself to the PATH-List # $Now = time(); open(Date, "date|"); $Date = ; chop ($Date); close(Date); $FilePath[$#FilePath + 1] = "$MainAka $Now $Date"; # # Fine. For every node, create a tic-file and send the stuff. # for $CurNode (@OutgoingNodes) { if ($CurNode gt '') { print "Sending to $CurNode\n"; # # Get the name for a ticfile # &Sequencer; # # And write the thing. Yes, it is a DOS file :-( # print "Writing to $Outbound/$SequenceFileName\n"; open(TicFile, ">$Outbound/$SequenceFileName"); $OldFile = select(TicFile); print "Area $FileContents{'Area'}\r\n"; print "Origin $FileContents{'Origin'}\r\n"; print "From $MainAka\r\n"; print "To Sysop, $CurNode\r\n"; print "File $FileContents{'File'}\r\n"; for $CurDesc (@FileDesc) { print "Desc $CurDesc\r\n"; } print "Crc $FileContents{'Crc'}\r\n"; print "Created $FileContents{'Created'}\r\n"; for $CurPath (@FilePath) { print "Path $CurPath\r\n"; } for $CurSeenby (@FileSeenby) { print "Seenby $CurSeenby\r\n"; } dbmopen(Nodes, "$ConfigDir/$NodeFileName", 0644); ($CurNodePW, $Junk) = split(/:/, $Nodes{$CurNode}); dbmclose(Nodes); print "Pw $CurNodePW\r\n"; close(TicFile); select($OldFile); # # Write the .flo file # # XXX Of course, this and above stuff should be split for # different Processors... # ($Zone, $Net, $Node, $Point) = split(/[:\/]/, $CurNode); print "Sending to $Zone $Net $Node $Point\n"; if ($Point ne "") { $PointDir = sprintf("%s/%04x%04x.pnt", $Outbound, $Net, $Node); if (! -d $PointDir) { mkdir($PointDir, 0750); } $FloFile = sprintf("%s/0000%04x.flo", $PointDir, $Point); } else { $FloFile = sprintf("%s/%04x%04x.flo", $Outbound, $Net, $Node); } print "Flo is $FloFile\n"; # # See FSC-0028: The File itself *MUST* come first, then # the .Tic! # open(FloFile, ">>$FloFile"); $OldFile = select(FloFile); print "$AreaDir/$FileContents{'File'}\n"; print "^$Outbound/$SequenceFileName\n"; close(FloFile); select($OldFile); } } unlink($CurTic); } # # process_tics.pl,v # Revision 1.2 1994/04/21 18:51:00 cg # This one works for me - I activated all `unsafe' statements, and it # processes LinuxNet; that's the primary goal, of course ;-) # # Revision 1.1 1994/03/19 16:34:50 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/purge_history.pl100754 1751 50 3732 5701550310 20563 0ustar mdsrc#!/usr/bin/perl # # purge_history.pl Purge Dupe-history # # purge_history.pl,v 1.1 1994/03/19 16:34:51 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This module contains a perl script which purges entries over 90 days # old in the history. # # # Find out where the .pli's should live. # $MyDir = $0; $MyDir =~ s|(.*)/.*$|$1|; require "$MyDir/config.pli"; &ReadConfig; # # Calculate what to purge. Times are in seconds in the histfile # $Purged = 0; print "Starting purge on history file\n"; $PurgeBefore = time() - ($KeepHistory * 24 * 60 * 60); dbmopen(History, "$FileBase/$HistFileName", 0644); while (($Key, $Val) = each %History) { ($Junk1, $Junk2, $HistTime) = split(/:/, $Val); if ($HistTime < $PurgeBefore) { delete $History{$Key}; $Purged++; } } print "Done. Purged $Purged entries\n"; # # purge_history.pl,v # Revision 1.1 1994/03/19 16:34:51 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/readtick.pli100644 1751 50 11545 5701550310 17636 0ustar mdsrc # # readtick.pli - Read Tick file into memory, perform sanity checks # # readtick.pli,v 1.2 1994/04/21 18:51:02 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This subroutine reads the named tickfile, and performs some # sanity checks on it - among others, it calls a CRC calculator # Returns true or false, and leaves the contents in %FileContents. # # &ReadTickFile(TickFileName); # -> false: # $ReadTickError has reason. # -> true: # $FileContents has Tick data. AreaDir (among others) has the # Destination Directory. Several Arrays contain tags that mey # occur multiply: @FileDesc, @FileLDesc, @FilePath, @FileSeenby. # # sub ReadTickFile { local($TicFile) = @_; # # Reset those. Otherwise, they'll occur multiple times # undef @FileDesc; undef @FileLDesc; undef @FilePath; undef @FileSeenby; open(CurTic, $TicFile); while () { chop; chop; # Twice ! These are DOS CR/LF files ! ($Key, $Value) = split(/ /, $_, 2); TestKey: { # # Special Processing for the keywords that may appear more # than once # if ($Key =~ /^Desc/) { $FileDesc[$#FileDesc + 1] = $Value; last TestKey; } if ($Key =~ /^LDesc/) { $FileDesc[$#FileLDesc + 1] = $Value; last TestKey; } if ($Key =~ /^Path/) { $FilePath[$#FilePath + 1] = $Value; last TestKey; } if ($Key =~ /^Seenby/) { $FileSeenby[$#FileSeenby + 1] = $Value; last TestKey; } # # Special Processing for exceptions we saw # if ($Key =~ /^CRC/) { $FileContents{'Crc'} = $Value; last TestKey; } # # Default: # $FileContents{$Key} = $Value; } } close(CurTic); print "Area = ", $FileContents{'Area'}, "\n"; print "PW = ", $FileContents{'Pw'}, "\n"; print "From = ", $FileContents{'From'}, "\n"; print "Dest = ", $FileContents{'Dest'}, "\n"; print "Desc = ", @FileDesc, "\n"; print "File = ", $FileContents{'File'}, "\n"; # # Check the file. If it doesn't exist, translate to lowercase # and retry # if (! -e $FileContents{'File'}) { $FileContents{'File'} =~ y/A-Z/a-z/; if (! -e $FileContents{'File'}) { $ReadTickFileError = "Can't find associated file"; return 0; } } # # Get the data for the Originating node and the Area # dbmopen(Areas,"$ConfigDir/$AreaFileName", 0644); ($AreaGroup, $AreaDir, $AreaFOwn, $AreaFGroup, $AreaFMode, $AreaPosting, $AreaDesc) = split(/:/, $Areas{$FileContents{'Area'}}); dbmclose(Areas); dbmopen(Nodes, "$ConfigDir/$NodeFileName", 0644); ($NodePW, $NodeGroups, $Junk) = split(/:/, $Nodes{$FileContents{'From'}}); dbmclose(Nodes); print "NodeGroups = ", $NodeGroups, "\n"; #print "NodePW = ", $NodePW, "\n"; print "AreaGroup = ", $AreaGroup, "\n"; print "AreaDir = ", $AreaDir, "\n"; # # Check various thingies # if ($AreaGroup =~ /^$/) { $ReadTickError = "Area not found"; return 0; } if ($NodePW =~ /^$/) { $ReadTickError = "Node unknown"; return 0; } if ($FileContents{'Pw'} ne $NodePW) { $ReadTickError = "Password doesn't match!"; return 0; } if ($NodeGroups !~ $AreaGroup) { $ReadTickError = "Node can't send for this area!"; return 0; } if (! -d $AreaDir) { $ReadTickError = "Can't find target directory"; return 0; } if (! -w $AreaDir) { $ReadTickError = "Target directory isn't writable"; return 0; } # # OK. Passed most sanity checks, now get a CRC for the thing. # open(CALCCRC, "crc32 <$FileContents{'File'}|"); $CalcCrc = ; close(CALCCRC); if ($CalcCrc != $FileContents{'Crc'}) { $ReadTickError = "Incorrect CRC"; return 0; }; return 1; } 1; # # readtick.pli,v # Revision 1.2 1994/04/21 18:51:02 cg # This one works for me - I activated all `unsafe' statements, and it # processes LinuxNet; that's the primary goal, of course ;-) # # Revision 1.1 1994/03/19 16:34:52 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/tic/sequencer.pli100644 1751 50 3700 5701550310 20014 0ustar mdsrc # # sequencer.pli - generate .TIC sequence numbers # # sequencer.pli,v 1.1 1994/03/19 16:34:53 cg Exp # # Filebase - filebase management for Unix systems # Copyright (C) 1994 Cees de Groot # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author # by SnailMail: Cees de Groot # Ortsstrasse 1a # 88718 Daisendorf # Germany # by Phone: +49 7532 5131 # by InternetMail: de_groot@decus.decus.de # on his Box: +49 7532 2532 (14k4/V42bis) # # # # This file contains the sub 'Sequencer', which will generate a # Sequence number from the Sequence file, prefixed with lt, # suffixed with .tic. The lt stands for 'Linux Tic', of course :-) # # Output: $SequenceFileName # sub Sequencer { # # Generate the thing, if not there # if (! -f "$FileBase/$Sequencer") { system "echo 0 >$FileBase/$Sequencer"; } # # Get the next sequence number. # open(Sequence, "$FileBase/$Sequencer"); $Number = ; close(Sequence); $Number++; system "echo $Number >$FileBase/$Sequencer"; $SequenceFileName = sprintf("lt%06x.tic", $Number); print "File = $SequenceFileName\n"; } 1; # # sequencer.pli,v # Revision 1.1 1994/03/19 16:34:53 cg # Filebase first version that functions more or less. More a 'backup' # commit than a real release... # # ifmail-2.14tx8.10.orig/misc/contrib/news_via_mail/ 40755 1751 50 0 5715117764 17276 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/news_via_mail/README100644 1751 50 1721 5715117764 20254 0ustar mdsrcHow to read/post news without news installed: 1) edit user name into news2mail.awk and boss address into mail2news.sh. Check programs path also. 2) copy news2mail.awk to /usr/local/etc/ifmail/news2mail.awk and mail2news.sh to /usr/local/bin/mail2news. 3) change in your config file: rnews /usr/bin/awk -f /usr/local/etc/ifmail/news2mail.awk 4) create empty news spool (for ifunpack space check), usually /usr/spool/news or /var/news Now you able to read news via your usual mailreader. 4) To post/reply article specify: To: |mail2news in message header via your mail agent (assuming that /usr/local/bin present in your PATH). Yours, Ache. -- Andrew A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849 ifmail-2.14tx8.10.orig/misc/contrib/news_via_mail/mail2news.sh100755 1751 50 74 5715117764 21574 0ustar mdsrc#!/bin/sh exec /usr/local/lib/ifmail/ifnews -rf230.n5020.z2 ifmail-2.14tx8.10.orig/misc/contrib/news_via_mail/news2mail.awk100644 1751 50 314 5715117764 21756 0ustar mdsrcBEGIN { first = 1; } END { close("/usr/sbin/sendmail -t ache"); } /^#! rnews [0-9]+$/ { if (!first) close("/usr/sbin/sendmail -t ache"); first = 0; next; } { print | "/usr/sbin/sendmail -t ache"; } ifmail-2.14tx8.10.orig/misc/contrib/fdpass/ 40755 1751 50 0 5715120013 15716 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/fdpass/fdpass.c100644 1751 50 2345 5715120012 17442 0ustar mdsrc/* Contributed by paiko!ricudis@forthnet.gr (Christos Ricudis) */ #include #include #include #include #include #include #include "session.h" /* session.h from fddev220.arj */ void main (int argc,char *argv[]) { int fd; _PSW koko; char addr[25]; if (argc<2) { printf("Usage : fdpass \n"); exit(1); } if (((fd=open(argv[1],O_RDONLY))==-1)) { printf("Cannot open %s\n",argv[1]); exit(2); } while (read(fd,&koko,sizeof(koko))!=0) { if (koko.point==0) sprintf(addr,"%u:%u/%u",koko.zone,koko.net,koko.node); else sprintf(addr,"%u:%u/%u.%u",koko.zone,koko.net,koko.node,koko.point); if (!(koko.status & ACTIVE)) printf("#"); if (strlen(koko.password)>0) printf("password %s %s\n",addr,koko.password); if (koko.status & (NOFREQS|NOEMSI|NOZAP|NOYOOHOO)) { if (!(koko.status & ACTIVE)) printf("#"); printf("options (address %s) ",addr); if (koko.status & NOFREQS) printf("nofreqs "); if (koko.status & NOEMSI) printf("noemsi "); if (koko.status & NOZAP) printf("nozap "); if (koko.status & NOYOOHOO) printf("nowazoo"); printf("\n"); } } close (fd); } ifmail-2.14tx8.10.orig/misc/contrib/fdpass/session.h100644 1751 50 3575 5715120012 17660 0ustar mdsrc/* ** session.h ** ** Structures for PASSWORD.FD ** ** Copyright 1991-1993 Joaquim Homrighausen; All rights reserved. ** ** Last revised: 93-06-21 FrontDoor 2.11+ ** ** ------------------------------------------------------------------------- ** This information is not necessarily final and is subject to change at any ** given time without further notice ** ------------------------------------------------------------------------- */ #ifndef __SESSION_H__ #define __SESSION_H__ #ifdef __cplusplus extern "C" { #endif /* Miscellaneous flags (STATUS) */ #define ACTIVE 0x01 /*Active, as opposed to inactive*/ #define DELETED 0x02 /*Never written to disk*/ #define NOFREQS 0x04 /*Don't allow file requests from system*/ #define NOMAIL 0x08 /*Don't allow mail from system*/ #define NOEMSI 0x10 /*No outbound EMSI sessions w/system*/ #define NOFTSC1 0x20 /*No outbound FTSC-1 sessions w/system*/ #define NOZAP 0x40 /*No outbound ZedZap sessions w/system*/ #define NOYOOHOO 0x80 /*No outbound YooHoo sessions w/system*/ /* ** Note that any settings in the FDOPT environment variable applies to ** all sessions (inbound AND outbound). For example, if FDOPT contains ** "NOEMSI", NO EMSI handshaking will be done, regardless of settings ** in the security manager */ typedef struct { unsigned short int zone, /*System address*/ net, node, point; char password[9]; /*NUL terminated*/ unsigned char status; /*See above*/ } _PSW, *PSWPTR; #ifdef __cplusplus } #endif #endif /* end of file "session.h" */ ifmail-2.14tx8.10.orig/misc/contrib/fdpass/NOTICE100644 1751 50 263 5715120012 16677 0ustar mdsrcI am not sure if it is legal to distribute the file "session.h" (copyright by JoHo). Tell me if it it is not, and I'll replace it with an appropriate reference. Eugene Crosser ifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/ 40755 1751 50 0 6701151723 16067 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/region63.153100644 1751 50 20114 6007066200 20062 0ustar mdsrcRegion,63,FidoNet-Japan,Sagamihara_Japan,Bill_English,81-427-77-0847,9600,XA,CM,HST,V32b,V42,MNP,H16,VFC,V34,V32T ,1,R63_Echo-Gate,Abiko_Chiba,Junsei_Yamada,81-471-85-1088,9600,XA,CM,HST,V32b,MNP,V42b,V32T,V34,VFC,H16.SDS ; Host,730,FidoNet-Tokyo,Tokyo,Kazuyoshi_Shinada,81-3-3355-4395,9600,XA,CM,ZYX,V32,V32b,V42,V42b,MNP ,2,MCN,Abiko_Chiba,Junsei_Yamada,81-471-85-1088,9600,XA,CM,HST,V32b,MNP,V42b ,6,IMS-NET,Tokyo,Jun_Moriya,81-3-3408-0479,9600,CM,XA,HST,V42,V42b,MNP ,9,Avxia_bbs,Tokyo,Kazuyoshi_Shinada,81-3-3355-4395,9600,XA,CM,ZYX,V32,V32b,V42b ,27,Foxtrot_BBS,Ichihara,Takahiro_Teramoto,81-436-52-4477,9600,CM,XA,V32b,V42b, Hub,100,Tokyo_Metro_Hub,Tokyo,Kazuyoshi_Shinada,81-3-3355-4395,9600,XA,CM,ZYX,V32,V32b,V42,V42b ,11,B&B_Shimokitazawa,Tokyo,Shuichi_Fujita,81-3-3419-1138,9600,Z19,XA,CM,V32b,V42b ,12,GeneCom_Japan,Tokyo_Ebisu,Steve_Nacarlo,81-3-3486-4622,9600,CM,XA,V32b,V42b ,14,Wind_Net,Hiroyoshi_Satoh,Tokyo_Japan,81-3-3322-1147,9600,CM,XA,HST,V32B, ,16,Tokyo_PC_Users_Club,Tokyo,Robert_Irizarry,81-3-3487-9819,9600,XA,HST,V32b,MNP,V42b ,17,EBISU-Net,Tokyo,Shinri_Takaragi,81-3-3727-5370,9600,Z19,CM,XA,V32B,V42B ,18,The_Watering_Hole_BBS,Tokyo,Trane_Francks,81-427-34-4561,9600,CM,XA,V34,VFC,V32t,H16,V32b,V42b ,19,Avxia_bbs_ii,Tokyo,Kazuyoshi_Shinada,81-3-5269-2826,9600,CM,XA,H14,V32,MNP ,20,Metropolitan_Datacasting_System,Tokyo_Japan,Yoshito_Uchiyama,81-3-5394-7215,9600,CM,XA,V32B,V32,V42B ,23,Tokyo_Online,Tokyo,Tsuneo_Tanaka,81-3-3378-0069,9600,CM,H16,V32B,V32T,XA ,24,Global_OnLine,Tokyo,Roger_Boisvert,81-3-5310-5143,9600,CM, HST, XA, V32B, V42B ,25,Friend_Network,Utsunomiya,Nobuo_Kobayashi,81-286-33-3689,9600,XA,CM,HST,V32,MNP,V42 ,30,SAGAMI_STREET_EBBS,Kawasaki_Japan,Kazuya_Nakayama,81-44-952-5077,9600,XA,CM,V42b,V32b,Z19 ,31,Inagi_Network_Station,Inagi_Tokyo,Yuichi_Ishida,81-423-70-7051,9600,XX,V32,V42,MNP,CM ,33,GO.GO-NET_Yokohama,Yokohama_Kamagawa,Hayato_Machida,81-45-772-8596,2400,XA,CM,MNP ,34,YLION_BBS,CHIBA,Hirofumi_Morita,81-43-273-7693,9600,ZYX,XA,CM,V32b,V42b ,35,Gopherwood_BBS,Kawasaki_Kanagawa,Toshihiro_Kisaka,81-44-434-3267,9600,CM,MO,V32b,V42b,XW ,36,B&B_Machida_City,Hitoshi_Sugimoto,Tokyo_Japan,81-427-27-7488,9600,CM,XA,Z19,V32B, ,40,Shizuoka_Echo,Shimizu_City,Stephen_M_Brown,81-543-48-8777,9600,CM,XA,V32B,V42B ; Host,731,MIL_NET,Yokota_Japan,Chris_White,81-3117-55-2652,9600,CM,V32B,V42B,XA ,1,BillBoard_BBS_Node2,Sagamihara_Japan,Bill_English,81-427-77-3784,9600,CM,XA,V32B,Z19 ,2,Joel's_Place,Camp_Zama_Japan,Joel_Pierson,81-3117-63-4876,9600,CM,XA,V32B,V42B,V34,VFC ,3,A.C.E.,Atsugi_Kanagawa,Aaron_Sanford,81-3117-64-6564,9600,CM,HST,V32B,V42B,XA ,4,Tigers_Den,Misawa_Japan,Thomas_Dorsey,81-3117-62-8928,9600,CM,XA,H16,V34,VFC ,5,White_House_BBS,Yokota_Japan,Chris_White,81-3117-55-2652,9600,CM,V32B,V42B,XA ,6,The_Totally_Unofficial_BBS,Sagamihara_Japan,Jose_Ornelas,81-3117-68-4209,9600,CM,XA,V32B,V42B,V34,VFC ,7,Y.C.C.,Yokosuka_Japan,Keith_Telle,81-3117-43-3579,9600,CM,V32B,V42B,XA ,8,The_Asylum_BBS,Misawa_Japan,Troy_Stevenson,81-3117-62-8906,9600,CM,V32B,XA ,10,Roger's_World,Misawa_Japan,Roger_Braden,81-3117-62-5699,9600,CM,V32,V32B,V42B,XA ,11,Northern_Exposure!,Yokota_Japan,Keith_Wagner,81-3117-57-2917,9600,CM,V32B,V42B,XA ,12,Wolfen_Empire,Misawa_Japan,Eugene_Austin,81-3117-62-6752,9600,CM,V32B,V42B,XA ,13,The_Core_Plane,Misawa_Japan,Robert_Force,81-3117-62-8915,9600,CM,V32B,V42B,XA ,14,Logan's_Run,Misawa_Japan,Logan_Gibbons,81-3117-62-8939,9600,CM,V32B,V42B,XA ,16,BillBoard_BBS_Node1,Sagamihara_Japan,Bill_English,81-427-77-0847,9600,CM,XA,H16,V34,VFC ,18,The_Texas_Lighthouse,Camp_Zama_Japan,Guy_Rink,81-3117-63-8906,9600,CM,XA,H16,V34,VFC ; Host,732,Fidonet-Kansai,Osaka_Japan,Masato_Inoue,81-6-956-1160,9600,XA,CM,V32b,V42b,V34,VFC ,1,THE_MAIL_MAELSTROM,Kobe_Japan,Patrick_Browne,81-78-754-0902,9600,MNP,XX,V32b,V42b ,3,Reading_Rabbits,Osaka_Japan,Masato_Inoue,81-6-956-1160,9600,XA,CM,V32b,V42b,V34,VFC ,4,Perry's_Music_Box,Amagasaki_Japan,Perry_Roebuck,81-6-497-3040,9600,MNP,XX,V32b,V42b, ,5,JIX_BBS,Osaka_Japan,Paul_Hardy,81-6-881-2875,9600,MNP,XX,V32b,V42b ,7,SKYblue_Sea_Net,Kobe_Japan,Makoto_Shibata,81-78-707-6185,9600,XA,CM,V32,V42,MNP ,10,Asian_Friendship_Online,Osaka_Japan,Shinji_Nishikawa,81-6-731-1490,9600,V32b,V42b,V34,CM ,30,Global_Region_Network,Kobe_Japan,Masahiro_Nishi,81-78-612-0476,9600,V32b,V42b,ZYX,CM ,101,MOVE-BBS,Yamaguchi_Japan,Hirokazu_Ochi,81-836-41-8483,9600,XA,CM,V32,V42,MNP ,102,YooZen_Net,Toyama_Japan,Yasuo_Nakayama,81-763-52-3261,9600,XA,CM,V32,V42,MNP ,301,THE_MATRIX_BBS,Fukuoka_Japan,Scott_Epstein,81-93-923-5817,9600,V32b,V42b ; Host,733,RockNet,Okinawa_Japan,Herman_Hardin,81-6117-33-1464,9600,CM,XA,V32B,V42B ,1,Temple_of_Rock,Camp_Foster,Bill_Gochnour,81-6117-45-5290,9600,CM,XA,V32B,V42B,H16,V34,V32T,VFC ,2,DarkRealm,Kadena_AB,Joel_A_Steed,81-6117-33-4705,9600,CM,XA,V32B,V42B,H16,V34,V32T,VFC ,3,The_Guru_Meditation,Camp_Foster,Steve_Robbins,81-6117-45-1660,9600,CM,XA,V32B,V42B,V34 ,4,Plastic_Tower/2,Nishihara,Chris_Albertsen,81-988-75-7073,9600,CM,XX,V32B,V42B,VFC ,5,MaD_mOnKs_BbS,Camp_Foster,John_Temple,81-6117-45-4527,9600,XX,V32B,V42B,H16 ,7,The_Rest_Stop,Camp_Foster,Kim_Turner,81-6117-45-5634,9600,CM,XA,V32B,V42B,H16,V34,V32T,VFC Pvt,8,Scooter's_Place,Kadena_Cho,Bradley_Witschner,-Unpublished-,9600,XA,V32B,V42B ,11,Lost_Realms_of_Reality,Kadena_AB,Mike_O'Neil,81-6117-33-1156,9600,CM,XA,V32B,V42B,H16 ,15,CD-Rom_Mania,Kadena_AB,Jim_Utkin,81-6117-33-0803,9600,CM,XA,V32B,V42B,H16,VFC,V34,V32T ,16,GeBo's_ImagiNation!_Support_BBS,Kadena_AB,George_Jones,81-6117-32-3616,9600,CM,XA,V32B,V42B ,17,Hundred_Acre_Woods,Camp_Foster,Michael_Cidras,81-6117-45-8658,9600,CM,XA,V32B,V42B ,18,Virtual_Partners_BBS,Kadena_AB,Scott_Ramer,81-6117-33-0451,9600,CM,XA,V32B,V42B,H16,V34,V32T,VFC ,19,Jolly_Roger_BBS,Kadena_AB,Herman_Hardin,81-6117-33-1464,9600,CM,XA,V32B,V42B ,20,Ocean_Blue_BBS,Camp_Kinser,Lance_Taylor,81-6117-37-4037,9600,XA,V32B,V42B ,21,WannaB-BS,Kadena_AB,Dave_Henderson,81-6117-33-4600,9600,CM,XA,V32B,V42B,H16,V34,V32T,VFC Pvt,22,Soul_Seeker,Kadena_AB,John_Collins,-Unpublished-,9600,XA,V32B,V42B ,27,The_Emerald_Coast,Kadena_AB,Jeff_O'Toole,81-6117-33-2587,9600,XA,V32B,V42B ,30,Safehouse,Kadena_AB,Spencer_Bitz,81-6117-33-3014,9600,CM,XA,V32B,V42B ,31,The_War-Zone,Camp_Kinser,Howard_Mitchell,81-6117-37-3639,9600,CM,XA,V32B,V42B ,32,Dragon's_Lair,Kadena_AB,Chris_White,81-6117-33-3583,9600,CM,XA,V32B,V42B ,33,The_Leecher's_Emporium,Camp_Lester,Charles_Phillips,81-6117-45-8610,9600,CM,XA,V32B,V42B,VFC,V34 ,34,Confession_Corner,Camp_Foster,Jon_Clemons,81-6117-45-5174,9600,XA,V32B,V42B,VFC ,76,The_Oriental_Express,Torii_Station,Michael_Lucas,81-6117-44-4584,9600,CM,XA,V32B,V42B ,77,Sovergein_Realm,Camp_Courtney,Dianna_Picanco,81-6117-22-8196,9600,CM,XA,V32B,V42B ,78,MIS,Camp_Courtney,Bob_Hager,81-6117-22-8193,9600,CM,XA,V32B,V42B ,79,The_Cobra's_Pit,Camp_Courtney,Bob_Kerr,81-6117-22-6800,9600,CM,XA,V32B,V42B ; Host,670,FIDONET_HOST_GUAM,Tumon_Guam,Don_Prater,671-646-3265,9600,CM,XX,V32b,V42b ,1,Trashers_Realm,Tumon_Guam,Don_Prater,671-649-3748,9600,V32b,V42b,XX,CM ,2,Paradox,Sinajana_Guam,Dennis_Camacho,671-472-7827,9600,VFC,V32b,V42b,XX,CM ,3,LO-DIT_[Node_1],Barrigada_Guam,Jim_Sheldon,671-477-3241,9600,XX,CM,V32B,HST ,4,The_Trench_[Node_1],Inarajan_Guam,Brian_Pauliino,671-828-3660,9600,VFC,V32b,V42b,XX,CM ,5,Smedley's_Mansion_[Node_1],Santa_Rita_Guam,Steve_EckHouse,671-565-7633,9600,CM,XA,V32B,V42B ,6,Smedley's_Mansion_[Node_2],Santa_Rita_Guam,Steve_EckHouse,671-565-7634,9600,CM,XA,V32B,V42B ,7,The_Secret_Service,Chalan_Pago_Guam,James_Bunn,671-734-0898,9600,V32b,V42b,XX,CM ,8,Astro's_Starship,Malojloj_Guam,Scott_Benjamin,671-828-2614,9600,V32b,V42b,XX,CM ,9,The_Trench_[Node_2],Inarajan_Guam,Brian_Pauliino,671-828-0063,9600,VFC,V32b,V42b,XX,CM ,10,Ourhouse,Santa_Rita_Guam,Tommy_Vaughan,671-565-4404,9600,CM,V34,XX,V32b,V42b Down,15,Ourhouse_[Node_1],Santa_Rita_Guam,Tommy_Vaughan,671-565-4404,9600,CM,V34,XX,V32b,V42b ,16,Southern_Comfort,Santa_Rita_Guam,Doug_Swatts,671-564-3600,9600,VFC,V32B,V42B,XX,CM,XX Down,21,Trashers_Realm_[Node_1],Tumon_Guam,Don_Prater,671-646-3265,9600,V32b,V42b,XX,CM Down,22,Trashers_Realm_[Node_2],Tumon_Guam,Don_Prater,671-649-3748,9600,V32b,V42b,XX,CM ; ifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/Makefile100644 1751 50 1661 6027672502 17634 0ustar mdsrcCXX = g++ CXXFLAGS = -O2 -Wall # -g PROJECT = cutnl-0.1 # no need to change all: cutnl cutnl: cutnl.cc $(CXX) $(CXXFLAGS) -o cutnl cutnl.cc clean: rm -f cutnl *.o a.out *.core cleanup: $(MAKE) clean rm -f *~; \ cd .. ; rm -f $(PROJECT).tar* tar: $(MAKE) cleanup cd .. ; tar cfvW $(PROJECT).tar ./$(PROJECT); \ ls -l $(PROJECT).tar taz: $(MAKE) tar cd .. ; compress $(PROJECT).tar; \ ls -l $(PROJECT).tar.Z tgz: $(MAKE) tar cd .. ; gzip -9n $(PROJECT).tar; \ ls -l $(PROJECT).tar.gz taz.uu: $(MAKE) taz cd .. ; uuencode $(PROJECT).tar.Z \ `basename $(PROJECT).tar.Z` \ > $(PROJECT).tar.Z.uu; \ ls -l $(PROJECT).tar.Z.uu tgz.uu: $(MAKE) tgz cd .. ; uuencode $(PROJECT).tar.gz \ `basename $(PROJECT).tar.gz` \ > $(PROJECT).tar.gz.uu; \ ls -l $(PROJECT).tar.gz.uu ifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/cutnl.cc100644 0 0 15547 6701151723 20310 0ustar rootroot#include #include #include #include #include #undef __GNUC__ #include const char *const szZONE = "Zone"; const int sizeofZONE = strlen(szZONE); const char *const szREGION = "Region"; const int sizeofREGION = strlen(szREGION); const int TRUE = !NULL; const int FALSE = NULL; const int SUCCESS = 0; const int FAILURE = !SUCCESS; char *progname; void usage(void); int main(int argc, char **argv); void usage(void) { fprintf(stderr, "Usage: %s -z | -r < \n" "Example:\n" " $ %s -r 29 < ~fnet/nl/nodelist.153 > region29.153\n", progname, progname); return; } #if 1 int main(int argc, char **argv) { int argoff, c; char *zone_to_cut, *region_to_cut; int sizeof_zone_to_cut = 0, sizeof_region_to_cut = 0; int listallmatched; int done, matched; char S[BUFSIZ]; char *p; progname = argv[0]; if ((p = strrchr(argv[0], '/'))) progname = ++p; zone_to_cut = region_to_cut = NULL; listallmatched = FALSE; const char *const szOPTIONS = "z:r:ah"; argoff = 0; while ((c = getopt(argc - argoff, argv + argoff, szOPTIONS)) != EOF) { switch (c) { case 'z': zone_to_cut = strdup(optarg); region_to_cut = NULL; break; case 'r': zone_to_cut = NULL; region_to_cut = strdup(optarg); break; case 'a': listallmatched = TRUE; case 'h': default: usage(); return 1; } } if (!zone_to_cut && !region_to_cut) { usage(); fprintf(stderr, "Either zone or region must be specified.\n"); return 2; } if (zone_to_cut) sizeof_zone_to_cut = strlen(zone_to_cut); if (region_to_cut) sizeof_region_to_cut = strlen(region_to_cut); done = FALSE; matched = FALSE; while (gets(S) && !done) { if (zone_to_cut) { if (!strncasecmp(S, szZONE, sizeofZONE)) { if (!strncmp(S + sizeofZONE + 1, zone_to_cut, sizeof_zone_to_cut) && *(S + sizeofZONE + 1 + sizeof_zone_to_cut) == ',') matched = TRUE; else { done = (listallmatched ? FALSE : (matched ? TRUE : FALSE)); matched = FALSE; } } } else if (region_to_cut) { if (!strncasecmp(S, szREGION, sizeofREGION)) { if (!strncmp(S + sizeofREGION + 1, region_to_cut, sizeof_region_to_cut) && *(S + sizeofREGION + 1 + sizeof_region_to_cut) == ',') matched = TRUE; else { done = (listallmatched ? FALSE : (matched ? TRUE : FALSE)); matched = FALSE; } } if (!strncasecmp(S, szZONE, sizeofZONE)) { done = (listallmatched ? FALSE : (matched ? TRUE : FALSE)); matched = FALSE; } } if (matched) puts(S); } return 0; } #else class node_entry { char *entry; char *attrib; int number; char *system_name; char *location; char *sysop_name; char *system_phone; int speed; char *flags; char **flags_array; int nflags; public: node_entry(char *An_entry); ~node_entry(); char *get_entry(void) { return entry; }; char *get_attrib(void) { return attrib; }; int get_number(void) { return number; }; char *get_system_name(void) { return system_name; }; char *get_location(void) { return location; }; char *get_sysop_name(void) { return sysop_name; }; char *get_system_phone(void) { return system_phone; }; int get_speed(void) { return speed; }; char *get_flags(void) { return flags; }; int get_nflags(void) { return nflags; }; int flags_coincide_with(const char *flag); }; node_entry::node_entry(char *An_entry) { char *S = strdup(An_entry); char *p; int i; entry = new char[strlen(An_entry) + 1]; strcpy(entry, An_entry); p = strtok(S, ",\n\r\t"); attrib = new char[strlen(p) + 1]; strcpy(attrib, p); number = atoi(strtok(NULL, ",\n\r\t")); p = strtok(NULL, ",\n\r\t"); system_name = new char[strlen(p) + 1]; strcpy(system_name, p); p = strtok(NULL, ",\n\r\t"); location = new char[strlen(p) + 1]; strcpy(location, p); p = strtok(NULL, ",\n\r\t"); sysop_name = new char[strlen(p) + 1]; strcpy(sysop_name, p); p = strtok(NULL, ",\n\r\t"); system_phone = new char[strlen(p) + 1]; strcpy(system_phone, p); speed = atoi(strtok(NULL, ",\n\r\t")); p = strtok(NULL, "\n\r\t"); flags = new char[strlen(p) + 1]; strcpy(flags, p); nflags = 0; if (strlen(flags)) { p = flags; ++nflags; while ((p = strchr(p + 1, ','))) ++nflags; } flags_array = new char*[nflags + 1]; p = strtok(strdup(flags), ",\n\r\t"); for (i = 0; i < nflags; i++) { flags_array[i] = new char[strlen(p) + 1]; strcpy(flags_array[i], p); p = strtok(NULL, ",\n\r\t"); } flags_array[nflags] = NULL; } node_entry::~node_entry() { int i; delete entry; delete attrib; delete system_name; delete location; delete sysop_name; delete system_phone; delete flags; for (i = 0; i < nflags; i++) delete flags_array[i]; delete flags_array; } int node_entry::flags_coincide_with(const char *flag) { int i; for (i = 0; i < nflags; i++) if (!strcasecmp(flags_array[i], flag)) return TRUE; return FALSE; } class nodelist { node_entry ent; char *network_id; char *nodelist_filename; char *nodelist_filename_ext; char *nodelist_dir; char *nodelist_fullpath; int juliandate; FILE *fp; nodelist(); ~nodelist(); int open(); int nodelist(char *A_nodelist_dir, char *A_nodelist_filename_ext); int nodelist(char *A_nodelist_dir, char *A_nodelist_filename, int A_juliandate = -1); // find latest if juliandate=-1 int nodelist(char *A_nodelist_fullpath); char *find_latest_nodelist(char *A_nodelist_id); int close(); }; int nodelist::nodelist(char *A_nodelist_fullpath) { nodelist_fullpath = new char[strlen(A_nodelist_fullpath)]; splitpath strcpy(nodelist_fullpath, A_nodelist_fullpath); if ((fp = fopen(nodelist_fullpath)) == NULL) { fprintf(strerr, "%s\n", strerror(errno)); return SUCCESS; } return FAILURE; } int main(void) { node_entry node_ent("Hub,500,Military_Net,Yokota_Japan,Keith_Wagner,81-3117-57-2917,9600,CM,VFC,V32B,V42B\r"); cout << "attrib=\"" << node_ent.get_attrib() << "\"" << endl; cout << "number=" << node_ent.get_number() << endl; cout << "system_name=\"" << node_ent.get_system_name() << "\"" << endl; cout << "location=\"" << node_ent.get_location() << "\"" << endl; cout << "sysop_name=\"" << node_ent.get_sysop_name() << "\"" << endl; cout << "system_phone=\"" << node_ent.get_system_phone() << "\"" << endl; cout << "speed=" << node_ent.get_speed() << endl; cout << "flags=\"" << node_ent.get_flags() << "\"" << endl; cout << "nflags=" << node_ent.get_nflags() << endl; // cout << "flags_array=\"" << node_ent.get_flags_array() << "\"" << endl; return 0; } #endif ifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/README100644 1751 50 1016 6117440010 17031 0ustar mdsrcThis program extracts a given zone or region fron a raw nodelist. Author: Tsuneo Tanaka Usage: cutnl -z | -r < Note: when in region mode, the output won't be ready to compile (there isn't the zone line). You need a litle script to get around: NODELIST=$1 ZONE=$2 REGION=$3 cat $NODELIST | grep "^Zone,$ZONE," cutnl -r $REGION < $NODELIST eg: machine:~$ regcutnl nodelist.128 4 85 > r85-list.128 will create a region 85 (under zone 4) nodelist ready to compile. ifmail-2.14tx8.10.orig/misc/contrib/cutnl-0.1/regcutnl100744 1751 50 433 6117440242 17711 0ustar mdsrcif [ "$1" = "-h" -o "$3" = "" ];then echo -e " \ Usage: `basename $0` extracts the given region, under the given zone, to stdout " else NODELIST=$1 ZONE=$2 REGION=$3 cat $NODELIST | grep "^Zone,$ZONE," cutnl -r $REGION < $NODELIST fi ifmail-2.14tx8.10.orig/misc/contrib/fido.daily100755 0 0 24036 6701151723 17174 0ustar rootrootReturn-Path: phreak!demos!kremvax.demos.su!educom2.fct.unl.pt!px Received: from phreak by pccross.msk.su with uucp (Smail3.1.29.1 #2) id m0s1Itd-0006NgC; Tue, 18 Apr 95 23:25 MSD Received: by phreak.demos.su; Tue, 18 Apr 1995 18:30:32 +0400 Received: by kremvax.demos.su; Tue, 18 Apr 1995 18:28:14 +0400 Received: from root@isolde.fct.unl.pt [192.68.178.191] by kremvax.demos.su with SMTP id SAA14524; (8.6.9/D) Tue, 18 Apr 1995 18:26:52 +0400 Received: from laminaria.fct.unl.pt by isolde.fct.unl.pt with SMTP id AA20480 (5.65c/IDA-1.4.4 for ); Tue, 18 Apr 1995 15:47:16 +0200 Received: from educom2.fct.unl.pt by laminaria.fct.unl.pt (AIX 3.2/UCB 5.64/4.03) id AA14367; Tue, 18 Apr 1995 15:18:18 +0200 Received: by educom2.fct.unl.pt (5.51/6.2); Tue, 18 Apr 95 14:23:27 GMT From: "Joaquim Baptista - DI [pxquim]" Message-Id: <9504181523.AA10741@educom2.fct.unl.pt> To: Eugene Crosser , ifmail@jadpc.jd.com Cc: px@fct.unl.pt Subject: fido.daily v1.1, resume your ifcico, iftoss, ifmail, and ifnews logs Date: Mon, 06 Feb 95 12:21:07 +0100 Greetings, Some of you may remember my previous post of "fido.daily", a perl script to resume ifmail logs. I received a request to restrict the nodes being processed; I added a "-s pattern" option which should allow you to select just one node or one network. Use "-s 2:362/" to select the net 2:362, for instance. I also received a bug report. Sometimes a node is reported as 2:362/42, other times as 2:362/42@fidonet, and this confused the script. I now strip the "@net" part to solve the problem. It would be nicer to add it, but that is not always possible. To better support the automatic generation of reports, I now include the period being reported on the log. This shows what is being reported in the event of failures, such as a failure to rotate the logs due to a machine being down, and causing the recounting of partial logs. It will warn you if a message is not tossed because its area is not configured. It probably should detect other exceptional situations. Suggestions for such situations are welcome (actual log lines would be best). It's been a while since I changed it, so I am releasing the current version as version 1.1. I place the fido.daily script on the public domain, but I ask that, if you do any significant improvement, that you consider sending the improvements to me so that I can mantain a reference version. Suggestions for improvements are also welcome. In this message I include a sample output produced by the script, the fido.daily script itself, and a "rotate-logs" shell script that I addapted from code floating on the net. I invoke this last script daily from cron. ----BEGIN sample output -- Report period: From Apr 10 03:34:03 To Apr 18 02:59:57 Trafic by system (ifcico): Attempts Busy NoCa Conn Time Received Sent System 314 90 1 20 6:58 472Kb 0Kb 16:16000/0 216 1 1 26 11:12 904Kb 7Kb 2:362/1006 269 119 13 18 0:15 15Kb 0Kb 2:362/8 Messages received by system (iftoss): Echomail Netmail Route 796 0 16:16000/0 2119 0 2:362/10 23 0 2:362/8 Messages sent by system (ifnews+ifmail): Echomail Netmail Route 1 0 16:16000/0 11 0 362/10 ----END sample output -- ----BEGIN fido.daily -- #!/usr/local/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 # require "getopts.pl"; &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); } ----END fido.daily -- ----BEGIN rotate-logs -- #!/bin/sh # Script to rotate syslog files. Run from cron, every day or weekend. LOGDIR=/usr/adm/fido # log file directory OLDDIR=${LOGDIR}/OLD LOGPERM=0660 # log file permissions LOG1=iflog LOG2=ifdebug LOG3=rnews LOG1OWN=fido.uucp # log file ownership LOG2OWN=fido.uucp # log file ownership LOG3OWN=news.news # log file ownership # But first, generate some statistics... TMP=/tmp/fido.$$ echo To: jcf, jpa, px > $TMP echo Subject: Daily Fidonet report >> $TMP echo "" >> $TMP perl /usr/local/lib/fido/fido.daily ${LOGDIR}/${LOG1} >> $TMP /usr/lib/sendmail -t < $TMP && rm $TMP test -f ${OLDDIR}/${LOG1}.6 && mv ${OLDDIR}/${LOG1}.6 ${OLDDIR}/${LOG1}.7 test -f ${OLDDIR}/${LOG1}.5 && mv ${OLDDIR}/${LOG1}.5 ${OLDDIR}/${LOG1}.6 test -f ${OLDDIR}/${LOG1}.4 && mv ${OLDDIR}/${LOG1}.4 ${OLDDIR}/${LOG1}.5 test -f ${OLDDIR}/${LOG1}.3 && mv ${OLDDIR}/${LOG1}.3 ${OLDDIR}/${LOG1}.4 test -f ${OLDDIR}/${LOG1}.2 && mv ${OLDDIR}/${LOG1}.2 ${OLDDIR}/${LOG1}.3 test -f ${OLDDIR}/${LOG1}.1 && mv ${OLDDIR}/${LOG1}.1 ${OLDDIR}/${LOG1}.2 test -f ${OLDDIR}/${LOG1}.0 && mv ${OLDDIR}/${LOG1}.0 ${OLDDIR}/${LOG1}.1 test -f ${LOGDIR}/${LOG1} && mv ${LOGDIR}/${LOG1} ${OLDDIR}/${LOG1}.0 test -f ${OLDDIR}/${LOG2}.6 && mv ${OLDDIR}/${LOG2}.6 ${OLDDIR}/${LOG2}.7 test -f ${OLDDIR}/${LOG2}.5 && mv ${OLDDIR}/${LOG2}.5 ${OLDDIR}/${LOG2}.6 test -f ${OLDDIR}/${LOG2}.4 && mv ${OLDDIR}/${LOG2}.4 ${OLDDIR}/${LOG2}.5 test -f ${OLDDIR}/${LOG2}.3 && mv ${OLDDIR}/${LOG2}.3 ${OLDDIR}/${LOG2}.4 test -f ${OLDDIR}/${LOG2}.2 && mv ${OLDDIR}/${LOG2}.2 ${OLDDIR}/${LOG2}.3 test -f ${OLDDIR}/${LOG2}.1 && mv ${OLDDIR}/${LOG2}.1 ${OLDDIR}/${LOG2}.2 test -f ${OLDDIR}/${LOG2}.0 && mv ${OLDDIR}/${LOG2}.0 ${OLDDIR}/${LOG2}.1 test -f ${LOGDIR}/${LOG2} && mv ${LOGDIR}/${LOG2} ${OLDDIR}/${LOG2}.0 test -f ${OLDDIR}/${LOG3}.6 && mv ${OLDDIR}/${LOG3}.6 ${OLDDIR}/${LOG3}.7 test -f ${OLDDIR}/${LOG3}.5 && mv ${OLDDIR}/${LOG3}.5 ${OLDDIR}/${LOG3}.6 test -f ${OLDDIR}/${LOG3}.4 && mv ${OLDDIR}/${LOG3}.4 ${OLDDIR}/${LOG3}.5 test -f ${OLDDIR}/${LOG3}.3 && mv ${OLDDIR}/${LOG3}.3 ${OLDDIR}/${LOG3}.4 test -f ${OLDDIR}/${LOG3}.2 && mv ${OLDDIR}/${LOG3}.2 ${OLDDIR}/${LOG3}.3 test -f ${OLDDIR}/${LOG3}.1 && mv ${OLDDIR}/${LOG3}.1 ${OLDDIR}/${LOG3}.2 test -f ${OLDDIR}/${LOG3}.0 && mv ${OLDDIR}/${LOG3}.0 ${OLDDIR}/${LOG3}.1 test -f ${LOGDIR}/${LOG3} && mv ${LOGDIR}/${LOG3} ${OLDDIR}/${LOG3}.0 cp /dev/null ${LOG1} chmod ${LOGPERM} ${LOG1} /usr/local/bin/chown ${LOG1OWN} ${LOG1} cp /dev/null ${LOG2} chmod ${LOGPERM} ${LOG2} /usr/local/bin/chown ${LOG2OWN} ${LOG2} cp /dev/null ${LOG3} chmod ${LOGPERM} ${LOG3} /usr/local/bin/chown ${LOG3OWN} ${LOG3} ----END rotate-logs -- ifmail-2.14tx8.10.orig/misc/contrib/perl4/ 40755 1751 50 0 6540755243 15504 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/perl4/README100644 1751 50 457 6540753002 16436 0ustar mdsrcedalias perl script to edit the name->email address database used by ifmail (only works whith perl4) ldbm outputs a list of all the name->email address entries of the database (only works whith perl4) lmsgid outputs the references database (only works whith perl4) a2dbm (only works whith perl4) ifmail-2.14tx8.10.orig/misc/contrib/perl4/a2dbm100644 1751 50 434 6540753002 16461 0ustar mdsrc#!/usr/bin/perl # this is broken, only works whith perl4 dbmopen(ifdbm,"ifdbm",0666); open(alias,"/usr/lib/ifmail/Alias") || die "Cannot open alias file"; while() { unless (/^#/) { /([^ ]*) *(.*) *$/; print $1, "--", $2, "\n"; $ifdbm{$2} = $1; } } dbmclose(ifdbm); ifmail-2.14tx8.10.orig/misc/contrib/perl4/edalias100644 1751 50 2136 6540753002 17117 0ustar mdsrc#!/usr/bin/perl # this is broken, only works whith perl4 $dbm="/var/spool/ifmail/ifdbm"; $|=1; dbmopen(ifdbm,"$dbm",0666); while(1) { print "Freename (Ctrl-D to quit):"; $key=; last if ("$key" eq ""); chop($key); if ($val=$ifdbm{$key}) { print "Found: \"$key\"->\"$val\"\n"; print "Action ([C]change address, [D]elete, [N]ew name):"; $action=; last if ("$action" eq ""); chop($action); if ($action =~ /^[Cc]/) { print "New address:"; $new=; last if ("$new" eq ""); chop($new); $ifdbm{$key}=$new; } elsif ($action =~ /^[Dd]/) { print "Really delete \"$key\"? [Y]/[N]:"; $new=; last if ("$new" eq ""); chop($new); if ($new =~ /^[Yy]/) { delete $ifdbm{$key}; print "deleted \"$key\"\n"; } else { print "Deletion cancelled\n"; } } elsif ($action =~ /^[Nn]/) { print "New name:"; $new=; last if ("$new" eq ""); chop($new); if ($ifdbm{$new}) { print "There is already \"$new\"\n"; } else { $ifdbm{$new}=$val; } } } else { print "Not found\n"; } } dbmclose(ifdbm); print "\nBye.\n"; ifmail-2.14tx8.10.orig/misc/contrib/perl4/ldbm100644 1751 50 320 6540753002 16404 0ustar mdsrc#!/usr/bin/perl # this is broken, only works whith perl4 dbmopen(ifdbm,"/var/spool/ifmail/ifdbm",0666); while(($key,$val)=each %ifdbm) { print $key, ' = ', $val, "\n"; } dbmclose(ifdbm); ifmail-2.14tx8.10.orig/misc/contrib/perl4/lmsgid100644 1751 50 276 6540753002 16757 0ustar mdsrc#!/usr/bin/perl # this is broken, only works whith perl4 dbmopen(ifdbm,"/var/spool/ifmail/refdb",0666); while(($key,$val)=each %ifdbm) { print $key, ' = ', $val, "\n"; } dbmclose(ifdbm); ifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/ 40755 1751 50 0 6024356345 16431 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/Makefile100644 1751 50 456 6024275110 20141 0ustar mdsrc# $Header: /users/lord/src/iftelnetd/Makefile,v 1.2 1995/09/09 11:28:08 lord Exp $ iftelnetd: iftelnetd.c cc -O2 -o iftelnetd iftelnetd.c clean: rm -f iftelnetd *.o install: iftelnetd cp iftelnetd /usr/lib/ifmail chown fnet:uucp /usr/lib/ifmail/iftelnetd chmod a+rx /usr/lib/ifmail/iftelnetd ifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/README100644 1751 50 1330 6057446156 17411 0ustar mdsrc Written by: Vadim Zaliva, lord@crocodile.kiev.ua, 2:463/80 This software is provided ``as is'' without express or implied warranty. Feel free to distribute it. Feel free to contact me with improovments request and bug reports. Some parts of this code are taken from 1. serge terekhov, 2:5000/13@fidonet path for ifmail 2. Vadim Kurland, vadim@gu.kiev.ua transl daemon. Tested with ifmail 2.8c on SGI IRIX 5.3 and Linux. Do not forget that this software is still BETA. Check for latest version ftp::/ftp.topaz.kiev.ua/pub/Unix This program is intended to allow _incoming_ calls from fido mailers using VMODEM. (Otherwise, connections from VMODEM mailers won't work, as ifcico uses real tcp/ip instead) ifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/iftelnetd.c100644 1751 50 20404 6024275621 20665 0ustar mdsrc/* $Header $Log: iftelnetd.c,v $ * Revision 1.2 1995/09/09 11:33:37 lord * Copyright notise * * Revision 1.1 1995/09/09 11:08:50 lord * Initial revision * */ /* Simple proxy daemon for ifcico to work with SIO/VMODEM. ======================================================== Written by: Vadim Zaliva, lord@crocodile.kiev.ua, 2:463/80 This software is provided ``as is'' without express or implied warranty. Feel free to distribute it. Feel free to contact me with improovments request and bug reports. Some parts of this code are taken from 1. serge terekhov, 2:5000/13@fidonet path for ifmail 2. Vadim Kurland, vadim@gu.kiev.ua transl daemon. Thanks them. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #define MBUFSIZ 8192 #define TELNETD LOG_DEBUG #define VERSION_S "iftelnetd v1.0B by lord@crocodile.kiev.ua" #define TIMEOUT 3600 #define nil NULL extern int init_telnet(void); extern void answer (int tag, int opt ); extern int read0 (char *buf, int len ); extern int write1 (char *buf, int len); extern void com_gw (int in); #define WILL 251 #define WONT 252 #define DO 253 #define DONT 254 #define IAC 255 #define TN_TRANSMIT_BINARY 0 #define TN_ECHO 1 #define TN_SUPPRESS_GA 3 static char telbuf[4]; static int tellen; int debug; int main(int ac,char **av) { struct sockaddr_in peeraddr; int addrlen=sizeof(struct sockaddr_in); char *remote_name=nil; char *remote_port=nil; int c; int s; /* socket to remote*/ struct hostent *hp; struct servent *sp; struct sockaddr_in server; FILE *f; time_t now; char *log_file=nil; char *tmp=nil; syslog(LOG_INFO,"iftelnetd: Starting..."); debug=0; while ((c = getopt(ac,av,"dl:h:p:")) != EOF) switch (c) { case 'd': debug=1; break; case 'l': log_file=strdup(optarg); break; case 'h': remote_name=strdup(optarg); break; case 'p': remote_port=strdup(optarg); break; default: ; syslog(LOG_ERR,"iftelnetd: Wrong number of args!"); syslog(LOG_ERR,"iftelnetd: Usage:"); syslog(LOG_ERR,"iftelnetd: iftelnetd [-h remote_addr] [-p remote_port] [-l logfile] [-d]"); syslog(LOG_ERR,"iftelnetd: Aborting."); if(log_file) free(log_file); if(remote_name) free(remote_name); if(remote_port) free(remote_port); return 1; break; } if(!remote_name) { syslog(LOG_WARNING,"iftelnetd: Remote addr not set. Assuming 'localhost'"); remote_name=strdup("localhost"); } if(!remote_port) { syslog(LOG_WARNING,"iftelnetd: Remote port not set. Assuming 'fido'"); remote_port=strdup("fido"); } if(getpeername(0,(struct sockaddr*)&peeraddr,&addrlen) == 0) { tmp=strdup(inet_ntoa(peeraddr.sin_addr)); syslog(LOG_INFO,"iftelnetd: incoming TCP connection from %s", tmp ? tmp : "Unknown" ); syslog(LOG_INFO,"iftelnetd: Rerouting to %s:%s", remote_name, remote_port); } if(log_file) { now=time(nil); if((f=fopen(log_file,"a"))!=nil) { fprintf(f,"%s\t%s\n", ctime(&now), tmp ? tmp : "Unknown" ); fclose(f); } free(log_file); } if(tmp) free(tmp); if((sp=getservbyname(remote_port,"tcp"))==NULL) { syslog(LOG_ERR,"iftelnetd: Can't find service: %s",remote_port); syslog(LOG_ERR,"iftelnetd: Aborting."); free(remote_name); free(remote_port); return 1; } if((s=socket(AF_INET,SOCK_STREAM,0))==-1) { syslog(LOG_ERR,"iftelnetd: Can't create Internet domain socket"); syslog(LOG_ERR,"iftelnetd: Aborting."); free(remote_name); free(remote_port); return 1; } if((hp=gethostbyname(remote_name))==NULL) { syslog(LOG_ERR,"iftelnetd: %s - Unknown host",remote_name); syslog(LOG_ERR,"iftelnetd: Aborting."); free(remote_name); free(remote_port); return; } memset(&server,0,sizeof(server)); memcpy((char *)&server.sin_addr,hp->h_addr,hp->h_length); server.sin_family=hp->h_addrtype; server.sin_port = sp->s_port; if(connect(s,(struct sockaddr *)&server,sizeof(server)) == -1) { syslog(LOG_ERR, "iftelnetd: Can't connect %s",remote_name); syslog(LOG_ERR, "iftelnetd: Aborting."); free(remote_name); free(remote_port); return; } init_telnet(); write1(VERSION_S "\r\n" ,strlen(VERSION_S)+2); com_gw(s); free(remote_name); free(remote_port); close(s); syslog(LOG_INFO,"iftelnetd: Done."); } /* --- This is an artwork of serge terekhov, 2:5000/13@fidonet :) --- */ void answer (int tag, int opt) { char buf[3]; if(debug) { char *r = "???"; switch (tag) { case WILL: r = "WILL"; break; case WONT: r = "WONT"; break; case DO: r = "DO"; break; case DONT: r = "DONT"; break; } syslog(LOG_SYSLOG, "iftelnetd: TELNET send %s %d", r, opt); } buf[0] = IAC; buf[1] = tag; buf[2] = opt; if (write (1, buf, 3) != 3) syslog(LOG_ERR,"iftelnetd: $answer cant send"); } int init_telnet(void) { tellen = 0; answer (DO, TN_SUPPRESS_GA); answer (WILL, TN_SUPPRESS_GA); answer (DO, TN_TRANSMIT_BINARY); answer (WILL, TN_TRANSMIT_BINARY); answer (DO, TN_ECHO); answer (WILL, TN_ECHO); return 1; } int read0 (char *buf, int len) { int n = 0, m; char *q, *p; /* return read (0, buf, BUFSIZ); */ while ((n == 0) && (n = read (0, buf + tellen, MBUFSIZ - tellen)) > 0) { if (tellen) { memcpy (buf, telbuf, tellen); n += tellen; tellen = 0; } if (memchr (buf, IAC, n)) { for (p = q = buf; n--; ) if ((m = (unsigned char)*q++) != IAC) *p++ = m; else { if (n < 2) { memcpy (telbuf, q - 1, tellen = n + 1); break; } --n; switch (m = (unsigned char)*q++) { case WILL: m = (unsigned char)*q++; --n; if(debug) syslog (TELNETD, "iftelnetd: TELNET: recv WILL %d", m); if (m != TN_TRANSMIT_BINARY && m != TN_SUPPRESS_GA && m != TN_ECHO) answer (DONT, m); break; case WONT: m = *q++; --n; if(debug) syslog (TELNETD, "iftelnetd: TELNET: recv WONT %d", m); break; case DO: m = (unsigned char)*q++; --n; if(debug) syslog (TELNETD, "iftelnetd: TELNET: recv DO %d", m); if (m != TN_TRANSMIT_BINARY && m != TN_SUPPRESS_GA && m != TN_ECHO) answer (WONT, m); break; case DONT: m = (unsigned char)*q++; --n; if(debug) syslog (TELNETD, "iftelnetd: TELNET: recv DONT %d", m); break; case IAC: *p++ = IAC; break; default: if(debug) syslog (TELNETD, "iftelnetd: TELNET: recv IAC %d", m); break; } } n = p - buf; } } return n; } int write1 (char *buf, int len) { char *q; int k, l; l = len; while ((len > 0) && (q = memchr(buf, IAC, len))) { k = (q - buf) + 1; if ((write (1, buf, k) != k) || (write (1, q, 1) != 1)) return -1; buf += k; len -= k; } if ((len > 0) && write (1, buf, len) != len) return -1; return l; } void com_gw(int in) { fd_set fds; int n, fdsbits; static struct timeval tout = { TIMEOUT, 0 }; unsigned char buf[MBUFSIZ]; alarm(0); fdsbits = in + 1; while (1) { FD_ZERO(& fds); FD_SET (in, &fds); FD_SET (0 , &fds); FD_SET (1 , &fds); tout.tv_sec = TIMEOUT; tout.tv_usec = 0; if ((n = select(fdsbits, &fds, NULL, NULL, &tout)) > 0) { if (FD_ISSET(in, &fds)) { if ((n = read(in, buf, sizeof buf)) > 0) { if (write1(buf, n) < 0) goto bad; } else goto bad; } if (FD_ISSET(0, &fds)) { if ((n = read0(buf, sizeof buf)) > 0) { if (write(in, buf, n) < 0) goto bad; } else goto bad; } } else goto bad; } bad: ; } ifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/inetd.conf100754 1751 50 251 6024355470 20456 0ustar mdsrc# fido stream tcp nowait fnet /usr/lib/ifmail/ifcico ifcico tfido stream tcp nowait fnet /usr/lib/ifmail/iftelnetd iftelnetd -l/var/log/ifmail.tcp -pfido -hlocalhost # ifmail-2.14tx8.10.orig/misc/contrib/iftelnetd/services100754 1751 50 127 6024275017 20252 0ustar mdsrc# fido 60179/tcp # For ifmail connections tfido 60177/tcp # For VMODEM connections # ifmail-2.14tx8.10.orig/misc/contrib/getnodelist100755 1751 50 2130 6214657443 17017 0ustar mdsrc#!/bin/sh # Check if we got a fresh nodediff, unpack and apply it and rebuild index. INB=/var/spool/ifmail/inb NLDIR=/var/spool/ifmail/nodelist UNPACKER="/usr/bin/unzip -o" PATCHER=/usr/lib/ifmail/nlpatch INDEXER=/usr/lib/ifmail/ifindex NLMASK='z2-list*' NDMASK='z2-diff*' if cd ${INB} ; then DIFF=`ls ${NDMASK}` if [ ! -f ${NDMASK} ] ; then echo No diff file exit 0 fi else echo Cannot chdir to ${INB} exit 1 fi echo Processing ${DIFF} if cd ${NLDIR} ; then if cp ${INB}/${DIFF} . ; then rm -f ${INB}/${DIFF} else echo Cannot copy ${INB}/${DIFF} to ${NLDIR} exit 1 fi else echo Cannot chdir to ${NLDIR} exit 1 fi if ${UNPACKER} ${DIFF} ; then rm -f ${DIFF} DIFF=`ls ${NDMASK}` else echo Could not unpack ${DIFF} exit 1 fi if [ ! -f "${DIFF}" ] ; then echo Nodediff was unpacked to unknown name exit 1 fi NLIST=`ls ${NLMASK}` if [ ! -f "${NLIST}" ] ; then echo Nodediff was unpacked to unknown name exit 1 fi echo applying ${DIFF} to ${NLIST} if ${PATCHER} ${NLIST} ${DIFF} ; then rm -f ${NLIST} ${DIFF} exec ${INDEXER} else echo Error compiling new nodelist exit 1 fi ifmail-2.14tx8.10.orig/misc/contrib/rtscts/ 40755 1751 50 0 6214661615 15775 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/rtscts/Makefile100644 1751 50 122 6214661615 17505 0ustar mdsrcrtscts: rtscts.c /svr3/usr/bin/cc -systype svr3 -DSVR3 -O0 -g rtscts.c -o rtscts ifmail-2.14tx8.10.orig/misc/contrib/rtscts/README100644 1751 50 313 6214661615 16727 0ustar mdsrcYou will need to add a define -DCRTSFL_COMMAND=\"/path/to/rtscts\" when compiling ifcico (to be exact, openport.c). This command will be executed by system() to put the port in HW flow control mode. ifmail-2.14tx8.10.orig/misc/contrib/rtscts/rtscts.c100644 1751 50 1611 6214661615 17557 0ustar mdsrc/* rtscts.c -- Sets the RTS/CTS flow control mode for RISCos * Marc SCHAEFER * V1.0 PV002 MSC95 * 15/01/95 * DESCRIPTION * This program will set the RTS/CTS mode bit on the io file * correponding to stdin (file handle 0). * NOTE * Must be called by any RISCos SVR4 program wanting to use RTS/CTS flow * control while dialing out (RISCos SVR4 is broken in this aspect) */ #define STRANGE #include #include #include #include #include #include #include int main(argc, argv) int argc; char **argv; { struct termio arg; #ifndef STRANGE if (argc != 1) { fprintf(stderr, "%s\n", argv[0]); fprintf(stderr, "%s: bad args\n", argv[0]); exit(1); } #endif ioctl(0, TCGETA, &arg); arg.c_cflag |= CNEW_RTSCTS; ioctl(0, TCSETA, &arg); exit(0); } ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.04/ 40755 1751 50 0 6420407714 16611 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/genreqmap100755 1751 50 20307 6254042503 16470 0ustar mdsrc#!/usr/bin/perl # # Reads an old reqmap (mapping file for patched ifcico) and an old # noreq (list of files in pubdir, which should not inserted to reqmap) # and generates a new reqmap.new and noreq.new and an additional # reqmap.add, which keeps all new files and a first try of a 8+3-conversion. # The admin should merge reqmap.add to reqmap.new. # # $Id: genreqmap,v 1.3 1996/09/27 02:14:18 roland Exp $ # # Copyright (C) 1996 Roland Rosenfeld 2:2450/42 # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # Some small parts of this script are stolen from FidoGate 4.0beta1 # the famous gatewaysoftware written by Martin Junius # ############################################################################# $fnet = "/usr/lib/ifmail"; $reqmap = "$fnet/reqmap"; $noreq = "$fnet/noreq"; $newreqmap = "$reqmap.new"; $newnoreq = "$noreq.new"; $reqmapadd = "$reqmap.add"; $oldreqmap = "$reqmap.old"; $oldnoreq = "$noreq.old"; $pubdir = "/home/ftp/pub/"; $files = "$pubdir/2450-42.lst"; $filesnew = "$files.new"; $filesold = "$files.old"; $fileszip = "$pubdir/2450-42.zip"; $fileshead = "$fnet/filelist.head"; $filesbbs = "files.bbs"; $admin = "news"; $report = "| /bin/mail -s 'New Fido-Requestmap and generated!' $admin"; $zip = "/usr/bin/zip -kjq"; ############################################################################# require "ctime.pl"; ############################################################################# # # Generating report: # open (REPORT, $report) || die "Can't generate $report: $!\n"; print REPORT "==============================================================="; print REPORT "\nNote the following inconsistencies:\n\n"; # # Read old reqmap and store it into %longtoshort # open (REQMAP, $reqmap) || die "Can't open $reqmap: $!\n"; while () { chop; ($shortname,$longname) = split (/\s+/, $_, 2); $longname =~ s/$pubdir//; $longtoshort{$longname} .= "$shortname "; } close (REQMAP); # # Read old noreq and store it into %longtoshort as "-" # open (NOREQ, $noreq) || die "Can't open $noreq: $!\n"; while () { chop; s/$pubdir//; if (!$longtoshort{$_}) { $longtoshort{$_} = "-"; } else { print REPORT "File defined in reqmap and noreq: $_\n"; } } close (NOREQ); open (FIND, "find $pubdir -type f -print|") || die "Can't open find to pipe\n"; open (NEWREQMAP, ">$newreqmap") || die "Can't open $newreqmap for writing\n"; open (NEWNOREQ, ">$newnoreq") || die "Can't open $newnoreq for writing\n"; open (REQMAPADD, ">$reqmapadd") || die "Can't open $reqmapadd for writing\n"; open (FILESNEW, ">$filesnew") || die "Can't open $filesnew for writing\n"; # # Generate Filelist-Header # open (FILESHEAD, "$fileshead") || die "Can't open $fileshead for reading\n"; while () { print FILESNEW $_; } close (FILESHEAD); print FILESNEW "\nGenerated: "; print FILESNEW &ctime(time),"\n\n"; # # Find out, which files really exist # (Files in $pubdir first!) # while () { chop; if ( /\/files.bbs$/ ) { next; } s/$pubdir//; $longname = $_; if (!$longtoshort{$longname}) { print REQMAPADD &translate($longname) . "\t$longname\n"; } else { if ($longtoshort{$longname} eq "-") { print NEWNOREQ "$longname\n"; } else { foreach $oneshort (split (/ /, $longtoshort{$longname})) { print NEWREQMAP "$oneshort\t$longname\n"; $shorttolong{$oneshort} .= "$longname "; ($x,$x,$x,$x,$x,$x,$x,$size,$x,$time,$x,$x,$x) = stat("$pubdir/$longname"); printf(FILESNEW "%-12s %s %s ~/%s\r\n", &toupper($oneshort), &ascdate($time), &ksize($size), $longname); } } delete $longtoshort{$longname}; } } # # Now test the other files: # foreach $longname (sort keys(%longtoshort)) { if ( -f $longname ) { if ($longtoshort{$longname} =~ /^-$/) { print REPORT "removing $longname from noreq-Liste\n"; } else { foreach $oneshort (split (/ /, $longtoshort{$longname})) { print NEWREQMAP "$oneshort\t$longname\n"; $shorttolong{$oneshort} .= "$longname "; ($x,$x,$x,$x,$x,$x,$x,$size,$x,$time,$x,$x,$x) = stat("$longname"); printf(FILESNEW "%-12s %s %s %s\r\n", &toupper($oneshort), &ascdate($time), &ksize($size), $longname); } } } else { print REPORT "$longname no longer exists\n"; } } close NEWREQMAP; close NEWNOREQ; close REQMAPADD; print FILESNEW "\n\nFilelist generated by"; print FILESNEW ' $RCSfile: genreqmap,v $ $Revision: 1.3 $'; print FILESNEW "\nwritten by Roland Rosenfeld ) { print REPORT $_; } close (REQMAPADD); close REPORT; rename ($reqmap, $oldreqmap); rename ($newreqmap, $reqmap); rename ($noreq, $oldnoreq); rename ($newnoreq, $noreq); rename ($files, $oldfiles); rename ($filesnew, $files); system ("$zip $fileszip $files"); exit(0); ############################################################################# sub translate { local($long) = @_; local($name,$ext); $long =~ s/^.*\///; $long =~ s/\.tar.gz/.tgz/; $long =~ s/\.tar.z/.tgz/; $long =~ s/\.tar.Z/.taz/; $long =~ s/\.ps.gz/.pgz/; $long =~ s/\.doc.gz/.dgz/; $name = $long; $ext = ""; if( $long =~ /^(.*)\.([^.]*)$/ ) { $name = $1; $ext = $2; } $name =~ tr/A-Z/a-z/; $ext =~ tr/A-Z/a-z/; $name =~ s/\.//g; if (length($name)>8) { $name =~ s/[^a-z0-9]//g; } if (length($ext)>3) { $ext =~ s/[^a-z0-9]//g; } $ext =~ s/^(...).*$/$1/; while ( (length($name)>8) && ($name =~ /[a-z]/) ) { $name =~ s/[a-z]([0-9]*)$/$1/; # remove last character } $name =~ s/^(.{8}).*$/$1/; return ($ext ? "$name.$ext" : $name); } sub ascdate { local($time) = @_; if($time eq "") { return " "; } else { local($yr, $mn, $dy, $h, $m, $s, $xx); ($s,$m,$h,$dy,$mn,$yr,$xx,$xx,$xx) = localtime($time); return sprintf("%02d.%02d.%02d", $dy,$mn+1,$yr, $h,$m); } } sub ksize{ local($size) = @_; local($k); if($size eq "") { return " N/A"; } else { if($size == 0) { $k = 0; } elsif($size <= 1024) { $k = 1; } else { $k = $size / 1024; } return sprintf("%4dK", $k); } } sub toupper{ local($name) = @_; $name =~ tr/a-z/A-Z/; return $name; } ############################################################################# # # ToDo: # # - use files.bbs to add comments to filelist # - remove duplicates from files.bbs # - find new files and announce them via news or mail # ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/ 40755 1751 50 0 6573551267 16630 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/HISTORY100644 1751 50 10660 6420407565 20024 0ustar mdsrcThe History of the AreaManager for INN+ifmail (it's short name - areafix :) ==== v0.00, ??-??-9? It was written by Alex Tutubalin (2:5020/96) in Perl for MS-DOS (so many later versions contained "#chop #MSDOG" :). Alex wrote to Sergey Vishnevskiy (2:5020/400): "I've learned a new language and wrote an area manager while having been learning it". ==== v0.01, april'95 The first operational alpha-version. Andrew Kolchoogin (was 2:5020/118.22) was made by Alexey Kshnyakin (2:5020/118) to learn Perl for a week, and then they made the areafix work :) ==== v0.02, may-june'95 The first operational version :) Andrew Kolchoogin and Alexey Kshnyakin made it from v0.01 just before Alexey's graduating. ==== v0.10, december'95 - february'96 Yar Tikhiy (2:5020/118) became the next developer :) 1) Areafix was divided into 2 parts: a little program that places requests in a queue and a queue processor. 2) "+*" is processed correctly now. 3) The list of restricted echoes is handled properly, too. 4) The names of echoes containing metacharacters are handled in a correct way. 5) The list of restricted echoes affects both + and - commands. 6) "Forward" config parameter was added. === v0.11, march'96 It's the version included into ifmail-2.8e package. 1) Areafix logs using syslogd (implemented by Andrew Kolchoogin) === v0.5.00, may'96 Yar Tikhiy began a new version numbering. 0.5 means "half-release". It's time to finish messing with the areafix. 1) It knows about INN's "default subscription list" feature (default subscription is '*') and writes '!*' in newsfeeds if detects empty subscription list. 2) Areafix has to use ifmail's Areas file as the list of areas, in which newsgroups are gated, so the lines in Areas containing '*' in area or newsgroup name are rejected (previous version would have subscribed you to something like 'junk.*' if you had asked '+*') 3) 'XlatCommand' config parameter has been added. Now you have ability to tell areafix to translate some users' commands to other ones. See also 4). 4) '%+' and '%-' command have been added. There is almost no use of them for users, but they can be used in 'XlatCommand'. Imagine that some areafix user (i.e. link) sends '+*' to it. Obviously he wants to get full feed of FidoNet echoes and has absolutely no desire to receive gated usenet shit. So it would be the right thing to add the 'XlatCommand +* %+fido7.*' line to areafix's config file. 5) Now you can tell areafix to restrict an echo for a set of links by specifying a wildmat(3)-style address pattern. See also the 'restricted' file. 6) Areafix forwards subscription requests to uplink in a single letter. Previous versions would have sent a letter per each nonexistent area. 7) Comments and README are now in bad English :) === v0.5.01, may'96 1) Areafix knows about Reply-To: RFC-822 message header line now. 2) It saves messages w/bad header in $QUEUE/bad directory. 3) It sends a correct list on %UNLINKED command. 4) It sends a sorted list on %LIST and %UNLINKED commands. === v0.5.02, may'96 1) 'quote_meta' subroutine quotes all metacharacters. Previous version have quoted only those metacharacters which I had found in echo and group names, but now it's getting popular to include weird characters in the names of new echoes. === v0.5.03, june'96 1) Because of the subscription algorithm, the subscription to '*' durated 2 days on 2:5020/400. So, the algorithm changed to make subscribing to a lot of echoes much faster (about 300 times). === v0.5.04, august'96 1) Now areafix can handle not only FTN links but also NNTP and UUCP ones. The trouble was that all newsgroup names passed check for their presence in ifmail's Areas file. Two types of links are introduced now, namely, FTN and non-FTN. FTN links can see only newsgroups being gated (i.e. present in the Areas), and non-FTN links see all active newsgroups. Of course, they can't reference ungated newsgroups by echotag, but only by newsgroup name. Futhermore, you can turn off FTN features at all. See 'config', 'restricted' and 'passwords' files' comments for more technical details. 2) A bug in list generating functions fixed. Now they output only active echoes but not all of them from ifmail's Areas. 3) A bug in unsubscribe_from_ngroup() that made it non-functional fixed. 4) A little bug in areaqueue.c fixed. Thanx to Nick Evgenev for giving the idea for fixes #1 and #2. === v.0.5.05 === v.0.5.06 1) Little bug fixes === v.0.5.07 1) Areafix uses gup3w-compatible lock file now ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/README100644 1751 50 3366 6420407565 17605 0ustar mdsrc Area Manager for ifgate+INN (areafix) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I. MISCELLANEOUS RUBBISH BY AUTHORS Area Manager is a program that plays the role of the Areafix robot of standard MS-DOS FTN packages in a system using ifgate and INN for internet news and FidoNet echoes processing. It handles links' requests for subscribing/unsubscribing to/from echoes by translating echo names to newsgroup names using ifmail's Areas file and modifying INN's newsfeeds file. Usual %LIST, %QUERY, %UNLINKED, %PASSIVE and %ACTIVE commands are also recognized and processed in a proper way. II. INSTALLATION To install areafix: 1) compile and link areaqueue.c. Read the comments in it. 2) add aliases for areafix and "areafix's name" (see 'config') to your MTA config. Example for sendmail's /etc/aliases: areafix: |/usr/lib/ifmail/areafix/areaqueue " " /var/spool/ifmail/areafix areafix-service: sysop We assume that areaqueue program resides in /usr/lib/ifmail/areafix, request queue will is to be placed in /var/spool/ifmail/areafix and replys to angry areafix's messages are to be forwarded to user "sysop" of your system. 3) Edit 'config', 'restricted' and 'passwords' files. Read comments while editing. 4) Edit /etc/syslog.conf according to log facility chosen Example: local1.* /var/log/ifmail/areafix and create the log file if your syslogd wouldn't create it (e.g. in BSDI 1.1). 5) Add a proper line to your crontab in ordrer to run areafix.pl sometimes. Supply the full name of 'config' file as the 1st parameter. III. THE END All comments and suggestions send to yar@comp.chem.msu.su or to Yar Tikhiy, 2:5020/118. (C) 1994 Alex Tutubalin, 2:5020/96 (C) 1994,1995,1996 Andrew Kolchoogin & Alexey Kshnyakin, 2:5020/118 (C) 1996,1997 Yar Tikhiy, 2:5020/118 ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/areafix.pl100644 0 0 70137 6573551267 21365 0ustar rootroot#!/usr/bin/perl use Sys::Syslog; # run syslogd with -r if you want it to work. # locate Syslog.pm and if it doesn't exist, read the manpage for h2ph. # # bug: crashes in line ~300 if system does not appear in newsfeeds # but has areafix password. # # bug: run this as root, or it will zero your newsfeeds file. # # Revision 1.3 1998/08/01 18:03:41 fnet # Fixed for perl5. James Vahn 1:346/3 # # Revision 1.2 1997/04/19 13:23:31 fnet # gup3w-compatible locking added # # Revision 1.1 1997/04/09 13:52:10 fnet # Initial revision # # $VERSION = "0.5.07-jv12"; ## Type _full_ path below $CONFIGFILE="/usr/lib/ifmail/areafix/config"; $CONFIGFILE=$ARGV[0] if defined($ARGV[0]); ## main program :) &areafix(); sub areafix { &startup(); unless (&shlock($SEMAPHORE,1)) { if (time-(stat($SEMAPHORE))[9] > 86400) { die &log('alert',"Possibly hung areafix (PID=$oldpid)",0); } else { &log('warning',"Overlapping with areafix[$oldpid] - exiting",1); } return; } if ($NEWSLOCK && !&shlock("$NEWSLOCK/LOCK.newsfeeds",5)) { return; } &read_control_files(); &process_queue(); &finish(); &shunlock("$NEWSLOCK/LOCK.newsfeeds") if $NEWSLOCK; &shunlock($SEMAPHORE); } sub process_queue { local(@file,$file,$rc); @file=<$QUEUE/*>; foreach $file (@file) { if ( -f $file ) { open(IN,$file) || (&log('err',"Cannot open queue file $file",0), next); $rc=&process_message(); close(IN); if ($rc) { unlink($file) || &log('err',"Cannot unlink queue file $file",0); } else { &log('warning',"Bad message header in message ".&basename($file)." - moving to $QUEUE/bad",1); mkdir("$QUEUE/bad",0777) || (&log('err',"Cannot make directory $QUEUE/bad",0), next) unless ( -d "$QUEUE/bad" ); rename($file,"$QUEUE/bad/".&basename($file)) || &log('err',"Cannot move $file to $QUEUE/bad",0); } } } } sub process_message { &parse_header() || return 0; open(OUT,$MAILCOMMAND) || die &log('err',"Bad mailing command $MAILCOMMAND",0); &log('info',"Processing message from $USERADDR",1); print OUT "From: $ROBOT_NAME \<$ROBOT_NAME\@$ADDRESS\>\n"; print OUT "To: Sysop \<".(defined($REPLYTO)?$REPLYTO:$USERADDR)."\>\n"; print OUT "Subject: Reply from Area Manager\n\n"; if ( &newsfeeds_check($USERHOST) ) { if ( &passwd_check($USERHOST,$SUBJECT) ) { $SITE=$feeds{$USERHOST}; $IS_FTN_LINK=$SITE=~/^(p\d+\.)?f\d+\.n\d+$/ && !$NO_FIDO; $WIDE=!$IS_FTN_LINK; &process_message_body(); } else { &write_password_flame(); } } else { &write_address_flame(); } close(OUT); return 1; } sub startup { &read_config($CONFIGFILE) || die "Bad configuration file"; &openlog('areafix','cons,pid',$LOG_FACILITY); ##&log('info','Starting areafix',3); } sub finish { if($NEWSFEEDSCHANGED) { if ( -e $OUTNEWSFEEDS) { if ( -e $OUTNEWSFEEDS.".bak") { unlink($OUTNEWSFEEDS.".bak") || die &log('err',"Can not unlink file $OUTNEWSFEEDS.bak",0); } rename($OUTNEWSFEEDS,$OUTNEWSFEEDS.".bak") || die &log('err',"Can not rename file $OUTNEWSFEEDS to $OUTNEWSFEEDS.bak",0); } &write_newsfeeds($OUTNEWSFEEDS,$PASSIVE_NEWSFEEDS) || &log('err',"Cannot write newsfeeds",0); system("$RELOADCOMMAND"); &log('debug',"Newsfeeds reloaded",4); } close(IN); close(FORWARD) if ($DOING_FORWARD); ##&log('info','stopping areafix'); &closelog(); } ##--------- top-level functions sub passwd_check { return (defined $passwds{$_[0]}) && (&to_upper_case($_[1]) eq &to_upper_case($passwds{$_[0]})); } sub newsfeeds_check { return (defined $feeds{$_[0]}); } sub to_upper_case { $_[0]=~tr/[a-z]/[A-Z]/; return $_[0]; } sub quote_meta { local($c); foreach $c (('\.','\+','\$','\?','\/','\{','\}','\(','\)','\<','\>')) { $_[0]=~s/$c/$c/g; } return $_[0]; } sub wildmat_to_regexp { $_[0]=~s/\*/\\S\*/go; $_[0]="^"."e_meta($_[0])."\$"; } sub basename { local($s)=@_; return $1 if ($s=~m|.*/([^/]+)$|); return $s; } sub log { local($prio,$message,$level)=@_; $message=~s/%/%%/go; &syslog($prio,$message) if ($level<=$LOG_LEVEL); return($_[1]."\n"); } sub write_password_flame { print OUT "Your areafix password can't be found and the request\n"; print OUT "has been refused. Perhaps you didn't use the correct\n"; print OUT "password, please try again.\n"; &log('notice',"Remote $USERADDR gave incorrect password $SUBJECT",1); } sub write_restricted_flame { print OUT "$_[1]$_[0] -- '$_[0]' is restricted. You cannot change its status.\n"; &log('notice',"Remote $USERADDR attempted to \'$_[1]\' restricted echo (newsgroup) $_[0]",1); } sub write_address_flame { print OUT "Your site isn't configured for areafix here and\n"; print OUT "the request has been refused.\n"; &log('notice',"Site $USERHOST was not found in passwords/newsfeeds",1); } sub process_message_body { &build_hashes(); while () { last if (/^---/o); next if (/^\s*$/o); s/^\s*(.*)\s*$/$1/; if (defined($XCOM_TABLE{$_})) { &log('debug',"Read command: $_",3); &log('debug',"Translating $_ to ".$XCOM_TABLE{$_},3); $_=$XCOM_TABLE{$_}; } &log('info',"Executing command: $_",2); next if (/^\s*\%NOP\s*$/io); &print_help(), next if (/^%HELP$/io); &print_list(), next if (/^%LIST$/io); &do_wide(), next if (/^%WIDE$/io); &print_query(), next if (/^%QUERY$/io); &make_passive(), next if (/^%PASSIVE$/io); &make_active(), next if (/^%ACTIVE$/io); &print_unlinked(), next if (/^%UNLINKED$/io); &subscribe_to_ngroup($1), next if (/^%\+(\S+)/o); &unsubscribe_from_ngroup($1), next if (/^%-(\S+)/o); $NO_FIDO?&unsubscribe_from_ngroup($1):&unsubscribe($1), next if (/^\-(\S+)/o); $NO_FIDO?&subscribe_to_ngroup($1):&subscribe($1), next if (/^\+(\S+)/o); &print_invalid($_); } $patterns{$SITE}=join(",",sort(keys(%patt_hash))); } ## top-level commands processing sub make_passive { &log('debug',"Processing %PASSIVE operation",4); if ($passive{$SITE}==1) { print OUT "-----------------------------------------------------\n"; print OUT "%PASSIVE - your newsfeeds already have passive status\n"; print OUT "-----------------------------------------------------\n"; } else { $passive{$SITE}=1; $NEWSFEEDSCHANGED=1; print OUT "-------------------------------------------------\n"; print OUT "%PASSIVE - your newsfeeds have passive status now\n"; print OUT "-------------------------------------------------\n"; } } sub make_active { &log('debug',"Processing %ACTIVE operation",4); if ($passive{$SITE}==0) { print OUT "----------------------------------------------------\n"; print OUT "%ACTIVE - your news feeds already have active status\n"; print OUT "----------------------------------------------------\n"; } else { $passive{$SITE}=0; $NEWSFEEDSCHANGED=1; print OUT "------------------------------------------------\n"; print OUT "%ACTIVE - your news feeds have active status now\n"; print OUT "------------------------------------------------\n"; } } sub build_hashes { local($group); undef %patt_hash; undef %active_hash; foreach $group (split(",",$patterns{$SITE})) { $patt_hash{$group}=1; } foreach $group (@active) { $active_hash{$group}=1; } } sub subscribe { local($echo,@echoes,$curecho,@tmp,$curgroup); $echo=$_[0]; $echo=~tr/a-z/A-Z/; &log('debug',"Processing subscribe operation",4); &wildmat_to_regexp($echo); @tmp=grep(/$echo/,keys(%echo2ng)); foreach $curecho (@tmp) { push(@echoes,$curecho) if defined($active_hash{$echo2ng{$curecho}}); } if (defined(@echoes)) { foreach $curecho (@echoes) { $curgroup=$echo2ng{$curecho}; if (&findinrestricted($curgroup) || &findinrestricted($curecho)) { &write_restricted_flame($curecho,"+"); } elsif (!defined($patt_hash{$curgroup})) { $patt_hash{$curgroup}=1; $NEWSFEEDSCHANGED=1; print OUT "+$curecho -- Subscribed to $curecho\n"; &log('debug',"Remote subsribed to $curecho",5); } else { print OUT "+$curecho -- Already subscribed to $curecho\n"; &log('debug',"Remote already subscribed to $curecho",5); } } } else { print OUT "+$_[0] -- No such echo(es) here."; &log('notice',"Can not subscribe to $_[0] - no such echo",1); if ($FORWARD) { print OUT "Your request will be forwarded to our uplink. Try later.\n"; &log('notice',"This request will be forwarded to our uplink",1); &forward($_[0]); } else { print OUT "\n"; } } } sub subscribe_to_ngroup { local($group,@groups,$curgroup,@tmp); $group=$_[0]; $group=~tr/A-Z/a-z/; &log('debug',"Processing subscribe operation to newsgroup",4); &wildmat_to_regexp($group); if ($IS_FTN_LINK) { @tmp=grep(/$group/,keys(%ng2echo)); foreach $curgroup (@tmp) { push(@groups,$curgroup) if defined($active_hash{$curgroup}); } } else { @groups=grep(/$group/,@active); } if (defined(@groups)) { foreach $curgroup (@groups) { if (&findinrestricted($curgroup) || &findinrestricted($ng2echo{$curgroup})) { &write_restricted_flame($curgroup,"%+"); } elsif (!defined($patt_hash{$curgroup})) { $patt_hash{$curgroup}=1; $NEWSFEEDSCHANGED=1; print OUT "%+$curgroup -- Subscribed to $curgroup\n"; &log('debug',"Remote subsribed to $curgroup",5); } else { print OUT "%+$curgroup -- Already subscribed to $curgroup\n"; &log('debug',"Remote already subscribed to $curgroup",5); } } } else { print OUT "%+$_[0] -- No such group(s) here.\n"; &log('notice',"Can not subscribe to newsgroup $_[0]",1); } } sub torealname { local($tmp)=$_[0]; $tmp=~tr/[_ \.]/ /; return $tmp; } sub findinrestricted { local($fgroup,$fcurgroup); $fgroup=$_[0]; foreach $fcurgroup (keys(%restricted)) { return 1 if ($fgroup=~/$fcurgroup/i && $USERHOST=~/$restricted{$fcurgroup}/); } return 0; } sub forward { unless ($DOING_FORWARD) { open(FORWARD,$MAILCOMMAND) || (&log('err',"Bad mailing command $MAILCOMMAND",0),return); $SYSOP_NAME=~tr/[_ ]/./; print FORWARD "From: $SYSOP_NAME \<$SYSOP_NAME\@$ADDRESS\>\n"; print FORWARD "To: $UPLINK_ROBOT_NAME \<$UPLINK_ROBOT_NAME\@$UPLINK_ADDRESS\>\n"; print FORWARD "Subject: $UPLINK_PASSWORD\n\n"; $DOING_FORWARD=1; } print FORWARD "+$_[0]\n"; } sub unsubscribe { local($echo,$curecho,$curgroup,$unsubscribed); $echo=$_[0]; $echo=~tr/a-z/A-Z/; &log('debug',"Processing unsubscribe operation",4); &wildmat_to_regexp($echo); foreach $curgroup (keys(%patt_hash)) { $curecho=$ng2echo{$curgroup}; if ($curecho=~/$echo/) { if (&findinrestricted($curecho) || &findinrestricted($curgroup)) { &write_restricted_flame($curecho,"-"); } else { delete $patt_hash{$curgroup}; print OUT "-$curecho -- Unsubscribed\n"; &log('debug',"Remote unsubsribed from $curecho",5); } $unsubscribed=1; } } unless ($unsubscribed) { print OUT "-$_[0] -- No match in your subscription list.\n"; &log('debug',"Remote is not subscribed to $_[0]",5); } else { $NEWSFEEDSCHANGED=1; } } sub unsubscribe_from_ngroup { local($group,$curgroup,$unsubscribed); $group=$_[0]; $group=~tr/A-Z/a-z/; &log('debug',"Processing unsubscribe operation from newsgroup",4); &wildmat_to_regexp($group); foreach $curgroup (keys(%patt_hash)) { if ($curgroup=~/$group/) { if (&findinrestricted($curgroup) || &findinrestricted($ng2echo{$curgroup})) { &write_restricted_flame($curgroup,"%-"); } else { delete $patt_hash{$curgroup}; print OUT "%-$curgroup -- Unsubscribed\n"; &log('debug',"Remote unsubsribed from $curgroup",5); } $unsubscribed=1; } } unless ($unsubscribed) { print OUT "%-$_[0] -- No match in your subscription list\n"; &log('debug',"Remote is not subsribed to $_[0]",5); } else { $NEWSFEEDSCHANGED=1; } } sub print_list { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %LIST operation",4); print OUT "--------------------------------------------------------\n"; print OUT "These are the echos currently available on this node.\n"; print OUT "To get a complete list please send a file request for\n"; print OUT "'backbone.na'. New requests will be forwarded.\n"; print OUT "--------------------------------------------------------\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $group (sort($IS_FTN_LINK?values(%echo2ng):@active)) { if (defined($active_hash{$group})) { $echo=$ng2echo{$group}; $descr=defined($description{$group})?$description{$group}:$DESCRMISSING; write; } } select($oldfh); } sub do_wide { $WIDE=1; print OUT "%WIDE -- OK\n"; } sub print_invalid { print OUT "$_[0] -- invalid command\n"; } sub print_help { print OUT "--------------------------------------\n"; print OUT "In response to your request for %HELP\n"; print OUT "--------------------------------------\n"; print OUT "$HELP\n"; } format OUTWIDE= @<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $echo, $group, $descr . ; format OUT= @<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $echo, $descr . format NO_FIDO= @<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $group, $descr . sub print_query { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %QUERY operation",4); print OUT "---------------------------\n"; print OUT "In response to your %QUERY \n"; print OUT "---------------------------\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $group (sort(keys(%patt_hash))) { ##$echo=defined ($ng2echo{$group}) ? $ng2echo{$group}: "UNTRANSLATED"; #$echo=defined ($ng2echo{$group}) ? $ng2echo{$group}: " ----??----"; #$descr=defined( $description{$group}) ? $description{$group}:$DESCRMISSING; #if ($echo ne " ----??----") { write ; } $echo=$ng2echo{$group}; $descr=defined( $description{$group}) ? $description{$group}:$DESCRMISSING; if ($echo) { write ; } } select($oldfh); } sub print_unlinked { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %UNLINKED operation",4); print OUT "-------------------------------------------\n"; print OUT "You are %UNLINKED from the following echos:\n"; print OUT "-------------------------------------------\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $echo (sort(keys(%echo2ng))) { $group=$echo2ng{$echo}; unless (defined($patt_hash{$group})) { $descr=defined($description{$group})?$description{$group}:$DESCRMISSING; write ; } } select($oldfh); } # ---- RFC822-header parsing # $USERADDR - full address (user@host) # $USERNAME - username part # $USERHOST - host part ( $USERADDR eq "$USERNAME\@$USERHOST") # $SUBJECT - letter's subject # $FROM - From field # inputs from IN filehandle sub parse_addr { local($line)=@_; return $1 if ($line=~/^[^<]*<(\S+@\S+)>/o); return $1 if ($line=~/^(\S+@\S+)/o); } sub parse_header { undef $REPLYTO; undef $USERADDR; undef $SUBJECT; while() { last if (/^\s*$/o); ## empty string -- break next unless (($headline,$value)=/([^:]+):\s*(.*)\s*$/o); $SUBJECT=$value if ($headline=~/^Subject$/io); $USERADDR=&parse_addr($value) if ($headline=~/^From$/io); $REPLYTO=&parse_addr($value) if ($headline=~/^Reply-To$/io); } return 0 unless (defined($USERADDR) && defined($SUBJECT)); $USERNAME=""; ($USERNAME,$USERHOST)=split("@",$USERADDR); return 1; } ## ------- NEWSFEEDS MANIPULATION SUBS sub write_newsfeeds { local ($site,$groupstr,$outfile,$passive_outfile); $outfile=$_[0]; $passive_outfile=$_[1]; open(OutHandle,">".$outfile) || return 0; open(passive_OutHandle,">".$passive_outfile) || return 0; foreach $site (@sites) { $patterns{$site}="!*" if ($patterns{$site} eq ""); if ($passive{$site}==0) { print OutHandle $comments{$site}; print OutHandle $site; print OutHandle "/".$exclude{$site} unless($exclude{$site}eq""); print OutHandle "\\\n"; $groupstr=$patterns{$site}; $groupstr=~s|,|,\\\n\t|go; print OutHandle "\t:$groupstr\\\n"; print OutHandle ("\t/".$distribs{$site}."\\\n") unless($distribs{$site} eq ""); print OutHandle "\t:"; print OutHandle ($flags{$site}) unless ($flags{$site} eq ""); print OutHandle ":"; print OutHandle $params{$site} unless ($params{$site}eq ""); print OutHandle "\n"; } else { print passive_OutHandle $comments{$site}; print OutHandle $comments{$site}; print passive_OutHandle $site; print OutHandle $site; print passive_OutHandle "/".$exclude{$site} unless($exclude{$site}eq""); print OutHandle "/".$exclude{$site} unless($exclude{$site}eq""); print passive_OutHandle "\\\n"; print OutHandle "\\\n"; $groupstr=$patterns{$site}; $groupstr=~s|,|,\\\n\t|go; print passive_OutHandle "\t:$groupstr\\\n"; print OutHandle "\t:!*\\\n"; print passive_OutHandle ("\t/".$distribs{$site}."\\\n") unless($distribs{$site} eq ""); print passive_OutHandle "\t:"; print OutHandle "\t:"; print passive_OutHandle ($flags{$site}) unless ($flags{$site} eq ""); print passive_OutHandle ":"; print passive_OutHandle $params{$site} unless ($params{$site}eq ""); print passive_OutHandle "\n"; print OutHandle ($flags{$site}) unless ($flags{$site} eq ""); print OutHandle ":"; print OutHandle $params{$site} unless ($params{$site}eq ""); print OutHandle "\n"; } } print OutHandle $last_comment; close(OutHandle); close(passive_OutHandle); return 1; } ## ---------------- reading of config files sub read_control_files { &read_active($ACTIVE) || die &log('err',"Bad active file",0); &read_areas($ECHO2NEWS) || die &log('err',"Bad Areas file",0) unless $NO_FIDO; &read_help($HELPFILE) || die &log('err',"Bad help file",0); &read_newsgroups($NEWSGROUPS) || die &log('err',"Bad newsgroups file",0); &read_newsfeeds($NEWSFEEDS) || die &log('err',"Bad newsfeeds file",0); &read_passive_newsfeeds($PASSIVE_NEWSFEEDS) || die &log('err',"Bad passive newsfeeds file",0); &read_passwd($PASSWDFILE) || die &log('err',"Bad passwords file",0); &read_restricted($RESTFILE) || die &log('err',"Bad restricted file",0); $NEWSFEEDSCHANGED=0; $WIDE=0; } sub read_passwd { local($pwd_file,$host,$feed,$passwd); $pwd_file=$_[0]; open(pwd_Handle,$pwd_file) || die &log('err',"Cannot open $pwd_file",0); while() { chop; next if (/\s+#/o); next unless(($host,$feed,$passwd)=/([^:]+):([^:]+):([^:]+)/o); $passwds{$host}=$passwd; $feeds{$host}=$feed; } close(pwd_Handle); return 1; } sub read_newsgroups { local($ng_file); $ng_file=$_[0]; open(ng_Handle,$ng_file) || die &log('err',"Cannot open $ng_file",0); while(){ next if(/^\s*#/o); next unless(($group,$descr)=/^(\S+)\s+(.*)\s*$/o); $description{$group}=$descr; } close(ng_Handle); return 1; } sub read_newsfeeds { local($current_line,$temp_line,$commentstr,@newsfeeds); local($index,$nf_file,$site,$sitetmp); local($excl,$pats,$patstmp,$distr,$flgs,$param); $nf_file=$_[0]; $index=0; $commentstr=""; open(Handle,$nf_file) || die &log('err',"Cannot open $nf_file",0); push(@newsfeeds,$_) while ; close(Handle); input: while($_=shift(@newsfeeds)) { next input if /^$/o; $current_line=$_; if($current_line=~m/^\s*#/o) { $commentstr.=$current_line; next input; } chop($current_line); ##MSDOS while ($current_line=~/\\$/o ) { chop($current_line); chop($temp_line=shift(@newsfeeds)); $temp_line=~s/^\s*//o; $current_line .= $temp_line; } $sitestr=$current_line; ($sitetmp,$patstmp, $flgs, $param)=split(/:/,$sitestr); $site=$sitetmp; $pats=$patstmp; $excl=""; if ($sitetmp=~m|([^/]+)/([^/]+)|o) { $site=$1; $excl=$2; } $distr=""; if($patstmp=~m|([^/]+)/([^/]+)|o) { $pats=$1; $distr=$2; } $pats="" if ($pats eq "!*"); $sites[$index]=$site; $passive{$site}=0; $exclude{$site}=$excl; $patterns{$site}=$pats; $distribs{$site}=$distr; $flags{$site}=$flgs; $params{$site}=$param; $comments{$site}=$commentstr; $index++; $commentstr=""; } $last_comment=$commentstr; return 1; } sub read_passive_newsfeeds { $counter=""; local($current_line,$temp_line,$commentstr); local($nf_file,$site,$sitetmp,$index); local($excl,$pats,$patstmp,$distr,$flgs,$param,$counter); $nf_file=$_[0]; $commentstr=""; open(Handle,$nf_file) || die &log('err',"Cannot open $nf_file",0); input: while() { next input if /^$/o; $current_line=$_; if($current_line=~m/^\s*#/o) { $commentstr.=$current_line; next input; } chop($current_line); ##MSDOS while ($current_line=~/\\$/o) { chop($current_line); chop($temp_line=); $temp_line=~s/^\s*//o; $current_line.=$temp_line; } $sitestr=$current_line; ($sitetmp,$patstmp, $flgs, $param)=split(/:/,$sitestr); $site=$sitetmp; $pats=$patstmp; $excl=""; if ($sitetmp=~m|([^/]+)/([^/]+)|o) { $site=$1; $excl=$2; } $distr=""; if($patstmp=~m|([^/]+)/([^/]+)|o) { $pats=$1; $distr=$2; } $pats="" if ($pats eq "!*"); $passive{$site}=1; $exclude{$site}=$excl; $patterns{$site}=$pats; $distribs{$site}=$distr; $flags{$site}=$flgs; $params{$site}=$param; $comments{$site}=$commentstr; $commentstr=""; } close(Handle); return 1; } sub read_help { local($helpf); $helpf=$_[0]; open(HH,$helpf) || die &log('err',"Cannot open $helpf",0); $HELP=""; $HELP.=$_ while(); close(HH); return 1; } sub read_areas { local($areas_file,$echo,$ngroup); $areas_file=$_[0]; open(areas_Handle,$areas_file) || die &log('err',"Cannot open $areas_file",0); while() { next if (/^\s*#/o); next unless(($echo,$ngroup)=/(\S+)\s+(\S+)/o); next if ($echo=~/\*/o); $ngroup=~tr/A-Z/a-z/; $echo=~tr/a-z/A-Z/; $echo2ng{$echo}=$ngroup; $ng2echo{$ngroup}=$echo; } close(areas_Handle); return 1; } sub findinactive { local($tmp)=$_[0]; "e_meta($tmp); return grep(/^$tmp$/,@active); } sub read_active { local($active_file,$ngroup); $active_file=$_[0]; open(active_Handle,$active_file) || die &log('err',"Cannot open $active_file",0); while() { next if (/^\s*#/o); next unless(($ngroup)=/^(\S+)/o); push(@active,$ngroup); } close(active_Handle); return 1; } sub read_restricted { local($echo,$addrpatt); open(Handle,$_[0]) || die &log('err',"Cannot open $_[0]",0); while() { next if (/^\s*#/o); if (/^(\S+)\s+(\S+)/o) { $echo=$1; $addrpatt=$2; } elsif (/^(\S+)/o) { $echo=$1; $addrpatt='*'; } else { next; } &wildmat_to_regexp($echo); &wildmat_to_regexp($addrpatt); $restricted{$echo}=$addrpatt; } close(Handle); return 1; } sub read_config { local($config_file); $config_file=$_[0]; open(Handle,$config_file) || die "Cannot open $config_file"; while() { next if (/^\s*#/o); next unless(($keyword,$val)=/^(\S+)\s+(.*)\s*$/o); $NO_FIDO=($val!~/^FTN$/io) if ($keyword=~/^Afix_Mode$/io); $ROBOT_NAME=$val if ($keyword=~/^Robot$/io); $HELPFILE=$val if ($keyword=~/^HelpFile$/io); $NEWSFEEDS=$val if ($keyword=~/^NewsFeeds$/io); $PASSIVE_NEWSFEEDS=$val if ($keyword=~/^Passive_NewsFeeds$/io); $NEWSGROUPS=$val if ($keyword=~/^NewsGroups$/io); $ECHO2NEWS=$val if ($keyword=~/^Echo2News$/io); $ACTIVE=$val if ($keyword=~/^Active$/io); $RESTFILE=$val if ($keyword=~/^RestEcho$/io); $PASSWDFILE=$val if ($keyword=~/^PasswdFile$/io); $OUTNEWSFEEDS=$val if ($keyword=~/^OutNewsFeeds$/io); $MAILCOMMAND=$val if ($keyword=~/^MailCommand$/io); $DESCRMISSING=$val if ($keyword=~/^DescrMissing$/io); $RELOADCOMMAND=$val if ($keyword=~/^ReloadCommand$/io); $SYSOP_NAME=$val if ($keyword=~/^SysOp$/io); $ADDRESS=$val if ($keyword=~/^Address$/io); $UPLINK_ADDRESS=$val if ($keyword=~/^UpLink_Address$/io); $UPLINK_ROBOT_NAME=$val if ($keyword=~/^UpLink_Robot$/io); $UPLINK_PASSWORD=$val if ($keyword=~/^UpLink_Password$/io); $FORWARD=($val=~/^Yes$/io)?1:0 if ($keyword=~/^Forward$/io); $QUEUE=$val if ($keyword=~/^Queue$/io); $SEMAPHORE=$val if ($keyword=~/^Semaphore$/io); $NEWSLOCK=$val if ($keyword=~/^NewsLockDir$/io); $LOG_FACILITY=$val if ($keyword=~/^LogFacility$/io); $LOG_LEVEL=$val if ($keyword=~/^LogLevel$/io); $val=~/(\S+)\s*(\S+)/o,$XCOM_TABLE{$1}=$2 if ($keyword=~/^XlateCommand$/io); } $DESCRMISSING="Description missing" unless (defined($DESCRMISSING)); return (defined($ACTIVE) && ((defined($ECHO2NEWS) && defined($UPLINK_ADDRESS) && defined($UPLINK_ROBOT_NAME) && defined($UPLINK_PASSWORD)) || $NO_FIDO) && defined($NEWSGROUPS) && defined($HELPFILE) && defined($PASSWDFILE) && defined($OUTNEWSFEEDS) && defined($MAILCOMMAND) && defined($RELOADCOMMAND) && defined($SYSOP_NAME) && defined($ADDRESS) && defined($PASSIVE_NEWSFEEDS) && defined($NEWSFEEDS) && defined($SEMAPHORE) && defined($LOG_FACILITY)); } sub shlock { local($file,$try)=@_; local($pid,$n,$rc); open(F,">$file.$$") || die "Cannot open $file.$$\n$!"; print F $$; close F; $rc=1; until (link("$file.$$",$file)) { $rc=0, last if $try && $n++>=$try; open(F,$file) || die "Cannot open lock file: $!"; $pid=; close F; if ($pid && !kill(0,$pid)) { unlink($file) || die "Cannot unlink stale lock: $!"; next; } sleep(1); } unlink("$file.$$") || die "Cannot unlink temp lock file: $!"; return $rc; } sub shunlock { unlink($_[0]) || die "Cannot unlink lock file: $!"; } sub _POSIX_C_SOURCE {0;} ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/areaqueue.c100644 1751 50 1657 6540753002 21040 0ustar mdsrc/* A little program that places incoming letters for areafix to a queue. It's only parameter is the full name of the directory where the queue is to reside. The program's executable must be suid and sgid to "fnet" or a similar user in your system to avoid "Permission denied"s. Your MTA's alias 'areafix' must point to the program. Example for sendmail: areafix: |"/usr/lib/ifmail/areafix/areaqueue /var/spool/ifmail/aqueue" */ #include #include #include #include #include int main(int argc,char **argv) { int c; FILE *f; char s1[1024],s2[1024],name[32]; if (argc<2) return 2; sprintf(name,"%d%d",getpid(),time(NULL)); sprintf(s1,"%s/%s",argv[1],"tmp"); mkdir(s1,0700); sprintf(s1,"%s/%s",s1,name); sprintf(s2,"%s/%s",argv[1],name); umask(007); if ((f=fopen(s1,"w"))==NULL) return 2; while ((c=getchar())!=EOF) putc(c,f); fclose(f); if (rename(s1,s2)==-1) return 2; return 0; } ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/config100644 1751 50 7305 6420407565 20112 0ustar mdsrc# The AreaFix's main config file # # Areafix mode: FTN or non-FTN # # In FTN mode FTN links are allowed, non-FTN links can reference # newsgroups gated to FIDO by their echotags, and the echotags # are included in the lists generated by %LIST, %QUERY and %UNLINKED # commands. # # In non-FTN mode all links are non-FTN, echotags appear nowhere # and some configuration parameters are ignored (they marked as "FTN") # Afix_Mode FTN ##### ## General info ##### # # The name of the sysop of your station :) # SysOp Alexey Kshnyakin # # Your own address in domain style # Address f118.n5020.z2.fidonet.org # # The name that will be placed in To: field of areafix's reply. # Do not set it to 'areafix' because it may cause robot-to-robot mailing # Robot areafix-service # # Your uplink's areafix name - FTN # UpLink_Robot AreaFix # # Your uplink's address in domain style - FTN # UpLink_Address f400.n5020.z2.fidonet.org Uplink_Site f400.n5020 # # Your password for the uplink's robot - FTN # UpLink_Password 118vs400 ##### ## Path and file part -- use FULL pathnames ##### # # Queue directory path -- evidently must be equal to the one # in areaqueue's command line # Queue /staff/fnet/areafix/areafix/queue # # File containing your links' passwords # PasswdFile /etc/ifmail/areafix/passwords UplinkFile /staff/fnet/areafix/areafix/config/uplinks # # File to be mailed for %HELP command # HelpFile /staff/fnet/areafix/areafix/config/help # # INN's $NEWSLIB/newsfeeds # NewsFeeds /staff/fnet/areafix/areafix/news/newsfeeds # # Passive newsfeeds - newsfeeds of passive links are placed here # Passive_NewsFeeds /staff/fnet/areafix/areafix/news/newsfeeds.passive # # Output newdsfeeds file. Usually is equal to NewsFeeds, # but you may supply a different one for debugging purposes # OutNewsFeeds /staff/fnet/areafix/areafix/news/newsfeeds.out # # INN's $NEWSLIB/newsgroups # NewsGroups /staff/fnet/areafix/areafix/news/newsgroups # # INN's $NEWSLIB/active # Active /staff/fnet/areafix/areafix/news/active # # ifmail's Areas file - FTN # Echo2News /staff/fnet/areafix/areafix/news/Areas # # File containing restricted echoes. See it for descriptions # RestEcho /staff/fnet/areafix/areafix/config/restricted # # Command to be used for mail delivering # >foofile -- overwrite file "foofile" # >>foofile -- append to file "foofile" # |fooprog -- pipe to program "fooprog" # MailCommand >>/staff/fnet/areafix/areafix/outmail # MailCommand |/usr/sbin/sendmail -t # # Command to be used for INN's newsfeeds reloading # #ReloadCommand /news/bin/ctlinnd reload newsfeeds "Areafix request" ReloadCommand /dev/null #RmGroup /news/bin/ctlinnd rmgroup %g RmGroup echo '%g' >> rmgroup # # Semaphore file used to make sure that there is exactly one instance # of the areafix at a time # Semaphore /staff/fnet/areafix/areafix/tmp/areafix.semaphore # # INN's lock directory. # Used to create a GUP3W-compatible lock file. # NewsLockDir /var/news/locks ##### ## Miscellaneous parameters ##### # # Description for the newsgroups that have no one in newsgroups file # DescrMissing Description missing # # "Log facility" of syslogd to be used by areafix # (RTFM syslog(3) and syslog.conf(5)) # LogFacility local1 # # Log detail level # 0 - errors only # 1 - + names of users and miscellaneous warnings and security notices # 2 - + command reports # 3 - + 1st debug level # 4 - + 2nd # 5 - + 3rd # LogLevel 5 # # Whether to forward unmatched '+' requests to your uplink (Yes|No) # Forward Yes AutoUnsubscribe Yes EchoHierarchy fido7 # # Command translation. User's command equal to the 1st parameter # is substituted with the 2nd one. # Its main purpose is shown by the example below # Can appear a few times (for different translations) # XlateCommand +* %+fido7.* ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/help100644 1751 50 2157 6420407565 17575 0ustar mdsrc 1. Subscribing/unsubscribing + Subscribe to all echoes that match the pattern - Unsubscribe from all echoes that match the pattern %+ Subscribe to echoes by their corresponding newsgroup names %- Unsubscribe from echoes by their corresponding newsgroup names You may use '*' symbol in the patterns. 3. Areafix control/info commands 1) %HELP - get this message :) 2) %LIST - get the list of echoes present on our node 3) %WIDE - force areafix to send wide-format lists on %LIST, %QUERY and %UNLINKED commands. It means that you will get not only echo names and descriptions, but also corresponding newsgroup names (useful for %+ and %- commands) 4) %QUERY - get your subscription list 5) %UNLINKED - get the list of echoes that youa are NOT subscribed to 6) %PASSIVE - make your subscription passive. It means that you will receive no echoes until you send %ACTIVE command, but you do not loose your subscription list on our node 7) %ACTIVE - make your subscription active. You will get echoes again ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/passwords100644 1751 50 1002 6420407565 20656 0ustar mdsrc# Areafix's password file # Format: # :: # Every link must have an entry in the file or areafix wouldn't # recognize him # If Areafix is in FTN mode and a link's site name has a format like # p999.f999.n999 or f999.n999 the link is assumed an FTN one # # FTN links f223.n5020.z2.fidonet.org:f223.n5020:X f476.n5020.z2.fidonet.org:f476.n5020:FOO f514.n5020.z2.fidonet.org:f514.n5020:BAR # a non-FTN link foo.bar.org:news.bar.org:XYZZY news.cplire.ru:cplire:FOOZZY ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/restricted100644 1751 50 443 6420407565 20771 0ustar mdsrc# File of restricted echoes - your links can not subscribe to them # and unsubscribe from them. # Format: # [Address wildmat(3)-style pattern] # The default address pattern is '*' # *COORD* N5020.HUBS * N5020.SYSOP p*.* 118.PVT * comp.* * ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/uplinks100644 1751 50 574 6420407565 20313 0ustar mdsrc# # Uplink configuration # uplinks MUST be ordered in ascending "globalness" # # ::password: # # group list is a-la INN's newsfeeds but ! is unimplemented # f401.n5020:areafix@ddt.demos.xxx:password1:\ fido7.su.*,\ fido7.ru.* # f400.n5020:areafix@f400.n5020.z2.fidonet.xxx:password2:fido7.* # radio-msu:gup@radio-msu.xxx:password3:* ifmail-2.14tx8.10.orig/misc/contrib/areafix-0.5.07/areafix.pl.old100644 1751 50 102366 6540753002 21507 0ustar mdsrc#!/usr/bin/perl # # $Id: areafix.pl,v 1.2 1997/04/19 13:23:31 fnet Exp fnet $ # # $Log: areafix.pl,v $ # Revision 1.2 1997/04/19 13:23:31 fnet # gup3w-compatible locking added # # Revision 1.1 1997/04/09 13:52:10 fnet # Initial revision # # $VERSION="0.5.07"; ## Type _full_ path below $CONFIGFILE="/staff/fnet/areafix/areafix/config/config"; $CONFIGFILE=$ARGV[0] if defined($ARGV[0]); ## main program :) &areafix(); ## ïÐÉÓÁÎÉÅ ÇÌÏÂÁÌØÎÙÈ ÐÅÒÅÍÅÎÎÙÈ # # $CONFIGFILE - ÉÍÑ É ÐÏÌÎÙÊ ÐÕÔØ ÆÁÊÌÁ ËÏÎÆÉÇÕÒÁÃÉÉ. # # ðÅÒÅÍÅÎÎÙÅ, ××ÅÄÅÎÎÙÅ ÉÚ ËÏÎÆÉÇÁ # $NO_FIDO - ÉÓÐÏÌØÚÏ×ÁÔØ ÌÉ Areas # $SYSOP_NAME - ÉÍÑ ÓÉÓÔÅÍÎÏÇÏ ÏÐÅÒÁÔÏÒÁ # $ROBOT_NAME - ÉÍÑ ÒÏÂÏÔÁ × ÏÔ×ÅÔÁÈ ÎÁ ÚÁÐÒÏÓÙ # $ADDRESS - ÁÄÒÅÓ ÓÔÁÎÃÉÉ # $UPLINK_ROBOT_NAME - ÉÍÑ ÒÏÂÏÔÁ Õ ÁÐÌÉÎËÁ ( ÄÌÑ ÆÏÒ×ÁÒÄÉÎÇÁ ÚÁÐÒÏÓÏ× ) # $UPLINK_ADDRESS - ÁÄÒÅÓ ÁÐÌÉÎËÁ # $UPLINK_PASSWORD - ÐÁÒÏÌØ ÎÁ Area Manager Õ ÁÐÌÉÎËÁ # $QUEUE - ÐÕÔØ ÄÏ ÏÞÅÒÅÄÉ ÓÏÏÂÝÅÎÉÊ ÁÒÅÁÆÉËÓÕ # $ECHO2NEWS - ÐÕÔØ ÄÏ ifmail's areas file # $HELPFILE - ÐÕÔØ ÄÏ ÆÁÊÌÁ Ó ÈÅÌÐÏÍ # $ACTIVE - $NEWSLIB/active # $NEWSGROUPS - $NEWSLIB/newsgroups # $NEWSFEEDS - $NEWSLIB/newsfeeds # $PASSIVE_NEWSFEEDS - ÆÁÊÌ, × ËÏÔÏÒÙÊ ÐÏÍÅÝÁÅÔÓÑ ÓÁÊÔ ÐÏÓÌÅ ÐÏÄÁÞÉ ËÏÍÁÎÄÙ %PASSIVE # $NEWSLOCK - $LOCKS # $RESTFILE - ÐÕÔØ ÄÏ ÆÁÊÌÁ ÓÏ ÓÐÉÓËÏÍ "ÚÁÐÒÅÝÅÎÎÙÈ" ÜÈ # $MAILCOMMAND - ðÒÏÇÒÁÍÍÁ, ÐÏÓÙÌÁÀÝÁÑ ÐÉÓØÍÏ ( |/usr/sbin/sendmail -t ) # $OUTNEWSFEEDS - ðÕÔØ ÄÏ "×ÙÈÏÄÎÏÇÏ ÆÁÊÌÁ newsfeeds" -- ÏÂÙÞÎÏ # ÓÏ×ÐÁÄÁÅÔ Ó $NEWSFEEDS # $DESCRMISSING - "ïÐÉÓÁÎÉÅ" ÄÌÑ ÎØÀÓÇÒÕÐÐ, ÎÅ ÏÐÉÓÁÎÎÙÈ × $NEWSLIB/newsgroups # $RELOADCOMMAND - ëÁËÉÍ ÏÂÒÁÚÏÍ ÐÅÒÅÇÒÕÚÉÔØ newsfeeds # $UPLINK_PASSWORD - ðÁÒÏÌØ ÎÁ ÁÒÅÁÆÉËÓ ÁÐÌÉÎËÁ # $FORWARD - æÏÒ×ÁÒÄÉÔØ ÌÉ ÚÁÐÒÏÓÙ ÁÐÌÉÎËÕ # $LOG_FACILITY - log facility ÄÌÑ syslogd (ÓÍ. syslog(2)) # $LOG_LEVEL - ÕÒÏ×ÅÎØ ÐÏÄÒÏÂÎÏÓÔÉ ÌÏÇÁ # $XCOM_TABLE - ÔÁÂÌÉÃÁ ÔÒÁÎÓÌÑÃÉÉ ËÏÍÁÎÄ # $SEMAPHORE - óÅÍÁÆÏÒ (ÎÁ ×ÓÑËÉÊ ÓÌÕÞÁÊ :) # ## úÎÁÞÅÎÉÑ ÓÞÉÔÁÎÎÙÅ ÉÚ ×ÓÑËÉÈ ÆÁÊÌÏ× # # $HELP = ×ÅÓØ ÈÅÌÐ × ÏÄÎÏÊ ÓÔpÏËÅ # %passwds - ÐÁpÏÌÉ ÎÁ ÈÏÓÔ $passwds{"hostname"} # %feeds - ÉÍÅÎÁ ÆÉÄÏ× (ÓÁÊÔÏ×) ÉÚ newsfeeds $feeds{"hostname"} # %passive - ÉÍÅÎÁ ÆÉÄÏ× Ó ÚÁÐÁÓÓÉ×ÌÅÎÏÊ ÐÏÄÐÉÓËÏÊ. # %description - ÏÐÉÓÁÎÉÑ ÜÈ. ($description{$newsgroup}) # @restricted[$i] - ÓÐÉÓÏË ÜÈ, ÚÁÐÒÅÝÅÎÎÙÈ ÄÌÑ ÐÏÄÐÉÓËÉ. # @sites[$i] - ÉÍÅÎÁ ÆÉÄÏ× (i - ÉÎÄÅËÓ) # @exclude{$sites[i]} - ÉÈ exclude-ÉÍÅÎÁ # @patterns{$sites[i]} - ÓÐÉÓËÉ ÎØÀÓÇpÕÐÐ # @distribs{$sites[i]} - ÓÐÉÓËÉ distributions # @flags{$sites[i]} - ÆÌÁÇÉ # @params{$sites[i]} - ÐÁpÁÍÅÔpÙ # @comments{$sites[i]} - ËÏÍÍÅÎÔÁpÉÉ _ÐÅpÅÄ_ ËÁÖÄÙÍ ÓÁÊÔÏÍ # $lastcomment - ËÏÍÍÅÎÔÁpÉÊ ÐÏÓÌÅ ÐÏÓÌÅÄÎÅÇÏ ÓÁÊÔÁ # %echo2ng - ÔpÁÎÓÌÑÃÉÑ ÉÍÅÎ ÜÈ × ÎØÀÓÇpÕÐÐÙ $echo2ns{"newsgroup_name"} # %ng2echo - ÎÁÏÂÏpÏÔ # $active[$i] - newsgroup # ## óÞÉÔÁÎÎÙÅ ÉÚ ×ÈÏÄÎÏÇÏ ÐÉÓØÍÁ: # # $USERADDR - full address (user@host) # $USERNAME - username part # $USERHOST - host part ( $USERADDR eq "$USERNAME@$USERHOST") # $SUBJECT - letter's subject # $FROM - From field # $REPLYTO - Reply-To field # ## other: # $NEWSFEEDSCHANGED (==1 ÅÓÌÉ ÂÙÌÉ ËÏÍÍÁÎÄÙ add/delete) sub areafix { &startup(); unless (&shlock($SEMAPHORE,1)) { if (time-(stat($SEMAPHORE))[9] > 86400) { die &log('alert',"Possibly hung areafix (PID=$oldpid)",0); } else { &log('warning',"Overlapping with areafix[$oldpid] - exiting",1); } return; } if ($NEWSLOCK && !&shlock("$NEWSLOCK/LOCK.newsfeeds",5)) { return; } &read_control_files(); &process_queue(); &finish(); &shunlock("$NEWSLOCK/LOCK.newsfeeds") if $NEWSLOCK; &shunlock($SEMAPHORE); } sub process_queue { local(@file,$file,$rc); @file=<$QUEUE/*>; foreach $file (@file) { if ( -f $file ) { open(IN,$file) || (&log('err',"Cannot open queue file $file",0), next); $rc=&process_message(); close(IN); if ($rc) { unlink($file) || &log('err',"Cannot unlink queue file $file",0); } else { &log('warning',"Bad message header in message ".&basename($file)." - moving to $QUEUE/bad",1); mkdir("$QUEUE/bad",0777) || (&log('err',"Cannot make directory $QUEUE/bad",0), next) unless ( -d "$QUEUE/bad" ); rename($file,"$QUEUE/bad/".&basename($file)) || &log('err',"Cannot move $file to $QUEUE/bad",0); } } } } sub process_message { &parse_header() || return 0; open(OUT,$MAILCOMMAND) || die &log('err',"Bad mailing command $MAILCOMMAND",0); &log('info',"Processing message from $USERADDR",1); print OUT "From: $ROBOT_NAME@$ADDRESS\n"; print OUT "To: ".(defined($REPLYTO)?$REPLYTO:$USERADDR)."\n"; print OUT "Subject: Reply from Area Manager\n\n"; if ( &newsfeeds_check($USERHOST) ) { if ( &passwd_check($USERHOST,$SUBJECT) ) { $SITE=$feeds{$USERHOST}; $IS_FTN_LINK=$SITE=~/^(p\d+\.)?f\d+\.n\d+$/ && !$NO_FIDO; $WIDE=!$IS_FTN_LINK; &process_message_body(); } else { &write_password_flame(); } } else { &write_address_flame(); } close(OUT); return 1; } sub startup { &read_config($CONFIGFILE) || die "Bad configuration file"; require "syslog.pl"; &openlog('areafix','cons,pid',$LOG_FACILITY); &log('debug','Firing up',3); } sub finish { if($NEWSFEEDSCHANGED) { if ( -e $OUTNEWSFEEDS) { if ( -e $OUTNEWSFEEDS.".bak") { unlink($OUTNEWSFEEDS.".bak") || die &log('err',"Can not unlink file $OUTNEWSFEEDS.bak",0); } rename($OUTNEWSFEEDS,$OUTNEWSFEEDS.".bak") || die &log('err',"Can not rename file $OUTNEWSFEEDS to $OUTNEWSFEEDS.bak",0); } &write_newsfeeds($OUTNEWSFEEDS,$PASSIVE_NEWSFEEDS) || &log('err',"Cannot write newsfeeds",0); system("$RELOADCOMMAND"); &log('debug',"Newsfeeds reloaded",4); } close(IN); close(FORWARD) if ($DOING_FORWARD); &log('debug',"Shutting down",3); &closelog(); } ##--------- top-level functions sub passwd_check { return (defined $passwds{$_[0]}) && (&to_upper_case($_[1]) eq &to_upper_case($passwds{$_[0]})); } sub newsfeeds_check { return (defined $feeds{$_[0]}); } sub to_upper_case { $_[0]=~tr/[a-z]/[A-Z]/; return $_[0]; } sub quote_meta { local($c); foreach $c (('\.','\+','\$','\?','\/','\{','\}','\(','\)','\<','\>')) { $_[0]=~s/$c/$c/g; } return $_[0]; } sub wildmat_to_regexp { $_[0]=~s/\*/\\S\*/go; $_[0]="^"."e_meta($_[0])."\$"; } sub basename { local($s)=@_; return $1 if ($s=~m|.*/([^/]+)$|); return $s; } sub log { local($prio,$message,$level)=@_; $message=~s/%/%%/go; &syslog($prio,$message) if ($level<=$LOG_LEVEL); return($_[1]."\n"); } sub write_password_flame { print OUT "\nDear ".&torealname($USERNAME)."!\n\n"; print OUT "You gave incorrect password for Area Manager, so,\n"; print OUT "your AreaFix query will be refused. Please repeat\n"; print OUT "your request with correct password or contact\n"; print OUT "with ".&torealname($SYSOP_NAME).", our system operator.\n\n"; print OUT "\t\t Yours, AreaFix of $ADDRESS\n"; &log('notice',"Remote $USERADDR gave incorrect password $SUBJECT",1); } sub write_restricted_flame { print OUT "$_[1]$_[0] -- '$_[0]' is restricted. You cannot change its status.\n"; &log('notice',"Remote $USERADDR attempted to \'$_[1]\' restricted echo (newsgroup) $_[0]",1); } sub write_address_flame { print OUT "\nDear ".&torealname($USERNAME)."!\n\n"; print OUT "I'm terribly sorry, but your site is not present\n"; print OUT "in our newsfeeds file, so, you can not access\n"; print OUT "Area Manager on this node. Please, contact with\n"; print OUT &torealname($SYSOP_NAME).", our system operator.\n\n"; print OUT "\t\t Yours, AreaFix of $ADDRESS\n"; &log('notice',"Site $USERHOST was not found in newsfeeds",1); } sub process_message_body { &build_hashes(); while () { last if (/^---/o); next if (/^\s*$/o); s/^\s*(.*)\s*$/$1/; if (defined($XCOM_TABLE{$_})) { &log('debug',"Read command: $_",3); &log('debug',"Translating $_ to ".$XCOM_TABLE{$_},3); $_=$XCOM_TABLE{$_}; } &log('info',"Executing command: $_",2); next if (/^\s*\%NOP\s*$/io); &print_help(), next if (/^%HELP$/io); &print_list(), next if (/^%LIST$/io); &do_wide(), next if (/^%WIDE$/io); &print_query(), next if (/^%QUERY$/io); &make_passive(), next if (/^%PASSIVE$/io); &make_active(), next if (/^%ACTIVE$/io); &print_unlinked(), next if (/^%UNLINKED$/io); &subscribe_to_ngroup($1), next if (/^%\+(\S+)/o); &unsubscribe_from_ngroup($1), next if (/^%-(\S+)/o); $NO_FIDO?&unsubscribe_from_ngroup($1):&unsubscribe($1), next if (/^\-(\S+)/o); $NO_FIDO?&subscribe_to_ngroup($1):&subscribe($1), next if (/^\+(\S+)/o); &print_invalid($_); } $patterns{$SITE}=join(",",sort(keys(%patt_hash))); } ## top-level commands processing sub make_passive { &log('debug',"Processing %PASSIVE operation",4); if ($passive{$SITE}==1) { print OUT "%PASSIVE - your newsfeeds already have passive status\n"; } else { $passive{$SITE}=1; $NEWSFEEDSCHANGED=1; print OUT "%PASSIVE - your newsfeeds have passive status now\n"; } } sub make_active { &log('debug',"Processing %ACTIVE operation",4); if ($passive{$SITE}==0) { print OUT "%ACTIVE - your news feeds already have active status\n"; } else { $passive{$SITE}=0; $NEWSFEEDSCHANGED=1; print OUT "%ACTIVE - your news feeds have active status now\n"; } } sub build_hashes { local($group); undef %patt_hash; undef %active_hash; foreach $group (split(",",$patterns{$SITE})) { $patt_hash{$group}=1; } foreach $group (@active) { $active_hash{$group}=1; } } sub subscribe { local($echo,@echoes,$curecho,@tmp,$curgroup); $echo=$_[0]; $echo=~tr/a-z/A-Z/; &log('debug',"Processing subscribe operation",4); &wildmat_to_regexp($echo); @tmp=grep(/$echo/,keys(%echo2ng)); foreach $curecho (@tmp) { push(@echoes,$curecho) if defined($active_hash{$echo2ng{$curecho}}); } if (defined(@echoes)) { foreach $curecho (@echoes) { $curgroup=$echo2ng{$curecho}; if (&findinrestricted($curgroup) || &findinrestricted($curecho)) { &write_restricted_flame($curecho,"+"); } elsif (!defined($patt_hash{$curgroup})) { $patt_hash{$curgroup}=1; $NEWSFEEDSCHANGED=1; print OUT "+$curecho -- Subscribed to $curecho\n"; &log('debug',"Remote subsribed to $curecho",5); } else { print OUT "+$curecho -- Already subscribed to $curecho\n"; &log('debug',"Remote already subscribed to $curecho",5); } } } else { print OUT "+$_[0] -- No such echo(es) here."; &log('notice',"Can not subscribe to $_[0] - no such echo",1); if ($FORWARD) { print OUT " Your request will be forwarded to our uplink. Try later.\n"; &log('notice',"This request will be forwarded to our uplink",1); &forward($_[0]); } else { print OUT "\n"; } } } sub subscribe_to_ngroup { local($group,@groups,$curgroup,@tmp); $group=$_[0]; $group=~tr/A-Z/a-z/; &log('debug',"Processing subscribe operation to newsgroup",4); &wildmat_to_regexp($group); if ($IS_FTN_LINK) { @tmp=grep(/$group/,keys(%ng2echo)); foreach $curgroup (@tmp) { push(@groups,$curgroup) if defined($active_hash{$curgroup}); } } else { @groups=grep(/$group/,@active); } if (defined(@groups)) { foreach $curgroup (@groups) { if (&findinrestricted($curgroup) || &findinrestricted($ng2echo{$curgroup})) { &write_restricted_flame($curgroup,"%+"); } elsif (!defined($patt_hash{$curgroup})) { $patt_hash{$curgroup}=1; $NEWSFEEDSCHANGED=1; print OUT "%+$curgroup -- Subscribed to $curgroup\n"; &log('debug',"Remote subsribed to $curgroup",5); } else { print OUT "%+$curgroup -- Already subscribed to $curgroup\n"; &log('debug',"Remote already subscribed to $curgroup",5); } } } else { print OUT "%+$_[0] -- No such group(s) here.\n"; &log('notice',"Can not subscribe to newsgroup $_[0]",1); } } sub torealname { local($tmp)=$_[0]; $tmp=~tr/[_ \.]/ /; return $tmp; } sub findinrestricted { local($fgroup,$fcurgroup); $fgroup=$_[0]; foreach $fcurgroup (keys(%restricted)) { return 1 if ($fgroup=~/$fcurgroup/i && $USERHOST=~/$restricted{$fcurgroup}/); } return 0; } sub forward { unless ($DOING_FORWARD) { open(FORWARD,$MAILCOMMAND) || (&log('err',"Bad mailing command $MAILCOMMAND",0),return); $SYSOP_NAME=~tr/[_ ]/./; print FORWARD "From: $SYSOP_NAME@$ADDRESS\n"; print FORWARD "To: $UPLINK_ROBOT_NAME@$UPLINK_ADDRESS\n"; print FORWARD "Subject: $UPLINK_PASSWORD\n\n"; $DOING_FORWARD=1; } print FORWARD "+$_[0]\n"; } sub unsubscribe { local($echo,$curecho,$curgroup,$unsubscribed); $echo=$_[0]; $echo=~tr/a-z/A-Z/; &log('debug',"Processing unsubscribe operation",4); &wildmat_to_regexp($echo); foreach $curgroup (keys(%patt_hash)) { $curecho=$ng2echo{$curgroup}; if ($curecho=~/$echo/) { if (&findinrestricted($curecho) || &findinrestricted($curgroup)) { &write_restricted_flame($curecho,"-"); } else { delete $patt_hash{$curgroup}; print OUT "-$curecho -- Unsubscribed\n"; &log('debug',"Remote unsubsribed from $curecho",5); } $unsubscribed=1; } } unless ($unsubscribed) { print OUT "-$_[0] -- No match in your subscription list\n"; &log('debug',"Remote is not subsribed to $_[0]",5); } else { $NEWSFEEDSCHANGED=1; } } sub unsubscribe_from_ngroup { local($group,$curgroup,$unsubscribed); $group=$_[0]; $group=~tr/A-Z/a-z/; &log('debug',"Processing unsubscribe operation from newsgroup",4); &wildmat_to_regexp($group); foreach $curgroup (keys(%patt_hash)) { if ($curgroup=~/$group/) { if (&findinrestricted($curgroup) || &findinrestricted($ng2echo{$curgroup})) { &write_restricted_flame($curgroup,"%-"); } else { delete $patt_hash{$curgroup}; print OUT "%-$curgroup -- Unsubscribed\n"; &log('debug',"Remote unsubsribed from $curgroup",5); } $unsubscribed=1; } } unless ($unsubscribed) { print OUT "%-$_[0] -- No match in your subscription list\n"; &log('debug',"Remote is not subsribed to $_[0]",5); } else { $NEWSFEEDSCHANGED=1; } } sub print_list { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %LIST operation",4); print OUT "\%LIST\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $group (sort($IS_FTN_LINK?values(%echo2ng):@active)) { if (defined($active_hash{$group})) { $echo=$ng2echo{$group}; $descr=defined($description{$group})?$description{$group}:$DESCRMISSING; write; } } select($oldfh); } sub do_wide { $WIDE=1; print OUT "%WIDE -- OK\n"; } sub print_invalid { print OUT "$_[0] -- invalid command\n"; } sub print_help { print OUT "%HELP\n$HELP\n"; } format OUTWIDE= @<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $echo, $group, $descr . ; format OUT= @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $echo, $descr . format NO_FIDO= @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $group, $descr . sub print_query { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %QUERY operation",4); print OUT "\%QUERY\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $group (sort(keys(%patt_hash))) { $echo=defined ($ng2echo{$group}) ? $ng2echo{$group}: "UNTRANSLATED"; $descr=defined( $description{$group})? $description{$group}:$DESCRMISSING; write ; } select($oldfh); } sub print_unlinked { local($echo,$group,$descr,$oldfh); &log('debug',"Processing %UNLINKED operation",4); print OUT "\%UNLINKED\n"; $oldfh=select(OUT); $~=$NO_FIDO?NO_FIDO:($WIDE?OUTWIDE:OUT); foreach $echo (sort(keys(%echo2ng))) { $group=$echo2ng{$echo}; unless (defined($patt_hash{$group})) { $descr=defined($description{$group})?$description{$group}:$DESCRMISSING; write ; } } select($oldfh); } # ---- RFC822-header parsing # $USERADDR - full address (user@host) # $USERNAME - username part # $USERHOST - host part ( $USERADDR eq "$USERNAME@$USERHOST") # $SUBJECT - letter's subject # $FROM - From field # inputs from IN filehandle sub parse_addr { local($line)=@_; return $1 if ($line=~/^[^<]*<(\S+@\S+)>/o); return $1 if ($line=~/^(\S+@\S+)/o); } sub parse_header { undef $REPLYTO; undef $USERADDR; undef $SUBJECT; while() { last if (/^\s*$/o); ## empty string -- break next unless (($headline,$value)=/([^:]+):\s*(.*)\s*$/o); $SUBJECT=$value if ($headline=~/^Subject$/io); $USERADDR=&parse_addr($value) if ($headline=~/^From$/io); $REPLYTO=&parse_addr($value) if ($headline=~/^Reply-To$/io); } return 0 unless (defined($USERADDR) && defined($SUBJECT)); ($USERNAME,$USERHOST)=split("@",$USERADDR); return 1; } ## ------- NEWSFEEDS MANIPULATION SUBS sub write_newsfeeds { local ($site,$groupstr,$outfile,$passive_outfile); $outfile=$_[0]; $passive_outfile=$_[1]; open(outhandle,">".$outfile) || return 0; open(passive_outhandle,">".$passive_outfile) || return 0; foreach $site (@sites) # äÌÑ ×ÓÅÈ ÓÁÊÔÏ× ! { # Ô.Ë. Õ inn ÐÏ ÕÍÏÌÞÁÎÉÀ ÐÏÄÐÉÓËÁ - *, ÔÏ... $patterns{$site}="!*" if ($patterns{$site} eq ""); if ($passive{$site}==0) { print outhandle $comments{$site}; # ëÏÍÍÅÎÔÁÒÉÊ ÐÅÒÅÄ ÓÁÊÔÏÍ print outhandle $site; # óÏÂÓÔ×ÅÎÎÏ ÓÁÊÔ print outhandle "/".$exclude{$site} unless($exclude{$site}eq""); # ÷ÓÅ ÔÅ, ËÏÔÏÒÙÅ ÐÏÄÈÏÄÑÔ # ÐÏÄ ÐÁÔÔÅÒÎ ÄÌÑ ÄÁÎÎÏÇÏ ÓÁÊÔÁ, ÎÏ ÎÁ ËÏÇÏ ÐÏÄÐÉÓËÁ ÓÁÊÔÁ ÎÅ ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ. print outhandle "\\\n"; # ÚÁÐÉÛÅÍ \ É ÐÅÒÅ×ÏÄ ÓÔÒÏËÉ. $groupstr=$patterns{$site}; # ÐÏÄÅÌÉÍ ÏÄÎÕ ÓÔÒÏÞËÕ ÐÏÄÐÉÓËÉ ÔÁË, $groupstr=~s|,|,\\\n\t|go; # ÞÔÏÂÙ ËÁÖÄÁÑ ÎØÀÓÇÒÕÐÐÁ ÂÙÌÁ ÎÁ Ó×ÏÅÊ ÓÔÒÏËÅ print outhandle "\t:$groupstr\\\n"; # É ÚÁÓÕÎÅÍ ÅÅ × newsfeeds print outhandle ("\t/".$distribs{$site}."\\\n") unless($distribs{$site} eq ""); # á ÔÁËÖÅ ÚÁÓÕÎÅÍ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÅ, ÅÓÌÉ ÏÎÏ ÅÓÔØ ... print outhandle "\t:"; print outhandle ($flags{$site}) unless ($flags{$site} eq ""); # ... É ÆÌÁÇÉ ... print outhandle ":"; print outhandle $params{$site} unless ($params{$site}eq ""); # ... Ó ÐÁÒÁÍÅÔÒÁÍÉ. print outhandle "\n"; } else { print passive_outhandle $comments{$site}; # ëÏÍÍÅÎÔÁÒÉÊ ÐÅÒÅÄ ÓÁÊÔÏÍ print outhandle $comments{$site}; # ëÏÍÍÅÎÔÁÒÉÊ ÐÅÒÅÄ ÓÁÊÔÏÍ print passive_outhandle $site; # óÏÂÓÔ×ÅÎÎÏ ÓÁÊÔ print outhandle $site; # óÏÂÓÔ×ÅÎÎÏ ÓÁÊÔ print passive_outhandle "/".$exclude{$site} unless($exclude{$site}eq""); # ÷ÓÅ ÔÅ, ËÏÔÏÒÙÅ ÐÏÄÈÏÄÑÔ print outhandle "/".$exclude{$site} unless($exclude{$site}eq""); # ÷ÓÅ ÔÅ, ËÏÔÏÒÙÅ ÐÏÄÈÏÄÑÔ # ÐÏÄ ÐÁÔÔÅÒÎ ÄÌÑ ÄÁÎÎÏÇÏ ÓÁÊÔÁ, ÎÏ ÎÁ ËÏÇÏ ÐÏÄÐÉÓËÁ ÓÁÊÔÁ ÎÅ ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ. print passive_outhandle "\\\n"; # ÚÁÐÉÛÅÍ \ É ÐÅÒÅ×ÏÄ ÓÔÒÏËÉ. print outhandle "\\\n"; # ÚÁÐÉÛÅÍ \ É ÐÅÒÅ×ÏÄ ÓÔÒÏËÉ. $groupstr=$patterns{$site}; # ÐÏÄÅÌÉÍ ÏÄÎÕ ÓÔÒÏÞËÕ ÐÏÄÐÉÓËÉ ÔÁË, $groupstr=~s|,|,\\\n\t|go; # ÞÔÏÂÙ ËÁÖÄÁÑ ÎØÀÓÇÒÕÐÐÁ ÂÙÌÁ ÎÁ Ó×ÏÅÊ ÓÔÒÏËÅ print passive_outhandle "\t:$groupstr\\\n"; # É ÚÁÓÕÎÅÍ ÅÅ × passive newsfeeds print outhandle "\t:!*\\\n"; # É ÚÁÓÕÎÅÍ !* × newsfeeds print passive_outhandle ("\t/".$distribs{$site}."\\\n") unless($distribs{$site} eq ""); # á ÔÁËÖÅ ÚÁÓÕÎÅÍ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÅ, ÅÓÌÉ ÏÎÏ ÅÓÔØ ... print passive_outhandle "\t:"; print outhandle "\t:"; print passive_outhandle ($flags{$site}) unless ($flags{$site} eq ""); # ... É ÆÌÁÇÉ ... print passive_outhandle ":"; print passive_outhandle $params{$site} unless ($params{$site}eq ""); # ... Ó ÐÁÒÁÍÅÔÒÁÍÉ. print passive_outhandle "\n"; print outhandle ($flags{$site}) unless ($flags{$site} eq ""); # ... É ÆÌÁÇÉ ... print outhandle ":"; print outhandle $params{$site} unless ($params{$site}eq ""); # ... Ó ÐÁÒÁÍÅÔÒÁÍÉ. print outhandle "\n"; } } print outhandle $last_comment; # É ËÏÍÍÅÎÔÁÒÉÊ ÐÏÓÌÅ ÐÏÓÌÅÄÎÅÇÏ ÓÁÊÔÁ. close(outhandle); close(passive_outhandle); return 1; } ## ---------------- reading of config files sub read_control_files { &read_active($ACTIVE) || die &log('err',"Bad active file",0); &read_areas($ECHO2NEWS) || die &log('err',"Bad Areas file",0) unless $NO_FIDO; &read_help($HELPFILE) || die &log('err',"Bad help file",0); &read_newsgroups($NEWSGROUPS) || die &log('err',"Bad newsgroups file",0); &read_newsfeeds($NEWSFEEDS) || die &log('err',"Bad newsfeeds file",0); &read_passive_newsfeeds($PASSIVE_NEWSFEEDS) || die &log('err',"Bad passive newsfeeds file",0); &read_passwd($PASSWDFILE) || die &log('err',"Bad passwords file",0); &read_restricted($RESTFILE) || die &log('err',"Bad restricted file",0); $NEWSFEEDSCHANGED=0; $WIDE=0; } ## ---------------- passwd.pl -------------------- # ÞÔÅÎÉÅ passwd # %passwds - ÐÁpÏÌØ ÎÁ ÈÏÓÔ $passwds{"hostname"} # %feeds - ÉÍÅÎÁ ÆÉÄÏ× (ÓÁÊÔÏ×) ÉÚ newsfeeds $feeds{"hostname"} # sub read_passwd { local($pwd_file,$host,$feed,$passwd); $pwd_file=$_[0]; open(pwd_handle,$pwd_file) || die &log('err',"Cannot open $pwd_file",0); while() { chop; next if (/\s+#/o); next unless(($host,$feed,$passwd)=/([^:]+):([^:]+):([^:]+)/o); $passwds{$host}=$passwd; $feeds{$host}=$feed; } close(pwd_handle); return 1; } ## ----------- newsgrou.pl ----------------- # þÔÅÎÉÅ ÆÁÊÌÁ newsgroups × ÍÁÓÓÉ× # %description - ÏÐÉÓÁÎÉÑ ÜÈ. ($description{$newsgroup}) sub read_newsgroups { local($ng_file); $ng_file=$_[0]; open(ng_handle,$ng_file) || die &log('err',"Cannot open $ng_file",0); while(){ next if(/^\s*#/o); next unless(($group,$descr)=/^(\S+)\s+(.*)\s*$/o); $description{$group}=$descr; } close(ng_handle); return 1; } ## ------------------ newsfeed.pl ----------------- # newsfeeds parser # ðÏÌÕÞÁÅÔ ÎÁ ×ÈÏÄ ÉÍÑ ÆÁÊÌÁ Ó newsfeeds, # ÐÁpÓÉÔ ÅÇÏ × ÔÁËÉÅ ÍÁÓÓÉ×Ù: # @sites[$i] - ÉÍÅÎÁ ÆÉÄÏ× (i - ÉÎÄÅËÓ) # @exclude{$sites[i]} - ÉÈ exclude-ÉÍÅÎÁ # @patterns{$sites[i]} - ÓÐÉÓËÉ ÎØÀÓÇpÕÐÐ # @distribs{$sites[i]} - ÓÐÉÓËÉ distributions # @flags{$sites[i]} - ÆÌÁÇÉ # @params{$sites[i]} - ÐÁpÁÍÅÔpÙ # @comments{$sites[i]} - ËÏÍÍÅÎÔÁpÉÉ _ÐÅpÅÄ_ ËÁÖÄÙÍ ÓÁÊÔÏÍ # $lastcomment - ËÏÍÍÅÎÔÁpÉÊ ÐÏÓÌÅ ÐÏÓÌÅÄÎÅÇÏ ÓÁÊÔÁ sub read_newsfeeds { local($current_line,$temp_line,$commentstr,@newsfeeds); local($index,$nf_file,$site,$sitetmp); local($excl,$pats,$patstmp,$distr,$flgs,$param); $nf_file=$_[0]; $index=0; $commentstr=""; open(handle,$nf_file) || die &log('err',"Cannot open $nf_file",0); push(@newsfeeds,$_) while ; close(handle); # á ÔÅÐÅÒØ Ó ÞÉÓÔÏÊ ÓÏ×ÅÓÔØÀ ÚÁËÒÏÅÍ ÆÁÊÌ Ó newsfeeds ! input: while($_=shift(@newsfeeds)) { next input if /^$/o; # ðÕÓÔÙÅ ÓÔÒÏËÉ × newsfeeds ÐÒÏÐÕÓËÁÀÔÓÑ. ## þÉÔÁÅÍ ÐÏÄÒÑÄ ÓÔÒÏËÉ ÉÚ newsfeeds ... $current_line=$_; # úÁÐÏÍÉÎÁÅÍ ÔÅËÕÝÕÀ ÓÔÒÏËÕ. if($current_line=~m/^\s*#/o) # åÓÌÉ ÔÅËÕÝÁÑ ÓÔÒÏËÁ - ËÏÍÍÅÎÔÁÒÉÊ, # Ô.Å. Ó ÎÁÞÁÌÁ ÓÔÒÏËÉ ÐÅÒ×ÙÊ ÎÅ ÐÒÏÂÅÌ - ÜÔÏ # ÒÅÛÅÔËÁ ( # ), ÔÏ { $commentstr.=$current_line; # ÄÏÂÁ×ÌÑÅÍ ÅÅ ÓÏÄÅÒÖÉÍÏÅ Ë ËÏÍÍÅÎÔÁÒÉÀ next input; # ÓÎÏ×Á ÎÁ ××ÏÄ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÉ ! } ## ôÅËÕÝÁÑ ÓÔÒÏËÁ - ÎÅ ËÏÍÍÅÎÔÁÒÉÊ ... chop($current_line); ##MSDOS ## öÕÔËÁÑ ÏÐÅÒÁÃÉÑ: ÚÁÇÏÎÑÅÍ ÜÌÅÍÅÎÔ newsfeeds ÄÌÑ ËÁÖÄÏÇÏ site, ËÏ- ## ÔÏÒÙÊ, ÅÓÔÅÓÔ×ÅÎÎÏ, ÍÏÖÅÔ ÚÁÎÉÍÁÔØ ÎÅÓËÏÌØËÏ ÓÔÒÏË ( × ËÏÎÃÅ ËÁÖÄÏÊ, ## ËÁË É × C, ÓÔÏÉÔ \ ÄÌÑ "ÕÂÉ×ÁÎÉÑ" ÍÎÏÇÏÓÔÒÏÞÎÏÓÔÉ ) × ÏÄÎÕ ... while ($current_line=~/\\$/o ) # éÔÁË, ÐÏËÁ ÓÔÒÏËÁ ÎÅ ËÏÎÞÉÌÁÓØ ... { chop($current_line); # ÕÂÉ×ÁÅÍ \ × ËÏÎÃÅ ... chop($temp_line=shift(@newsfeeds)); # ÞÉÔÁÅÍ ÓÌÅÄÕÀÝÕÀ, ÕÂÉ×ÁÑ \n ... $temp_line=~s/^\s*//o; # ÐÒÉÂÉ×ÁÅÍ ÌÉÄÉÒÕÀÝÉÅ ÐÒÏÂÅÌÙ ... $current_line .= $temp_line; # É ÐÒÉÓÏÅÄÉÎÑÅÍ ÅÅ Ë ÔÏÍÕ, ÞÔÏ ÕÖÅ ÐÒÏÞÉÔÁÌÉ. } $sitestr=$current_line; ## ÷ÏÔ ÔÕÔ ÍÙ ÐÏÌÕÞÉÌÉ ×ÓÀ ÉÎÆÏÒÍÁÃÉÀ Ï ÐÏÄÐÉÓËÅ site × ÏÄÎÏÊ ÓÔÒÏËÅ × ÆÏÒ- ## ÍÁÔÅ: ::: ... ($sitetmp,$patstmp, $flgs, $param)=split(/:/,$sitestr); # äÙË ÐÏÄÅÌÉÍ ÅÅ ÎÁ ÜÔÉ ÞÅÔÙÒÅ ÞÁÓÔÉ ! $site=$sitetmp; # $site - ÉÍÑ ÓÁÊÔÁ. $pats=$patstmp; # $pats - ÅÇÏ ÐÏÄÐÉÓËÁ. $excl=""; # $excl - ËÔÏ ÐÏÄÈÏÄÉÔ ÐÏÄ ÓÁÊÔ, ÎÏ ÎÁ ËÏÇÏ ÐÏÄÐÉÓËÁ ÎÅ ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ ... ## ôÅÐÅÒØ ÐÏÄÅÌÉÍ ÉÍÑ ÓÁÊÔÁ ÎÁ ÓÏÂÓÔ×ÅÎÎÏ ÓÁÊÔ, É ÔÅÈ, ÎÁ ËÏÇÏ ÐÏÄÐÉÓËÁ ## ÓÁÊÔÁ ÎÅ ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ ... if ($sitetmp=~m|([^/]+)/([^/]+)|o) { $site=$1; $excl=$2; } $distr=""; # $distr - ÐÒÏ×ÅÒËÁ ÎÁ newsgroup distribution ## á ÔÅÐÅÒØ ÐÏÄÅÌÉÍ ÐÏÄÐÉÓËÕ ÎÁ ÓÏÂÓÔ×ÅÎÎÏ ÐÏÄÐÉÓËÕ É ÅÅ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÅ. if($patstmp=~m|([^/]+)/([^/]+)|o) { $pats=$1; $distr=$2; } $pats="" if ($pats eq "!*"); ## îÕ É ÒÁÚÌÏÖÉÍ ×ÓÅ ÐÏ ÐÏÌÏÞËÁÍ: $sites[$index]=$site; # éÍÑ ÓÁÊÔÁ -> × ÍÁÓÓÉ× ÓÁÊÔÏ× ... $passive{$site}=0; $exclude{$site}=$excl; # éÓËÌÀÞÅÎÉÑ -> × ÍÁÓÓÉ× ÉÓËÌÀÞÅÎÉÊ ... $patterns{$site}=$pats; # ðÏÄÐÉÓËÕ ... $distribs{$site}=$distr; # òÁÓÐÒÏÓÔÒÁÎÅÎÉÅ ... $flags{$site}=$flgs; # æÌÁÇÉ ... $params{$site}=$param; # ðÁÒÁÍÅÔÒÙ ... $comments{$site}=$commentstr; # ëÏÍÍÅÎÔÁÒÉÉ ... $index++; # õ×ÅÌÉÞÉÍ ÎÏÍÅÒ ÓÁÊÔÁ ÎÁ 1 ... $commentstr=""; # ïÂÎÕÌÉÍ ÓÔÒÏËÕ Ó ËÏÍÍÅÎÔÁÒÉÅÍ ... } $last_comment=$commentstr; # á ÔÁËÖÅ ÚÁÐÏÍÎÉÍ ËÏÍÍÅÎÔÁÒÉÊ ÐÏÓÌÅ ÐÏÓÌÅÄÎÅÇÏ ÐÏÄÐÉÓÞÉËÁ. return 1; } sub read_passive_newsfeeds { local($current_line,$temp_line,$commentstr); local($nf_file,$site,$sitetmp,$index); local($excl,$pats,$patstmp,$distr,$flgs,$param,$counter); $nf_file=$_[0]; $commentstr=""; open(handle,$nf_file) || die &log('err',"Cannot open $nf_file",0); input: while() { next input if /^$/o; $current_line=$_; if($current_line=~m/^\s*#/o) { $commentstr.=$current_line; next input; } chop($current_line); ##MSDOS while ($current_line=~/\\$/o) { chop($current_line); chop($temp_line=); $temp_line=~s/^\s*//o; $current_line.=$temp_line; } $sitestr=$current_line; ($sitetmp,$patstmp, $flgs, $param)=split(/:/,$sitestr); $site=$sitetmp; $pats=$patstmp; $excl=""; if ($sitetmp=~m|([^/]+)/([^/]+)|o) { $site=$1; $excl=$2; } $distr=""; if($patstmp=~m|([^/]+)/([^/]+)|o) { $pats=$1; $distr=$2; } $pats="" if ($pats eq "!*"); $passive{$site}=1; $exclude{$site}=$excl; $patterns{$site}=$pats; $distribs{$site}=$distr; $flags{$site}=$flgs; $params{$site}=$param; $comments{$site}=$commentstr; $commentstr=""; } close(handle); return 1; } ## ---------------- read help file -------------- # ÞÔÅÎÉÅ HELP'Á # $HELP = ×ÅÓØ ÈÅÌÐ × ÏÄÎÏÊ ÓÔpÏËÅ # sub read_help { local($helpf); $helpf=$_[0]; open(hh,$helpf) || die &log('err',"Cannot open $helpf",0); $HELP=""; $HELP.=$_ while(); close(hh); return 1; } ## ------------ read areas file ------------------ # úÁÐÏÌÎÅÎÉÅ ÍÁÓÓÉ×Ï×: # %echo2ng - ÔpÁÎÓÌÑÃÉÑ ÉÍÅÎ ÜÈ × ÎØÀÓÇpÕÐÐÙ $echo2ns{"newsgroup_name"} # %ng2echo - ÎÁÏÂÏpÏÔ sub read_areas { local($areas_file,$echo,$ngroup); $areas_file=$_[0]; open(areas_handle,$areas_file) || die &log('err',"Cannot open $areas_file",0); while() { next if (/^\s*#/o); next unless(($echo,$ngroup)=/(\S+)\s+(\S+)/o); next if ($echo=~/\*/o); $ngroup=~tr/A-Z/a-z/; $echo=~tr/a-z/A-Z/; $echo2ng{$echo}=$ngroup; $ng2echo{$ngroup}=$echo; } close(areas_handle); return 1; } sub findinactive { local($tmp)=$_[0]; "e_meta($tmp); return grep(/^$tmp$/,@active); } ## --------- read active file ----------------------- # úÁÐÏÌÎÅÎÉÅ ÍÁÓÓÉ×Ï×: # $active[$i] # sub read_active { local($active_file,$ngroup); $active_file=$_[0]; open(active_handle,$active_file) || die &log('err',"Cannot open $active_file",0); while() { next if (/^\s*#/o); next unless(($ngroup)=/^(\S+)/o); push(@active,$ngroup); } close(active_handle); return 1; } ## --------- read restricted file ----------------------- # úÁÐÏÌÎÅÎÉÅ ÍÁÓÓÉ×Ï×: # $restricted[$i] sub read_restricted { local($echo,$addrpatt); open(handle,$_[0]) || die &log('err',"Cannot open $_[0]",0); while() { next if (/^\s*#/o); if (/^(\S+)\s+(\S+)/o) { $echo=$1; $addrpatt=$2; } elsif (/^(\S+)/o) { $echo=$1; $addrpatt='*'; } else { next; } &wildmat_to_regexp($echo); &wildmat_to_regexp($addrpatt); $restricted{$echo}=$addrpatt; } close(handle); return 1; } sub read_config { local($config_file); $config_file=$_[0]; open(handle,$config_file) || die "Cannot open $config_file"; while() { next if (/^\s*#/o); next unless(($keyword,$val)=/^(\S+)\s+(.*)\s*$/o); $NO_FIDO=($val!~/^FTN$/io) if ($keyword=~/^Afix_Mode$/io); $ROBOT_NAME=$val if ($keyword=~/^Robot$/io); $HELPFILE=$val if ($keyword=~/^HelpFile$/io); $NEWSFEEDS=$val if ($keyword=~/^NewsFeeds$/io); $PASSIVE_NEWSFEEDS=$val if ($keyword=~/^Passive_NewsFeeds$/io); $NEWSGROUPS=$val if ($keyword=~/^NewsGroups$/io); $ECHO2NEWS=$val if ($keyword=~/^Echo2News$/io); $ACTIVE=$val if ($keyword=~/^Active$/io); $RESTFILE=$val if ($keyword=~/^RestEcho$/io); $PASSWDFILE=$val if ($keyword=~/^PasswdFile$/io); $OUTNEWSFEEDS=$val if ($keyword=~/^OutNewsFeeds$/io); $MAILCOMMAND=$val if ($keyword=~/^MailCommand$/io); $DESCRMISSING=$val if ($keyword=~/^DescrMissing$/io); $RELOADCOMMAND=$val if ($keyword=~/^ReloadCommand$/io); $SYSOP_NAME=$val if ($keyword=~/^SysOp$/io); $ADDRESS=$val if ($keyword=~/^Address$/io); $UPLINK_ADDRESS=$val if ($keyword=~/^UpLink_Address$/io); $UPLINK_ROBOT_NAME=$val if ($keyword=~/^UpLink_Robot$/io); $UPLINK_PASSWORD=$val if ($keyword=~/^UpLink_Password$/io); $FORWARD=($val=~/^Yes$/io)?1:0 if ($keyword=~/^Forward$/io); $QUEUE=$val if ($keyword=~/^Queue$/io); $SEMAPHORE=$val if ($keyword=~/^Semaphore$/io); $NEWSLOCK=$val if ($keyword=~/^NewsLockDir$/io); $LOG_FACILITY=$val if ($keyword=~/^LogFacility$/io); $LOG_LEVEL=$val if ($keyword=~/^LogLevel$/io); $val=~/(\S+)\s*(\S+)/o,$XCOM_TABLE{$1}=$2 if ($keyword=~/^XlateCommand$/io); } $DESCRMISSING="Description missing" unless (defined($DESCRMISSING)); return (defined($ACTIVE) && ((defined($ECHO2NEWS) && defined($UPLINK_ADDRESS) && defined($UPLINK_ROBOT_NAME) && defined($UPLINK_PASSWORD)) || $NO_FIDO) && defined($NEWSGROUPS) && defined($HELPFILE) && defined($PASSWDFILE) && defined($OUTNEWSFEEDS) && defined($MAILCOMMAND) && defined($RELOADCOMMAND) && defined($SYSOP_NAME) && defined($ADDRESS) && defined($PASSIVE_NEWSFEEDS) && defined($NEWSFEEDS) && defined($SEMAPHORE) && defined($LOG_FACILITY)); } ##-------- end of reading of config files # ##-------- shlock/shunlock sub shlock { local($file,$try)=@_; local($pid,$n,$rc); open(F,">$file.$$") || die "Cannot open temp lock file: $!"; print F $$; close F; $rc=1; until (link("$file.$$",$file)) { $rc=0, last if $try && $n++>=$try; open(F,$file) || die "Cannot open lock file: $!"; $pid=; close F; if ($pid && !kill(0,$pid)) { unlink($file) || die "Cannot unlink stale lock: $!"; next; } sleep(1); } unlink("$file.$$") || die "Cannot unlink temp lock file: $!"; return $rc; } sub shunlock { unlink($_[0]) || die "Cannot unlink lock file: $!"; } sub _POSIX_C_SOURCE {0;} ifmail-2.14tx8.10.orig/misc/contrib/ifinfo.pl100644 1751 50 4406 6420407565 16364 0ustar mdsrc#!/usr/bin/perl $Ver = "0.5"; # # this is a simple perl script to extract informations from # the nodelist about a given sysop name. # i don't know about the format of the nodelist, so perhaps it # will not work 100% right :) # # Usage: ifinfo # if you give the full name quote it or replace the space # through a '_' # # rasca, berlin 1994,97 (Rasca Gmelch, 2:2410/305.4) # changed by Andreas Jellinghaus, 2:246/8112.16 # *** EDIT the next LINE to the right path!!! *** $listpath = '/var/spool/fnet/Nodelist/[A-Za-z]*.[0-9][0-9][0-9] /var/spool/fnet/Nodelist/[a-z]*.bln'; # default domain $domain = "fidonet.org"; if ((@ARGV != 1) || $ARGV[0] eq "-?" || $ARGV[0] eq "-h") { &usage; } $input = $ARGV[0]; # substitute spaces in the name argument through "_" $input =~ s/ +/_/g; open (FIND, "find $listpath|") || die "error finding the nodelists"; while ($nodelist = ) { &get_info; } close (FIND); if (!$found) { print ("$0: \"$input\" not found\n"); exit (1); } # process for every nodelist sub get_info { $zone = "???"; $hub = ""; open (NLIST, "<$nodelist") || die "can't open nodelist '$nodelist'"; while ($line=) { # # skip lines with comments # if ($line =~ /^[^;]/) { # # split the line.. ($key, $num, $sys, $locate, $name, $phone, $speed, $flags) = split(/,/, $line, 8); # # and have a look at the first field.. # if ($key eq "Zone") { $zone = $num; $net = 0; $num = 0; $hub = ""; } elsif ($key eq "Host") { $net = $num; $num = 0; $hub = ""; } elsif ($key eq "Hub") { $hub = "f$num.n$net.z$zone.$domain ($sys)"; $num = 0; } elsif ($name =~ /$input/) { # i don't know about the meaning of all keywords in the nodelist, # so print the not known keys behind the system name :-) if ($key ne "") { $sys .= " ($key)"; } $name =~ s/_/\./g; print ("System: $sys\n"); print ("Sysop: $name\@f$num.n$net.z$zone.$domain\n"); print ("Location: $locate\n"); print ("PhoneNo.: $phone\n"); print ("Speed: $speed\n"); print ("NL-Flags: $flags"); print ("HubSystem: $hub\n\n"); $found++; } } } close (NLIST); } # usage() sub usage { print ("$0 Version $Ver\n"); print ("Usage: $0 \n"); exit (2); } ifmail-2.14tx8.10.orig/misc/contrib/unarj100644 1751 50 52 6463053353 15547 0ustar mdsrc#! /bin/sh /usr/bin/unarj $* > /dev/null ifmail-2.14tx8.10.orig/misc/contrib/unrar100644 1751 50 52 6463053353 15557 0ustar mdsrc#! /bin/sh /usr/bin/unrar $* > /dev/null ifmail-2.14tx8.10.orig/misc/contrib/Gecho2newsfeeds/ 40755 1751 50 0 6701151723 17461 5ustar mdsrcifmail-2.14tx8.10.orig/misc/contrib/Gecho2newsfeeds/AREAS.BBS100644 1751 50 72570 6540753002 20773 0ustar mdsrcHome Of AMiga XX,MO,CM.LO,V34,VFC,V32T,U,ENC,NC ! Rafal Wiosna ; E:\FIDO\BADECHO\ !BADEcHO 198 !DUPES C:\FD\NETMAIL.RCV\ !NETRECVD C:\FD\NETMAIL.SNT\ !NETSENT !E:\Fido\J\R\PERSONAL !RAF 002 !SYSOPOWA C:\FD\TRANSIT\ !TRANSIT 098 33.POINTS 2:480/33.4 .7 .9 .10 .12 .13 .16 .19 .21 .22 .30 .34 .42 .45 .49 .51 .52 .55 .56 79 P 3D.POL 2:480/19 33.49 55 70 91 96 110 125 127 481/33 484/8 !E:\FIDO\J\R\484LINKS 484.8.LINKS 2:484/8 !E:\FIDO\J\484FIDO 484.FIDO 2:484/8 !E:\FIDO\J\484NET 484.NET 2:484/8 032 4DOS 2:480/36 55 69 70 91 481/33 484/2 P 80XXX 2:480/19 70 91 481/33 484/2 P 8BIT.POL 2:480/19 33.4 .34 .42 .51 .56 49 55 58 66 70 79 91 96 106 110 127 481/33 484/8 105 ADMIN.POL 2:480/33.7 36 51 66 70 84 481/21 !E:\Fido\J\DON\ADSHUBS ADSHUBS P ADS_ANNOUNCE 034 ADS_COORD 045 ADS_FILE_REL 047 ADS_STAR !E:\Fido\J\ALLFIX_H ALLFIX_HELP 2:480/33.49 55 70 73 91 125 127 481/33 484/2 114 AMIGA 2:480/33.49 37 49 70 84 91 481/33 484/2 P AMIGA.FIDO.POL 2:480/33.49 55 91 481/33 014 AMIGA.POL 2:480/19 33.49 37 49 55 58 70 84 91 110 481/33 484/8 P AMIGASCENE.POL 2:480/19 33.49 37 49 55 70 79 91 125 481/33 484/8 019 ANGELUS.POL 2:480/19 49 55 58 66 69 70 79 84 91 96 110 125 481/33 484/8 P ANIMALS.POL 2:480/19 49 55 70 91 96 106 110 125 481/33 484/8 P ANIME-MANGA.POL 2:480/19 33.49 49 55 70 91 96 106 110 481/33 484/8 P ANSI_ASCII.POL 2:480/19 33.49 49 55 70 106 110 125 1496 481/33 484/8 P APPLE 2:480/66 70 91 481/33 P ASIAN_LINK 2:480/33.22 70 91 110 481/33 P ASSEMBLER.POL 2:480/19 33.49 .52 .56 37 49 55 58 70 76 84 90 91 96 110 125 127 1496 481/33 484/8 P ATARI.POL 2:480/19 33.56 55 70 91 96 106 110 127 484/8 !E:\FIDO\J\AVIDEO AUDIOVIDEO.POL 2:480/19 33.10 .34 49 55 58 69 70 84 91 96 106 110 481/33 484/8 041 AUTO.POL 2:480/19 33.10 .45 .55 37 49 55 57 58 66 70 76 84 91 96 106 110 1496 481/33 484/8 !E:\Fido\J\R\AWACS AVX.POL 2:480/70 481/33 484/8 !E:\FIDO\J\BABY BABY.POL 2:480/19 33.7 37 49 55 57 58 69 70 73 76 79 91 100 110 1496 481/33 484/8 P BACHORKI.POL 2:480/19 33.10 .55 49 55 70 76 91 96 100 110 125 1496 481/33 484/8 065 BATPOWER 2:480/33.49 55 70 91 481/33 484/2 051 BBBS.POINTS 2:480/19 58 70 P BEZ_DRUTU.POL 2:480/19 33.34 36 49 55 58 70 79 84 90 91 96 110 125 1496 481/33 484/8 P BINKLEY 2:480/55 70 91 481/33 484/2 P BIOLCHEM.POL 2:480/19 36 49 55 57 70 91 481/33 484/8 P BNU 2:480/70 91 125 127 481/33 484/2 048 BOOKZ.POL 2:480/19 33.9 .21 .34 37 49 55 66 69 70 73 84 91 96 110 125 481/33 484/8 !E:\Fido\J\R\BRAMKA BRAMKA.POL 2:480/19 33.49 49 51 55 58 70 84 91 96 106 110 125 127 481/33 484/8 P BUSINESS 2:480/33.9 .45 70 91 110 481/33 !E:\Fido\J\BUY_SELL BUY_SELL.POL 2:480/19 33.4 .12 .16 .34 .42 .45 .49 .51 .55 37 49 51 55 57 58 66 69 70 73 76 79 84 90 91 96 100 106 110 125 127 1496 481/33 484/8 P CARTOON.POL 2:480/19 33.49 49 55 70 84 91 96 106 110 125 481/33 484/8 P CDROM 2:480/19 70 91 125 481/33 484/2 P CLARION 2:480/70 91 481/33 484/2 P CLIPPER 2:480/19 33.49 70 76 91 481/33 484/2 P CLIPPER.POL 2:480/33.49 55 70 76 91 110 1496 481/33 484/8 P COMM 2:480/19 70 91 125 481/33 484/2 021 COOKERY.POL 2:480/19 33.42 37 49 55 58 70 73 84 91 96 97 110 481/33 484/8 P COREWARS.POL 2:480/19 49 55 91 125 481/33 484/8 070 CPLUSPLUS.POL 2:480/19 33.16 .42 .49 37 49 55 58 69 70 84 90 91 96 110 125 127 1496 481/33 484/8 029 CRYPTO.POL 2:480/19 33.34 .56 36 49 55 58 66 70 90 91 96 110 125 127 481/33 484/8 P C_ECHO 2:480/55 69 70 91 96 125 481/33 484/2 P C_PLUSPLUS 2:480/55 69 70 90 91 96 125 127 481/33 484/2 P DBASE 2:480/33.49 55 70 91 481/33 484/2 078 DEMATECH.POL 2:480/19 33.49 49 55 70 84 91 96 110 125 481/33 484/8 P DESQVIEW 2:480/70 91 481/33 P DEUTSCH.POL 2:480/33.21 .22 .47 .49 .55 49 55 70 91 96 110 125 127 1496 481/33 484/8 P DISNEY 2:480/70 91 125 481/33 P DOORS.POL 2:480/19 33.49 49 55 79 91 96 125 481/33 484/8 031 DRINKS.POL 2:480/19 33.56 37 49 55 58 66 69 70 84 91 96 106 110 125 481/33 484/8 P DRUGS.POL 2:480/19 33.34 .49 .56 37 49 55 58 66 70 76 79 84 91 96 97 106 110 125 481/33 484/8 P DR_DEBUG 2:480/55 70 91 481/33 P DTP.POL 2:480/19 33.42 49 55 66 70 73 79 84 91 96 97 106 110 481/33 484/8 !E:\FIDO\J\DZIADY DZIADY.POL 2:480/19 33.7 .13 .15 .42 .47 .49 49 55 58 66 70 76 84 91 96 100 106 110 1496 481/33 484/8 P ECHOPOL2 2:292/854 480/19 70 91 125 484/2 !E:\FIDO\J\ECHOPOL ECHOPOL48.POL 2:480/19 33.7 49 70 484/8 P EKOLOGIA.POL 2:480/19 33.22 36 37 49 55 70 73 84 90 91 96 106 110 125 481/33 484/8 P ELEKTRO.POL 2:480/19 33.4 .12 .30 .34 .42 .45 .49 .56 49 55 57 58 66 69 70 73 79 84 90 91 96 110 125 127 481/33 484/8 P ELITE.POL 2:480/19 33.49 37 55 70 84 91 96 106 110 125 481/33 484/8 P ENET.SOFT 2:480/19 55 79 91 481/33 !E:\Fido\J\ENETSYS ENET.SYSOP 2:292/854 480/19 49 55 66 70 79 91 96 106 481/21 33 033 ENGLISH.POL 2:480/19 33.12 .21 .49 .55 37 49 55 58 70 84 90 91 96 106 110 125 127 1496 481/33 484/8 P EOS-L 2:480/66 P ESPERANTO 2:480/33.9 70 91 125 481/33 043 FAQPL.POL 2:480/19 33.12 .34 .42 .49 .51 .56 49 51 55 58 66 69 70 73 79 84 91 96 106 110 125 127 1496 481/33 484/8 P FDECHO 2:480/33.34 55 70 91 125 1496 481/33 484/2 P FE_HELP 2:480/55 70 110 481/33 P FE_HELP.POL 2:480/33.34 49 55 58 70 84 91 96 106 110 481/33 484/8 P FILEF480.LOC 2:480/19 33.12 .34 .42 .49 49 55 57 66 70 73 79 90 91 96 106 110 127 1496 481/33 P FILEF480.POL 2:480/19 33.49 55 57 70 96 106 110 1496 481/33 P FILEFIND.POL 2:480/19 33.12 .34 .49 .56 37 49 55 57 66 70 73 79 84 90 91 96 106 110 125 127 1496 481/33 484/8 104 FILENET.POL 2:480/19 33.12 .34 .49 49 55 58 66 70 90 91 106 110 125 127 1496 481/33 484/8 P FILE_REQ 2:480/55 70 91 125 481/33 484/2 P FIRMA.POL 2:480/19 33.49 .55 49 55 58 66 69 70 73 76 79 84 91 96 106 110 127 1496 481/33 484/8 P FLEA.GER 2:480/70 91 481/33 P FMAIL.POL 2:480/19 49 55 66 70 84 91 96 106 110 125 127 481/33 484/8 P FOTO.POL 2:480/19 33.21 .34 .42 .49 .55 36 49 55 58 66 69 70 79 84 91 96 110 125 481/33 484/8 P FOXPRO 2:480/33.49 55 70 79 91 481/33 484/2 P FOXPRO.POL 2:480/19 33.49 55 70 79 91 110 1496 481/33 484/8 !E:\FIDO\J\FTSC_PUB FTSC_PUBLIC 2:292/854 480/19 91 125 127 481/21 484/2 P GAMING 2:480/19 70 84 91 110 125 481/33 484/2 P GAZETA.POL 2:480/19 33.9 .12 .34 .49 37 49 55 58 66 70 73 76 84 91 96 110 125 1496 481/33 484/8 066 GECHO_HELP 2:480/33.34 70 91 125 481/33 484/2 P GENEALOGY 2:480/55 70 91 481/33 P GITARA.POL 2:480/19 33.21 .51 49 55 70 73 91 96 110 125 127 481/33 484/8 053 GOLDED 2:480/33.49 66 70 91 96 110 125 481/33 484/2 072 GOLDED.BETA 2:480/70 1496 P GRAPHICS.POL 2:480/19 33.49 49 55 58 66 91 125 481/33 484/8 P GRY.BITEWNE.POL 2:480/19 33.55 49 55 70 91 96 106 110 125 481/33 484/8 P GRY.DECK.POL 2:480/19 33.42 .49 49 55 70 84 91 96 106 110 481/33 484/8 077 GRY.POL 2:480/19 33.34 .49 .51 37 49 55 58 69 70 84 91 96 106 110 125 127 1496 481/33 484/8 013 GRY.RPG.POL 2:480/19 33.42 37 49 55 70 79 84 91 96 106 110 125 481/33 484/8 !E:\FIDO\J\GSM GSM.POL 2:480/19 33.16 .42 .51 .55 .56 49 51 55 57 58 70 76 84 91 96 100 106 110 125 1496 481/33 484/8 P HAM 2:480/19 33.34 70 91 481/33 484/2 P HARCERSTWO.POL 2:480/19 33.7 .16 .56 55 70 91 110 125 481/33 484/8 P HDCONF 2:480/70 91 481/33 484/2 !E:\Fido\J\HOA HOA.MAIL 2:480/19 33.4 .7 .9 .10 .12 .13 .16 .19 .21 .30 .34 .42 .43 .45 .47 .49 .51 .52 .55 .56 36 37 49 51 55 57 58 66 69 70 73 76 79 83 84 90 91 96 97 100 106 110 125 127 1496 481/33 484/2 8 P HS_MODEMS 2:480/19 70 91 481/33 484/2 P HUMOR 2:480/19 33.55 70 91 96 110 481/33 484/2 P HYDEPARK.POL 2:480/19 33.13 .34 .56 37 55 58 70 84 91 96 106 110 125 127 481/33 484/8 P IBMPC 2:480/19 70 91 481/33 484/8 !E:\FIDO\J\INFO INFO.POL 2:480/19 33.4 .7 .10 .19 .34 .47 .49 .51 .52 .56 37 49 51 55 57 58 66 69 70 73 79 84 90 91 96 97 106 110 125 127 1496 481/33 484/8 P INFORMATYKA.POL 2:480/19 33.4 .9 .12 .21 .51 49 55 70 91 96 110 125 1496 481/33 484/8 P INTERCOOK 2:480/49 70 91 481/33 484/2 !E:\FIDO\J\INTERNET INTERNET.POL 2:480/19 33.7 .10 .12 .16 .19 .22 .34 .42 .43 .49 .55 .56 37 49 51 55 58 66 70 79 84 91 96 106 110 125 127 1496 481/33 484/8 P INTYMATE.POL 2:480/33.42 55 91 484/8 !E:\FIDO\J\IP IP_CONNECT 2:292/854 480/19 33.7 70 91 110 481/21 484/2 !E:\FIDO\J\IZA IZA.TOC 2:480/33.7 70 76 P I_UFO 2:480/19 33.34 70 91 125 481/33 484/2 P KIDS-91 2:480/33.16 70 481/33 P KIDS.POL 2:480/19 33.49 55 70 91 110 1496 481/33 484/8 017 KINO.POL 2:480/19 33.21 .34 .49 37 49 51 55 57 58 66 69 70 73 79 84 91 96 110 125 127 481/33 484/8 P KOMERCJA.PVT 2:480/19 33.4 .10 .16 .34 .49 37 49 51 55 58 66 70 73 76 79 84 90 91 106 110 125 1496 481/33 484/8 P KONKURSY.POL 2:480/19 33.49 55 70 91 125 481/33 484/8 P KOSMOS.POL 2:480/19 37 49 55 58 66 69 70 76 84 91 96 110 125 127 1496 481/33 484/8 !E:\FIDO\J\KRAPMAIL KRAP.MAIL 2:480/70 !E:\FIDO\J\LAMERS LAMERS.POL 2:480/19 33.7 .13 .21 .34 .42 .49 .56 37 49 55 58 66 70 84 91 96 106 110 125 127 481/33 484/8 P LAN 2:480/19 69 70 91 125 481/33 484/2 P LANTASTI 2:480/69 70 481/33 P LEGAL.POL 2:480/19 55 70 79 91 481/33 484/8 P LINGUA.POL 2:480/19 33.21 .49 49 55 70 91 96 110 125 1496 481/33 484/8 P LINUX 2:480/33.49 55 69 70 91 127 1496 481/33 484/2 010 LINUX.POL 2:480/19 33.4 .7 .9 .12 .19 .21 .34 .42 .43 .49 .51 .56 37 49 55 58 66 69 70 73 79 84 91 96 106 110 125 127 481/33 484/8 P MAC.POL 2:480/19 33.42 37 49 55 69 70 91 96 110 481/33 484/8 P MATURA.POL 2:480/19 37 49 55 58 70 84 91 96 110 125 481/33 484/8 P MCMAIL 2:480/70 91 481/33 P MEDFORUM.POL 2:480/55 79 91 481/33 484/8 P MEDIA.POL 2:480/19 33.21 .55 49 55 58 70 91 96 110 125 481/33 484/8 P MEDICO.POL 2:480/19 49 55 70 91 96 110 127 1496 481/33 484/8 P MIDI-PROGRAMMING 2:480/33.49 70 91 110 125 481/33 P MM.POL 2:480/19 55 70 91 481/33 484/8 !E:\Fido\J\R\MODEMY MODEMY.POL 2:480/19 33.7 .12 .16 .30 .34 .42 .49 .51 .56 37 49 55 58 66 69 70 79 84 91 96 106 110 125 127 1496 481/33 484/8 P MS_WORD 2:480/33.55 70 91 110 127 481/33 484/2 P MUFFIN 2:480/55 70 91 481/33 484/2 P MUZKOMP.POL 2:480/19 33.49 49 55 70 84 91 96 106 110 125 481/33 484/8 !E:\FIDO\J\MUZYKA MUZYKA.POL 2:480/19 33.7 .21 .49 .56 49 55 58 69 70 73 84 91 96 97 110 125 127 481/33 484/8 P NAUKA.POL 2:480/19 33.21 .49 49 55 58 66 70 84 91 96 110 125 127 1496 481/33 484/8 P NBA.POL 2:480/33.49 55 70 91 96 110 125 481/33 484/8 P NET_DEV 2:480/55 66 70 110 125 481/33 484/2 P NET_DEV.POL 2:480/19 33.7 49 55 66 70 91 125 481/33 484/8 P NIKON-L 2:480/19 66 P NOVELL 2:480/55 70 79 91 125 127 481/33 484/2 P NU_SUPPORT 2:480/33.34 70 91 127 481/33 484/8 P OBLECHY.PVT 2:480/33.49 55 58 70 96 106 110 125 481/33 484/8 !E:\Fido\J\OS2 OS2 2:480/19 55 70 76 91 110 481/33 484/2 036 OS2.POL 2:480/19 33.34 .42 49 55 58 70 73 76 84 91 96 106 110 127 481/33 484/8 !E:\Fido\J\OS2DOS OS2DOS 2:480/55 70 76 91 110 481/33 484/2 !E:\Fido\J\OS2GAME OS2GAMES 2:480/19 55 70 76 91 110 481/33 484/2 !E:\Fido\J\OS2HW OS2HW 2:480/55 70 76 91 481/33 484/2 P OS2LAN 2:480/19 55 70 76 91 110 481/33 484/2 !E:\Fido\J\OS2PROG OS2PROG 2:480/55 70 76 91 110 481/33 484/2 P OT_SUPPORT 2:480/33.49 70 76 91 481/33 484/2 P PACKET 2:480/33.34 70 91 481/33 484/2 P PALMTOPS.POL 2:480/19 33.34 .42 55 91 125 481/33 484/8 P PASCAL 2:480/19 49 55 70 91 96 110 125 481/33 484/2 067 PASCAL.POL 2:480/19 33.4 .42 .49 .52 .56 37 49 55 66 70 90 91 96 110 125 127 481/33 484/8 P PCBOARD 2:480/70 91 125 481/33 484/2 P PL.ANNOUNCE.NEWGROUPS 2:480/55 70 91 96 110 481/33 484/8 P PL.ANSWERS 2:480/51 55 70 91 481/33 484/8 P PL.BIZNES 2:480/55 70 91 110 481/33 484/8 P PL.COMP.BAZY-DANYCH 2:480/55 69 70 79 91 481/33 484/8 P PL.COMP.DTP 2:480/55 70 91 96 481/33 484/8 P PL.COMP.DTP.TEX 2:480/33.43 55 70 91 96 481/33 484/8 P PL.COMP.DTP.TEX.GUST 2:480/55 70 91 481/33 484/8 P PL.COMP.GRAFIKA 2:480/55 70 91 96 110 481/33 484/8 P PL.COMP.LANG.C 2:480/55 70 91 96 110 481/33 484/8 P PL.COMP.LANG.DELPHI 2:480/55 70 91 110 481/33 484/8 P PL.COMP.LANG.JAVA 2:480/33.49 55 70 96 110 481/33 484/8 !E:\FIDO\J\KHC\PERL PL.COMP.LANG.PERL 2:480/55 70 91 481/33 484/8 P PL.COMP.LANG.VBASIC 2:480/55 70 91 110 481/33 484/8 P PL.COMP.MAIL 2:480/55 70 91 481/33 484/8 P PL.COMP.MAIL.MTA 2:480/70 91 481/33 484/8 P PL.COMP.NETWORKING 2:480/33.51 49 55 70 91 110 481/33 484/8 P PL.COMP.NOWE-PROGRAMY 2:480/33.16 55 70 91 110 481/33 484/8 P PL.COMP.OBJECTS 2:480/55 70 91 96 110 1496 481/33 484/8 P PL.COMP.OGONKI 2:480/55 70 91 110 481/33 484/8 !E:\FIDO\J\KHC\OSADV PL.COMP.OS.ADVOCACY 2:480/70 91 481/33 484/8 P PL.COMP.OS.FREEBSD 2:480/55 70 91 481/33 484/8 P PL.COMP.OS.HP-UX 2:480/55 70 91 481/33 484/8 !E:\FIDO\J\KHC\LINUX PL.COMP.OS.LINUX 2:480/33.43 .49 .56 55 70 91 110 127 481/33 484/8 !E:\Fido\J\KHC\OS2 PL.COMP.OS.OS2 2:480/55 70 91 110 481/33 484/8 P PL.COMP.OS.UNIX 2:480/55 70 91 127 481/33 484/8 P PL.COMP.OS.WIN3 2:480/55 70 91 481/33 484/8 P PL.COMP.OS.WIN95 2:480/55 70 91 96 110 481/33 484/8 P PL.COMP.OS.WINNT 2:480/55 70 91 110 481/33 484/8 !E:\FIDO\J\KHC\PECET PL.COMP.PECET 2:480/33.56 55 69 70 91 96 481/33 484/8 P PL.COMP.PROGRAMMING 2:480/55 70 91 96 110 1496 481/33 484/8 !E:\FIDO\J\KHC\SECURITY PL.COMP.SECURITY 2:480/55 70 91 96 481/33 484/8 P PL.COMP.SYS.AMIGA 2:480/33.49 55 70 91 481/33 484/8 P PL.COMP.SYS.ATARI 2:480/70 91 481/33 484/8 P PL.COMP.SYS.MACINTOSH 2:480/55 70 91 96 481/33 484/8 P PL.COMP.SYS.NOVELL 2:480/33.13 49 51 55 69 70 79 91 1496 481/33 484/8 P PL.COMP.SYS.PC-UNIX 2:480/55 70 481/33 484/8 P PL.COMP.SYS.SUN.ADMIN 2:480/55 70 91 481/33 484/8 P PL.COMP.TLUMACZENIA 2:480/70 91 110 481/33 484/8 !E:\Fido\J\KHC\WWW PL.COMP.WWW 2:480/19 33.49 55 70 91 96 110 481/33 484/8 P PL.COMP.WWW.NOWE-STRONY 2:480/33.49 55 70 91 96 110 481/33 484/8 P PL.GAZETY.DONOSY 2:480/33.13 55 58 70 91 96 110 127 481/33 484/8 P PL.GAZETY.DYRDYMALKI 2:480/55 58 70 79 481/33 484/8 P PL.GAZETY.GAZETA 2:480/55 70 79 90 481/33 484/8 P PL.GRY.MUD 2:480/19 55 70 91 110 481/33 484/8 P PL.GRY.RPG 2:480/19 55 70 91 110 127 481/33 484/8 P PL.HUM.POEZJA 2:480/55 70 91 110 481/33 484/8 P PL.INTERNET.KOMUNIKATY 2:480/33.49 55 70 79 91 96 481/33 484/8 P PL.INTERNET.NOWOSCI 2:480/19 33.16 .49 55 70 79 91 96 481/33 484/8 P PL.INTERNET.OGLOSZENIA 2:480/55 70 79 481/33 484/8 P PL.IRC 2:480/55 70 91 96 110 125 481/33 484/8 P PL.LISTSERV.CHOMOR-L 2:480/33.21 55 58 70 91 96 110 127 481/33 484/8 P PL.LISTSERV.DZIENNIKARZ 2:480/19 55 70 91 110 481/33 484/8 P PL.LISTSERV.GIELDA 2:480/19 33.45 55 70 91 110 127 481/33 484/8 P PL.LISTSERV.PLOTKI 2:480/19 55 70 91 481/33 484/8 !E:\Fido\J\KHC\POLIP PL.LISTSERV.POLIP 2:480/19 33.49 55 70 481/33 484/8 P PL.LISTSERV.POLWRO 2:480/55 70 91 481/33 484/8 P PL.LISTSERV.SF-F 2:480/19 55 66 70 91 110 127 481/33 484/8 P PL.LISTSERV.WROCLAW 2:480/55 70 91 481/33 484/8 P PL.MISC.BUDOWANIE 2:480/33.30 55 70 91 481/33 484/8 P PL.MISC.ELEKTRONIKA 2:480/55 70 91 481/33 484/8 P PL.MISC.KOLEJ 2:480/55 70 91 481/33 484/8 P PL.MISC.MILITARIA 2:480/55 70 91 481/33 484/8 P PL.MISC.PARANAUKI 2:480/33.13 55 70 91 96 110 481/33 484/8 P PL.MISC.SAMOCHODY 2:480/19 55 70 91 481/33 484/8 P PL.MISC.TELEFONIA 2:480/33.51 .56 51 55 70 91 481/33 484/8 !E:\FIDO\J\KHC\GSM PL.MISC.TELEFONIA.GSM 2:480/19 33.51 51 55 58 70 91 100 481/33 484/8 P PL.MISC.TRANSPORT 2:480/55 70 91 481/33 484/8 P PL.NEWS.ADMIN 2:480/55 70 91 481/33 484/8 P PL.NEWS.NOWE-GRUPY 2:480/55 70 91 481/33 484/8 P PL.OGLOSZENIA.KUPIE 2:480/49 51 55 58 70 79 91 96 125 481/33 484/8 P PL.OGLOSZENIA.ROZNE 2:480/49 55 70 79 91 96 1496 481/33 484/8 P PL.OGLOSZENIA.SPRZEDAM 2:480/49 51 55 58 70 79 91 96 481/33 484/8 P PL.ORG.PSI 2:480/33.21 55 70 91 481/33 484/8 P PL.PRACA.DYSKUSJE 2:480/33.16 .45 51 55 70 91 481/33 484/8 P PL.PRACA.OFEROWANA 2:480/19 33.16 .43 .45 .51 49 51 55 58 66 70 91 96 110 127 481/33 484/8 P PL.PRACA.SZUKANA 2:480/33.45 55 58 70 91 125 481/33 484/8 P PL.PREGIERZ 2:480/55 70 91 481/33 484/8 P PL.REC.ANIME 2:480/55 70 91 96 481/33 484/8 P PL.REC.AUDIO 2:480/55 70 91 481/33 484/8 P PL.REC.FILM 2:480/19 33.21 55 70 91 96 481/33 484/8 P PL.REC.FOTO 2:480/55 66 70 91 127 481/33 484/8 P PL.REC.GRY.KARCIANE 2:480/19 55 70 91 96 481/33 484/8 P PL.REC.GRY.KOMPUTEROWE 2:480/55 70 91 96 481/33 484/8 P PL.REC.GRY.KOMPUTEROWE.SPRZET 2:480/70 91 96 481/33 484/8 P PL.REC.GRY.MUD 2:480/55 70 91 96 481/33 484/8 P PL.REC.GRY.RPG 2:480/55 70 91 127 481/33 484/8 P PL.REC.GRY.RPL 2:480/55 70 91 481/33 484/8 P PL.REC.GRY.STRATEGICZNE 2:480/55 70 91 96 481/33 484/8 P PL.REC.GRY.SZACHY 2:480/55 70 91 481/33 484/8 P PL.REC.HIHOT 2:480/55 58 70 91 127 481/33 484/8 !E:\FIDO\J\KHC\HUMNAJ PL.REC.HUMOR.NAJLEPSZE 2:480/33.16 .55 55 58 70 91 96 110 127 481/33 484/8 P PL.REC.KSIAZKI 2:480/33.21 55 70 91 96 481/33 484/8 P PL.REC.KUCHNIA 2:480/55 70 91 481/33 484/8 P PL.REC.MODELARSTWO 2:480/55 70 91 481/33 484/8 P PL.REC.MOTOCYKLE 2:480/55 70 91 481/33 484/8 P PL.REC.MUZYKA 2:480/33.21 55 70 91 96 110 481/33 484/8 P PL.REC.MUZYKA.GITARA 2:480/70 91 481/33 484/8 P PL.REC.MUZYKA.JAZZ 2:480/70 91 481/33 484/8 P PL.REC.MUZYKA.TECHNO 2:480/55 70 91 110 125 481/33 484/8 P PL.REC.NURKOWANIE 2:480/55 70 91 481/33 484/8 P PL.REC.PARALOTNIE 2:480/55 70 91 481/33 484/8 P PL.REC.RADIO 2:480/55 70 91 110 481/33 484/8 P PL.REC.RADIO.AMATORSKIE 2:480/55 70 91 110 481/33 484/8 P PL.REC.RADIO.CB 2:480/70 91 96 481/33 484/8 P PL.REC.ROWERY 2:480/55 70 91 481/33 484/8 P PL.REC.SOC.INWALIDZI 2:480/70 91 481/33 484/8 P PL.REC.SOC.WEGETARIANIZM 2:480/70 91 481/33 484/8 P PL.REC.SPORT 2:480/55 70 91 96 481/33 484/8 P PL.REC.SPORT.PILKA-NOZNA 2:480/55 70 91 96 110 481/33 484/8 P PL.REC.TELEWIZJA 2:480/55 70 91 110 481/33 484/8 P PL.REC.TRAVEL 2:480/55 69 70 91 481/33 484/8 P PL.REC.ZBIERACTWO 2:480/55 70 91 96 481/33 484/8 P PL.REC.ZEGLARSTWO 2:480/55 70 91 110 481/33 484/8 P PL.REC.ZWIERZAKI 2:480/55 70 91 481/33 484/8 P PL.REGIONALNE.KRAKOW 2:480/55 70 91 481/33 484/8 !E:\FIDO\J\KHC\WARSZAWA PL.REGIONALNE.WARSZAWA 2:480/55 70 91 110 P PL.SCI.CHEMIA 2:480/19 55 70 91 481/33 484/8 P PL.SCI.FILOZOFIA 2:480/55 70 91 96 110 481/33 484/8 P PL.SCI.FIZYKA 2:480/55 70 91 96 481/33 484/8 P PL.SCI.HISTORIA 2:480/55 70 91 481/33 484/8 P PL.SCI.KOSMOS 2:480/19 55 70 91 481/33 484/8 P PL.SCI.MEDYCYNA 2:480/55 70 91 481/33 484/8 P PL.SCI.PSYCHOLOGIA 2:480/55 70 91 96 110 481/33 484/8 P PL.SOC.DEKADENTYZM 2:480/55 70 91 96 110 481/33 484/8 P PL.SOC.DZIECI 2:480/55 70 91 481/33 484/8 P PL.SOC.EDUKACJA 2:480/55 70 91 481/33 484/8 P PL.SOC.INWALIDZI 2:480/55 70 91 481/33 484/8 P PL.SOC.POLITYKA 2:480/33.45 55 70 91 481/33 484/8 P PL.SOC.POLITYKA.WYBORY 2:480/55 70 91 96 481/33 484/8 P PL.SOC.PRAWO 2:480/19 55 70 96 481/33 484/8 P PL.SOC.RELIGIA 2:480/33.45 55 70 91 110 481/33 484/8 P PL.SOC.SEKS 2:480/33.49 55 70 91 110 127 481/33 484/8 P PL.SOC.SEKS.TOWARZYSKIE 2:480/33.49 55 70 91 127 481/33 484/8 P PL.SOC.WEGETARIANIZM 2:480/70 91 481/33 484/8 P PL.SOC.ZIELONI 2:480/19 55 70 91 481/33 484/8 P PL.TEST 2:480/55 70 91 481/33 484/8 069 PODATKI.POL 2:480/19 33.12 .16 .21 .45 .55 55 58 66 70 73 76 79 84 91 96 106 110 1496 481/33 484/8 !E:\FIDO\J\POEZJA POEZJA.POL 2:480/19 33.21 37 55 58 69 70 73 91 96 110 125 481/33 484/8 !E:\FIDO\J\POINT49 POINT.49 2:480/49 P POL-BRIT 2:480/33.9 .16 70 84 91 127 481/33 003 POLECHO.POL 2:480/19 33.7 .12 .34 .49 .51 .56 36 37 49 55 57 58 66 70 79 84 91 96 106 110 125 127 1496 481/33 484/8 005 POLISH 2:480/19 33.7 .12 .16 .29 .47 55 58 66 70 76 79 91 96 100 110 125 127 1496 481/33 484/2 8 P POLITICS 2:480/33.9 70 91 481/33 P POLSKA.GEN 2:480/33.16 55 70 91 481/33 006 POL_DEV.POL 2:480/19 33.4 .7 .10 .12 .16 .34 .42 .45 .51 .55 .56 49 55 57 58 66 69 70 73 79 84 91 96 106 110 125 1496 481/33 484/8 025 POL_TEL.POL 2:480/19 33.4 .7 .12 .16 .22 .30 .34 .42 .55 .56 37 49 51 55 58 66 69 70 76 79 84 91 96 100 106 110 125 1496 481/33 484/8 028 POL_TIX.POL 2:480/19 33.10 .55 55 58 66 70 76 84 91 96 110 125 127 481/33 484/8 P PORTAL 2:480/70 91 481/33 P PORTAL.POL 2:480/55 70 481/33 484/8 P PRACA.POL 2:480/19 33.16 .43 .49 .51 37 49 55 70 73 79 90 91 96 106 110 125 127 1496 481/33 484/8 P PRAKTYCY.POL 2:480/19 33.49 55 70 73 90 91 96 110 1496 481/33 484/8 P PROBOARD 2:480/33.49 70 91 96 125 481/33 484/2 P PROBOARD.POL 2:480/19 33.49 .51 37 49 55 70 91 96 106 110 125 127 481/33 484/8 P PSYCHOLOGIA.POL 2:480/19 49 55 70 76 96 106 110 125 484/8 !E:\Fido\J\R48CHAT R48CHAT.POL 2:480/19 33.4 .7 .16 .34 .42 .49 .51 .52 .56 49 55 58 66 70 73 76 79 84 91 96 106 110 125 127 1496 481/33 484/8 P RAP.PVT 2:480/19 70 96 106 110 125 481/33 484/8 !E:\Fido\J\RAR RAR 2:480/19 33.34 70 91 127 481/33 484/2 177 RA_BILL 73:7440/25 7480/33 54 172 RA_CHAT 73:7440/25 7480/33 54 175 RA_COORD 73:7440/25 7480/33 54 174 RA_DIST 73:7440/25 7480/33 54 173 RA_FIND 73:7440/25 7480/33 35 54 176 RA_HELP 73:7440/25 7480/33 54 170 RA_NET 73:7440/25 7480/33 54 171 RA_PROG 73:7440/25 7480/33 54 P RA_SUPPORT 2:480/70 91 127 481/33 484/2 P RA_UTIL 2:480/70 91 481/33 484/2 !E:\FIDO\J\REGCON REGCON 2:292/854 480/70 481/21 101 REGCON.EUR 2:292/854 480/70 481/21 !E:\FIDO\J\REZYDENT REZYDENCI.LOC 2:480/33.7 70 76 100 016 ROCKECHO.POL 2:480/19 33.15 .21 .56 37 49 55 58 66 69 70 84 91 96 97 106 110 125 481/33 484/8 !E:\FIDO\J\ROWERY ROWERY.POL 2:480/19 33.47 .55 49 55 69 70 76 91 96 110 125 484/8 P SAMURAJ.POL 2:480/19 33.21 55 70 91 96 110 125 1496 481/33 484/8 P SB-NASA_NEWS 2:480/19 37 69 70 84 91 96 125 127 481/33 484/2 P SB-NASA_TECH 2:480/19 37 69 70 91 96 125 127 481/33 484/2 P SB-QUESTIONS 2:480/19 70 91 96 481/33 484/2 P SCIENCE 2:480/19 70 91 96 110 481/33 484/2 !E:\Fido\J\SEKS SEKS.POL 2:480/19 33.7 .10 .21 .34 .42 .43 .49 .55 37 49 55 58 66 69 70 73 76 84 91 96 100 110 125 127 1496 481/33 484/8 030 SFF.POL 2:480/19 33.12 .34 .42 49 55 66 70 79 84 91 96 110 125 127 481/33 484/8 P SFFAN 2:480/70 84 91 481/33 P SIECI.POL 2:480/19 33.4 .7 .16 .19 .21 .34 .42 .49 .51 37 49 51 55 58 66 69 70 73 79 84 91 96 106 110 1496 481/33 484/8 061 SIR.TENLEY.POL 2:480/19 49 55 481/33 P SOC.CULUTURE.POLISH 2:480/19 70 91 481/33 484/8 P SOCCER.POL 2:480/19 49 55 70 91 96 110 481/33 484/8 011 SOFTWARE.POL 2:480/19 33.7 .10 .12 .16 .34 .42 .56 55 58 66 70 79 84 91 96 106 110 125 127 1496 481/33 484/8 P SOUND.POL 2:480/19 33.34 .49 37 49 55 58 69 70 79 84 91 96 106 110 125 481/33 484/8 P SPACE 2:480/70 91 96 110 481/33 484/2 P SPECTRUM 2:480/33.34 70 91 481/33 076 SPORT.POL 2:480/19 55 70 79 84 91 96 110 481/33 484/8 110 STAT.POL 2:480/19 33.34 49 55 58 70 91 96 106 110 125 481/33 484/8 P SUBKULTURY.POL 2:480/19 33.56 55 70 91 96 106 110 125 1496 481/33 484/8 !E:\Fido\J\SUPPORT SUPPORT.POL 2:480/19 33.42 49 55 66 91 125 481/33 484/8 100 SYSOP.POL 2:480/19 33.7 36 37 49 51 55 57 58 66 69 70 73 76 79 84 90 91 96 97 100 106 110 125 127 1496 481/33 484/8 !E:\FIDO\J\SYS480 SYSOP480.LOC 2:480/19 33.7 36 37 49 51 55 57 58 66 69 70 76 79 84 90 91 96 97 100 106 110 125 127 1496 484/2 !E:\FIDO\J\SYSTEMY SYSTEMY.POL 2:480/19 33.7 .19 .21 .30 .42 .51 .56 37 55 58 66 70 73 76 84 96 106 110 125 1496 481/33 484/8 !E:\Fido\J\T-MAIL T-MAIL.POL 2:480/19 33.30 .34 .49 .51 49 55 58 66 70 76 84 91 96 106 110 125 127 1496 481/33 484/8 !E:\Fido\J\TMAIL T-MAIL.SUPPORT 2:480/33.49 70 91 96 125 127 481/33 !E:\FIDO\J\TAGLINES TAGLINES 2:480/70 484/2 !E:\FIDO\J\TERROR TERROR.CHAT 2:480/33.7 70 76 110 !E:\FIDO\J\TERMAIL TERROR.MAIL 2:480/110 P TEST.POL 2:480/19 33.34 .51 .56 55 70 79 84 90 91 96 106 110 125 127 1496 481/33 484/8 P TOLKIEN.POL 2:480/19 33.13 .21 55 58 69 70 73 79 96 110 125 127 481/33 484/8 P TPASCAL 2:480/70 91 481/33 484/2 P TPWTECH 2:480/19 70 91 481/33 P TUB 2:480/55 70 91 481/33 484/2 P TURYSTYKA.POL 2:480/19 33.21 .42 49 55 58 69 70 73 91 96 110 481/33 484/8 !E:\FIDO\J\R\TV_SAT TV_SAT.POL 2:480/19 33.10 .16 .30 .34 .42 49 55 58 66 70 84 91 96 106 110 125 481/33 484/8 P UFO.POL 2:480/19 33.4 .13 .34 .56 55 58 66 70 84 91 96 106 110 125 481/33 484/8 P UNIX 2:480/69 70 91 125 127 481/33 484/2 P USA_EURLINK 2:480/70 91 125 127 481/33 484/2 !E:\Fido\J\USR USR_MODEMS 2:480/19 36 49 58 70 84 91 481/33 484/2 !E:\FIDO\J\U_BORYNY U_BORYNY.LOC 2:480/19 33.4 .7 .12 .15 .34 .42 .49 .51 .56 36 49 55 57 58 66 69 70 73 76 79 84 91 96 97 100 106 110 125 127 1496 481/33 P VBASIC.POL 2:480/19 49 55 70 91 96 110 1496 481/33 484/8 P VIRUS 2:480/70 91 96 125 481/33 484/2 012 VIRUS.POL 2:480/19 33.4 .12 .16 .30 .34 .42 .49 .56 49 51 55 58 66 69 70 76 84 91 96 106 110 125 1496 481/33 484/8 P VIRUS_INFO 2:480/19 70 91 96 125 481/33 484/2 P WEDKARSTWO.POL 2:480/19 55 70 91 96 110 481/33 484/8 P WHITEHOUSE 2:480/33.9 .12 70 91 481/33 P WIN32 2:480/55 70 84 91 96 125 481/33 484/2 P WIN95 2:480/70 484/2 P WINDOWS 2:480/55 70 91 125 481/33 484/2 P WINDOWS.POL 2:480/19 33.30 .34 .42 .47 .51 .55 .56 49 51 55 58 66 70 84 91 96 106 110 125 127 1496 481/33 484/8 !E:\FIDO\J\WIRUSAT WIRUSAT.POINT 2:484/2 P WOJSKO.POL 2:480/19 33.7 .55 .56 37 55 58 69 70 73 84 91 96 110 125 1496 481/33 484/8 !E:\FIDO\J\WWW WWW.POL 2:480/19 33.21 .49 49 55 58 66 70 73 84 91 96 106 110 125 1496 481/33 484/8 P XENIA 2:480/55 70 73 91 1496 481/33 484/2 P ZADANIADOM.POL 2:480/19 33.49 55 58 70 91 96 106 110 125 127 1496 481/33 484/8 P ZAJAC.PVT 2:480/33.19 49 57 P ZEGLARSTWO.POL 2:480/19 49 58 70 96 110 125 127 484/8 P ZMODEM 2:480/33.12 70 91 1496 481/33 068 ZYXEL 2:480/19 70 79 91 125 481/33 484/2 ifmail-2.14tx8.10.orig/misc/contrib/Gecho2newsfeeds/Areas100644 0 0 145014 6701151723 21235 0ustar rootroot # Conversion of areatags to newsgroups (with distribution) and back. # AREA newsgroup distribution moderator # If you compile with -DJE, the format is: # AREA newsgroup distribution rfc-charset FTN-CHRS moderator # # "rfc-charset" is the charset used in the rfc (usenet/email) side. It must # be in the format used in MIME headers (ex: iso-8859-1, koi8-r, EUC-kr,...) # "FTN-CHRS" is the charset used in the FTN side. It must be in the format # used in ^aCHRS: kludges, whitout de level number (ex: LATIN-1, KOI8, EUC-KR) # See file README.charset for a list of recognized rfc-charset and FTN-CHRS # "moderator" is an rfc address to create correct "Approved:" lines for # FTN read-only areas defined as "Moderated" in the rfc side. And whose # moderator is in the FTN side; so he/she doesn't has to worry about. # exemple (with -DJE): # #COMERZ fido.commerz world iso-8859-1 CP437 Jan.Smith@f1.n2.z3.fidonet.org # Fido R48 3D.POL fido.pol.3d fido 8BIT.POL fido.pol.8bit fido ADMIN.POL fido.pol.admin fido AMIGA.POL fido.pol.amiga fido AMIGASCENE.POL fido.pol.amigascene fido ANGELUS.POL fido.pol.angelus fido ANIMALS.POL fido.pol.animals fido ANIME-MANGA.POL fido.pol.anime-manga fido ANSI_ASCII.POL fido.pol.ansi_ascii fido ASSEMBLER.POL fido.pol.assembler fido ATARI.POL fido.pol.atari fido AUDIOVIDEO.POL fido.pol.audiovideo fido AUTO.POL fido.pol.auto fido AVX.POL fido.pol.avx fido BABY.POL fido.pol.baby fido BACHORKI.POL fido.pol.bachorki fido BEZ_DRUTU.POL fido.pol.bez_drutu fido BIOLCHEM.POL fido.pol.biolchem fido BOOKZ.POL fido.pol.bookz fido BUY_SELL.POL fido.pol.buy_sell fido CARTOON.POL fido.pol.cartoon fido CLIPPER.POL fido.pol.clipper fido COOKERY.POL fido.pol.cookery fido CPLUSPLUS.POL fido.pol.cplusplus fido CRYPTO.POL fido.pol.crypto fido DEMATECH.POL fido.pol.dematech fido DEUTSCH.POL fido.pol.deutsch fido DRINKS.POL fido.pol.drinks fido DRUGS.POL fido.pol.drugs fido DTP.POL fido.pol.dtp fido DZIADY.POL fido.pol.dziady fido ECHOPOL48.POL fido.pol.echopol48 fido EKOLOGIA.POL fido.pol.ekologia fido ELEKTRO.POL fido.pol.elektro fido ELITE.POL fido.pol.elite fido ENGLISH.POL fido.pol.english fido FAQPL.POL fido.pol.faqpl fido FE_HELP.POL fido.pol.fe_help fido FILEFIND.POL fido.pol.filefind fido FILENET.POL fido.pol.filenet fido FIRMA.POL fido.pol.firma fido FMAIL.POL fido.pol.fmail fido FOTO.POL fido.pol.foto fido FOXPRO.POL fido.pol.foxpro fido GAZETA.POL fido.pol.gazeta fido GITARA.POL fido.pol.gitara fido GRY.BITEWNE.POL fido.pol.gry.bitewne fido GRY.DECK.POL fido.pol.gry.deck fido GRY.POL fido.pol.gry fido GRY.RPG.POL fido.pol.gry.rpg fido GSM.POL fido.pol.gsm fido HYDEPARK.POL fido.pol.hydepark fido INFO.POL fido.pol.info fido INFORMATYKA.POL fido.pol.informatyka fido INTERNET.POL fido.pol.internet fido KAWALY.POL fido.pol.kawaly fido KIDS.POL fido.pol.kids fido KINO.POL fido.pol.kino fido KONKURSY.POL fido.pol.konkursy fido KOSMOS.POL fido.pol.kosmos fido LAMERS.POL fido.pol.lamers fido LEGAL.POL fido.pol.legal fido LINGUA.POL fido.pol.lingua fido LINUX.POL fido.pol.linux fido MAC.POL fido.pol.mac fido MATURA.POL fido.pol.matura fido MEDIA.POL fido.pol.media fido MEDICO.POL fido.pol.medico fido MM.POL fido.pol.mm fido MODEMY.POL fido.pol.modemy fido MUZKOMP.POL fido.pol.muzkomp fido MUZYKA.POL fido.pol.muzyka fido NAUKA.POL fido.pol.nauka fido NBA.POL fido.pol.nba fido NET_DEV.POL fido.pol.net_dev fido OS2.POL fido.pol.os2 fido PASCAL.POL fido.pol.pascal fido PODATKI.POL fido.pol.podatki fido POEZJA.POL fido.pol.poezja fido POLECHO.POL fido.pol.polecho fido POLICY.POL fido.pol.policy fido POL_DEV.POL fido.pol.pol_dev fido POL_TEL.POL fido.pol.pol_tel fido POL_TIX.POL fido.pol.pol_tix fido PORTAL.POL fido.pol.portal fido PRACA.POL fido.pol.praca fido PROBOARD.POL fido.pol.proboard fido PSYCHOLOGIA.POL fido.pol.psychologia fido R48CHAT.POL fido.pol.r48chat fido ROCKECHO.POL fido.pol.rockecho fido ROWERY.POL fido.pol.rowery fido SAMURAJ.POL fido.pol.samuraj fido SEKS.POL fido.pol.seks fido SFF.POL fido.pol.sff fido SIECI.POL fido.pol.sieci fido SOCCER.POL fido.pol.soccer fido SOFTWARE.POL fido.pol.software fido SOUND.POL fido.pol.sound fido SPORT.POL fido.pol.sport fido STAT.POL fido.pol.stat fido SUBKULTURY.POL fido.pol.subkultury fido SYSOP.POL fido.pol.sysop fido SYSTEMY.POL fido.pol.systemy fido T-MAIL.POL fido.pol.t-mail fido TEST.POL fido.pol.test fido TOLKIEN.POL fido.pol.tolkien fido TURYSTYKA.POL fido.pol.turystyka fido TV_SAT.POL fido.pol.tv_sat fido UFO.POL fido.pol.ufo fido VBASIC.POL fido.pol.vbasic fido VIRUS.POL fido.pol.virus fido WEDKARSTWO.POL fido.pol.wedkarstwo fido WINDOWS.POL fido.pol.windows fido WOJSKO.POL fido.pol.wojsko fido WWW.POL fido.pol.www fido ZADANIADOM.POL fido.pol.zadaniadom fido FILEF480.LOC fido.loc.filef480 fido GALECHO.LOC fido.loc.galecho fido REZYDENCI.LOC fido.loc.rezydenci fido SYSOP480.LOC fido.loc.sysop480 fido U_BORYNY.LOC fido.loc.u_boryny fido DER.BRESLAUER.TSCHATT fido.loc.der.breslauer.tschatt fido BBBS.POINTS fido.points.bbbs fido BVB.DOWNLINKS fido.downlinks.bvb fido HOA.MAIL fido.mail.hoa fido KRAP.MAIL fido.mail.krap fido TERROR.CHAT fido.chat.terror fido TERROR.MAIL fido.mail.terror fido BEBOP.CHAT.PVT fido.pvt.chat.bebop fido HACKERS.PVT fido.pvt.hackers fido KOMERCJA.PVT fido.pvt.komercja fido OBLECHY.PVT fido.pvt.oblechy fido RAP.PVT fido.pvt.rap fido POINTS_25.PRV fido.pvt.points_25 fido IZA.TOC fido.toc.iza fido # Dodatkowe konferencje w 2:480/33 33.POINTS fido.33.points fido 484.8.LINKS fido.484.8.links fido 484.FIDO fido.484.fido fido 484.NET fido.484.net fido AMIGA.FIDO.POL fido.pol.amiga.fido fido COREWARS.POL fido.pol.corewars fido DOORS.POL fido.pol.doors fido EOS-L fido.eos-l fido ESPERANTO fido.esperanto fido FILEF480.POL fido.pol.filef480 fido FLEA.GER fido.ger.flea fido GRAPHICS.POL fido.pol.graphics fido HARCERSTWO.POL fido.pol.harcerstwo fido IBMPC fido.ibmpc fido INTYMATE.POL fido.pol.intymate fido KIDS-91 fido.kids-91 fido MEDFORUM.POL fido.pol.medforum fido MIDI-PROGRAMMING fido.midi-programming fido NIKON-L fido.nikon-l fido PALMTOPS.POL fido.pol.palmtops fido # PL.INTERNET.OGLOSZENIA pl.internet.ogloszenia world # PL.REC.GRY.RPL pl.rec.gry.rpl world # PL.REC.SOC.INWALIDZI # PL.REC.SOC.WEGETARIANIZM POINT.49 fido.49.point fido POL-BRIT fido.pol-brit fido POLSKA.GEN fido.gen.polska fido PRAKTYCY.POL fido.pol.praktycy fido SIR.TENLEY.POL fido.pol.sir.tenley fido # SOC.CULUTURE.POLISH SUPPORT.POL fido.pol.support fido TPWTECH fido.tpwtech fido WIRUSAT.POINT fido.wirusat.point fido ZAJAC.PVT fido.pvt.zajac fido ZEGLARSTWO.POL fido.pol.zeglarstwo fido ZMODEM fido.zmodem # piwonet PIWONET.CHAT piwonet.chat piwo PIWONET.FILES piwonet.files piwo PIWONET.KOORD piwonet.koord piwo PIWONET.TEST piwonet.test piwo # comp.* COMP.DATABASES.SYBASE comp.databases.sybase world COMP.GRAPHICS.API.OPENGL comp.graphics.api.opengl world COMP.GRAPHICS.APPS.ALIAS comp.graphics.apps.alias world COMP.GRAPHICS.APPS.WAVEFRONT comp.graphics.apps.wavefront world COMP.LANG.C++ comp.lang.c++ world COMP.OS.OS2.MARKETPLACE comp.os.os2.marketplace world COMP.SOURCES.HP48 comp.sources.hp48 world COMP.SYS.AMIGA comp.sys.amiga world COMP.SYS.AMIGA.ADVOCACY comp.sys.amiga.advocacy world COMP.SYS.AMIGA.ANNOUNCE comp.sys.amiga.announce world COMP.SYS.AMIGA.APPLICATIONS comp.sys.amiga.applications world COMP.SYS.AMIGA.AUDIO comp.sys.amiga.audio world COMP.SYS.AMIGA.CD32 comp.sys.amiga.cd32 world COMP.SYS.AMIGA.DATACOM comp.sys.amiga.datacomm world COMP.SYS.AMIGA.EMULATIONS comp.sys.amiga.emulations world COMP.SYS.AMIGA.GAMES comp.sys.amiga.games world COMP.SYS.AMIGA.GRAPHICS comp.sys.amiga.graphics world COMP.SYS.AMIGA.HARDWARE comp.sys.amiga.hardware world COMP.SYS.AMIGA.INTRODUCTION comp.sys.amiga.introduction world COMP.SYS.AMIGA.MARKETPLACE comp.sys.amiga.marketplace world COMP.SYS.AMIGA.MISC comp.sys.amiga.misc world COMP.SYS.AMIGA.MULTIMEDIA comp.sys.amiga.multimedia world COMP.SYS.AMIGA.NETWORKING comp.sys.amiga.networking world COMP.SYS.AMIGA.PROGRAMMER comp.sys.amiga.programmer world COMP.SYS.AMIGA.REVIEWS comp.sys.amiga.reviews world COMP.SYS.AMIGA.TECH comp.sys.amiga.tech world COMP.SYS.AMIGA.UUCP comp.sys.amiga.uucp world COMP.SYS.AMSTRAD.8BIT comp.sys.amstrad.8bit world COMP.SYS.ATARI.8BIT comp.sys.atari.8bit world COMP.SYS.HP48 comp.sys.hp48 world COMP.SYS.INTERGRAPH comp.sys.intergraph world COMP.SYS.MAC.APPS comp.sys.mac.apps world COMP.SYS.SGI.ADMIN comp.sys.sgi.admin world COMP.SYS.SGI.APPS comp.sys.sgi.apps world COMP.SYS.SGI.AUDIO comp.sys.sgi.audio world COMP.SYS.SGI.BUGS comp.sys.sgi.bugs world COMP.SYS.SGI.GRAPHICS comp.sys.sgi.graphics world COMP.SYS.SGI.HARDWARE comp.sys.sgi.hardware world COMP.SYS.SGI.MARKETPLACE comp.sys.sgi.marketplace world COMP.SYS.SGI.MISC comp.sys.sgi.misc world COMP.SYS.SINCLAIR comp.sys.sinclair world # pl.* BRAMKA.POL pl.fidonet.bramka world PL.ANNOUNCE.NEWGROUPS pl.announce.newgroups world PL.ANSWERS pl.answers world PL.BIZNES pl.biznes world PL.BIZNES.BANKI pl.biznes.banki world PL.COMP.BAZY-DANYCH pl.comp.bazy-danych world PL.COMP.DTP pl.comp.dtp world PL.COMP.DTP.TEX pl.comp.dtp.tex world PL.COMP.DTP.TEX.GUST pl.comp.dtp.tex.gust world PL.COMP.GRAFIKA pl.comp.grafika world PL.COMP.INTRANET pl.comp.intranet world PL.COMP.LANG.C pl.comp.lang.c world PL.COMP.LANG.DELPHI pl.comp.lang.delphi world PL.COMP.LANG.JAVA pl.comp.lang.java world PL.COMP.LANG.PERL pl.comp.lang.perl world PL.COMP.LANG.VBASIC pl.comp.lang.vbasic world PL.COMP.MAIL pl.comp.mail world PL.COMP.MAIL.MTA pl.comp.mail.mta world PL.COMP.NETWORKING pl.comp.networking world PL.COMP.NOWE-PROGRAMY pl.comp.nowe-programy world PL.COMP.OBJECTS pl.comp.objects world PL.COMP.OGONKI pl.comp.ogonki world PL.COMP.OS.ADVOCACY pl.comp.os.advocacy world PL.COMP.OS.FREEBSD pl.comp.os.freebsd world PL.COMP.OS.HP-UX pl.comp.os.hp-ux world PL.COMP.OS.LINUX pl.comp.os.linux world PL.COMP.OS.OS2 pl.comp.os.os2 world PL.COMP.OS.UNIX pl.comp.os.unix world PL.COMP.OS.WIN3 pl.comp.os.win3 world PL.COMP.OS.WIN95 pl.comp.os.win95 world PL.COMP.OS.WINNT pl.comp.os.winnt world PL.COMP.PECET pl.comp.pecet world PL.COMP.PROGRAMMING pl.comp.programming world PL.COMP.SECURITY pl.comp.security world PL.COMP.SYS.AMIGA pl.comp.sys.amiga world PL.COMP.SYS.ATARI pl.comp.sys.atari world PL.COMP.SYS.MACINTOSH pl.comp.sys.macintosh world PL.COMP.SYS.NOVELL pl.comp.sys.novell world PL.COMP.SYS.PC-UNIX pl.comp.sys.pc-unix world PL.COMP.SYS.PC-UNIX.LINUX pl.comp.sys.pc-unix.linux world PL.COMP.SYS.SUN.ADMIN pl.comp.sys.sun.admin world PL.COMP.SYS.XWINDOW pl.comp.sys.xwindow world PL.COMP.TLUMACZENIA pl.comp.tlumaczenia world PL.COMP.WWW pl.comp.www world PL.COMP.WWW.NOWE-STRONY pl.comp.www.nowe-strony world PL.GAZETY.DONOSY pl.gazety.donosy world PL.GAZETY.DYRDYMALKI pl.gazety.dyrdymalki world PL.GAZETY.GAZETA pl.gazety.gazeta world PL.GRY.MUD pl.gry.mud world PL.GRY.RPG pl.gry.rpg world PL.HUM.POEZJA pl.hum.poezja world PL.HUM.TLUMACZENIA pl.hum.tlumaczenia world PL.INTERNET.KOMUNIKATY pl.internet.komunikaty world PL.INTERNET.NOWOSCI pl.internet.nowosci world PL.IRC pl.irc world PL.LISTSERV.CHOMOR-L pl.listserv.chomor-l world PL.LISTSERV.DZIENNIKARZ pl.listserv.dziennikarz world PL.LISTSERV.GIELDA pl.listserv.gielda world PL.LISTSERV.PLOTKI pl.listserv.plotki world PL.LISTSERV.POLIP pl.listserv.polip world PL.LISTSERV.POLWRO pl.listserv.polwro world PL.LISTSERV.SF-F pl.listserv.sf-f world PL.LISTSERV.WROCLAW pl.listserv.wroclaw world PL.MISC.BUDOWANIE pl.misc.budowanie world PL.MISC.ELEKTRONIKA pl.misc.elektronika world PL.MISC.KOLEJ pl.misc.kolej world PL.MISC.MILITARIA pl.misc.militaria world PL.MISC.PARANAUKI pl.misc.paranauki world PL.MISC.SAMOCHODY pl.misc.samochody world PL.MISC.TELEFONIA pl.misc.telefonia world PL.MISC.TELEFONIA.GSM pl.misc.telefonia.gsm world PL.MISC.TELEFONIA.ISDN pl.misc.telefonia.isdn world PL.MISC.TRANSPORT pl.misc.transport world PL.NEWS.ADMIN pl.news.admin world PL.NEWS.NOWE-GRUPY pl.news.nowe-grupy world PL.OGLOSZENIA.KUPIE pl.ogloszenia.kupie world PL.OGLOSZENIA.ROZNE pl.ogloszenia.rozne world PL.OGLOSZENIA.SPRZEDAM pl.ogloszenia.sprzedam world PL.ORG.PSI pl.org.psi world PL.PRACA.DYSKUSJE pl.praca.dyskusje world PL.PRACA.OFEROWANA pl.praca.oferowana world PL.PRACA.SZUKANA pl.praca.szukana world PL.PREGIERZ pl.pregierz world PL.REC.ANIME pl.rec.anime world PL.REC.AUDIO pl.rec.audio world PL.REC.FILM pl.rec.film world PL.REC.FILM.ANIMOWANY pl.rec.film.animowany world PL.REC.FOTO pl.rec.foto world PL.REC.GRY.KARCIANE pl.rec.gry.karciane world PL.REC.GRY.KOMPUTEROWE pl.rec.gry.komputerowe world PL.REC.GRY.KOMPUTEROWE.SPRZET pl.rec.gry.komputerowe.sprzet world PL.REC.GRY.KONSOLE pl.rec.gry.konsole world PL.REC.GRY.MUD pl.rec.gry.mud world PL.REC.GRY.RPG pl.rec.gry.rpg world PL.REC.GRY.STRATEGICZNE pl.rec.gry.strategiczne world PL.REC.GRY.SZACHY pl.rec.gry.szachy world PL.REC.HIHOT pl.rec.hihot world PL.REC.HUMOR.NAJLEPSZE pl.rec.humor.najlepsze world PL.REC.KSIAZKI pl.rec.ksiazki world PL.REC.KUCHNIA pl.rec.kuchnia world PL.REC.MODELARSTWO pl.rec.modelarstwo world PL.REC.MOTOCYKLE pl.rec.motocykle world PL.REC.MUZYKA pl.rec.muzyka world PL.REC.MUZYKA.BIN pl.rec.muzyka.bin world PL.REC.MUZYKA.GITARA pl.rec.muzyka.gitara world PL.REC.MUZYKA.JAZZ pl.rec.muzyka.jazz world PL.REC.MUZYKA.TECHNO pl.rec.muzyka.techno world PL.REC.NURKOWANIE pl.rec.nurkowanie world PL.REC.PARALOTNIE pl.rec.paralotnie world PL.REC.RADIO pl.rec.radio world PL.REC.RADIO.AMATORSKIE pl.rec.radio.amatorskie world PL.REC.RADIO.CB pl.rec.radio.cb world PL.REC.ROWERY pl.rec.rowery world PL.REC.SPORT pl.rec.sport world PL.REC.SPORT.KOSZYKOWKA pl.rec.sport.koszykowka world PL.REC.SPORT.PILKA-NOZNA pl.rec.sport.pilka-nozna world PL.REC.TELEWIZJA pl.rec.telewizja world PL.REC.TRAVEL pl.rec.travel world PL.REC.ZBIERACTWO pl.rec.zbieractwo world PL.REC.ZEGLARSTWO pl.rec.zeglarstwo world PL.REC.ZEGLARSTWO.SZANTY pl.rec.zeglarstwo.szanty world PL.REC.ZWIERZAKI pl.rec.zwierzaki world PL.REGIONALNE.KRAKOW pl.regionalne.krakow world PL.REGIONALNE.WARSZAWA pl.regionalne.warszawa world PL.SCI.CHEMIA pl.sci.chemia world PL.SCI.FILOZOFIA pl.sci.filozofia world PL.SCI.FIZYKA pl.sci.fizyka world PL.SCI.HISTORIA pl.sci.historia world PL.SCI.KOSMOS pl.sci.kosmos world PL.SCI.MATEMATYKA pl.sci.matematyka world PL.SCI.MEDYCYNA pl.sci.medycyna world PL.SCI.PSYCHOLOGIA pl.sci.psychologia world PL.SOC.DEKADENTYZM pl.soc.dekadentyzm world PL.SOC.DZIECI pl.soc.dzieci world PL.SOC.EDUKACJA pl.soc.edukacja world PL.SOC.EDUKACJA.SZKOLA pl.soc.edukacja.szkola world PL.SOC.INWALIDZI pl.soc.inwalidzi world PL.SOC.POLITYKA pl.soc.polityka world PL.SOC.POLITYKA.WYBORY pl.soc.polityka.wybory world PL.SOC.PRAWO pl.soc.prawo world PL.SOC.RELIGIA pl.soc.religia world PL.SOC.SEKS pl.soc.seks world PL.SOC.SEKS.TOWARZYSKIE pl.soc.seks.towarzyskie world PL.SOC.WEGETARIANIZM pl.soc.wegetarianizm world PL.SOC.ZIELONI pl.soc.zieloni world PL.TEST pl.test world # Fido - World 10TH_AMD fido.10th_amd fido 12_STEPS fido.12_steps fido 1992-NET fido.1992-net fido 2000 fido.2000 fido 4DOS fido.4dos fido 4X4 fido.4x4 fido 60S_70S_PROGROCK fido.60s_70s_progrock fido 80XXX fido.80xxx fido AAOS fido.aaos fido ABLED fido.abled fido ABLENEWS fido.ablenews fido ABORTION fido.abortion fido AD&D fido.ad_and_d fido ADAM fido.adam fido ADAPTEK fido.adaptek fido ADEPTSOFT fido.adeptsoft fido ADEPT_SYSOP fido.adept_sysop fido ADHD fido.adhd fido ADLIB fido.adlib fido ADOPTEES fido.adoptees fido ADS_ANNOUNCE fido.ads_announce fido ADULT_TALK fido.adult_talk fido AGA_AMIGA fido.aga_amiga fido AIDS-HIV fido.aids-hiv fido AIDS.DATA fido.aids.data fido AIDS/ARC fido.aids_arc fido AIRGUN fido.airgun fido ALASKA_CHAT fido.alaska_chat fido ALLFIX_HELP fido.allfix_help fido ALTMED fido.altmed fido ALT_DOS fido.alt_dos fido AMATEUR_RADIO fido.amateur_radio fido AMIGA fido.amiga fido AMIGA.EUR fido.eur.amiga fido AMIGAGAMES fido.amigagames fido AMIGASALE fido.amigasale fido AMIGASOFT fido.amigasoft fido AMIGA_BBS fido.amiga_bbs fido AMIGA_CDROM fido.amiga_cdrom fido AMIGA_COMMS fido.amiga_comms fido AMIGA_FILEFIND fido.amiga_filefind fido AMIGA_INT fido.amiga_int fido AMIGA_LC fido.amiga_lc fido AMIGA_MAGS fido.amiga_mags fido AMIGA_MUSIC fido.amiga_music fido AMIGA_NF fido.amiga_nf fido AMIGA_PROG fido.amiga_prog fido AMIGA_SYSOP fido.amiga_sysop fido AMIGA_UK fido.amiga_uk fido AMSTRAD fido.amstrad fido AMU_HELP fido.amu_help fido AMY_COMMS fido.amy_comms fido AMY_TECH fido.amy_tech fido ANEWS fido.anews fido ANGLING fido.angling fido ANIMAL_DOC fido.animal_doc fido ANIMAL_RIGHTS fido.animal_rights fido ANIME fido.anime fido ANIMED fido.animed fido ANXIETY fido.anxiety fido APOGEE fido.apogee fido APPLE fido.apple fido APWORKS fido.apworks fido AQUARIUM fido.aquarium fido ARCADE fido.arcade fido AREXX fido.arexx fido ARJ fido.arj fido ARROWBRIDGE fido.arrowbridge fido ARTWARE fido.artware fido ASCII_ART fido.ascii_art fido ASIAN_LINK fido.asian_link fido ASKACOP fido.askacop fido ASKACOP2 fido.askacop2 fido ASKCOPS fido.askcops fido ASK_A_NURSE fido.ask_a_nurse fido ASL fido.asl fido ASP fido.asp fido ASTRONET fido.astronet fido ASTRONOMY fido.astronomy fido ASTRONOMY.029 fido.astronomy-029 fido AT&T fido.at_and_t fido ATARI fido.atari fido ATARIST fido.atarist fido ATARI_ST fido.atari_st fido ATM fido.atm fido AUDIO fido.audio fido AUS_GENEALOGY fido.aus_genealogy fido AUTOMOTIVE fido.automotive fido AUTORACE fido.autorace fido AVIATION fido.aviation fido A_CAD fido.a_cad fido A_THEIST fido.a_theist fido BABYLON5 fido.babylon5 fido BAMA fido.bama fido BARDROOM fido.bardroom fido BASIC7 fido.basic7 fido BASSGTR fido.bassgtr fido BATPOWER fido.batpower fido BATPOWER_UK fido.batpower_uk fido BB-CARDS fido.bb-cards fido BBC fido.bbc fido BBS-GAMES fido.bbs-games fido BBS-SYSOP fido.bbs-sysop fido BBSCON fido.bbscon fido BBSDOORS fido.bbsdoors fido BBSDOOR_DISCUSSION fido.bbsdoor_discussion fido BBSLAW fido.bbslaw fido BBS_ADS fido.bbs_ads fido BBS_CARNIVAL fido.bbs_carnival fido BBS_DOORS fido.bbs_doors fido BBS_INTERNET fido.bbs_internet fido BBS_USERS fido.bbs_users fido BCAST_RADIO fido.bcast_radio fido BEACH_BOYS fido.beach_boys fido BEAD-JEWEL fido.bead-jewel fido BEATLES fido.beatles fido BGFAX fido.bgfax fido BIBLE fido.bible fido BIBLE-STUDY fido.bible-study fido BIG_SMOKE fido.big_smoke fido BIKE-N-RIDER fido.bike-n-rider fido BIKENET fido.bikenet fido BINKLEY fido.binkley fido BIRDING fido.birding fido BLINDTLK fido.blindtlk fido BLINKTALK fido.blinktalk fido BLUEWAVE fido.bluewave fido BNU fido.bnu fido BOATING fido.boating fido BODYWORK fido.bodywork fido BOFFINS fido.boffins fido BOOKEM fido.bookem fido BRE900 fido.bre900 fido BRIT_CAR fido.brit_car fido BROADCAST fido.broadcast fido BT-XE fido.bt-xe fido BUSINESS fido.business fido BUSINESS_UK fido.business_uk fido BUY fido.buy fido C&C fido.c_and_c fido CABLE_MODEMS fido.cable_modems fido CALLSIGN fido.callsign fido CANACHAT fido.canachat fido CANPOL fido.canpol fido CAN_FREECHAT fido.can_freechat fido CAN_MILITARY fido.can_military fido CAN_SYSLAW fido.can_syslaw fido CARCINOMA fido.carcinoma fido CARDIAC fido.cardiac fido CAROLINA_GEN fido.carolina_gen fido CAR_AUDIO fido.car_audio fido CATS fido.cats fido CBM fido.cbm fido CBM-128 fido.cbm-128 fido CBM-GEOS fido.cbm-geos fido CB_RADIO fido.cb_radio fido CDOOR fido.cdoor fido CDROM fido.cdrom fido CDROM_SALE fido.cdrom_sale fido CD_ECHO fido.cd_echo fido CELLULAR fido.cellular fido CELLULAR_II fido.cellular_ii fido CFL fido.cfl fido CFORSALE fido.cforsale fido CFS fido.cfs fido CHAMELEON fido.chameleon fido CHANNELS fido.channels fido CHAOS_LANDING fido.chaos_landing fido CHATTER fido.chatter fido CHESS fido.chess fido CHESS_TOURNEY fido.chess_tourney fido CHILD_ABUSE fido.child_abuse fido CHIPSMAG fido.chipsmag fido CHRONIC_PAIN fido.chronic_pain fido CHURCH&STATE fido.church_and_state fido CIRCUS_UK fido.circus_uk fido CIVIL_WAR fido.civil_war fido CIVLIB fido.civlib fido CLARION fido.clarion fido CLASSICAL fido.classical fido CLASSICAL_UK fido.classical_uk fido CLASSIFIEDS fido.classifieds fido CLIMBING fido.climbing fido CLIPPER fido.clipper fido CLONE fido.clone fido CLUB_AMIGA fido.club_amiga fido CMX4SALE fido.cmx4sale fido CNET_BBS fido.cnet_bbs fido COCO fido.coco fido COFFEE_KLATSCH fido.coffee_klatsch fido COLLECTABLES fido.collectables fido COLLEGE fido.college fido COLLEGE_SINGLES fido.college_singles fido COMICS fido.comics fido COMM fido.comm fido COMMS_UK fido.comms_uk fido COMPRESS fido.compress fido COMPUSALE fido.compusale fido CONCORD fido.concord fido CONFED_HERITAGE fido.confed_heritage fido CONSOLES fido.consoles fido CONSPRCY fido.consprcy fido CONSTITUTIONAL fido.constitutional fido CONSUMER_REPORT fido.consumer_report fido CONSUMER_VIEW fido.consumer_view fido CONTACT_WORLD_LINK fido.contact_world_link fido COOKING fido.cooking fido CORELDRAW fido.coreldraw fido COUNTRY fido.country fido CPMTECH fido.cpmtech fido CRAFTING fido.crafting fido CRAFTING-FORSALE fido.crafting-forsale fido CREATIVE_ARTS fido.creative_arts fido CRICKET_ECHO fido.cricket_echo fido CROSS-STITCHING fido.cross-stitching fido CYCLONE fido.cyclone fido C_ECHO fido.c_echo fido C_PLUSPLUS fido.c_plusplus fido DADS fido.dads fido DBASE fido.dbase fido DBRIDGE fido.dbridge fido DEAR_DIARY fido.dear_diary fido DEBATE fido.debate fido DELPHI fido.delphi fido DESQVIEW fido.desqview fido DEUTSCH fido.deutsch fido DIABETES fido.diabetes fido DIARIST fido.diarist fido DIETING fido.dieting fido DIRTY_DOZEN fido.dirty_dozen fido DISASTERS fido.disasters fido DISNEY fido.disney fido DIY fido.diy fido DJ fido.dj fido DLG_INFO fido.dlg_info fido DLG_SUPPORT fido.dlg_support fido DND fido.dnd fido DOGHOUSE fido.doghouse fido DOG_FANCIERS fido.dog_fanciers fido DOOM fido.doom fido DOORGAMES fido.doorgames fido DOORWARE fido.doorware fido DOS_INTERNET fido.dos_internet fido DREAMS fido.dreams fido DRIVING fido.driving fido DR_DEBUG fido.dr_debug fido DTP fido.dtp fido DUNE fido.dune fido ECHOLIST fido.echolist fido ECHOMAC fido.echomac fido ECHOPOL2 fido.echopol2 fido ECHOREVIEWS fido.echoreviews fido ECHO_ADS fido.echo_ads fido ECHO_REQ fido.echo_req fido ECOLOGY fido.ecology fido ECPROG fido.ecprog fido EC_SUPPORT fido.ec_support fido EC_UTIL fido.ec_util fido EDGE_ONLINE fido.edge_online fido ELECTRONICS fido.electronics fido EMBEDDED fido.embedded fido EMS fido.ems fido EMULATE fido.emulate fido ENET.SOFT fido.enet.soft fido ENET.SYSOP fido.enet.sysop fido ENTREPRENEUR fido.entrepreneur fido ENVIRON fido.environ fido EP-ANNOUNCE fido.ep-announce fido EQUUS fido.equus fido ER fido.er fido ESPRIT fido.esprit fido ET_SIGHTINGS fido.et_sightings fido EVOLUTION fido.evolution fido E_ECHO fido.e_echo fido FANTASY.281 fido.fantasy-281 fido FARMING fido.farming fido FAROUT fido.farout fido FCC fido.fcc fido FDECHO fido.fdecho fido FDN_ANNOUNCE fido.fdn_announce fido FEMINISM fido.feminism fido FE_HELP fido.fe_help fido FIBROM fido.fibrom fido FIDOECHOPOL fido.fidoechopol fido FIDOGEN fido.fidogen fido FIDONEWS fido.fidonews fido FILEFIND fido.filefind fido FILES fido.files fido FILE_MOVERS fido.file_movers fido FILE_REQ fido.file_req fido FILK fido.filk fido FILM fido.film fido FIREARMS fido.firearms fido FISHING fido.fishing fido FLAME fido.flame fido FLAT_TAX fido.flat_tax fido FLYING fido.flying fido FMAIL_HELP fido.fmail_help fido FNOS_HELP fido.fnos_help fido FN_SYSOP fido.fn_sysop fido FOR-SALE fido.for-sale fido FOXPRO fido.foxpro fido FRANCAIS fido.francais fido FRANCENET fido.francenet fido FREE2000 fido.free2000 fido FREEMAIL fido.freemail fido FREEMASON fido.freemason fido FREE_BIBLE fido.free_bible fido FREE_SPEECH fido.free_speech fido FRIENDS fido.friends fido FRONTDOOR_APX fido.frontdoor_apx fido FRONTIER fido.frontier fido FS fido.fs fido FTN_INTERNET fido.ftn_internet fido FTN_PROGS fido.ftn_progs fido FTP_FIDO fido.ftp_fido fido FTSC_PUBLIC fido.ftsc_public fido FUNNY fido.funny fido F_SYSLNGE fido.f_syslnge fido GAF.CHAT fido.chat.gaf fido GAMEDEV fido.gamedev fido GAMING fido.gaming fido GAYLINK fido.gaylink fido GAYNEWS fido.gaynews fido GAYTEEN fido.gayteen fido GAY_FAITH fido.gay_faith fido GAY_PRIDE fido.gay_pride fido GECHO_HELP fido.gecho_help fido GENDATA fido.gendata fido GENDER fido.gender fido GENEALOGY fido.genealogy fido GENEALOGY.CDN fido.genealogy.cdn fido GENEALOGY.EUR fido.eur.genealogy fido GENE_CHAT fido.gene_chat fido GENSOFT fido.gensoft fido GENSYSOP fido.gensysop fido GEN_RES fido.gen_res fido GEOWORKS fido.geoworks fido GIGO fido.gigo fido GOLDED fido.golded fido GOLDED.BETA fido.golded.beta fido GOP_POLITICS fido.gop_politics fido GOTHIC.UK fido.gothic.uk fido GOURMET fido.gourmet fido GRAMPS_ECHO fido.gramps_echo fido GRAND_PRIX fido.grand_prix fido GRAPHICS fido.graphics fido GREEN.029 fido.green.029 fido GUITAR fido.guitar fido GUNS fido.guns fido GUN_CONTROL fido.gun_control fido HAM fido.ham fido HAM-ECHO fido.ham-echo fido HAM-SALE fido.ham-sale fido HAM_REQ fido.ham_req fido HAM_TECH fido.ham_tech fido HAPPY_HARDCORE fido.happy_hardcore fido HARDWARE fido.hardware fido HAYES fido.hayes fido HDCONF fido.hdconf fido HDSALE fido.hdsale fido HDTV fido.hdtv fido HEINLEIN fido.heinlein fido HELPLINE fido.helpline fido HERBS-N-SUCH fido.herbs-n-such fido HERMES_SYSOPS fido.hermes_sysops fido HIGHLANDER fido.highlander fido HISTORY fido.history fido HOBBIES fido.hobbies fido HOCKEY fido.hockey fido HOLYSMOKE fido.holysmoke fido HOLY_BIBLE_FCS fido.holy_bible_fcs fido HOME-N-GRDN fido.home-n-grdn fido HOMEPOWR fido.homepowr fido HOMESCHL fido.homeschl fido HOME_AUTOMATION fido.home_automation fido HOME_COOKING fido.home_cooking fido HOME_OFFICE fido.home_office fido HOME_REPAIR fido.home_repair fido HOTROD fido.hotrod fido HOT_SITES fido.hot_sites fido HOUFILES fido.houfiles fido HOUSTON_CHAT fido.houston_chat fido HOUSYSOP fido.housysop fido HP fido.hp fido HS_MODEMS fido.hs_modems fido HTMLEDIT fido.htmledit fido HUMOR fido.humor fido I95 fido.i95 fido IBBSDOOR fido.ibbsdoor fido IBM fido.ibm fido ICEUTILS fido.iceutils fido ICGAL fido.icgal fido IEEE fido.ieee fido IMAGES fido.images fido IMAIL_HELP fido.imail_help fido IM_USER fido.im_user fido INDIAN_AFFAIRS fido.indian_affairs fido INDIE fido.indie fido INFOMAIL fido.infomail fido INTBBS_WK fido.intbbs_wk fido INTERBBS fido.interbbs fido INTERCOOK fido.intercook fido INTERFAITH fido.interfaith fido INTERGREEK fido.intergreek fido INTERNAT fido.internat fido INTERNAT_UK fido.internat_uk fido INTERNET fido.internet fido INTERUSER fido.interuser fido INVEST fido.invest fido IPMAILER fido.ipmailer fido IP_CONNECT fido.ip_connect fido ISDN fido.isdn fido ISDN.EUR fido.isdn.eur fido ITALIANO.GEN fido.gen.italiano fido I_AMSTRAD_8BIT fido.i_amstrad_8bit fido I_UFO fido.i_ufo fido JDSSOFT fido.jdssoft fido JEWISHGEN fido.jewishgen fido JOURNAL fido.journal fido JUDAICA fido.judaica fido KATTY_KORNER fido.katty_korner fido KERRANG fido.kerrang fido KIDS fido.kids fido KLINGON fido.klingon fido KLINGON_RPG fido.klingon_rpg fido KRAP_LINKS fido.krap_links fido LAN fido.lan fido LAND fido.land fido LANDROVER_UK fido.landrover_uk fido LANTASTI fido.lantasti fido LAW fido.law fido LAW_&_ORDER fido.law_and_order fido LA_CHAT fido.la_chat fido LA_FOR_SALE fido.la_for_sale fido LEGAL_LAW fido.legal_law fido LIBRARY fido.library fido LIB_NW fido.lib_nw fido LIMBAUGH fido.limbaugh fido LINUX fido.linux fido LINUX_UK fido.linux_uk fido LOCAL_MUSIC fido.local_music fido LOGS fido.logs fido LORA fido.lora fido LORD fido.lord fido LORD2_CHAT fido.lord2_chat fido LORD2_IGM fido.lord2_igm fido LORD2_SYSOP fido.lord2_sysop fido LORD_SYSOP fido.lord_sysop fido LORE fido.lore fido LOTUS fido.lotus fido LOVE_&_MARRIAGE fido.love_and_marriage fido LOW-FAT fido.low-fat fido LYRICS fido.lyrics fido MAC4SALE fido.mac4sale fido MACCOMM fido.maccomm fido MACHW fido.machw fido MACSW fido.macsw fido MACSYSOP fido.macsysop fido MAC_TELEFINDER fido.mac_telefinder fido MAGICK fido.magick fido MAIL_80 fido.mail_80 fido MALUM_PROHIBITUM fido.malum_prohibitum fido MATHS.ACA fido.maths.aca fido MAXDEV fido.maxdev fido MCC_SUPPORT fido.mcc_support fido MCIBTYC fido.mcibtyc fido MCMAIL fido.mcmail fido MDOOR_HELP fido.mdoor_help fido MEADOW fido.meadow fido MEAL-MASTER fido.meal-master fido MECCA fido.mecca fido MED_MOANS fido.med_moans fido MEMORIES fido.memories fido MENSA fido.mensa fido MENS_ISSUES fido.mens_issues fido MENTAL_HEALTH fido.mental_health fido META_UFO fido.meta_ufo fido MEXICAN_LINK fido.mexican_link fido MIDI-NET fido.midi-net fido MILHISTORY fido.milhistory fido MILITARY_PEOPLE fido.military_people fido MILITIA fido.militia fido MISSING fido.missing fido MISSING_CHILD fido.missing_child fido ML-BASEBALL fido.ml-baseball fido MLM fido.mlm fido MODEM fido.modem fido MODEMS fido.modems fido MODERATOR fido.moderator fido MODR8TR fido.modr8tr fido MONTE fido.monte fido MOORCOCK fido.moorcock fido MORMON fido.mormon fido MOSCOW_OKLAHOMA fido.moscow_oklahoma fido MOTORCYCLE fido.motorcycle fido MSGED_ECHO fido.msged_echo fido MST3K fido.mst3k fido MS_EXCEL fido.ms_excel fido MS_WORD fido.ms_word fido MTG_UK fido.mtg_uk fido MTG_WOC fido.mtg_woc fido MUFFIN fido.muffin fido MULT-SCLEROSIS fido.mult-sclerosis fido MUSE fido.muse fido MUSIC fido.music fido MUSICIAN fido.musician fido MUSIC_CONTACTS fido.music_contacts fido MUSIC_UK fido.music_uk fido MW_GENE fido.mw_gene fido MYSTERY fido.mystery fido MYTHOLOGY fido.mythology fido NANFE fido.nanfe fido NASCAR fido.nascar fido NATURIST fido.naturist fido NAT_FLEA_MKT fido.nat_flea_mkt fido NAVY fido.navy fido NBA_ECHO fido.nba_echo fido NEEDLES_THREADS fido.needles_threads fido NETSCAPE fido.netscape fido NET_DEV fido.net_dev fido NEUROLOGY fido.neurology fido NEWAGE_THOUGHT fido.newage_thought fido NEWMUSIC fido.newmusic fido NEWSCHAT fido.newschat fido NEW_AGE_ECHO fido.new_age_echo fido NEW_SYSOP fido.new_sysop fido NEW_SYSOP_UK fido.new_sysop_uk fido NEXUS fido.nexus fido NFB-TALK fido.nfb-talk fido NFL fido.nfl fido NONSPORT_CARDS fido.nonsport_cards fido NOPIRACY fido.nopiracy fido NORML fido.norml fido NOVELL fido.novell fido NURSES_NETWORK fido.nurses_network fido NUTRITION fido.nutrition fido NU_SUPPORT fido.nu_support fido NZ_AMRAD fido.nz_amrad fido NZ_BBS fido.nz_bbs fido NZ_BUYSELL fido.nz_buysell fido NZ_COMMS fido.nz_comms fido NZ_COMM_BUYSELL fido.nz_comm_buysell fido NZ_DEMO fido.nz_demo fido NZ_DISTRIBUTION fido.nz_distribution fido NZ_ECHO fido.nz_echo fido NZ_FIDONET fido.nz_fidonet fido NZ_FISHING fido.nz_fishing fido NZ_GAMES fido.nz_games fido NZ_GENEALOGY fido.nz_genealogy fido NZ_HUMOUR fido.nz_humour fido NZ_INERNET fido.nz_internet fido NZ_INTERNET fido.nz_internet fido NZ_LOWLEVEL fido.nz_lowlevel fido NZ_MUSIC fido.nz_music fido NZ_PARANORMAL fido.nz_paranormal fido NZ_PASCAL fido.nz_pascal fido NZ_PHILOSOPHY fido.nz_philosophy fido NZ_POLS fido.nz_pols fido NZ_RELIGION fido.nz_religion fido NZ_RPG fido.nz_rpg fido NZ_RPG_CHAT fido.nz_rpg_chat fido NZ_SF fido.nz_sf fido NZ_SPACE fido.nz_space fido NZ_STARTREK fido.nz_startrek fido NZ_TECH fido.nz_tech fido NZ_WINDOWS fido.nz_windows fido OBSOLETE fido.obsolete fido OCCULT_CHAT fido.occult_chat fido OFFLINE fido.offline fido OLDCARS fido.oldcars fido OLD_ENGINE fido.old_engine fido ON_LINE_GAMES fido.on_line_games fido OPENDOORS fido.opendoors fido OPEN_BIBLE fido.open_bible fido OS-DEBATE fido.os-debate fido OS2 fido.os2 fido OS2BBS fido.os2bbs fido OS2COMM fido.os2comm fido OS2DOS fido.os2dos fido OS2DOSBBS fido.os2dosbbs fido OS2GAMES fido.os2games fido OS2HW fido.os2hw fido OS2INET fido.os2inet fido OS2LAN fido.os2lan fido OS2PROC fido.os2proc fido OS2PROG fido.os2prog fido OS2REXX fido.os2rexx fido OS9 fido.os9 fido OSDEBATE fido.osdebate fido OTHERNETS fido.othernets fido OT_SUPPORT fido.ot_support fido P5DRAFT fido.p5draft fido PACKET fido.packet fido PARANORM fido.paranorm fido PARENTS fido.parents fido PARROTS fido.parrots fido PASCAL fido.pascal fido PASCAL_LESSONS fido.pascal_lessons fido PAUK_REVERE fido.paul_revere fido PAUL_REVERE fido.paul_revere fido PCBOARD fido.pcboard fido PCUG fido.pcug fido PC_ADDICT fido.pc_addict fido PDNECHO fido.pdnecho fido PENPAL fido.penpal fido PENPAL2_UK fido.penpal2_uk fido PERL fido.perl fido PET_CHAT fido.pet_chat fido PGMRS fido.pgmrs fido PHARMACY fido.pharmacy fido PHIL fido.phil fido PHILOSOPHY fido.philosophy fido PHONES fido.phones fido PHOTO fido.photo fido PHOTOGRAPHY fido.photography fido PHYSICS fido.physics fido PINK fido.pink fido PKEY_DROP fido.pkey_drop fido PLATINUM_XPRESS fido.platinum_xpress fido POETRY_WORKSHOP fido.poetry_workshop fido POHE fido.pohe fido POINTS fido.points fido POLISH fido.polish fido POLITICS fido.politics fido PORTAL fido.portal fido POWERPC fido.powerpc fido POWER_BAS fido.power_bas fido PPI_MODEMS fido.ppi_modems fido PRATCHETT fido.pratchett fido PREMIER_LEAGUE fido.premier_league fido PROBOARD fido.proboard fido PROMOTE_BBS fido.promote_bbs fido PROSE&VERSE fido.prose_and_verse fido PROTOSTAR fido.protostar fido PROWRITE fido.prowrite fido PRO_AUDIO fido.pro_audio fido PRO_LIFE fido.pro_life fido PRO_WRESTLING fido.pro_wrestling fido PSION fido.psion fido PS_DAILY fido.ps_daily fido PS_WEEKLY fido.ps_weekly fido PUBLIC_KEYS fido.public_keys fido PUNCH fido.punch fido PYRO fido.pyro fido P_NEWS fido.p_news fido QEDIT fido.qedit fido QFRONT fido.qfront fido QMODEM_USER fido.qmodem_user fido QUAKE fido.quake fido QUICKBBS fido.quickbbs fido QUICKEN fido.quicken fido QUICKPRO fido.quickpro fido QUIK_BAS fido.quik_bas fido QUIK_BAS_UK fido.quik_bas_uk fido R19SYSOP fido.r19sysop fido R19_CHAT fido.r19_chat fido RACING_SPEED fido.racing_speed fido RADIO_CONTROL fido.radio_control fido RADIO_HOBBY-ALL fido.radio_hobby-all fido RAILFANS fido.railfans fido RANMA_1/2 fido.ranma_1_2 fido RAR fido.rar fido RAR.SUPPORT fido.rar.support fido RA_32BIT fido.ra_32bit fido RA_SUPPORT fido.ra_support fido RA_UK fido.ra_uk fido RA_UTIL fido.ra_util fido RBBS-PC fido.rbbs-pc fido RCM fido.rcm fido READING-ROOM fido.reading-room fido REAL_FREE_SPEECH fido.real_free_speech fido RECFRP fido.recfrp fido RECIPES fido.recipes fido RECOVERY fido.recovery fido REGCON fido.regcon fido REGCON.EUR fido.eur.regcon fido RELOAD fido.reload fido RENEGADE fido.renegade fido RENEGADE_BBS fido.renegade_bbs fido RENEGADE_UTILS fido.renegade_utils fido REPUBLICAN fido.republican fido RIBBS fido.ribbs fido RIGHTS fido.rights fido ROBOTECH fido.robotech fido ROFC fido.rofc fido ROK fido.rok fido ROOTS_MUSIC fido.roots_music fido RPG_GENERAL fido.rpg_general fido RTKBA fido.rtkba fido R_CATHOLIC fido.r_catholic fido SACRED_MAGICK fido.sacred_magick fido SAILING fido.sailing fido SAILOR_MOON fido.sailor_moon fido SATELLITE fido.satellite fido SAT_TV_EUROPE fido.sat_tv_europe fido SB-NASA_NEWS fido.sb-nasa_news fido SB-NASA_TECH fido.sb-nasa_tech fido SB-QUESTIONS fido.sb-questions fido SB-SAT_TRACK fido.sb-sat_track fido SB-SOLAR_RPT fido.sb-solar_rpt fido SB-SYSOPS fido.sb-sysops fido SB-WORLD_NWS fido.sb-world_nws fido SCANRADIO fido.scanradio fido SCI&TECH fido.sci_and_tech fido SCIENCE fido.science fido SCN-CHEAT fido.scn-cheat fido SCOUTER fido.scouter fido SCOUTING fido.scouting fido SCUBA fido.scuba fido SEARCHLIGHT fido.searchlight fido SET fido.set fido SEW_&_QUILT fido.sew_and_quilt fido SE_GENEALOGY fido.se_genealogy fido SF fido.sf fido SFFAN fido.sffan fido SHAREWARE_SUPPORT fido.shareware_support fido SHAREWRE fido.sharewre fido SHARP_POINTS fido.sharp_points fido SHORTWAVE fido.shortwave fido SHOTGUN fido.shotgun fido SHOTGUN_UK fido.shotgun_uk fido SILENTTALK fido.silenttalk fido SILVER_XPRESS fido.silver_xpress fido SIM fido.sim fido SIMPSONS fido.simpsons fido SINGLE_DADS fido.single_dads fido SINGLE_MOMS fido.single_moms fido SINGLE_PARENT fido.single_parent fido SIP_AA fido.sip_aa fido SIP_ACA fido.sip_aca fido SIP_ALANON fido.sip_alanon fido SIP_INCEST fido.sip_incest fido SIP_NA fido.sip_na fido SIP_SURVIVOR fido.sip_survivor fido SKEPTIC fido.skeptic fido SLIDERS fido.sliders fido SMEG fido.smeg fido SMOKERS_RIGHTS fido.smokers_rights fido SOAPS fido.soaps fido SOUNDOFF fido.soundoff fido SOUTH_TEXAS fido.south_texas fido SOU_STAR fido.sou_star fido SPACE fido.space fido SPECTRUM fido.spectrum fido SPINAL_INJURY fido.spinal_injury fido SPIRITUAL fido.spiritual fido SPITFIRE fido.spitfire fido SPORTS fido.sports fido SPORTS_UK fido.sports_uk fido SPOT fido.spot fido SP_GENERAL fido.sp_general fido SRGAMES fido.srgames fido STAMPS fido.stamps fido STARGATE fido.stargate fido STARTREK fido.startrek fido STARTREK_CCG fido.startrek_ccg fido STARTREK_RPG fido.startrek_rpg fido STARWARS fido.starwars fido STARWARS_UK fido.starwars_uk fido STATESIDE_PENPALS fido.stateside_penpals fido STDSN fido.stdsn fido STOCK_MARKET fido.stock_market fido STOP_SMOKING fido.stop_smoking fido STRATEGY fido.strategy fido STRESS_MGMT fido.stress_mgmt fido STTNG fido.sttng fido STUDENT fido.student fido ST_PROG fido.st_prog fido SUPERBBS fido.superbbs fido SUPRA fido.supra fido SUPRAFAX fido.suprafax fido SURVIVOR fido.survivor fido SYNCDATA fido.syncdata fido SYNCHRONET fido.synchronet fido SYNC_SYSOPS fido.sync_sysops fido SYS4SALE fido.sys4sale fido SYSOP fido.sysop fido SYSOPS fido.sysops fido SYSTEM7 fido.system7 fido S_KING fido.s_king fido T-MAIL.SUPPORT fido.t-mail.support fido T-MAIL.UTIL fido.t-mail.util fido TABLATURE fido.tablature fido TAG fido.tag fido TAGLINES fido.taglines fido TAGLINES_UK fido.taglines_uk fido TBBS fido.tbbs fido TCPIP fido.tcpip fido TCRSCHAT fido.tcrschat fido TCRSFILEBONE fido.tcrsfilebone fido TCRSSTATS fido.tcrsstats fido TCRSVOTE fido.tcrsvote fido TCRS_ADMIN fido.tcrs_admin fido TEAMOS2 fido.teamos2 fido TECH fido.tech fido TEEN fido.teen fido TELEMATE fido.telemate fido TELIX fido.telix fido TENNIS fido.tennis fido TENN_GEN fido.tenn_gen fido TERMINAT fido.terminat fido TERMINATE_UK fido.terminate_uk fido TG_SUPPORT fido.tg_support fido THE-BIBLE fido.the-bible fido THEATRE fido.theatre fido THEIST_WATCH fido.theist_watch fido THERAPY_SERVICE_DOG fido.therapy_service_dog fido THE_CURE_NETWORK fido.the_cure_network fido TI-ECHO fido.ti-echo fido TOONS fido.toons fido TOTT fido.tott fido TOTT_ROCK fido.tott_rock fido TOTT_SYSOP fido.tott_sysop fido TPASCAL fido.tpascal fido TRADE_WARS fido.trade_wars fido TRAINS fido.trains fido TRAK-ONE-FILES fido.trak-one-files fido TRANSAMIGA fido.transamiga fido TRANSATLANTIC_TALK fido.transatlantic_talk fido TRANSPORT fido.transport fido TRAPDOOR fido.trapdoor fido TRAVEL fido.travel fido TREK fido.trek fido TREK.UK fido.uk.trek fido TREKTECH fido.trektech fido TREK_CREATIVE fido.trek_creative fido TREK_HUMOR_FILK fido.trek_humor_filk fido TREK_RANKS_UK fido.trek_ranks_uk fido TREK_VOYAGER fido.trek_voyager fido TRIBBS fido.tribbs fido TRIUS fido.trius fido TRI_SYSOP fido.tri_sysop fido TRS-MOD134 fido.trs-mod134 fido TUB fido.tub fido TV fido.tv fido TVRO fido.tvro fido UFGATE fido.ufgate fido UFO fido.ufo fido UK-OFFTOPIC fido.uk-offtopic fido UKSCH_HIGH fido.uksch_high fido UKSCH_SIXTH fido.uksch_sixth fido UK_FILE_DIST fido.uk_file_dist fido UK_FILE_FIND fido.uk_file_find fido UK_HST fido.uk_hst fido UK_OZ fido.uk_oz fido UK_SALES fido.uk_sales fido UNIX fido.unix fido USA_EURLINK fido.usa_eurlink fido USR_MODEMS fido.usr_modems fido USR_SPORTSTERS fido.usr_sportsters fido VBBS fido.vbbs fido VEGAN fido.vegan fido VEGETARIAN fido.vegetarian fido VFIDO fido.vfido fido VGA.PLANETS fido.vga.planets fido VIA_SOFT fido.via_soft fido VICARS fido.vicars fido VIDEO fido.video fido VID_GAME fido.vid_game fido VIETNAM_VETS fido.vietnam_vets fido VIN_MAISON fido.vin_maison fido VIRUS fido.virus fido VIRUS_INFO fido.virus_info fido VIRUS_NFO fido.virus_nfo fido VISUAL_BASIC fido.visual_basic fido WARNING fido.warning fido WC!_CHAT fido.wc_chat fido WC4DOS fido.wc4dos fido WC4_32BIT fido.wc4_32bit fido WCCODE fido.wccode fido WC_TECH fido.wc_tech fido WEATHER fido.weather fido WEB-CONSTRUCT fido.web-construct fido WELFARE fido.welfare fido WGW fido.wgw fido WHAT'S_HOT! fido.what_s_hot fido WHITEHOUSE fido.whitehouse fido WHITEHOUSE_TALK fido.whitehouse_talk fido WHO fido.who fido WHOLLY_BIBLE fido.wholly_bible fido WILDCAT fido.wildcat fido WILDCAT4 fido.wildcat4 fido WILDCAT5 fido.wildcat5 fido WILDRNSS fido.wildrnss fido WIN.SYSOP fido.win.sysop fido WIN32 fido.win32 fido WIN95 fido.win95 fido WINDOWS fido.windows fido WINDOWS-NT fido.windows-nt fido WINDOWS-NT_BBS fido.windows-nt_bbs fido WINDOWS.PROG fido.windows.prog fido WINDOWS_UK fido.windows_uk fido WIN_95 fido.win_95 fido WIN_ACCESS fido.win_access fido WNFOSSIL fido.wnfossil fido WOODYS_LINKS fido.woodys_links fido WOODY_STATS fido.woody_stats fido WORKBENCH fido.workbench fido WORLDTLK fido.worldtlk fido WPERFECT fido.wperfect fido WRESTLING fido.wrestling fido WRESTLING_CHAT fido.wrestling_chat fido WRITING fido.writing fido WUNDERMENT fido.wunderment fido X-FILES fido.x-files fido X00_USER fido.x00_user fido XENIA fido.xenia fido XPOINT_UK fido.xpoint_uk fido YOUNG_ADULT fido.young_adult fido Z1_BACKBONE fido.z1_backbone fido Z1_CHAT fido.z1_chat fido Z1_ELECTION fido.z1_election fido Z1_FIDONET fido.z1_fidonet fido Z1_POLITICAL fido.z1_political fido ZEC fido.zec fido ZONE3_SPORT fido.zone3_sport fido ZONE3_TECH fido.zone3_tech fido ZOOM fido.zoom fido ZYMURGY fido.zymurgy fido ZYXEL fido.zyxel fido {COMMO} fido._commo_ fido # szwecja R20_AMIGA fido.r20.amiga fido R20_ASM fido.r20.asm fido R20_CHAT fido.r20.chat fido R20_CSV fido.r20.csv fido R20_DATORKRIG fido.r20.datorkrig fido R20_ENGLISH fido.r20.english fido R20_FD fido.r20.fd fido R20_FIDONET fido.r20.fidonet fido R20_GLAD fido.r20.glad fido R20_HARD fido.r20.hard fido R20_INTRESSE fido.r20.intresse fido R20_INTR_KOM fido.r20.intr_kom fido R20_KINKYSEX fido.r20.kinkysex fido R20_LINUX fido.r20.linux fido R20_MUSIC fido.r20.music fido R20_NEWPROG fido.r20.newprog fido R20_OPERATIVSYSTEM fido.r20.operativsystem fido R20_OS2NEW fido.r20.os2new fido R20_POLITIX fido.r20.politix fido R20_POP fido.r20.pop fido R20_RASISM fido.r20.rasism fido R20_RELIGION fido.r20.religion fido R20_SOS fido.r20.sos fido R20_SPELKONSOLL fido.r20.spelkonsoll fido R20_TEEN fido.r20.teen fido R20_TI fido.r20.ti fido R20_TV fido.r20.tv fido R20_WIN_95 fido.r20.win_95 fido # bulgarskie BG.UUE fido.bg.uue fido BG.VIRUS fido.bg.virus fido BG.PRIVATE fido.bg.private fido BG.FUCK fido.bg.fuck fido BG.GAMES fido.bg.games fido BG.INTL fido.bg.intl fido BG.PROG fido.bg.prog fido BG.CULTURE fido.bg.culture fido BG.FUN fido.bg.fun fido BG.INTERNET fido.bg.internet fido BG.COMM fido.bg.comm fido BG.MISC fido.bg.misc fido BG.OS fido.bg.os fido BG.SF_LINK fido.bg.sf_link fido BG.PARTY fido.bg.pary fido BG.PROBLEM fido.bg.problem fido BG.APPLE fido.bg.apple fido BG.PSY_ADVICE fido.bg.psy_advice fido # SexNet GIELDA.69 sexnet.gielda sexnet INACZEJ.69 sexnet.inaczej sexnet INTERSEX.69 sexnet.intersex sexnet KAWALY.69 sexnet.kawaly sexnet OBRAZKI.69 sexnet.obrazki sexnet OPOWIESCI.69 sexnet.opowiesci sexnet SEXCHAT.69 sexnet.sexchat sexnet STAROWICZ.69 sexnet.starowicz sexnet SYSOP.69 sexnet.sysop sexnet TECH.69 sexnet.tech sexnet # AmigaNet AMIGA-E_AMY amiganet.amiga-e amiga AREXX_AMY amiganet.arexx amiga AUDIO_AMY amiganet.audio amiga BBSNEWS_AMY amiganet.bbsnews amiga BBSSOFT_AMY amiganet.bbssoft amiga BLITZ_AMY amiganet.blitz amiga COMMS_AMY amiganet.comms amiga DIRUTILS_AMY amiganet.dirutils amiga EMULATORS_AMY amiganet.emulators amiga GAMES_AMY amiganet.games amiga GFXBOARDS_AMY amiganet.gfxboards amiga GMS_AMY amiganet.gsm amiga GMS_AMY.POL amiganet.pol.gms amiga GPFAX_AMY amiganet.gpfax amiga GVP_AMY amiganet.gvp amiga HARD_AMY amiganet.hard amiga HSMODS_AMY amiganet.hsmods amiga LINK_AMY amiganet.link amiga LINK_AMY.POL amiganet.pol.link amiga MM_AMY amiganet.mm amiga MM_AMY.POL amiganet.pol.mm amiga N110AMY.LINK amiganet.link.n110 amiga NEW2C_AMY amiganet.new2c amiga NEWS_AMY amiganet.news amiga PD_AMY amiganet.pd amiga QUEST_AMY amiganet.quest amiga R20_AMY.POL amiganet.pol.r20 amiga SOFT_AMY amiganet.soft amiga SPOT_AMY amiganet.spot amiga SYSOP_AMY amiganet.sysop amiga SYSOP_AMY.POL amiganet.pol.sysop amiga UGROUP_AMY amiganet.ugroup amiga VIRUS_AMY amiganet.virus amiga Z39_AMY amiganet.z39 amiga Z39_SYSOP_AMY amiganet.z39_sysop amiga ZEUS_AMY amiganet.zeus amiga # alt.* ALT.ASCII-ART alt.ascii-art world ALT.BBS.INIQUITY alt.bbs.iniquity world ALT.GUITAR.TAB alt.guitar.tab world ALT.DRUGS alt.drugs world ALT.DRUGS.CAFFEINE alt.drugs.caffeine world ALT.DRUGS.CAFFEINE.CTL alt.drugs.caffeine.ctl world ALT.DRUGS.CHEMISTRY alt.drugs.chemistry world ALT.DRUGS.CULTURE alt.drugs.culture world ALT.DRUGS.HARD alt.drugs.hard world ALT.DRUGS.POT alt.drugs.pot world ALT.DRUGS.POT.CULTIVATION alt.drugs.pot.cultivation world ALT.DRUGS.PSYCHEDELICS alt.drugs.psychedelics world ALT.DRUGS.USENET alt.drugs.usenet world ALT.SYS.AMIGA.BLITZ alt.sys.amiga.blitz world ALT.SYS.AMIGA.DEMOS alt.sys.amiga.demos world ALT.SYS.AMIGA.UUCP alt.sys.amiga.uucp world ALT.SYS.AMIGA.UUCP.PATCHES alt.sys.amiga.uucp.patches world ALT.AMIGA alt.amiga world ALT.AMIGA.SLIP alt.amiga.slip world # rec.* REC.AQUARIA rec.aquaria world REC.AQUARIA.FRESHWATER rec.aquaria.freshwater.misc world REC.AQUARIA.FRESHWATER.CICHILDS rec.aquaria.freshwater.cichlids world REC.AQUARIA.FRESHWATER.GOLDFISH rec.aquaria.freshwater.goldfish world REC.AQUARIA.FRESHWATER.PLANTS rec.aquaria.freshwater.plants world REC.AQUARIA.MARINE.MISC rec.aquaria.marine.misc world REC.AQUARIA.MARINE.REEFS rec.aquaria.marine.reefs world REC.AQUARIA.MARKETPLACE rec.aquaria.marketplace world REC.AQUARIA.MISC rec.aquaria.misc world REC.AQUARIA.TECH rec.aquaria.tech world # unholynet UN.10GOTO10.POL un.pol.10goto10 un UN.BBS.SYSOPS un.sysops.bbs un UN.RPG.POL un.pol.rpg un UN.CHAT.BBS.POL un.pol.chat.bbs un UN.CHAT.POL un.pol.chat un UN.CI.POL un.pol.ci un UN.FILES un.files un UN.FORWARDS.POL un.pol.forwards un UN.GORAL.POL un.pol.goral un UN.GRAFIKA.POL un.pol.grafika un UN.GRY.POL un.pol.gry un UN.GRY.RPG.POL un.pol.gry.rpg un UN.HANDEL.POL un.pol.handel un UN.HARDWARE.POL un.pol.hardware un UN.KAWALY.POL un.pol.kawaly un UN.MUZYKA.POL un.pol.muzyka un UN.NIECENZ.POL un.pol.niecenz un UN.POEZJA.POL un.pol.poezja un UN.SFF.POL un.pol.sff un UN.SYSOPS.POL un.pol.sysops un UN.TEST un.test un UN.TV.POL un.pol.tv un UN.UNHOLY.POL un.pol.unholy un # allnet ALL.ALLNET.POL all.pol.allnet all ALL.BBS.POL all.pol.bbs all ALL.BUY.POL all.pol.buy all ALL.CHAT.POL all.pol.chat all ALL.FILES.POL all.pol.files all ALL.GRY.POL all.pol.gry all ALL.INTERNET.POL all.pol.internet all ALL.POINTS.POL all.pol.points all ALL.TEST.POL all.pol.test all ALL.WARSZAWA.LOC all.loc.warszawa all TECH.20 all.tech-20 all # local IG.GSM-L ya.test3 fido PSYCH.TEST psych.test local ZWIERACZ.TEST1 zw.test1 local # terrorgarden MOURNING.WOOD tg.mourning.wood tg MIEDZY-SZCZACA-A-PIERDZACA.TOC tg.toc.miedzy-szczaca-a-pierdzaca tg KAKALO.TOC tg.toc.kakalo tg IKNE'EKA'A tg.ikne-eka-a tg # listserv LISTSERV.RPG-POZNAN-L listserv.rpg-poznan-l local LISTSERV.IDEEFIXE listserv.ideefixe local LISTSERV.ATARI8PL-L listserv.atari8pl-l local LISTSERV.ATARI8-L listserv.atari8-l local LISTSERV.CLASSICCMP listserv.classiccmp local LISTSERV.GENOS listserv.genos local LISTSERV.NET-PROG-PL-L listserv.net-prog-pl-l local LISTSERV.GWIEZDNY-KUPIEC-L listserv.gwiezdny-kupiec-l local LiSTSERV.PLUG Listserv.plug local LISTSERV.SHADOWRN listserv.shadowrn local # Line with a single '*' in the "newsgroup" field defines default areatag. # '*' in the "AREA" field, if present, is expanded to the original # newsgroup (converted to uppercase). (Distribution is insignificant). # # If you define it, an FTN message will be generated for each newsgroup in # the Newsgroups: header, even if you're not linked to it, and an ECHO doesn't # really exist for it. Is better not to define. #U_* * # Line with a single '*' in the "AREA" field defines default newsgroup # and distribution. '*' in the "newsgroup" field, if present, is expanded # to the original areatag (converted to lowcase). * ftn.* local # You can specify a line with a single asterisk in the "AREA" field and # a single asterisk in the "newsgroup" field. It will cause a reversible # conversion - areatag will be an uppercased newsgroup, and a newsgroup # will be a lowercased areatag. This is not recommended. # * * world ifmail-2.14tx8.10.orig/misc/contrib/Gecho2newsfeeds/README100644 1751 50 4116 6540753002 20437 0ustar mdsrcFrom raf@wiosna.office.polbox.pl Sat Mar 21 22:37:26 1998 Return-Path: Received: (from uucp@localhost) by chanae.alphanet.ch (8.8.7/8.8.7) with UUCP id WAA05875 for srtxg@chanae.alphanet.ch; Sat, 21 Mar 1998 22:33:44 +0100 Received: (from uucp@localhost) by vulcan.alphanet.ch (8.8.5/8.7.3) with BSMTP id RAA25373 for srtxg@chanae.alphanet.ch; Sat, 21 Mar 1998 17:15:31 +0100 Received: from ns.imp.ch by impch.imp.ch with SMTP (5.65b/IDA-052490) id AA24758; Sat, 21 Mar 98 15:36:54 GMT Received: from uucp.polbox.com.pl (root@uucp.polbox.com.pl [195.116.5.3]) by mail.imp.ch (8.8.8/8.8.5) with ESMTP id QAA14227 for ; Sat, 21 Mar 1998 16:36:49 +0100 (MET) Received: from wiosna.office.polbox.pl (raf@wiosna.office.polbox.pl [195.116.6.81]) by uucp.polbox.com.pl (8.8.2/8.7.6-11) with ESMTP id QAA15180 for ; Sat, 21 Mar 1998 16:43:29 +0100 Received: (from raf@localhost) by wiosna.office.polbox.pl (8.8.7/8.8.7) id QAA09803 for srtxg@chanae.alphanet.ch; Sat, 21 Mar 1998 16:35:12 +0100 From: rafal wiosna Message-Id: <199803211535.QAA09803@wiosna.office.polbox.pl> Subject: abbs2nf To: srtxg@chanae.alphanet.ch Date: Sat, 21 Mar 1998 16:35:11 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL39 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 X-Mime-Autoconverted: from 8bit to quoted-printable by mail.imp.ch id QAA14227 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by vulcan.alphanet.ch id RAA25373 Status: RO Hi Pablo. Since I'm changing platform from OS/2 to Linux I needed the program to convert GEcho's AREAS.BBS files to newsfeeds. My node has about 80 links and 400+ conferences so you see -- I had to do it automagically. I did it in perl. In the next message there's a tar.gz of my program with example files. Hope it finds way to utilities you include inside TX release. -- ______________________________________________________________________________ rafzdomu * Linux * OS/2 v4 * Fidonet 2:480/33 * "Quota pod nogi u¿ytkownikom!" ifmail-2.14tx8.10.orig/misc/contrib/Gecho2newsfeeds/abbs2nf.pl100644 0 0 25255 6701151723 22115 0ustar rootroot#!/usr/bin/perl ### ### abbs2nf.pl v0.4 - AREAS.BBS to newsfeeds converter ### ### (c) 1998 rafal wiosna, 2:480/33 mailto: rafamiga@uucp.polbox.pl ### ### v0.1 98.03.15 first version, developed under OS/2's ### perl 5.003, tested on 5.004 under Linux ### v0.2 98.03.16 implemented @IGNORENODES and $COMPACT ### v0.3 98.03.21 some fixes based on the real-world ifmail config ### v0.4 98.03.23 comments inside filed 3 caused innd to prompt ### error; now they're after field 4 ### ### If you want to receive an e-mail with the newest and future versions ### of this program just send me a letter with the subject: ### ### SEND NEWEST FUTURE abbs2nf.pl ### $VERSION = "v0.4"; ## ## This program reads the AREAS.BBS file and then outputs newsfeeds-like ## structure on standard output. ## ## Usage: ## ## abbs2nf.pl ./AREAS.BBS /etc/ifmail/Areas >/var/lib/news/etc/newsfeeds ## ## The first argument is AREAS.BBS-style file. It should be generated by your ## DOS mailprocessor, like GEcho, FastEcho, FMail... ## ## The second argument is Areas file with the FIDONET.NAME to news.name ## breakdown. It's not generated by a program but instead you should find ## someone in your net/region that has up-to-date Areas file. Ask yor ## boss/uplink/NC/RC for the nearest ifmail site. ## ## The output should be redirected to newsfeeds file. [See below.] ## ## Notice: ## ## The AREAS.BBS file I used to test this program was generated by GEcho 1.20 ## and the sample is included in the distribution directory. If your AREAS.BBS ## file causes my program to behave strangely just send ma an e-mail with your ## AREAS.BBS and program's [bad] output. ## ## The same goes to Areas file, the one I used is included in the directory. ## It's usual ifmail Areas file. If you don't have one don't bother using this ## nice program. 8^P ## ## The output is like this: ## ## FQHN:\ ## fido.newsgroup.1,\ ## fido.newsgroup.2,\ ## fido.newsgroup.3,\ ## ... ## fido.newsgroup.last,\ ## !junk,!control:\ ## Twf,Wn: ## ## PAY ATTENTION! After generating newsfeeds file always take look at it! At ## the bottom of the file there is a listing of areas missing from Areas file ## you've provided. Unless intentional, the Areas file should be completed. ## (Of course, this footer won't be generated if you set $COMPACT to "1".) ## ## ## configuration section ## # something you SHOULD change $myZONE = 2; # your zone $myNET = 480; # your network $myNODE = 33; # your node number or node number of your boss # this array contains [sub]strings of the f:i/d.o netadresses we # would like to ignore in the newsfeeds file; you could use perl's regex if # you want to and know what you're doing @IGNORENODES = ("73:", "9:", "2:480/999"); # some ways to alter program behaviour $COMPACT = 0; # put "1" if you don't want any unnecessary, but helpfull # comments in newsfeeds file; the header is still there thou $DEBUG = 0; # put "1" here for debug output but there's really nothing cool # WARNING: produces HUGE newsfeeds $WARNINGS = 1; # put "1" here for warning messages on STDERR [recomended] ## ## private variables definition DO NOT CHANGE! You have been warned. ## %nodes = (); # nodes hash holding the addresses used in AREAS.BBS file %arean = (); # areaname-to-newsgroup hash %lonely = (); # hash containing names of areas missing in Areas file ## ## program starts here ## ## initialisation ## $AREAS_BBS = $ARGV[0]; # this could be done in if statement but what $Areasfile = $ARGV[1]; # do I care, let the code be nice and clean 8^) if ((! defined $AREAS_BBS) || (! defined $Areasfile)) # no filenames { die "ERROR: in arguments; read the program text for instructions!\n"; } if (! $DEBUG) # if we DEBUG we don't need sanity checking { die "ERROR: the file $AREAS_BBS does not exist!\n" if (! -e $AREAS_BBS); die "ERROR: the file $Areasfile does not exist!\n" if (! -e $Areasfile); } ## ## the flow ## $lnum = 0; open (ABBS, "$AREAS_BBS") || die "ERROR: cannot open $AREAS_BBS file: $!"; while () { next if (/^;/ || ! $lnum++); # skip the 1st line and all the lines # beginning with ";" chomp; s/(\s+)/ /g; # get rid of unnecessary white spaces @entr = split / /; # split entries $entr[1] =~ tr/a-z/A-Z/; # fido areas are UPPERCASE $nentr = scalar @entr; # get number of entries if ($nentr < 3) # if there are no links just ignore this line # with optional warning # In GEcho, special areas like dupes or # personal have no links and we definitely # don't want them in newsfeeds 8^) { print STDERR "WARNING: area $entr[1] has no links, ignoring\n" if ($WARNINGS); next; } if ($DEBUG) { print "## DEBUG: $nentr -> "; # this DEBUG prints entries and # quantity foreach $tmp (@entr) { print "$tmp,"; } print "\n"; } ## ## now fix the links entries by adding the missing bits, i.e. ## "2:480/19" "33" ".7" "55" "66.1" "1:120/53" will become ## "2:480/19" "2:480/33" "2:480/33.7" "2:480/55" "2:480/66.1" "1:120/53" ## ## additionally push area entry to @[FQHN] array, where [FQHN] is, guess, FQHN ## and then make an entry in %nodes hash like this: FQHN => f:i/d.o ## $czone = $myZONE; # in case AREAS.BBS entries are wacky $cnet = $myNET; # we should fix it also by preloading $cnode = $myNODE; # address variables $cpoint = 0; $mentr = 1; # start from 3rd line element # [yes, here's 1, no mistake] while ($mentr++ < $nentr-1) { $_ = $entr[$mentr]; ($czone,$_) = split /:/ if /:/; # get zone $cpoint = 0; # if there's no point # assume .0 ($_,$cpoint) = split /\./ if /\./; # get point ($cnet,$_) = split /\// if /\//; # get net $cnode = $_ if ($_); # get node; if empty # remember the previous $_ = "$czone:$cnet/$cnode.$cpoint"; # just one more slight s/(.*)\.0/$1/g if /\.0$/; # to fix unwanted .0's $entr[$mentr] = $_; # and we're finished! peeking the value # back to @entr is my good will 8^) ## ## now convert f:i/d.o address into FQHN [fully qualified host name] ## $fqhn = ""; # start with empty string $fqhn = "p$cpoint." if /\./; # if there's point prepend # pxxx. to FQHN $fqhn .= "f$cnode.n$cnet.z$czone.fidonet.org"; # the FQHN in all it's glory push @{$fqhn}, $entr[1]; # push the area name onto # array named by FQHN $nodes{$fqhn} = $_; # put f:i/d.o into %nodes hash; it's # hash because node could be a link # in many conferences and hash # simplifies the process [no dupes] if ($DEBUG) # DEBUG print the FQHN and hash entry { print "## DEBUG: FQHN: $fqhn HASH: $nodes{$fqhn}\n"; } } } close (ABBS); # we don't need AREAS.BBS file no more if ($DEBUG) # DEBUG print FQDN, fido addres and areas { print "\n## DEBUG: FQHN to f:i/d.o breakdown with areas\n"; foreach $tmp (sort keys %nodes) { print "## DEBUG: key $tmp value $nodes{$tmp}\n## DEBUG: areas: @{$tmp}\n"; } } ## ## since we have nice arrays with areas for every link ever appeared in ## AREAS.BBS file now we have to open Areas file, read it in and convert ## the area tag names to newsgroup names ## ## we could issue some warnings about areas that have no newsgroup associated, ## the user will be more than happy indeed ## if ($DEBUG) { print "\n## DEBUG: Areas file read\n"; } open (AREAS, "$Areasfile") || die "ERROR: cannot open $Areasfile file: $!"; while () { chomp; next if (/^[#\*]/ || /^$/ || /^\s$/); # lines we could forget s/(\s+)/ /g; # white space exterminator ($aname,$ngroup,$tmp) = split / /; $aname =~ tr/a-z/A-Z/; # fido areas are UPPERCASE $ngroup =~ tr/A-Z/a-z/; # newsgroups are lowercase if ($DEBUG) { print "## DEBUG: $aname -> $ngroup\n"; } $arean{$aname} = $ngroup; # hash key areaname with newsgroup } close (AREAS); # sayonara Areas file ## ## now we have areaname to newsgruop hash ready, stdout newsfeeds style ## ## the %lonely hash is created, with names of areas not found in Areas file ## $time = localtime; # nice touch print "##\n## abbs2nf.pl $VERSION -- AREAS.BBS to newsfeeds converter\n"; print "##\n## (c) 1998 rafal wiosna mailto: rafamiga\@uucp.polbox.pl\n##\n"; print "## Read program text for instruction on requirements and usage.\n"; print "## If this file's a mess you've probably switched places of\n"; print "## Areas and AREAS.BBS files in the command line! 8^)\n"; print "##\n## THIS FILE HAS BEEN GENERATED AUTOMAGICALLY, change on your own risk!\n"; print "## Generation date: $time\n##\n"; $nnum = 0; foreach $tmp (sort keys %nodes) # main loop thru nodes hash { @comments = ( ); # array of comments to add after field 4 $nnode = $nodes{$tmp}; # get f:i/d.o address $wayout = 0; foreach $ignore (@IGNORENODES) # ignore nodes magic { $_ = $nnode; $wayout++ if /$ignore/; # if matches increment if ($DEBUG) # this DEBUG prints the ignore results; had some troubles witit { print "\n## DEBUG: node $nnode ignore(s) \"@IGNORENODES\" wayout $wayout"; } } if ($wayout) # if $wayyout > 0 this node matched { if ($WARNINGS) { print STDERR "WARNING: The node $_ is ignored\n"; } if (! $COMPACT) # friendly mode { print "\n# $_ node ignore ruled by \@IGNORENODES, next!\n"; } next; # please } $nnum++; print "\n"; if (! $COMPACT) # friendly mode { print "# *** NODE #$nnum -- $nodes{$tmp}\n#\n"; } ## ## this idea is obsolete ## ## $nnode =~ tr/:.\//_/; # translate :./ to _ for nickname print "$tmp:\\\n"; # 1st line; FQHN sort @{tmp}; # sort the areas nicely foreach $narea (@{$tmp}) # loop thru array containing areanames # for this link { if (! defined $arean{$narea}) # if this area has no # coresponding newsgroup # warn and ignore { if ($WARNINGS) { print STDERR "WARNING: $narea not in $Areasfile file, ignoring\n"; } if (! $COMPACT) # friendly mode { push @comments, "# IGNORED: $narea, not in $Areasfile"; } $lonely{$narea}++; # increment hash } else # standard output for areas { print "\t$arean{$narea},\\\n"; } } print "\t!junk,!control:\\\n"; # end of field 3; # exclude unwanted stuph print "\t\tTf,Wfb,B4096/1024:\n"; # field 4; flags if (! $COMPACT && scalar @comments gt 0) # friendly mode { print "# Notice:\n#\n"; # print out all the ignored # areas at the end of feed # definition foreach $ignore (@comments) { print "$ignore\n"; } print "#\n"; } } ## ## print the lonely areas ## if (! $COMPACT) # friendly mode { print "\n##\n## End of newsfeeds definition\n##\n\n##\n## The following areas "; print "are missing in Areas file:\n##\n"; foreach $tmp (sort keys %lonely) { print "## $tmp -- $lonely{$tmp} occurence"; print "s" if ($lonely{$tmp} > 1); # be sooo clever print "\n"; } } ## ## it's bed time, Dexter ## print "\n##\n## End of newsfeeds file\n##\n\n"; # say goodbye ## ## end of program ## ifmail-2.14tx8.10.orig/misc/DEBUG100644 1751 50 1417 5643306636 13670 0ustar mdsrc# bit description # # 0 output regardless of verbose value a 1 outbound object names b 2 system calls: exec(), mkdir(), popen() etc. c 3 creating and filling packet, file attaches d 4 uucp locking e 5 reading packet/messages f 6 AKA matching, address substitution g 7 scanning outbound h 8 address lists processing (seen-by, path, etc.) i 9 AREAS/newsgroups processing j 10 session flow, handshaking k 11 file transfer protocols l 12 file lists, requests and attaches m 13 logical expression parser n 14 finite state machine (entry/exit) o 15 finite state machine (every state) p 16 parsing confuguration q 17 parsing RFC headers r 18 I/O (less verbose) s 19 I/O (max. verbose) t 20 nodelist processing (less verbose) u 21 nodelist processing (max. verbose) v 22 w 23 x 24 y 25 z 26 ifmail-2.14tx8.10.orig/misc/maptabs/ 40755 1751 50 0 6573551267 14453 5ustar mdsrcifmail-2.14tx8.10.orig/misc/maptabs/cp437__iso-8859-1100644 1751 50 1113 6100601550 17062 0ustar mdsrc# Following the translation table extracted from recode 3.3, file ibmpc.c: # ibmpc to latin1, contributed by Martin Wunderli : 20 182 21 167 128 199 129 252 130 233 131 226 132 228 133 224 134 229 135 231 136 234 137 235 138 232 139 239 140 238 141 236 142 196 143 197 144 201 145 230 146 198 147 244 148 246 149 242 150 251 151 249 152 255 153 214 154 220 155 162 156 163 157 165 160 225 161 237 162 243 163 250 164 241 165 209 166 170 167 186 168 191 170 172 171 189 172 188 173 161 174 171 175 187 225 223 230 181 241 177 246 247 248 176 250 183 253 178 255 160 ifmail-2.14tx8.10.orig/misc/maptabs/cp866__koi8100644 1751 50 3362 6100601550 16407 0ustar mdsrc# Channel map for translation PC-alternate codes to KOI8 codes # (Russian language) # # Internal value Output character 0x80 0xE1 0x81 0xE2 0x82 0xF7 0x83 0xE7 0x84 0xE4 0x85 0xE5 0x86 0xF6 0x87 0xFA 0x88 0xE9 0x89 0xEA 0x8A 0xEB 0x8B 0xEC 0x8C 0xED 0x8D 0xEE 0x8E 0xEF 0x8F 0xF0 0x90 0xF2 0x91 0xF3 0x92 0xF4 0x93 0xF5 0x94 0xE6 0x95 0xE8 0x96 0xE3 0x97 0xFE 0x98 0xFB 0x99 0xFD 0x9A 0xFF 0x9B 0xF9 0x9C 0xF8 0x9D 0xFC 0x9E 0xE0 0x9F 0xF1 0xA0 0xC1 0xA1 0xC2 0xA2 0xD7 0xA3 0xC7 0xA4 0xC4 0xA5 0xC5 0xA6 0xD6 0xA7 0xDA 0xA8 0xC9 0xA9 0xCA 0xAA 0xCB 0xAB 0xCC 0xAC 0xCD 0xAD 0xCE 0xAE 0xCF 0xAF 0xD0 0xB0 0x80 0xB1 0x81 0xB2 0x82 0xB3 0x83 0xB4 0x84 0xB5 0x85 0xB6 0x86 0xB7 0x87 0xB8 0x88 0xB9 0x89 0xBB 0x8B 0xBC 0x8C 0xBD 0x8D 0xBE 0x8E 0xBF 0x8F 0xC0 0x90 0xC1 0x91 0xC2 0x92 0xC3 0x93 0xC4 0x94 0xC5 0x95 0xC6 0x96 0xC7 0x97 0xC8 0x98 0xC9 0x99 0xCA 0x9A 0xCB 0xBF 0xCC 0x9C 0xCD 0x9D 0xCE 0x9E 0xCF 0x9F 0xD0 0xB9 0xD1 0xA1 0xD2 0xA2 0xD3 0xB0 0xD4 0xA4 0xD5 0xA5 0xD6 0xA6 0xD7 0xA7 0xD8 0xA8 0xD9 0xA9 0xDA 0xAA 0xDB 0xAB 0xDC 0xAC 0xDD 0xAD 0xDE 0xAE 0xDF 0xAF 0xE0 0xD2 0xE1 0xD3 0xE2 0xD4 0xE3 0xD5 0xE4 0xC6 0xE5 0xC8 0xE6 0xC3 0xE7 0xDE 0xE8 0xDB 0xE9 0xDD 0xEA 0xDF 0xEB 0xD9 0xEC 0xD8 0xED 0xDC 0xEE 0xC0 0xEF 0xD1 0xF0 0xB3 0xF1 0xA3 0xF2 0xB2 0xF3 0xB1 0xF4 0xB4 0xF5 0xB5 0xF6 0xB6 0xF7 0xB7 0xF8 0xB8 0xF9 0xA0 0xFA 0x8A 0xFB 0xBB 0xFC 0xBC 0xFD 0xBD 0xFE 0xBE 0xFF 0x9B ifmail-2.14tx8.10.orig/misc/maptabs/iso-11__iso-8859-1100644 1751 50 1046 6100601550 17240 0ustar mdsrc# iso-11 to iso-8859-1 20 182 21 167 35 '°' 36 '¤' 64 'É' 91 'Ä' 92 'Ö' 93 'Å' 94 'Ü' 96 'é' 123 'ä' 124 'ö' 125 'å' 126 'ü' 128 199 129 252 130 233 131 226 132 228 133 224 134 229 135 231 136 234 137 235 138 232 139 239 140 238 141 236 142 196 143 197 144 201 145 230 146 198 147 244 148 246 149 242 150 251 151 249 152 255 153 214 154 220 155 162 156 163 157 165 160 225 161 237 162 243 163 250 164 241 165 209 166 170 167 186 168 191 170 172 171 189 172 188 173 161 174 171 175 187 225 223 230 181 241 177 246 247 248 176 250 183 253 178 255 160 ifmail-2.14tx8.10.orig/misc/maptabs/iso-4__iso-8859-1100644 1751 50 703 6100601550 17141 0ustar mdsrc# iso-4 to iso-8859-1 35 £ 128 199 129 252 130 233 131 226 132 228 133 224 134 229 135 231 136 234 137 235 138 232 139 239 140 238 141 236 142 196 143 197 144 201 145 230 146 198 147 244 148 246 149 242 150 251 151 249 152 255 153 214 154 220 155 162 156 163 157 165 160 225 161 237 162 243 163 250 164 241 165 209 166 170 167 186 168 191 170 172 171 189 172 188 173 161 174 171 175 187 225 223 230 181 241 177 246 247 248 176 250 183 253 178 255 160 ifmail-2.14tx8.10.orig/misc/maptabs/iso-60__iso-8859-1100644 1751 50 1021 6100601550 17235 0ustar mdsrc# iso-60 to iso-8859-1 20 182 21 167 35 '°' 91 'Æ' 92 'Ø' 93 'Å' 96 'é' 123 'æ' 124 'ø' 125 'å' 126 '|' 128 199 129 252 130 233 131 226 132 228 133 224 134 229 135 231 136 234 137 235 138 232 139 239 140 238 141 236 142 196 143 197 144 201 145 230 146 198 147 244 148 246 149 242 150 251 151 249 152 255 153 214 154 220 155 162 156 163 157 165 160 225 161 237 162 243 163 250 164 241 165 209 166 170 167 186 168 191 170 172 171 189 172 188 173 161 174 171 175 187 225 223 230 181 241 177 246 247 248 176 250 183 253 178 255 160 ifmail-2.14tx8.10.orig/misc/maptabs/iso-8859-1__cp437100644 1751 50 1113 6100601550 17062 0ustar mdsrc# Following the translation table extracted from recode 3.3, file ibmpc.c: # latin1 to ibmpc, contributed by Martin Wunderli : 182 20 167 21 199 128 252 129 233 130 226 131 228 132 224 133 229 134 231 135 234 136 235 137 232 138 239 139 238 140 236 141 196 142 197 143 201 144 230 145 198 146 244 147 246 148 242 149 251 150 249 151 255 152 214 153 220 154 162 155 163 156 165 157 225 160 237 161 243 162 250 163 241 164 209 165 170 166 186 167 191 168 172 170 189 171 188 172 161 173 171 174 187 175 223 225 181 230 177 241 247 246 176 248 183 250 178 253 160 255 ifmail-2.14tx8.10.orig/misc/maptabs/koi8__cp866100644 1751 50 4642 6100601550 16411 0ustar mdsrc# Channel map for translation KOI8 codes to PC-alternate codes # (Russian language) # Due to fidonet wieredness, capital Russian EN translates to # latin 'H'. # # Internal value Output character 0x80 0xB0 0x81 0xB1 0x82 0xB2 0x83 0xB3 0x84 0xB4 0x85 0xB5 0x86 0xB6 0x87 0xB7 0x88 0xB8 0x89 0xB9 0x8A 0xFA 0x8B 0xBB 0x8C 0xBC 0x8D 0xBD 0x8E 0xBE 0x8F 0xBF 0x90 0xC0 0x91 0xC1 0x92 0xC2 0x93 0xC3 0x94 0xC4 0x95 0xC5 0x96 0xC6 0x97 0xC7 0x98 0xC8 0x99 0xC9 0x9A 0xCA 0x9B 0xFF # High-bit Escape to Rubout 0x9C 0xCC 0x9D 0xCD 0x9E 0xCE 0x9F 0xCF 0xA0 0xD0 0xA1 0xD1 0xA2 0xD2 0xA3 0xF1 # yo 0xA4 0xD4 0xA5 0xD5 0xA6 0xD6 0xA7 0xD7 0xA8 0xD8 0xA9 0xD9 0xAA 0xDA 0xAB 0xDB 0xAC 0xDC 0xAD 0xDD 0xAE 0xDE 0xAF 0xDF 0xB0 0xD3 # Changed, because yo 0xB1 0xF3 # 0xB2 0xF2 0xB3 0xF0 # YO 0xB4 0xF4 0xB5 0xF5 0xB6 0xF6 0xB7 0xF7 0xB8 0xF8 0xB9 0xD0 #0xBA 0xFA 0xBB 0xFB 0xBC 0xFC 0xBD 0xFD 0xBE 0xFE 0xBF 0xCB # 0xC0 0xEE # yu 0xC1 0xA0 # a 0xC2 0xA1 # b 0xC3 0xE6 # c 0xC4 0xA4 # d 0xC5 0xA5 # e 0xC6 0xE4 # f 0xC7 0xA3 # g 0xC8 0xE5 # h 0xC9 0xA8 # i 0xCA 0xA9 # iy 0xCB 0xAA # k 0xCC 0xAB # l 0xCD 0xAC # m 0xCE 0xAD # n 0xCF 0xAE # o 0xD0 0xAF # p 0xD1 0xEF # ya 0xD2 0xE0 # r 0xD3 0xE1 # s 0xD4 0xE2 # t 0xD5 0xE3 # u 0xD6 0xA6 # zh 0xD7 0xA2 # v 0xD8 0xEC # m znak 0xD9 0xEB # y 0xDA 0xA7 # z 0xDB 0xE8 # sh 0xDC 0xED # ae 0xDD 0xE9 # sch 0xDE 0xE7 # ch 0xDF 0xEA # t znak 0xE0 0x9E # YU 0xE1 0x80 # A 0xE2 0x81 # B 0xE3 0x96 # C 0xE4 0x84 # D 0xE5 0x85 # E 0xE6 0x94 # F 0xE7 0x83 # G 0xE8 0x95 # H 0xE9 0x88 # I 0xEA 0x89 # IY 0xEB 0x8A # K 0xEC 0x8B # L 0xED 0x8C # M 0xEE 0x48 # changed for Fidonet 0x8D # N 0xEF 0x8E # O 0xF0 0x8F # P 0xF1 0x9F # YA 0xF2 0x90 # R 0xF3 0x91 # S 0xF4 0x92 # T 0xF5 0x93 # U 0xF6 0x86 # ZH 0xF7 0x82 # V 0xF8 0x9C # M znak 0xF9 0x9B # Y 0xFA 0x87 # Z 0xFB 0x98 # SH 0xFC 0x9D # AE 0xFD 0x99 # SCH 0xFE 0x97 # CH 0xFF 0x9A # T znak ifmail-2.14tx8.10.orig/misc/maptabs/cp424__iso-8859-8100644 1751 50 2501 6100601550 17067 0ustar mdsrc# hebrew cp424 (alias ebcdic-cp-he) to iso-8859-8 0x40 32 0x41 224 0x42 225 0x43 226 0x44 227 0x45 228 0x46 229 0x47 230 0x48 231 0x49 232 0x4a 162 0x4b 46 0x4c 60 0x4d 40 0x4e 43 0x4f 124 0x50 38 0x51 233 0x52 234 0x53 235 0x54 236 0x55 237 0x56 238 0x57 239 0x58 240 0x59 241 0x5a 33 0x5b 36 0x5c 42 0x5d 41 0x5e 59 0x5f 172 0x60 45 0x61 47 0x62 242 0x63 243 0x64 244 0x65 245 0x66 246 0x67 247 0x68 248 0x69 249 0x6a 166 0x6b 44 0x6c 37 0x6d 95 0x6e 62 0x6f 63 0x71 250 0x74 160    0x79 96 0x7a 58 0x7b 35 0x7c 64 0x7d 39 0x7e 61 0x7f 34 0x81 97 0x82 98 0x83 99 0x84 100 0x85 101 0x86 102 0x87 103 0x88 104 0x89 105 0x8a 171 0x8b 187 0x90 176 0x91 106 0x92 107 0x93 108 0x94 109 0x95 110 0x96 111 0x97 112 0x98 113 0x99 114 0x9d 184 0x9f 164 0xa0 181 0xa1 126 0xa2 115 0xa3 116 0xa4 117 0xa5 118 0xa6 119 0xa7 120 0xa8 121 0xa9 122 0xaf 174 0xb0 94 0xb1 163 0xb2 165 0xb3 183 0xb4 169 0xb5 167 0xb6 182 0xb7 188 0xb8 189 0xb9 190 0xba 91 0xbb 93 0xbc 175 0xbd 168 0xbe 180 0xbf 170 0xc0 123 0xc1 65 0xc2 66 0xc3 67 0xc4 68 0xc5 69 0xc6 70 0xc7 71 0xc8 72 0xc9 73 0xca 173 0xd0 125 0xd1 74 0xd2 75 0xd3 76 0xd4 77 0xd5 78 0xd6 79 0xd7 80 0xd8 81 0xd9 82 0xda 185 0xe0 92 0xe1 186 0xe2 83 0xe3 84 0xe4 85 0xe5 86 0xe6 87 0xe7 88 0xe8 89 0xe9 90 0xea 178 0xf0 48 0xf1 41 0xf2 42 0xf3 43 0xf4 44 0xf5 45 0xf6 46 0xf7 47 0xf8 48 0xf9 49 0xfa 179 ifmail-2.14tx8.10.orig/misc/maptabs/cp424__cp862100644 1751 50 2310 6100601550 16355 0ustar mdsrc# hebrew cp424 (alias ebcdic-cp-he) to cp862 (Hebrew PC) 0x40 32 0x41 128 0x42 129 0x43 130 0x44 131 0x45 132 0x46 133 0x47 134 0x48 135 0x49 136 0x4a 155 0x4b 46 0x4c 60 0x4d 40 0x4e 43 0x50 38 0x51 137 0x52 138 0x53 139 0x54 140 0x55 141 0x56 142 0x57 143 0x58 144 0x59 145 0x5a 33 0x5b 36 0x5c 42 0x5d 41 0x5e 59 0x5f 170 0x60 45 0x61 47 0x62 146 0x63 147 0x64 148 0x65 149 0x66 150 0x67 151 0x68 152 0x69 153 0x6b 44 0x6c 37 0x6d 95 0x6e 62 0x6f 63 0x71 163 0x74 255    0x79 96 0x7a 58 0x7b 35 0x7c 64 0x7d 39 0x7e 61 0x7f 34 0x81 97 0x82 98 0x83 99 0x84 100 0x85 101 0x86 102 0x87 103 0x88 104 0x89 105 0x8a 174 0x8b 175 0x90 248 0x91 106 0x92 107 0x93 108 0x94 109 0x95 110 0x96 111 0x97 112 0x98 113 0x99 114 0xa0 230 0xa1 126 0xa2 115 0xa3 116 0xa4 117 0xa5 118 0xa6 119 0xa7 120 0xa8 121 0xa9 122 0xb0 94 0xb1 156 0xb2 157 0xb3 250 0xb5 21 0xb7 172 0xb8 171 0xba 91 0xbb 93 0xbf 166 0xc0 123 0xc1 65 0xc2 66 0xc3 67 0xc4 68 0xc5 69 0xc6 70 0xc7 71 0xc8 72 0xc9 73 0xd0 125 0xd1 74 0xd2 75 0xd3 76 0xd4 77 0xd5 78 0xd6 79 0xd7 80 0xd8 81 0xd9 82 0xe0 92 0xe1 167 0xe2 83 0xe3 84 0xe4 85 0xe5 86 0xe6 87 0xe7 88 0xe8 89 0xe9 90 0xea 253 0xf0 48 0xf1 41 0xf2 42 0xf3 43 0xf4 44 0xf5 45 0xf6 46 0xf7 47 0xf8 48 0xf9 49 ifmail-2.14tx8.10.orig/misc/maptabs/mac__cp437100644 1751 50 3614 6100601550 16267 0ustar mdsrc# Macintosh extended characters to cp437 128 0x8E # A dieresis 129 0x8F # A ring 130 0x80 # C cedilla 131 0x90 # E acute 132 0xA5 # N tilde 133 0x94 # O dieresis 134 0x9A # U dieresis 135 0xA0 # a acute 136 0x85 # a grave 137 0x83 # a circumflex 138 0x84 # a dieresis 139 'a' # a tilde 140 0x86 # a ring 141 0x87 # c cedilla 142 0x82 # e acute 143 0x8A # e grave 144 0x88 # e circumflex 145 0x89 # e dieresis 146 0xA1 # i acute 147 0x8D # i grave 148 0x8C # i circumflex 149 0x8B # i dieresis 150 0xA4 # n tilde 151 0xA2 # o acute 152 0x95 # o grave 153 0x96 # o circumflex 154 0x94 # o dieresis 155 'o' # o tilde 156 0xA3 # u acute 157 0x97 # u grave 158 0x96 # u circumflex 159 0x81 # u dieresis 160 '+' # dagger 161 0xF8 # ring / degree 162 0x9B # cent 163 0x9C # pound sterling 164 0x15 # section 165 0xFE # bullet 166 0x14 # paragraph 167 0xE1 # german double s 168 'R' # registered trademark 169 'c' # copyright 170 'T' # trademark 171 '\'' # acute 172 '"' # dieresis 174 0x92 # AE 175 '0' # O slash 176 0xEC # infinity 177 0xF1 # plusminus 178 0xF3 # smaller equals 179 0xF2 # greater equals 180 0x9D # Yen 181 0xE6 # mu 182 0xEB # delta 183 0xE4 # Sigma (summation) 184 0xE3 # Pi 185 0xE3 # pi 187 0xA6 # ord feminine 188 0xA7 # ord masculine 189 0xEA # Omega 190 0x91 # ae 191 0xED # o slash 192 0xA8 # question downwards 193 0xAD # exclam downwards 194 0xAA # logical not 195 0xFB # radical 196 0x9F # florin 197 0xF7 # approx. 198 0x7F # Delta 199 0xAF # guillemot right 200 0xAE # guillemot left 201 '.' # ellipsis 202 32 # non breaking space 203 A # A acute 204 A # A tilde 205 O # O tilde 206 'Ö' # OE 207 'ö' # oe 208 0xFA # en dash 209 '-' # em dash 210 '"' # double quote left 211 '"' # double quote right 212 '`' # quote left 213 '\'' # quote right 214 0xF6 # divide 215 0x04 # lozenge 216 0x98 # y dieresis ifmail-2.14tx8.10.orig/misc/maptabs/cp437__mac100644 1751 50 3053 6100601550 16264 0ustar mdsrc128 0x82 # C with cedilla 129 0x9F # u dieresis 130 0x8E # e acute 131 0x89 # a circumflex 132 0x8A # a dieresis 133 0x88 # a grave 134 0x8C # a ring 135 0x8D # c cedilla 136 0x90 # e circumflex 137 0x91 # e dieresis 138 0x8F # e grave 139 0x95 # i dieresis 140 0x94 # i circumflex 141 0x93 # i grave 142 0x80 # A dieresis 143 0x81 # A ring 144 0x83 # E acute 145 0xBE # ae 146 0xAE # AE 147 0x99 # o circumflex 148 0x9A # o dieresis 149 0x97 # o acute 150 0x9E # u circumflex 151 0x9D # u grave 152 0xD8 # y dieresis 153 0x85 # O dieresis 154 0x9F # U dieresis 155 0xA2 # cent 156 0xA3 # pound sterling 157 0xB4 # yen 158 'P' # Pt 159 0xC4 # florin 160 0x87 # a acute 161 0x93 # i grave 162 0x98 # o grave 163 0x9D # u grave 164 0x96 # n tilde 165 0x84 # N tilde 166 0xBB # ord feminine 167 0xBC # ord masculine 168 0xC0 # question downwards 169 '-' # 170 0xC2 # logical not 172 0xC1 # exclam downwards 173 0xC7 # guillemot left 174 0xC8 # guillemot right 224 'a' # alpha 225 0xA7 # german double s (misused as Beta) 227 0xB9 # pi 228 0xB7 # Sigma (summation) 230 0xB5 # mu 234 0xBD # Omega 235 0xB6 # delta 236 0xB0 # infinity 237 0xBF # o slash 240 '=' # equivalence 241 0xB1 # plusminus 242 0xB3 # greater equals 243 0xB2 # smaller equals 244 '?' # integral top 245 '?' # integral bottom 246 0xD6 # divide 247 0xC5 # approx. 248 0xA1 # ring / degree 249 '.' # centered dot 250 0xD0 # en dash 251 0xC3 # radical 252 'n' # to the n'th power 253 '2' # to the second power 254 0xA5 255 32 # space ifmail-2.14tx8.10.orig/misc/maptabs/fidomazovia__iso-8859-2100644 1751 50 1036 6100601550 20537 0ustar mdsrc# Table contributed by Krzysztof Halasa # fidomazovia->ISO 8859-2 0x80 0xc7 0x81 0xfc 0x82 0xe9 0x83 0xe1 0x84 0xe2 0x85 'a' # a! 0x86 0xb1 0x87 0xe6 0x88 'e' # e> 0x89 0xeb 0x8a 'e' # e! 0x8b 'i' # i: 0x8c 0xee 0x8d 'i' # i! 0x8e 0xc4 0x8f 0xa1 0x90 0xca 0x91 0xea 0x92 0xb3 0x93 0xf4 0x94 0xf6 0x95 0xc6 0x96 'u' # u> 0x97 'u' # u! 0x98 0xa6 0x99 0xd6 0x9a 0xdc 0x9c 0xa3 0x9e 0xb6 0xa0 0xac 0xa1 0xaf 0xa2 0xf3 0xa3 0xd3 0xa4 0xf1 0xa5 0xd1 0xa6 0xbc 0xa7 0xbf 0xa8 '?' # ?I 0xad '!' # !I 0xae '\"' # << 0xaf '\"' # >> ifmail-2.14tx8.10.orig/misc/maptabs/iso-8859-2__fidomazovia100644 1751 50 2360 6100601550 20540 0ustar mdsrc# ISO 8859-2 -> fidomazovia # Table contributed by Krzysztof Halasa 0xa0 0xff 0xa1 0x8f 0xa3 0x9c 0xa5 'L' # L< 0xa6 0x98 0xa8 '\"' # ': 0xa9 'S' # S< 0xaa 'S' # S, 0xab 'T' # T< 0xac 0xa0 0xad '-' # -- 0xae 'Z' # Z< 0xaf 0xa1 0xb1 0x86 0xb3 0x92 0xb4 '\'' # '' 0xb5 'l' # l< 0xb6 0x9e 0xb9 's' # s< 0xba 's' # s, 0xbb 't' # t< 0xbc 0xa6 0xde 'z' # z< 0xbf 0xa7 0xc0 'R' # R' 0xc1 'A' # A' 0xc2 'A' # A> 0xc3 'A' # A( 0xc4 'A' # A: 0xc5 'L' # L' 0xc6 0x95 0xc7 0x80 0xc8 'C' # C< 0xc9 0x90 0xca 0x90 0xcb 'E' # E: 0xcc 'E' # E< 0xcd 'I' # I' 0xce 'I' # I> 0xcf 'D' # D< 0xd0 'D' # D/ 0xd1 0xa5 0xd2 'N' # N< 0xd3 0xa3 0xd4 'O' # O> 0xd5 'O' # O" 0xd6 0x99 0xd8 'R' # R< 0xd9 'U' # U0 0xda 'U' # U' 0xdb 'U' # U" 0xdc 0x9a 0xdd 'Y' # Y' 0xde 'T' # T, 0xe0 'r' # r' 0xe1 'a' # a' 0xe2 'a' # a> 0xe3 'a' # a( 0xe4 'a' # a: 0xe5 'l' # l' 0xe6 0x87 0xe7 0x87 0xe8 'c' # c< 0xe9 0x82 0xea 0x91 0xeb 0x89 0xec 'e' # e< 0xed 0xa1 0xee 0x8c 0xef 'd' # d< 0xf0 'd' # d/ 0xf1 0xa4 0xf2 'N' # N< 0xf3 0xa2 0xf4 0x93 0xf5 'O' # O" 0xf6 0x94 0xf8 'R' # R< 0xf9 'U' # U0 0xfa 'U' # U' 0xfb 'U' # U" 0xfc 0x81 0xfd 'Y' # Y' 0xfe 'T' # T, ifmail-2.14tx8.10.orig/misc/maptabs/cp852__fidomazovia100644 1751 50 337 6100601550 20017 0ustar mdsrc# Table # cp852 --> fidomazovia 0x83 0x84 0x86 0x87 0x88 0x92 0x8d 0xa0 0x8f 0x95 0x97 0x98 0x98 0x9e 0x9d 0x9c 0xa0 0x83 0xa4 0x8f 0xa5 0x86 0xa8 0x90 0xa9 0x91 0xab 0xa6 0xbd 0xa1 0xbe 0xa7 0xe0 0xa3 0xe3 0xa5 0xe4 0xa4 ifmail-2.14tx8.10.orig/misc/maptabs/cp852__iso-8859-2100644 1751 50 1760 6100601550 17074 0ustar mdsrc# cp852 --> iso-8859-2 0x80 0xc7 0x81 0xfc 0x82 0xe9 0x83 0xe2 0x84 0xe4 0x85 0xf9 0x86 0xe6 0x87 0xe7 0x88 0xb3 0x89 0xeb 0x8a 0xd5 0x8b 0xf5 0x8c 0xee 0x8d 0xac 0x8e 0xc4 0x8f 0xc6 0x90 0xc9 0x91 0xc5 0x92 0xe5 0x93 0xf4 0x94 0xf6 0x95 0xa5 0x96 0xb5 0x97 0xa6 0x98 0xb6 0x99 0xd6 0x9a 0xdc 0x9b 0xab 0x9c 0xbb 0x9d 0xa3 0x9e 0xd7 0x9f 0xe8 0xa0 0xe1 0xa1 0xed 0xa2 0xf3 0xa3 0xfa 0xa4 0xa1 0xa5 0xb1 0xa6 0xae 0xa7 0xbe 0xa8 0xca 0xa9 0xea 0xab 0xbc 0xac 0xc8 0xad 0xba 0xae '\"' # << 0xaf '\"' # >> 0xb5 0xc1 0xb6 0xc2 0xb7 0xcc 0xb8 0xaa 0xbd 0xaf 0xbe 0xbf 0xc6 0xc3 0xc7 0xe3 0xcf 0xa4 0xd0 0xf0 0xd1 0xd0 0xd2 0xcf 0xd3 0xcb 0xd4 0xef 0xd5 0xd2 0xd6 0xcd 0xd7 'U' # U> 0xd8 0xec 0xdd 0xde 0xde 0xd9 0xe0 0xd3 0xe1 0xdf 0xe2 0xd4 0xe3 0xd1 0xe4 0xf1 0xe5 0xf2 0xe6 0xa9 0xe7 0xb9 0xe8 0xc0 0xe9 0xda 0xea 0xe0 0xeb 0xdb 0xec 0xfd 0xed 0xdd 0xee 0xfe 0xef 0xb4 0xf0 0xad 0xf1 0xbd 0xf2 0xb8 0xf3 0xb7 0xf4 0xa2 0xf5 0xa7 0xf6 0xf7 0xf7 0xb2 0xf8 0xb0 0xf9 0xa8 0xfa 0xff 0xfb 0xfb 0xfc 0xd8 0xfd 0xf8 ifmail-2.14tx8.10.orig/misc/maptabs/fidomazovia__cp852100644 1751 50 653 6100601550 20020 0ustar mdsrc# fidomazovia-> cp852 0x80 0x80 0x83 0xa0 0x84 0x83 0x85 'a' # a! 0x86 0xa5 0x87 0x86 0x88 'e' # e> 0x8a 'e' # e! 0x8b 'i' # i: 0x8d 'i' # i! 0x8f 0xa4 0x90 0xa8 0x91 0xa9 0x92 0x88 0x95 0x8f 0x96 'u' # u> 0x97 'u' # u! 0x98 0x97 0x9c 0x9d 0x9e 0x98 0xa0 0x8d 0xa1 0xbd 0xa3 0xe0 0xa4 0xe4 0xa5 0xe3 0xa6 0xab 0xa7 0xbe 0xa8 '?' # ?I 0xad '!' # !I 0xae '\"' # << 0xaf '\"' # >> ifmail-2.14tx8.10.orig/misc/maptabs/iso-8859-2__cp852100644 0 0 1715 6573551267 17557 0ustar rootroot# iso-8859-2 to cp852 0xa1 0xa4 0xa2 0xf4 0xa3 0x9d 0xa4 0xcf 0xa5 0x95 0xa6 0x97 0xa7 0xf5 0xa8 0xf9 0xa9 0xe6 0xaa 0xb8 0xab 0x9b 0xac 0x8d 0xad 0xf0 0xae 0xa6 0xaf 0xbd 0xb0 0xf8 0xb1 0xa5 0xb2 0xf7 0xb3 0x88 0xb4 0xef 0xb5 0x96 0xb6 0x98 0xb7 0xf3 0xb8 0xf2 0xb9 0xe7 0xba 0xad 0xbb 0x9c 0xbc 0xab 0xbd 0xf1 0xbe 0xa7 0xbf 0xbe 0xc0 0xe8 0xc1 0xb5 0xc2 0xb6 0xc3 0xc6 0xc4 0x8e 0xc5 0x91 0xc6 0x8f 0xc7 0x80 0xc8 0xac 0xc9 0x90 0xca 0xa8 0xcb 0xd3 0xcc 0xb7 0xcd 0xd6 0xce 0xd7 0xcf 0xd2 0xd0 0xd1 0xd1 0xe3 0xd2 0xd5 0xd3 0xe0 0xd4 0xe2 0xd5 0x8a 0xd6 0x99 0xd7 0x9e 0xd8 0xfc 0xd9 0xde 0xda 0xe9 0xdb 0xeb 0xdc 0x9a 0xdd 0xed 0xde 0xdd 0xdf 0xe1 0xe0 0xea 0xe1 0xa0 0xe2 0x83 0xe3 0xc7 0xe4 0x84 0xe5 0x92 0xe6 0x86 0xe7 0x87 0xe8 0x9f 0xe9 0x82 0xea 0xa9 0xeb 0x89 0xec 0xd8 0xed 0xa1 0xee 0x8c 0xef 0xd4 0xf0 0xd0 0xf1 0xe4 0xf2 0xe5 0xf3 0xa2 0xf4 0x93 0xf5 0x8b 0xf6 0x94 0xf7 0xf6 0xf8 0xfd 0xf9 0x85 0xfa 0xa3 0xfb 0xfb 0xfc 0x81 0xfd 0xec 0xfe 0xee 0xff 0xfa ifmail-2.14tx8.10.orig/misc/maptabs/cp862__iso-8859-8100644 1751 50 1006 6100601550 17074 0ustar mdsrc# hebrew cp862 (alias hebrew-PC 8 bit) to iso-8859-8 20 182 21 167 128 224 129 225 130 226 131 227 132 228 133 229 134 230 135 231 136 232 137 233 138 234 139 235 140 236 141 237 142 238 143 239 144 240 145 241 146 242 147 243 148 244 149 245 150 246 151 247 152 248 153 249 154 250 155 162 156 163 157 165 160 225 161 237 162 243 163 250 164 241 165 209 166 170 167 186 168 191 170 172 171 189 172 188 173 161 174 171 175 187 225 223 230 181 241 177 246 247 248 176 250 183 253 178 255 160 ifmail-2.14tx8.10.orig/misc/maptabs/mac__iso-8859-1100644 1751 50 3514 6267716523 17016 0ustar mdsrc# Macintosh extended characters to iso-8859-1 128 'Ä' # A dieresis 129 'Å' # A ring 130 'Ç' # C cedilla 131 'É' # E acute 132 'Ñ' # N tilde 133 'Ö' # O dieresis 134 'Ü' # U dieresis 135 'á' # a acute 136 'à' # a grave 137 'â' # a circumflex 138 'ä' # a dieresis 139 'ã' # a tilde 140 'å' # a ring 141 'ç' # c cedilla 142 'é' # e acute 143 'è' # e grave 144 'ê' # e circumflex 145 'ë' # e dieresis 146 'í' # i acute 147 'ì' # i grave 148 'î' # i circumflex 149 'ï' # i dieresis 150 'ñ' # n tilde 151 'ó' # o acute 152 'ò' # o grave 153 'ô' # o circumflex 154 'ö' # o dieresis 155 'õ' # o tilde 156 'ú' # u acute 157 'ù' # u grave 158 'û' # u circumflex 159 'ü' # u dieresis 160 '+' # dagger 161 '°' # ring / degree 162 'ç' # cent 163 '£' # pound sterling 164 '§' # section 165 '·' # bullet 166 '§' # paragraph 167 'ß' # german double s 168 '®' # registered trademark 169 '©' # copyright 170 'T' # trademark 171 '´' # acute 172 '¨' # dieresis 174 'Æ' # AE 175 'Ø' # O slash #176 # infinity 177 '±' # plusminus 178 '«' # smaller equals 179 '»' # greater equals 180 '¥' # Yen 181 'µ' # mu 182 'ð' # delta #183 0xE4 # Sigma (summation) #184 0xE3 # Pi #185 0xE3 # pi 187 'ª' # ord feminine 188 'º' # ord masculine #189 0xEA # Omega 190 'æ' # ae 191 'ø' # o slash 192 '¿' # question downwards 193 '¡' # exclam downwards 194 '¬' # logical not 195 'V' # radical 196 'f' # florin 197 '~' # approx. #198 0x7F # Delta 199 '»' # guillemot right 200 '«' # guillemot left 201 '.' # ellipsis 202 32 # non breaking space 203 'Á' # A acute 204 'Ã' # A tilde 205 'Õ' # O tilde 206 'Ö' # OE 207 'ö' # oe #208 0xFA # en dash 209 '-' # em dash 210 '"' # double quote left 211 '"' # double quote right 212 '`' # quote left 213 '\'' # quote right 214 '÷' # divide #215 0x04 # lozenge 216 'ÿ' # y dieresis ifmail-2.14tx8.10.orig/misc/maptabs/iso-8859-5__mik100644 1751 50 1642 6352265223 17031 0ustar mdsrc# trans table for the ISO-8859-5 (Cyrillic) to MIK (Bulgaria-DOS) codepage # program generated! 0xb0 0x80 0xb1 0x81 0xb2 0x82 0xb3 0x83 0xb4 0x84 0xb5 0x85 0xb6 0x86 0xb7 0x87 0xb8 0x88 0xb9 0x89 0xba 0x8a 0xbb 0x8b 0xbc 0x8c 0xbd 0x8d 0xbe 0x8e 0xbf 0x8f 0xc0 0x90 0xc1 0x91 0xc2 0x92 0xc3 0x93 0xc4 0x94 0xc5 0x95 0xc6 0x96 0xc7 0x97 0xc8 0x98 0xc9 0x99 0xca 0x9a 0xcb 0x9b 0xcc 0x9c 0xcd 0x9d 0xce 0x9e 0xcf 0x9f 0xd0 0xa0 0xd1 0xa1 0xd2 0xa2 0xd3 0xa3 0xd4 0xa4 0xd5 0xa5 0xd6 0xa6 0xd7 0xa7 0xd8 0xa8 0xd9 0xa9 0xda 0xaa 0xdb 0xab 0xdc 0xac 0xdd 0xad 0xde 0xae 0xdf 0xaf 0xe0 0xb0 0xe1 0xb1 0xe2 0xb2 0xe3 0xb3 0xe4 0xb4 0xe5 0xb5 0xe6 0xb6 0xe7 0xb7 0xe8 0xb8 0xe9 0xb9 0xea 0xba 0xeb 0xbb 0xec 0xbc 0xed 0xbd 0xee 0xbe 0xef 0xbf ifmail-2.14tx8.10.orig/misc/maptabs/koi8__mik100644 1751 50 2633 6352265223 16335 0ustar mdsrc# converion table from KOI8 (Russian) to MIK (Bulgarian-DOS) codepage # semi-automatically received by mik__koi8 file 0x80 0xC4 0x81 0xD3 0x83 0xCF 0x84 0xC0 0x86 0xC3 0x87 0xD4 0x88 0xC2 0x89 0xC1 0x8A 0xC5 0x90 0xD0 0x91 0xD1 0x92 0xD2 0x9B 0xFF 0xA0 0xCD 0xA1 0xC7 0xA3 0xF1 0xA5 0xC9 0xA8 0xD7 0xA9 0xD9 0xAA 0xDA 0xAB 0xC8 0xAC 0xDC 0xAD 0xDD 0xAE 0xD8 0xAF 0xDF 0xB1 0xCC 0xB2 0xF2 0xB3 0xD6 0xB4 0xF4 0xB5 0xC6 0xB6 0xF6 0xB7 0xF7 0xB8 0xCB 0xBB 0xCA 0xBC 0xFC 0xBD 0xFD 0xBE 0xCE 0xC0 0xBE 0xC1 0xA0 0xC2 0xA1 0xC3 0xB6 0xC4 0xA4 0xC5 0xA5 0xC6 0xB4 0xC7 0xA3 0xC8 0xB5 0xC9 0xA8 0xCA 0xA9 0xCB 0xAA 0xCC 0xAB 0xCD 0xAC 0xCE 0xAD 0xCF 0xAE 0xD0 0xAF 0xD1 0xBF 0xD2 0xB0 0xD3 0xB1 0xD4 0xB2 0xD5 0xB3 0xD6 0xA6 0xD7 0xA2 0xD8 0xBC 0xD9 0xBB 0xDA 0xA7 0xDB 0xB8 0xDC 0xBD 0xDD 0xB9 0xDE 0xB7 0xDF 0xBA 0xE0 0x9E 0xE1 0x80 0xE2 0x81 0xE3 0x96 0xE4 0x84 0xE5 0x85 0xE6 0x94 0xE7 0x83 0xE8 0x95 0xE9 0x88 0xEA 0x89 0xEB 0x8A 0xEC 0x8B 0xED 0x8C 0xEE 0x8D 0xEF 0x8E 0xF0 0x8F 0xF1 0x9F 0xF2 0x90 0xF3 0x91 0xF4 0x92 0xF5 0x93 0xF6 0x86 0xF7 0x82 0xF8 0x9C 0xF9 0x9B 0xFA 0x87 0xFB 0x98 0xFC 0x9D 0xFD 0x99 0xFE 0x97 0xFF 0x9A ifmail-2.14tx8.10.orig/misc/maptabs/mik__iso-8859-5100644 1751 50 1636 6352265223 17034 0ustar mdsrc# trans table for MIK (Bulgarian-DOS) to ISO-8859-5 (Cyrillic) codepage # program generated! 0x80 0xb0 0x81 0xb1 0x82 0xb2 0x83 0xb3 0x84 0xb4 0x85 0xb5 0x86 0xb6 0x87 0xb7 0x88 0xb8 0x89 0xb9 0x8a 0xba 0x8b 0xbb 0x8c 0xbc 0x8d 0xbd 0x8e 0xbe 0x8f 0xbf 0x90 0xc0 0x91 0xc1 0x92 0xc2 0x93 0xc3 0x94 0xc4 0x95 0xc5 0x96 0xc6 0x97 0xc7 0x98 0xc8 0x99 0xc9 0x9a 0xca 0x9b 0xcb 0x9c 0xcc 0x9d 0xcd 0x9e 0xce 0x9f 0xcf 0xa0 0xd0 0xa1 0xd1 0xa2 0xd2 0xa3 0xd3 0xa4 0xd4 0xa5 0xd5 0xa6 0xd6 0xa7 0xd7 0xa8 0xd8 0xa9 0xd9 0xaa 0xda 0xab 0xdb 0xac 0xdc 0xad 0xdd 0xae 0xde 0xaf 0xdf 0xb0 0xe0 0xb1 0xe1 0xb2 0xe2 0xb3 0xe3 0xb4 0xe4 0xb5 0xe5 0xb6 0xe6 0xb7 0xe7 0xb8 0xe8 0xb9 0xe9 0xba 0xea 0xbb 0xeb 0xbc 0xec 0xbd 0xed 0xbe 0xee 0xbf 0xef ifmail-2.14tx8.10.orig/misc/maptabs/mik__koi8100644 1751 50 3403 6352265223 16331 0ustar mdsrc# Channel map for translation MIK codes (Bulgarian-DOS) to KOI8 codes # (Russian language) # # Internal value Output character 0x80 0xE1 0x81 0xE2 0x82 0xF7 0x83 0xE7 0x84 0xE4 0x85 0xE5 0x86 0xF6 0x87 0xFA 0x88 0xE9 0x89 0xEA 0x8A 0xEB 0x8B 0xEC 0x8C 0xED 0x8D 0xEE 0x8E 0xEF 0x8F 0xF0 0x90 0xF2 0x91 0xF3 0x92 0xF4 0x93 0xF5 0x94 0xE6 0x95 0xE8 0x96 0xE3 0x97 0xFE 0x98 0xFB 0x99 0xFD 0x9A 0xFF 0x9B 0xF9 0x9C 0xF8 0x9D 0xFC 0x9E 0xE0 0x9F 0xF1 0xA0 0xC1 0xA1 0xC2 0xA2 0xD7 0xA3 0xC7 0xA4 0xC4 0xA5 0xC5 0xA6 0xD6 0xA7 0xDA 0xA8 0xC9 0xA9 0xCA 0xAA 0xCB 0xAB 0xCC 0xAC 0xCD 0xAD 0xCE 0xAE 0xCF 0xAF 0xD0 0xB0 0xD2 0xB1 0xD3 0xB2 0xD4 0xB3 0xD5 0xB4 0xC6 0xB5 0xC8 0xB6 0xC3 0xB7 0xDE 0xB8 0xDB 0xB9 0xDD 0xBA 0xDF 0xBB 0xD9 0xBC 0xD8 0xBD 0xDC 0xBE 0xC0 0xBF 0xD1 0xC0 0x84 0xC1 0x89 0xC2 0x88 0xC3 0x86 0xC4 0x80 0xC5 0x8A 0xC6 0xB5 0xC7 0xA1 0xC8 0xAB 0xC9 0xA5 0xCA 0xBB 0xCB 0xB8 0xCC 0xB1 0xCD 0xA0 0xCE 0xBE 0xCF 0x83 0xD0 0x90 0xD1 0x91 0xD2 0x92 0xD3 0x81 0xD4 0x87 0xD5 0xA3 0xD6 0xB3 0xD7 0xA8 0xD8 0xAE 0xD9 0xA9 0xDA 0xAA 0xDB 0xAB 0xDC 0xAC 0xDD 0xAD 0xDE 0xAE 0xDF 0xAF 0xE0 0xD2 0xE1 0xD3 0xE2 0xD4 0xE3 0xD5 0xE4 0xC6 0xE5 0xC8 0xE6 0xC3 0xE7 0xDE 0xE8 0xDB 0xE9 0xDD 0xEA 0xDF 0xEB 0xD9 0xEC 0xD8 0xED 0xDC 0xEE 0xC0 0xEF 0xD1 0xF0 0xB3 0xF1 0xA3 0xF2 0xB2 0xF3 0xB1 0xF4 0xB4 0xF5 0xB5 0xF6 0xB6 0xF7 0xB7 0xF8 0xB8 0xF9 0xA0 0xFA 0x8A 0xFB 0xBB 0xFC 0xBC 0xFD 0xBD 0xFE 0xBE 0xFF 0x9B ifmail-2.14tx8.10.orig/misc/maptabs/README.cz_and_sk100644 1751 50 1671 6362255474 17364 0ustar mdsrcFrom: Stanislav Meduna I send you an information on charsets used in Czech and Slovak Republic (FIDO region 42). This region historically uses "Kamenicky" coding of local characters. This coding was used here long before M$ 852 and 1250 codepages existed and the idea behind this was that the text in Kamenicky coding is well readable also on displays with only CP437 loaded. The FIDO network in Czechia and Slovakia uses this (and only this) coding for east european characters in message bodies. The headers are always ASCII-only. The (unofficial ?) codepage number is 895 and the CHRS kludge used is "CP895 2". The situation in the internet world is clear - ISO 8859-2 is used, but most of the local newsgroups don't use national characters at all. I send you the (hopefully correct) mapping tables for Kamenicky -> PC (cp895__cp437) Kamenicky -> ISO L2 (cp895_iso-8859-2) ISO L2 -> Kamenicky (iso-8859-2__cp895) ifmail-2.14tx8.10.orig/misc/maptabs/cp895__cp437100644 1751 50 521 6277333716 16376 0ustar mdsrc# Mapping table from Kamenicky (CP895) to PC codepage 128 67 130 101 131 100 133 68 134 84 135 99 136 101 137 69 138 76 139 73 140 108 141 108 143 65 144 69 145 122 146 90 147 111 149 79 150 117 151 85 152 121 155 83 156 76 157 89 158 82 159 116 160 97 161 105 162 111 163 117 164 110 165 78 166 85 167 79 168 115 169 114 170 114 171 82 ifmail-2.14tx8.10.orig/misc/maptabs/cp895__iso-8859-2100644 1751 50 704 6372132347 17076 0ustar mdsrc# Mapping table from Kamenicky (CP895) to ISO 8859-2 coding 128 200 129 252 130 233 131 239 132 228 133 207 134 171 135 232 136 236 137 204 138 165 139 205 140 229 141 181 142 196 143 193 144 201 145 190 146 174 147 244 148 246 149 211 150 249 151 218 152 253 153 214 154 220 155 169 156 197 157 221 158 216 159 187 160 225 161 237 162 243 163 250 164 242 165 210 166 217 168 185 169 248 170 224 171 192 225 223 243 162 246 247 248 176 249 168 250 215 ifmail-2.14tx8.10.orig/misc/maptabs/iso-8859-2__cp895100644 1751 50 1762 6277334010 17116 0ustar mdsrc# Mapping table from ISO 8859-2 to Kamenicky (CP895) 128 32 129 32 130 32 131 32 132 32 133 32 134 32 135 32 136 32 137 32 138 32 139 32 140 32 141 32 142 32 143 32 144 32 145 32 146 32 147 32 148 32 149 32 150 32 151 32 152 32 153 32 154 32 155 32 156 32 157 32 158 32 159 32 160 32 161 65 162 243 163 76 164 111 165 138 166 83 167 64 168 249 169 155 170 83 171 134 172 90 173 45 174 146 175 90 176 248 177 97 178 249 179 108 180 44 181 141 182 115 183 248 184 249 185 168 186 115 187 159 188 122 189 126 190 145 191 122 192 171 193 143 194 65 195 65 196 142 197 156 198 67 199 67 200 128 201 144 202 69 203 69 204 137 205 139 206 73 207 133 208 68 209 78 210 165 211 149 212 79 213 79 214 153 215 250 216 158 217 166 218 151 219 85 220 154 221 157 222 84 223 225 224 170 225 160 226 131 227 97 228 132 229 140 230 99 231 99 232 135 233 130 234 101 235 137 236 136 237 161 238 140 239 131 240 100 241 110 242 164 243 162 244 147 245 139 246 148 247 246 248 169 249 150 250 163 251 117 252 129 253 152 254 116 ifmail-2.14tx8.10.orig/misc/ifmail.gif100644 1751 50 51537 6240215122 15056 0ustar mdsrcGIF89a@@¥¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ !ù ,!ÿ NETSCAPE2.0,@@þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞÿÿÿ´¬´¤Jÿל”öj9bZRJ{½ jÿ þ@€pH,€\Ž“ÓåШt*äXAì³åÆ\“J.˜8íjÕ™¸ owgU«„uæ|Q‰¡°';ƒƒ„ƒp45xzeL42;0†6›6 œ›†0;34OR“4£†  ´ž6†˜2§ªH4300¼¹.ÒÓÕÕº»›ÌÂ8ÅD 53—.-ñ*-ïïÖ¸éÛ235ÄàXÕÑ,B\ÒàX¨І".\Oš}ÛL](Æ! ‚çnypñO 8Á2@ —˜„ç"ß>ÝLèጠþÁ\î,,\™¢è  n(½‘‚iÑ´°PóA<ÈÃócH\îL¢(Úôƒ F¨½±`Áˆ¥7X¢0ÙBš­¬Ý"]ð*á– z(Y6U;b‚oHLXiÒ)ª–5Âa§ôé×ÅÉ,‘^¼…éÓ¨+-ú0« [pÒ¥9èØµP¡4Ò¶ŠQ ΢0Ò®ëêÛáoU…e}!<°òèYÃÄMgÈà`»ƒï¨¸6"ž«˜o5ÖÀ+:i¼WþV}ûvö·—HÀôx•sUÂ>˜CÁ2¹‘„‚onÑ7Faøy—ÀxÇ <°þÁ0Gp0 éæÐQme'!¬ávã™`Z*IUÓM4 `pöWCÖ-@\„- `ä‘GBc¦™uB“݈ˆá´×Œ_-œ˜Ö"éå‘1šPx,,”œAz44ÎJ·›|#p‰ä Fâùž„IB ÜöVdõt8ÁDØ&Ã9&¢ Úƒ,Þ¹'j/øIB…˜öSP…ž 5 !bÍ€ @ÞP烒¾ \˜2šV!“ÅÅõ4kÂc1¼ÒIXcÝ0¤¤ÃÁŠî§i\*·Ï 1T±Â¢¦ºšªF:)j°Æz à–PÂŒ4Þªþ+QÀ´˜*”KØ §í¶§u+œ"„;. ”;Ï H Cº @j»§¢ÔÔ°yºZ¯±÷æ›ìiþ*'JB 0Á€@’ ƒ±Úðð:Œ¾ïËïqó¸ 0LpF ÛµE +/‹zú×íÏ&¤L1ZÕe•‡1t$ˆ x°P 0,€«@o¸§õ+—ѱÉôÀ4IðBÚpÕ݆€2Ö,$Ð*M†Þ ð¶ ¸ p fO¶±!¨-tÛZ7+¥ u÷ºÞÓ-,¯‘C,øÕûöëï@«ôây[PöΑÇxZà‚³€,;‹S´4/‚µè|lþ¤kï蓃kÚémm-¥Ì×üºP)œíÔ¯BŒšÚjƒKÂî  ÎÀCªoð KÃQx$·Ê/Ÿûi¼Ãmx®P@d¯Óò Ga—$ÇÈq(K¼{ùq·`Ë6ãÀ Ú‡7ø¥{´cAÉî7œÀ]íy,ØåàVÌ €­+àn¸'?"-0;x iÆä€Ã˜¯eˆÍ¢•±eïs: jÄ¥$Ñ ‡^¦1½Ã þ+…1KÔÅf"ÎaΞLÖ=î8 1NjÙ§V°¹îGñ›a…“§ï¡Æ>ßYÌ[j¤º¡À^-þR书KGÒÓ—þ$ä'B‘5FË vô¥y,†Qó™kæ×%Ú!‰Žuãj ä¬Ì!Ê×{!8žˆ«—"’‹^Æ0nê%6úTúø(ˆÆãDãÙß%K°IüT(‘ª)ÊBjDÄAa+ÀžÍàƒ‚T¢Æ’—ÌÏ+;iÇO¦`!ž"Ð(‘Ð:"þÅ5Ö,™ŸîÔ<ªá”L’™‘)¬Kxp ~3œï˜óœ™B1eR «ÄfTŒ—–,V‡œÙÉÎZžÒ©4]¤kñ”‚Á •tü%†Ö¹N>—5¨§ÔßbÆÍƒ¬ 70œ“–Žò–Ž6fSNåCuá MÔ &ˆûvËiÈÃ!ÕiJYdʧęÐÅ/.³Ì<¨ô_qénP²õ%7½I7AŠžê—@;HR”U"2Afš®¡Pì`N…Äàƒ¨ã}i²‡=jkdc§˜8Œà,JlÏÐ…5öêV’úq+@‰a¯ H¬©°a*Å‚â_íÀ#‹„ |  ‚8ì'6ûØDÄu²”ÂXWð†Ìbï´&°†¶ jøCiW VÉ‚öµÅˆÁv‹[!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞÿÿÿ´¬´¤Jÿל”öj9bZRJ{½ jÿ þ@€pH,€\Ž“ÓåШt*äXAì³åÆ\“J.˜8íjÕ™¸ owgU«„uæ|Q‰¡°';ƒƒ„ƒp45xzeL42;0†6›6 œ›†0;34OR“4£†  ´ž6†˜2§ªH4300¼¹.ÒÓÕÕº»›ÌÂ8ÅD 53—.-ñ*-ïïÖ¸éÛ235ÄàXÕÑ,B\ÒàX¨І".\Oš}ÛL](Æ! ‚çnypñO 8Á2@ —˜„ç"ß>ÝLèጠþÁ\î,,\™¢è  n(½‘‚iÑ´°PóA<ÈÃócH\îL¢(Úôƒ F¨½±`Áˆ¥7X¢0ÙBš­¬Ý"]ð*á– z(Y6U;b‚oHLXiÒ)ª–5Âa§ôé×ÅÉ,‘^¼…éÓ¨+-ú0« [pÒ¥9èØµP¡4Ò¶ŠQ ΢0Ò®ëêÛáoU…e}!<°òèYÃÄMgÈà`»ƒï¨¸6"ž«˜o5ÖÀ+:i¼WþV}ûvö·—HÀôx•sUÂ>˜CÁ2¹‘„‚onÑ7Faøy—ÀxÇ <°þÁ0Gp0 éæÐQme'!¬ávã™`Z*IUÓM4 `pöWCÖ-@\„- `ä‘GBc¦™uB“݈ˆá´×Œ_-œ˜Ö"éå‘1šPx,,”œAz44ÎJ·›|#p‰ä Fâùž„IB ÜöVdõt8ÁDØ&Ã9&¢ Úƒ,Þ¹'j/øIB…˜öSP…ž 5 !bÍ€ @ÞP烒¾ \˜2šV!“ÅÅõ4kÂc1¼ÒIXcÝ0¤¤ÃÁŠî§i\*·Ï 1T±Â¢¦ºšªF:)j°Æz à–PÂŒ4Þªþ+QÀ´˜*”KØ §í¶§u+œ"„;. ”;Ï H Cº @j»§¢ÔÔ°yºZ¯±÷æ›ìiþ*'JB 0Á€@’ ƒ±Úðð:Œ¾ïËïqó¸ 0LpF ÛµE +/‹zú×íÏ&¤L1ZÕe•‡1t$ˆ x°P 0,€«@o¸§õ+—ѱÉôÀ4IðBÚpÕ݆€2Ö,$Ð*M†Þ ð¶ ¸ p fO¶±!¨-tÛZ7+¥ u÷ºÞÓ-,¯‘C,øÕûöëï@«ôây[PöΑÇxZà‚³€,;‹S´4/‚µè|lþ¤kï蓃kÚémm-¥Ì×üºP)œíÔ¯BŒšÚjƒKÂî  ÎÀCªoð KÃQx$·Ê/Ÿûi¼Ãmx®P@d¯Óò Ga—$ÇÈq(K¼{ùq·`Ë6ãÀ Ú‡7ø¥{´cAÉî7œÀ]íy,ØåàVÌ €­+àn¸'?"-0;x iÆä€Ã˜¯eˆÍ¢•±eïs: jÄ¥$Ñ ‡^¦1½Ã þ+…1KÔÅf"ÎaΞLÖ=î8 1NjÙ§V°¹îGñ›a…“§ï¡Æ>ßYÌ[j¤º¡À^-þR书KGÒÓ—þ$ä'B‘5FË vô¥y,†Qó™kæ×%Ú!‰Žuãj ä¬Ì!Ê×{!8žˆ«—"’‹^Æ0nê%6úTúø(ˆÆãDãÙß%K°IüT(‘ª)ÊBjDÄAa+ÀžÍàƒ‚T¢Æ’—ÌÏ+;iÇO¦`!ž"Ð(‘Ð:"þÅ5Ö,™ŸîÔ<ªá”L’™‘)¬Kxp ~3œï˜óœ™B1eR «ÄfTŒ—–,V‡œÙÉÎZžÒ©4]¤kñ”‚Á •tü%†Ö¹N>—5¨§ÔßbÆÍƒ¬ 70œ“–Žò–Ž6fSNåCuá MÔ &ˆûvËiÈÃ!ÕiJYdʧęÐÅ/.³Ì<¨ô_qénP²õ%7½I7AŠžê—@;HR”U"2Afš®¡Pì`N…Äàƒ¨ã}i²‡=jkdc§˜8Œà,JlÏÐ…5öêV’úq+@‰a¯ H¬©°a*Å‚â_íÀ#‹„ |  ‚8ì'6ûØDÄu²”ÂXWð†Ìbï´&°†¶ jøCiW VÉ‚öµÅˆÁv‹[!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞÿÿÿ´¬´¤Jÿל”öj9bZRJ{½ jÿ þ@€pH,€\Ž“ÓåШt*äXAì³åÆ\“J.˜8íjÕ™¸ owgU«„uæ|Q‰¡°';ƒƒ„ƒp45xzeL42;0†6›6 œ›†0;34OR“4£†  ´ž6†˜2§ªH4300¼¹.ÒÓÕÕº»›ÌÂ8ÅD 53—.-ñ*-ïïÖ¸éÛ235ÄàXÕÑ,B\ÒàX¨І".\Oš}ÛL](Æ! ‚çnypñO 8Á2@ —˜„ç"ß>ÝLèጠþÁ\î,,\™¢è  n(½‘‚iÑ´°PóA<ÈÃócH\îL¢(Úôƒ F¨½±`Áˆ¥7X¢0ÙBš­¬Ý"]ð*á– z(Y6U;b‚oHLXiÒ)ª–5Âa§ôé×ÅÉ,‘^¼…éÓ¨+-ú0« [pÒ¥9èØµP¡4Ò¶ŠQ ΢0Ò®ëêÛáoU…e}!<°òèYÃÄMgÈà`»ƒï¨¸6"ž«˜o5ÖÀ+:i¼WþV}ûvö·—HÀôx•sUÂ>˜CÁ2¹‘„‚onÑ7Faøy—ÀxÇ <°þÁ0Gp0 éæÐQme'!¬ávã™`Z*IUÓM4 `pöWCÖ-@\„- `ä‘GBc¦™uB“݈ˆá´×Œ_-œ˜Ö"éå‘1šPx,,”œAz44ÎJ·›|#p‰ä Fâùž„IB ÜöVdõt8ÁDØ&Ã9&¢ Úƒ,Þ¹'j/øIB…˜öSP…ž 5 !bÍ€ @ÞP烒¾ \˜2šV!“ÅÅõ4kÂc1¼ÒIXcÝ0¤¤ÃÁŠî§i\*·Ï 1T±Â¢¦ºšªF:)j°Æz à–PÂŒ4Þªþ+QÀ´˜*”KØ §í¶§u+œ"„;. ”;Ï H Cº @j»§¢ÔÔ°yºZ¯±÷æ›ìiþ*'JB 0Á€@’ ƒ±Úðð:Œ¾ïËïqó¸ 0LpF ÛµE +/‹zú×íÏ&¤L1ZÕe•‡1t$ˆ x°P 0,€«@o¸§õ+—ѱÉôÀ4IðBÚpÕ݆€2Ö,$Ð*M†Þ ð¶ ¸ p fO¶±!¨-tÛZ7+¥ u÷ºÞÓ-,¯‘C,øÕûöëï@«ôây[PöΑÇxZà‚³€,;‹S´4/‚µè|lþ¤kï蓃kÚémm-¥Ì×üºP)œíÔ¯BŒšÚjƒKÂî  ÎÀCªoð KÃQx$·Ê/Ÿûi¼Ãmx®P@d¯Óò Ga—$ÇÈq(K¼{ùq·`Ë6ãÀ Ú‡7ø¥{´cAÉî7œÀ]íy,ØåàVÌ €­+àn¸'?"-0;x iÆä€Ã˜¯eˆÍ¢•±eïs: jÄ¥$Ñ ‡^¦1½Ã þ+…1KÔÅf"ÎaΞLÖ=î8 1NjÙ§V°¹îGñ›a…“§ï¡Æ>ßYÌ[j¤º¡À^-þR书KGÒÓ—þ$ä'B‘5FË vô¥y,†Qó™kæ×%Ú!‰Žuãj ä¬Ì!Ê×{!8žˆ«—"’‹^Æ0nê%6úTúø(ˆÆãDãÙß%K°IüT(‘ª)ÊBjDÄAa+ÀžÍàƒ‚T¢Æ’—ÌÏ+;iÇO¦`!ž"Ð(‘Ð:"þÅ5Ö,™ŸîÔ<ªá”L’™‘)¬Kxp ~3œï˜óœ™B1eR «ÄfTŒ—–,V‡œÙÉÎZžÒ©4]¤kñ”‚Á •tü%†Ö¹N>—5¨§ÔßbÆÍƒ¬ 70œ“–Žò–Ž6fSNåCuá MÔ &ˆûvËiÈÃ!ÕiJYdʧęÐÅ/.³Ì<¨ô_qénP²õ%7½I7AŠžê—@;HR”U"2Afš®¡Pì`N…Äàƒ¨ã}i²‡=jkdc§˜8Œà,JlÏÐ…5öêV’úq+@‰a¯ H¬©°a*Å‚â_íÀ#‹„ |  ‚8ì'6ûØDÄu²”ÂXWð†Ìbï´&°†¶ jøCiW VÉ‚öµÅˆÁv‹[!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞÿÿÿ´¬´¤Jÿל”öj9bZRJ{½ jÿ þ@€pH,€\Ž“ÓåШt*äXAì³åÆ\“J.˜8íjÕ™¸ owgU«„uæ|Q‰¡°';ƒƒ„ƒp45xzeL42;0†6›6 œ›†0;34OR“4£†  ´ž6†˜2§ªH4300¼¹.ÒÓÕÕº»›ÌÂ8ÅD 53—.-ñ*-ïïÖ¸éÛ235ÄàXÕÑ,B\ÒàX¨І".\Oš}ÛL](Æ! ‚çnypñO 8Á2@ —˜„ç"ß>ÝLèጠþÁ\î,,\™¢è  n(½‘‚iÑ´°PóA<ÈÃócH\îL¢(Úôƒ F¨½±`Áˆ¥7X¢0ÙBš­¬Ý"]ð*á– z(Y6U;b‚oHLXiÒ)ª–5Âa§ôé×ÅÉ,‘^¼…éÓ¨+-ú0« [pÒ¥9èØµP¡4Ò¶ŠQ ΢0Ò®ëêÛáoU…e}!<°òèYÃÄMgÈà`»ƒï¨¸6"ž«˜o5ÖÀ+:i¼WþV}ûvö·—HÀôx•sUÂ>˜CÁ2¹‘„‚onÑ7Faøy—ÀxÇ <°þÁ0Gp0 éæÐQme'!¬ávã™`Z*IUÓM4 `pöWCÖ-@\„- `ä‘GBc¦™uB“݈ˆá´×Œ_-œ˜Ö"éå‘1šPx,,”œAz44ÎJ·›|#p‰ä Fâùž„IB ÜöVdõt8ÁDØ&Ã9&¢ Úƒ,Þ¹'j/øIB…˜öSP…ž 5 !bÍ€ @ÞP烒¾ \˜2šV!“ÅÅõ4kÂc1¼ÒIXcÝ0¤¤ÃÁŠî§i\*·Ï 1T±Â¢¦ºšªF:)j°Æz à–PÂŒ4Þªþ+QÀ´˜*”KØ §í¶§u+œ"„;. ”;Ï H Cº @j»§¢ÔÔ°yºZ¯±÷æ›ìiþ*'JB 0Á€@’ ƒ±Úðð:Œ¾ïËïqó¸ 0LpF ÛµE +/‹zú×íÏ&¤L1ZÕe•‡1t$ˆ x°P 0,€«@o¸§õ+—ѱÉôÀ4IðBÚpÕ݆€2Ö,$Ð*M†Þ ð¶ ¸ p fO¶±!¨-tÛZ7+¥ u÷ºÞÓ-,¯‘C,øÕûöëï@«ôây[PöΑÇxZà‚³€,;‹S´4/‚µè|lþ¤kï蓃kÚémm-¥Ì×üºP)œíÔ¯BŒšÚjƒKÂî  ÎÀCªoð KÃQx$·Ê/Ÿûi¼Ãmx®P@d¯Óò Ga—$ÇÈq(K¼{ùq·`Ë6ãÀ Ú‡7ø¥{´cAÉî7œÀ]íy,ØåàVÌ €­+àn¸'?"-0;x iÆä€Ã˜¯eˆÍ¢•±eïs: jÄ¥$Ñ ‡^¦1½Ã þ+…1KÔÅf"ÎaΞLÖ=î8 1NjÙ§V°¹îGñ›a…“§ï¡Æ>ßYÌ[j¤º¡À^-þR书KGÒÓ—þ$ä'B‘5FË vô¥y,†Qó™kæ×%Ú!‰Žuãj ä¬Ì!Ê×{!8žˆ«—"’‹^Æ0nê%6úTúø(ˆÆãDãÙß%K°IüT(‘ª)ÊBjDÄAa+ÀžÍàƒ‚T¢Æ’—ÌÏ+;iÇO¦`!ž"Ð(‘Ð:"þÅ5Ö,™ŸîÔ<ªá”L’™‘)¬Kxp ~3œï˜óœ™B1eR «ÄfTŒ—–,V‡œÙÉÎZžÒ©4]¤kñ”‚Á •tü%†Ö¹N>—5¨§ÔßbÆÍƒ¬ 70œ“–Žò–Ž6fSNåCuá MÔ &ˆûvËiÈÃ!ÕiJYdʧęÐÅ/.³Ì<¨ô_qénP²õ%7½I7AŠžê—@;HR”U"2Afš®¡Pì`N…Äàƒ¨ã}i²‡=jkdc§˜8Œà,JlÏÐ…5öêV’úq+@‰a¯ H¬©°a*Å‚â_íÀ#‹„ |  ‚8ì'6ûØDÄu²”ÂXWð†Ìbï´&°†¶ jøCiW VÉ‚öµÅˆÁv‹[!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞÿÿÿ´¬´¤Jÿל”öj9bZRJ{½ jÿ þ@€pH,€\Ž“ÓåШt*äXAì³åÆ\“J.˜8íjÕ™¸ owgU«„uæ|Q‰¡°';ƒƒ„ƒp45xzeL42;0†6›6 œ›†0;34OR“4£†  ´ž6†˜2§ªH4300¼¹.ÒÓÕÕº»›ÌÂ8ÅD 53—.-ñ*-ïïÖ¸éÛ235ÄàXÕÑ,B\ÒàX¨І".\Oš}ÛL](Æ! ‚çnypñO 8Á2@ —˜„ç"ß>ÝLèጠþÁ\î,,\™¢è  n(½‘‚iÑ´°PóA<ÈÃócH\îL¢(Úôƒ F¨½±`Áˆ¥7X¢0ÙBš­¬Ý"]ð*á– z(Y6U;b‚oHLXiÒ)ª–5Âa§ôé×ÅÉ,‘^¼…éÓ¨+-ú0« [pÒ¥9èØµP¡4Ò¶ŠQ ΢0Ò®ëêÛáoU…e}!<°òèYÃÄMgÈà`»ƒï¨¸6"ž«˜o5ÖÀ+:i¼WþV}ûvö·—HÀôx•sUÂ>˜CÁ2¹‘„‚onÑ7Faøy—ÀxÇ <°þÁ0Gp0 éæÐQme'!¬ávã™`Z*IUÓM4 `pöWCÖ-@\„- `ä‘GBc¦™uB“݈ˆá´×Œ_-œ˜Ö"éå‘1šPx,,”œAz44ÎJ·›|#p‰ä Fâùž„IB ÜöVdõt8ÁDØ&Ã9&¢ Úƒ,Þ¹'j/øIB…˜öSP…ž 5 !bÍ€ @ÞP烒¾ \˜2šV!“ÅÅõ4kÂc1¼ÒIXcÝ0¤¤ÃÁŠî§i\*·Ï 1T±Â¢¦ºšªF:)j°Æz à–PÂŒ4Þªþ+QÀ´˜*”KØ §í¶§u+œ"„;. ”;Ï H Cº @j»§¢ÔÔ°yºZ¯±÷æ›ìiþ*'JB 0Á€@’ ƒ±Úðð:Œ¾ïËïqó¸ 0LpF ÛµE +/‹zú×íÏ&¤L1ZÕe•‡1t$ˆ x°P 0,€«@o¸§õ+—ѱÉôÀ4IðBÚpÕ݆€2Ö,$Ð*M†Þ ð¶ ¸ p fO¶±!¨-tÛZ7+¥ u÷ºÞÓ-,¯‘C,øÕûöëï@«ôây[PöΑÇxZà‚³€,;‹S´4/‚µè|lþ¤kï蓃kÚémm-¥Ì×üºP)œíÔ¯BŒšÚjƒKÂî  ÎÀCªoð KÃQx$·Ê/Ÿûi¼Ãmx®P@d¯Óò Ga—$ÇÈq(K¼{ùq·`Ë6ãÀ Ú‡7ø¥{´cAÉî7œÀ]íy,ØåàVÌ €­+àn¸'?"-0;x iÆä€Ã˜¯eˆÍ¢•±eïs: jÄ¥$Ñ ‡^¦1½Ã þ+…1KÔÅf"ÎaΞLÖ=î8 1NjÙ§V°¹îGñ›a…“§ï¡Æ>ßYÌ[j¤º¡À^-þR书KGÒÓ—þ$ä'B‘5FË vô¥y,†Qó™kæ×%Ú!‰Žuãj ä¬Ì!Ê×{!8žˆ«—"’‹^Æ0nê%6úTúø(ˆÆãDãÙß%K°IüT(‘ª)ÊBjDÄAa+ÀžÍàƒ‚T¢Æ’—ÌÏ+;iÇO¦`!ž"Ð(‘Ð:"þÅ5Ö,™ŸîÔ<ªá”L’™‘)¬Kxp ~3œï˜óœ™B1eR «ÄfTŒ—–,V‡œÙÉÎZžÒ©4]¤kñ”‚Á •tü%†Ö¹N>—5¨§ÔßbÆÍƒ¬ 70œ“–Žò–Ž6fSNåCuá MÔ &ˆûvËiÈÃ!ÕiJYdʧęÐÅ/.³Ì<¨ô_qénP²õ%7½I7AŠžê—@;HR”U"2Afš®¡Pì`N…Äàƒ¨ã}i²‡=jkdc§˜8Œà,JlÏÐ…5öêV’úq+@‰a¯ H¬©°a*Å‚â_íÀ#‹„ |  ‚8ì'6ûØDÄu²”ÂXWð†Ìbï´&°†¶ jøCiW VÉ‚öµÅˆÁv‹[!ù ,@@…¬î1s b¤æÕÍŽ)Õ‹ƒ{sZA9œ1)Þ‹ÍR”AƒöîÅæÞ´¬´¤Jÿל”öj9bZRJ{½ jÿ‚ þ@€pH,ŽƒËáШt*äXì³å—[“J.˜7­JÕ™¸ owGE«„sæ|Q‰¡°':ƒƒ„ƒp34xzeL31:/†5›5 œ›†/:23OR“3£†  ´ž5†˜1§ªH32//¼¹-ÒÓÕÕº»›ÌÂ7ÅD 42—-,ñ),ïïÖ¸éÛ124ÄàXшÑ,B\ÒàX˜âĉ†".\Oš}ÛL](ÆÆ ‚çnyhñî@ŠMœ0Á2 —˜„×"ß¾Ý qHFÐ`þ.w®DAÔ6’Ú@±”h€‡XX¨ùÀ Îòìü—;“'ˆ2µÁ`ƒhm,X0B© –'L²fk_N2¬¸J¸Õ‚J–LÑŽX `Äà NŠÔЇ)èBˆ CØÆ){òmq2Ë£‚oXAº´iÅI‰Bž[÷*À(Ƚ@ÇŽEŠž®Elº·ïƒ²¼=WŸ«*,Û ä•FËþM:CÖh7m–ÜxªJ8žÕX®è¤Ý^©[uëÖÀ·^"AîÞ¨ÂîŒËFp@Á2´‘tBnl¹ç 6Ø`òeg_i™<­É@Áþ 0CAµ9dÔZÔ9ˆ€&2H_}÷‘f–JQÕtÓ øf}5Ý¿5ˆ¢@¤ƒ°XY&™Œ8mÎyÍðÅ‚ˆgõÈ X é` %l·Âo)iAxŒ7Cá|@`s¶±7‚•Bº¤œ.È)¤$äYÂu¥µõX=­Mð±ÅpNˆ'€¶à‰qÖiZw桤µµTS‰ CtØA3 h`Ž6¼¹`£.P—jo¶Ü[ISæ 4VÃ+|– =6Ji«š† \¶ØÖpÅí# U¨`h¨îxVꢌ:ú+uy[‚‹/ƪ]*Q€³„”KþÓ²:§µ¿í°Ão"à©-i t;Ï HC¸ ði¹¢¢ÄT¯ë¶»ƒ îú¯žÛº˜ß<-@ JB 0€@R Z°o»{°Â [šÂA A /Lp ×A´DñÊê‰t,2¼%7ü¥Y±Á Ëv$H x° ,@°¦‰¼so!„ÐóÉ |Çd 0pðÁ Mº‹~Ü›Ô S¯¼ '°ÖÃ2J Ã^ƒ]ƒ-ŒBÙOë,µoU_½Bõ"»5Ý·êp·s«¤ßi«½¶É+ÔkoÜE'¾¸dß<'äïR8Û¤žr²81 ³â D€ÍÂ2*þè€[]ré–k]UËÇÜzP(˜@mß¾¡ºiV[-î(3ðê.÷Ûü~K¾Aøxñ!C]Úèx–Fø‹· ÅÐÕk 4{½Axe»#Ìóíƒÿ0 ¶lÃ/*`ßÝÞg”ìÉd;òl—'ÒÔÇrùš ð¿Õ Ð6Ø‹Ÿ~c¿ß]r@a¼S¾ˆ mÌêõjѦš†KWšÝ¯ØE ‘ :×QÌþE¨†-D|! æ§*Æï:8 ’ ¦)~Uák¬Ëü^XÉÐ4sÚ^ià£Ä+.¨ÓP0½êQx½Ù“ƒâô´, ‰^lÊ þX3«ØèhkaÓL“€"ÉïJ²ÓÒƒ²“D%^JeÊ”üµÂÚèhâãR †è£©ˆ‹]´ÔKb¤)ôݱ‘ñ Roì#É*ZBóé"jˆ²šL'Š<ÂT@=™©G”£,å|"”JUj É”]<‰„ÕýPŠŸdéH™JLn5—’‰032…qùΑ,‹o´ÃÍnRÊ4¿”I5ª2481 dÄ£#E´£ký&-NÁÔ˜.2´}•Á_ì#@:úÒÂèHÇmñ“Sê1Ïþ0ÃŽf€Áú@›ÈÃ!ì1J@KµK5e“Õ…'ô…Ð<(TÌ‘ÆCÙÉ”±”t)M‰I0=» ‹_T†˜]_A6#”ÄD,8}‰Jï¡ÑM¦z˜å+$Àv¤$(±©DdÌ1]C ÐÁ€ ‰¨ $Q‡ûÆd{ÔÖȆK 0pÁ#10TØž¡ k¸5¬õ0ÈjV$ €£ÞZAÀ×Pa#T}Å!¤ÚXÖõø@¡×O8V°‰ «a «ªà Œ¥žf+8L@)¤ì=a°†6`Ö³S-ìdE« lᵬ@;ifmail-2.14tx8.10.orig/Changelog.TX100644 0 0 125156 6701151722 15021 0ustar rootrootThis file describes the changes in "TX" versions, that is versions modified by me (Pablo Saratxaga ). I began working with sources to solucionate some minor problems about MSGID, then I liked it and added some features, from me and Tanaka-san (Tsuneo Tanaka ). !!! Note that bugs, if any, are from me. The original 2.10 version worked !!! !!! very well. Note also that I've little credit to the ifmail package; it !!! !!! exists thanks to its author, E. Crosser. !!! I hope that you will find the changes and the new features usefull. I also will appreciate any feedback from you. Liège, 3 May 1997 Pablo Saratxaga Features in the current TX version ================================== (that is new features not found in v2.10) * When gating from FTN to rfc, support has been added for messages previously gated by some other gateway, to try to retrieve the most of the original informations. Some special ones are compile time configurable. 0) v2.10 already recognizes its own gated messages, with ^aRFC- kludges. 1) @FROM :, and @SUBJECT: lines generated by a rfc->PcBoard->FTN gate (used in France, I don't know if elsewhere) are recognized, and the original From: and Subject: lines written in gated article. It needs -DPCBOARD_GATE at compilation. 2) Support for messages gated from rfc to FTN by FidoGate. 3) There is a gate program that writes rfc headers in the text body of FTN messages. It is parseable, but, Newsgroups: is written erroneously, with ", " instead of "," for separating them. It arrived with FTN K12* echoes gated from usenet at puddle.fidonet.org. compiling with -DPUDDLE_GATE corriges that. 4) Support for headers "Golded-style" (^aHeader: .... instead of ^aRFC-Header...) 5) Support for retrieving original Message-ID's from gigo * changes to Makefiles, now "make man" will install the man pages. * A new manpage for ifcico * MIME quoted-printable messages will be dequoted when geting from rfc -> FTN * FidoGate generates, when it gates from FTN -> rfc, Message-ID's from MSGID in quoted printable form. The original MSGID is written when gating to FTN again. * "Supersedes: " and "Control: cancel " are gated to their FTN counterparts (^ACUPDATE: MODIFY and ^aACUPDATE: DELETE) used by Squish it needs -DALLOW_CONTROL for cancel messages. * When gating to FTN, if there is more than one group in Newsgroups: line, the line is conserved. * Charset support. I'm trying to done it as complete as possible. Until now it can deal with Cyrillic, Hebrew, Japanese, Chinese, Polish, Czech, Slovak and West-European languages. unicode partially supported (utf-7 and utf-8 decoding, but only if it was iso-8859-1, cyrillic or hebrew) Greek, Arabic and other latin languages are not complete (I lack info). See the file README.charset for more info on this. The idea is to do, if necessary, transcodage when gating, according to the real charset used in the messages. For this a lot of changes have been done. When gating from FTN to rfc, it looks, in that order, for a CHARSET FTN kludge line, or a CHRS kludge line or a Content-Type: line (if it is a gated article). If none, it will look in Areas file (if compiled with -DJE) if that fails, then charset is assumed to be CHRS_DEFAULT_FTN (you should configure it according to the one used in your country). Then, with this value, the getincode() function gives the charset value that will be used for writting the rfc article (taylor getincode in iflib/charset.c for your needs). Or it will look in Areas file (if you compiled with -DJE) When gating from rfc to FTN, it looks for Content-Type: line, or a X-FTN-CHARSET, or a X-FTN-CHRS line. if none, then the default charset is searched in Areas file (if compiled with -DJE) if there isn't a charset yet and if the message isn't from FTN networks, charset is assumed to be CHRS_DEFAULT_RFC (you should configure it according to the one used in your country). Then, with this value, the getoutcode() function gives the charset value that will be used for writting the FTN article (taylor getoutcode in iflib/charset.c for your needs). If you compile with -DJE and a charset is set in Areas file, it is taken from there instead of getoutcode() If Content-Transfert-Encoding, gives "quoted-printable" or "base64", the text body is dequoted to 8bit before transcodage is done. All header lines are passed trough hdrconv() which looks if it is mime encoded (=?charset?codage?coded-string?=), dequoded, then translated. In this case the charset read from the mime encoded header (=?charset?... you remember ?) has priority from the one read at the beginning (From Content-Type, or X-FTN-CHARSET, or X-FTN-CHRS, you remember ?), then it is translated to the charset whe want for the FTN message. * 8bit and "strange" names in to/from fields of FTN messages are quoted in a quoted-printable like way, allowing full recovery when gating back to FTN. * References database; Message-ID <--> MSGID equivalences are stored and when a reply arrives from FTN the ^aREPLY kludge is matched against the database and eventually the right ID is recupered. * If -DFORCE_REPLYTO_LOCAL is used, the value in the ^aREPLYTO: kludge is forced to be your FTN adress, even if a previous one exists. (I created this possibility because the news<->echo gate didn't accept netmail). This compile option creates ^aREPLYTO and ^aREPLYADDR even if a database is used. So people which uses smart FTN programs can profit of ^aREPLYADDR kludge, others can still reply to my FTN adress and the database retrieves the email adress (but it is _far_ from fiable, it can be more than one "John Smith"... However, without that is even worst, people in ftn networks aren't used to reply otherwise than pressing th "R" key) * a "secure mode", when email is gated only if the FTN adresse's node is listed on the nodelists. * Telnet-Vmodem in and out connections. * Read-only FTN areas can be defined as Moderated in rfc side; which is their equivalent. "TX" versions allow putting a correct "Approved:" line when gating, so the the moderatod in the FTN side doesn't have to worry with that. Just add the correct email address for the Approved line as 6th field (or 4th field if compiled without -DJE) prefixing it whith "fro:". See top of misc/Areas for an exemple. * When a message arrives from FTN to a Usenet (Moderated) group it can be converted to email to the moderator, by putting its adress as 6th (4th if not -DJE) field of Areas file; prefixing it whith "umod:". For exemple "umod:comp-os-linux-announces@uunet.uu.net" * Possibility to specify several Areas file, in the form of Areas.site (eg: Areas.f2219, Areas.p5.f23.n15.z45.somenet.ftn). The first match will be used, it searchs from more specific (5D address) to less specific (only node or point) defaults to Areas whith no extension. The Areas whith no extension is allways used for _incoming_ netmail. Changelog ========= Changes in 2.14-tx8.10 ---------------------- - Changes whith tearlines - corrected a little problem whith Reply-To: header - switched ifcico code to ifcico-3.0.cm.alpha-4.0 entirely. Changes in 2.14-tx8.9 --------------------- - corrected logfacility macro in ifcico/nlpatch.c (it should use CICOLOG not MAILLOG), thanks to Marco d'Itri. - made some more headers "kludgerisable" depending on level value - corrected a bug in 2.14-tx8.8 when more than one % was present in the Message-ID - some FTN readers put Cc: lines in the body of FTN messages whith only names or addresses whithout any "@"; sendmail then added localhost at each time... now when an FTN messages has such a line it isn't considered as rfc header anymore. - corrected a bug in yoohoo.c that caused a sigsev when domains weren't used. - changed hydra code to the one from ifcico-3.0.cm.alpha-4.0 of Christof Meerwald <2:315/3.13@FidoNet> - added several man pages from ifcico-3.0.cm.alpha-4.0 - in iflib/trap.c iBCS2 should be defined for intel compatible architectures only; added the proper #ifdef __i386__ - recognizes new iso-8859-15 charset Changes in 2.14-tx8.8 --------------------- - added support for empty passwords (use "" (two double-quoutes) as password) - added handling of utf-8 encoding of unicode. Same restrictions as for utf-7 apply; that is only works well if the encoded char is of iso-8859-{1,5,6,7,8} - Merged whith 2.14 code - Messages in unicode (utf-7 encoding) are appearing in usenet due to the bogus Microsoft Outlook program, so I've added a basic utf-7 decoding support (it only converts to 8 bit, only works well for iso-8859-{1,5,6,7,8}). utf-7 decoding figured out thanks to the utf7.tar.gz package (it is a set of little programs to convert chinese between GB and unicode) from Ross Paterson and Guo Jin (guojin@iss.nus.sg) - make a little test to avoid segfaults whith MSGID like "MSGID: 12345ab" (that is, the char string field is missing !). - added support for usenet headers like ".MSGID: ...", ".PID: ..." etc (yes, *another* one gateway program that reinvents the weel, still fidonet people don't realize that standardizing can be a good thingh, and people continue to create completly incompatible programs that will generate loops, dupes, *sigh*. If even this one was good enough, but no, it is not possible to easily retrieve all the info (PATH, SEEN-BY, Origin, Tearline are in the case), *re-sigh* - added -DHAS_SIGNUM_H to OPTS = list. That allows compiling whith glibc on a Linux and still use -DNEED_TRAP - Corrected a typo in message.c, thanks to Urko Lusa. - Ooops ! -lintl is not needed anymore whith glibc, if it is included the locale stuff don't work as it conflicts whith internal glibc one - corrected a bug that makes SIGSEV when an Approved: header was present on a netmail - the "," char is now encoded in email addresses; avoiding that an address like be parsed as two addresses "" by sendmail. Now it becomes Changes in 2.13-tx8.7 --------------------- - merged whith ifmail 2.13 - added support for ^aCODEPAGE: kludge recognition - HYDRA support (added from ifmail-so, code from Vladimir Zarozhevsky) - support for nodelist U,Txy flags (from ifmail-so, code of Boris Tobotras) the meaning of the flags is : ;S System open hours: ;S ;S Txx Availability flag for non-CM nodes indicating the ;S hours during which the node is available in addition ;S to ZMH. This must be in accordance with the recommen- ;S dations in FSC-0062 and the reference table reproduced ;S below. ;S ;S ATTENTION : All times must be UTC! ;S ;S +------+----+ +------+----+ +------+----+ +------+----+ +------+----+ ;S |Letter|Time| |Letter|Time| |Letter|Time| |Letter|Time| |Letter|Time| ;S +------+----+ +------+----+ +------+----+ +------+----+ +------+----+ ;S | A |0000| | F |0500| | K |1000| | P |1500| | U |2000| ;S | a |0030| | f |0530| | k |1030| | p |1530| | u |2030| ;S | B |0100| | G |0600| | L |1100| | Q |1600| | V |2100| ;S | b |0130| | g |0630| | l |1130| | q |1630| | v |2130| ;S | C |0200| | H |0700| | M |1200| | R |1700| | W |2200| ;S | c |0230| | h |0730| | m |1230| | r |1730| | w |2230| ;S | D |0300| | I |0800| | N |1300| | S |1800| | X |2300| ;S | d |0330| | i |0830| | n |1330| | s |1830| | x |2330| ;S | E |0400| | J |0900| | O |1400| | T |1900| | | | ;S | e |0430| | j |0930| | o |1430| | t |1930| | | | ;S +------+----+ +------+----+ +------+----+ +------+----+ +------+----+ - added support of ZMH (it is just a matter of translating it to a Txy flag and call the IsNodeCallable() function. I choose the Z[1-6]MH according to the following table in the Z2 nodelist : ;S #01 Zone 5 mail hour (01:00 - 02:00 UTC) ;S #02 Zone 2 mail hour (02:30 - 03:30 UTC) ;S #08 Zone 4 mail hour (08:00 - 09:00 UTC) ;S #09 Zone 1 mail hour (09:00 - 10:00 UTC) ;S #18 Zone 3 mail hour (18:00 - 19:00 UTC) ;S #20 Zone 6 mail hour (20:00 - 21:00 UTC) - added a german language file (by Michael Holzt ) - added conversion of User-Agent: to ^aPID: - Corrected a bug whith missing From:, I'm ashamed I introduced a so stupid bug; Thanks to Marco d'Itri for pointing me the problem. - Corrected a bug whith generation of Notice-Requested-Upon-Delivery-To: header; the content must be the internet address of the recipient of the message, not the sender address. Thanks to Marco d'Itri. - Glibc patch from Yuri Kuzmenko (yuri@cracksoft.kiev.ua) - changed MAX to NL_MAX in nodelist.h as MAX conflicts whith a macro definition in glibc - added #define _REGEX_RE_COMP in respfreq.c otherwise the definitions of re_comp of aren't read when using glibc - changed nlookup.c so it uses correctly the domtrans directives Changes in 2.12-tx8.6 --------------------- - added function ref_store_msgid(), an easier to use interface to ref_store(), as the arguments don't need to be formatted. As the way Message-ID --> MSGID work has changed the refdb was broken, this fixes the problem. - changed ref.c and ref_interface.h for ref_store_msgid() function. - changed ifmail.c and mkftnhdr.c to use ref_store_msgid() - corrected an old bug where keyword "defaultrfcchar" wrongly returned iso-8859-1 for any iso-8859-* charset (reported by Andrzej Jordanow) - changed macro DBM_SUFFIX to IF_DBM_SUFFIX as DBM_SUFFIX is used in ndbm.h and caused some bugs as the macro could have different values... - corrected a bug in falists.c that made Host adresses (eg 320/0) to be wrongly handled on SEEN-BY lines (this bug doesn't exist on plain ifmail, it has been introduced in tx - merging whith 2.12, the format of Areas changed, now comments are lines beginning whith a blank. I made two conditional defines, -DAREAS_NUMERAL_COMMENTS which allows to keep also the old behaviour, and -DAREAS_NUMERAL_COMPATIBILITY which is the same as -DAREAS_NUMERAL_COMMENTS but prints a warning. - added -DFSC_0048 for strict fsc-0048 behaviour when writting packets. - Corrected a bug related to REPLY kludge Changes in 2.11-tx8.5 --------------------- - Merged whith 2.11 - Added the ability to support echoarea names whith '#' on them, just put a '\' before it on the Area file, eg: TEST.\#2 test.n2 idea from Erik Warmelink. - improved rfcmsgid, now it will correctly handle some gigo MSGID and REPLY like "msgid__" and "msgid___" - while the maptabs for CZ and SK where there in tx8.4 I forgot to add the proper code to charconv.c and charconv.h, sorry :-( this is corrected, thanks to Stanislav Meduna. - a better way to handle support, now you have just to comment or uncomment a line in CONFIG file, no more manual Makefile editing. - the NLS support now looks for LC_MESSAGE variable rather than LC_ALL, in case the user wants a different locale for the messages than the general locale. - added Thai charset recognition (iso-8859-11) - added chinese charsets (CN-GB, CN-Big5, zW, HZ, iso-2022-cn) recognition. and zW --> GB, HZ --> GB, GB --> HZ, zW --> HZ conversion functions. - added toftnchar to force charset translation of outgoing pkt to a given charset. see misc/config. - added ftnmsgidstyle keyword from an idea of Andrzej Jordanow, it is of the form "ftnmsgidstyle news.chanae.stben.be", then if the level (-l switch) is less than 1, and the Message-ID is of the form <*@news.chanae.stben.be> it wont be kept, but the FTN MSGID will be built from the best aka (eg "MSGID: 2:293/2219@fidonet 123456ab" instead of "MSGID: news.chanae.stben.be cdef0123") note also that it won't do anything special for Message-IDs where the string after the "@" doesn't match exactly (case insensitive however). In other words you can make vanish your Message-ID while still not touching those of other people. WARNING: Use this whith care !!! Only for your messages and if you are absolutely sure that they aren't exported of your machine by other channels (eg uucp, nntp,...) which conserve the message-id. This feature is intended for convenience of end-leaf nodes, not to defeat the purpose of dupe checking. Changes in 2.10-tx8.4 --------------------- - Changed again the MACHIGAI code, now it is a single supplementary condition on an if. Idea from Erik Warmelink - Added support for cp895 used in fidonet in Czechia and Slovakia, map tables from Stanislav Meduna - corriged an array overflow problem whith REPLYs (it seems gigo puts there the whole References: line, in some cases that overflow 128 bytes used. now it mallocs some space. - Changed the charset conversion code so it uses *char instead of *FILE (as disc access is sloooooow); iftoss is 8 times faster than in previous "tx" versions, it is now only twice as slower as plain ifmail. For 8bit charsets only, japanese still uses temporary files. - provided fnet.m4 and ifmail.mc for configuring sendmail. read misc/sendmail/ifmail.mc.README, it's very easy. ** includes anti-spam rules ** - NLS support for help mesages (eg: ifmail -h). for that in CONFIG file add -DHAVE_LOCALE_H define to GEN_OPTS= and add -intl in the LIB= entry for your OS. To install the nls files go to po/ subdirectory and type make then make install (will install in /usr/share/locale//LC_MESSAGES/ ) - added support for Notice-Requested-Upon-Delivery-To: header for RRQ flag (sendmail doesn't use Return-Receipt-To: any more...) - removed SWITCH_DATE code Changes in 2.10-tx8.3 --------------------- - Corrected a bug when modtype=1 - imporved creation of X-FTN-Tearline: to avoid "X-FTN-Tearline: \n" - changed message.c so a line ^aRFC-Approved is only created for modtype==1 - added -DALLOW_RETURNPATH define to allow the use of a given Return-Path address, so we can force it to be the real return address instead of the one of the last FTN node. - added support of type 2.2 packets - corrected a bug in rfcmsgid() - added recognition of Gatebau Message-ID when gating rfc -> FTN - added generation of Gatebau Message-ID when gating FTN -> rfc note that this will break the References: database, but anyway that database isn't needed anymore whith Gatebau style MSGID). You can select this whith -DGATEBAU_MSGID - added generation of Gatebau MSGID when gating rfc -> FTN. You can select this whith -DGATEBAU_MSGID - corrected problems whith the non conform ^aDOMAIN kludge generated by fidogate - improved References: code. - added -DXGATEWAY_STRICT for strict compliance to X-Gateway header/kludge in case you need it. - added -b option to ifmail/ifnews. It allows non-splitting of messages when writting to pkt. - made a little change to the skconv() code that speed ups the ifmail/iftoss when both incode and outcode are known and are the same, a little more speedy too when default language is 8bit instead of 16bit for unknown charsets (autodetect). - added MIK-CYR charset support (Pavel Pavlov) - corrected bugs in base64 and MACHIGAI code (Pavel Pavlov) - added config file keywords for default rfc and FTN charsets Changes in 2.10-tx8.2 --------------------- - added TZUTC handling recognition and generation in EMSI (emsidat.c) - made a function char *gmtoffset(time_t) that tells the difference whith GMT in the pattern ("%c%02d%02d",sign,hours,mins) - merge whith 2.10 version - -DNEW_MSGID has been dropped as the solution in 2.10 is far superior. Changes in 2.9-tx8.1 -------------------- - Corrected ifgate/mkftnhdr.c so if the X-Comment-To: line has an address like "A.Ismael Olea Gonzalez" <"A.Ismael=20Olea=20Gonzalez"@p9.f108.n345.z2.fidonet.org> the quotes are stripped on the FTN echomail message header. (U.Lusa) - Changes in ifcico/zmmisc.c to solve problems whith TBBS systems (T.Tanaka) - Changes in iflib/cleanup_ref.c (M.Schaeffer) - added Base64 decode support (in both headers and body) - added escaping of chars [\]{} in outgoing EMSI packets. - corrected a bug in de-escaping of incoming EMSI packets. - added code to autodetect the linux kernel used (no more need to define -DPRE_21_LINUX) - corrected bugs in zmmisc.c mkrfcmsg.c and unpacker.c, M.Schaeffer. Changes in 2.9-tx8.0 --------------------- - argh ! I forgot to include clean_ref.c on previous release ! - merging whith version 2.9 - added macintosh charset support Changes in 2.8g-tx7.9 --------------------- - added chkftnmsgid() to iflib/ftn.c - corrected ifgate/mkftnhdr.c so it doesn't keep FTN messag-id's in the ref_db - corrected ifgate/ifdbm.c so long freename are registred only up to MAXNAME characters long - cleanup_ref utility that cleans-up the reference database (by M.Schaeffer) - iftoss now looks at ^aSPTH when writting the rfc-1036 Path: line - new strcasestr.c (by M.Schaeffer) - changed the moderator field in Areas file Changes in 2.8g-tx7.8 --------------------- - included the several changes from 2.8f --> 2.8g - corrected -DTERMAIL_HACK behaviour. - (BTW, -DTERMINATE_HACK is done by -DBELEIVE_ZFIN=1 since 2.8f/2.8f-tx7.7) - added patch from Yar Tikhiy that makes ifpack handle lines beginning by "~" in *.?lo as already sent, when ifpack decides how to name new archives. - added recognition of JAR archiver format (I'm not aware of any unjar for unix; however the code is there just in case...) - added removereturnto to message.c, so Return-Receipt-To isn't rewrite when gating when not needed. - rewrite the way ref database is used, now it is looked on in rfcmsgid() function when gating to RFC format. The code looks better and it can also be used on all MSGID-> lines (MSGID,REPLY,ACUPDATE,...) - added several PGP recognition support when gating from rfc-->FTN. Changes in 2.8f-tx7.7 --------------------- - The base against patches are done is now v 2.8f - Changed FIDOMAZOVIA charset recognition to also understand "FIDOMAZ 2". - added DEFAULT_ORIGIN from an idea of "Marco d'Itri" - added recognition for Content-Type: multipart/signed messages and application/pgp as PGP signed messages (= no charset conversion). - corrected a little security hole when requesting "../filename" (if you haven't files in the parent directory of the public one, then there wasn't any problem, but is better to solve it). Problem pointed out by Andrew Romanenko - in ifgate/getmessage.c, if a kludge line begins whith RFC- then it can have \n and \t on it. (no badkludge defined). This is good for ^aRFC-Received lines which often are broken on several lines. - added TEL6.1 patches of T.Tanaka (add telnet-Vmodem mode) - FreeBSD specific hack by Igor Vinokurov in clibrary.h - added -DTERMAIL_HACK which tries to correct a bug in TerMail 4 which sometimes reports incorrect charsets (ie: puts "LATIN-1 2" while it is in fact "IBMPC 2". iftoss will recognise "^aPID: TerMail 4", hoping that version 5 will repair it. - Improved charset determination. Now ^aCHRS has priority on Content-Type: when gating from FTN --> usenet. - made the LEVEL stuff a command line option. the -DLEVEL compile time option is still there to determine the default (1) - corrected the behaviour when "dosoutbound" is used; now ifcico correctly convert the pathnames in the fly, see the files and send them. Changes in 2.8e-tx7.6 --------------------- - I forgot hydra.h GRRRR !! (anyway hydra doesn't work, it is only the *.h) Changes in 2.8e-tx7.5 --------------------- - replaced the "-p port" option by the "-a adress:port" of Eugene Crosser. changed the ifcico/openport.c with author's code. - applyed the Eugene's patch for nodelist.c (that is replaced my bugfix in tx7.4 by the Eugene's one) - added some CHRS_* macros (traditional and mainland iso-2022 chinese) - I splitted iflib/kconv.c in two files: charconv.c (general stuff and eight bit charsets conversions) and charconv_jp.c (japanese conversions). charconv_cn.c (chinese) and charconv_kr.c (korean) will be added in the future. - added the macro LANG_DEFAULT, used for autodetecting charsets (as now only LANG_JAPAN does something). Read README.charsets for more info. - corrected the removereplyto code in ifgate/message.c. - corrected MSGID retrieval in mkftnhdr.c for and Message-IDs. - Changed the way ifmail/ifnews get the local hostname (gethostname() instead of $HOSTNAME) and corrected a bug about that. It also checks Reply-To: line for localness (LEVEL < 1) - Added a -DDIRTY_CHRS option; it is really dirty, but sometimes necessary. When compiled like that a "dirtychrs" keyword is recognized in config files, it tells the charset to assume for packets from a given address. This is to by-pass the problems of nodes doing savage charset translation, whitout knowing the original charset, and worst, not changing the ^aCHRS kludges :-( a "-c charset" command line option is added to ifmail/ifnews, so you can force a given charset for a given adress you route through if you know that it does savage translations. - Added some #ifdef MIPS_* compile options for RISCos SVR4 (seems very bad to handle comms :) ). Contributed by Marc Schaeffer Changes in 2.8e-tx7.4 --------------------- - improved support for PGP-signed messages (don't change "soft CR" to space nor break lines, if the message is PGP-signed). It still lacks the same functionality when gating from usenet to FTN... - corrected a bug when Organization: has only blanks, it caused a seg fault because after getting out all the leading blanks we finished with a null string, and strlen() on it is bad :) problem pointed by Evaldas Auryla - added mxlookup.c from Ruslan Belkin - applied SEEN-BY database building patch of Yar Tikhiy - added support for Message-IDs of the pattern: to be gated back to "MSGID: 2:204/226@fidonet 1d17b3b3". - added references support from Marc SCHAEFER it stores in a database ftn Message-IDs (eg: 125876@some.where) and RFC ones (eg: aze$12.az@some.where) So when an FTN reply comes back the right original id can be restored in the References: line. - -DMIPS_AREAS_HACKING allows you to define "Areas.fidosite" files which are scanned for a given fidosite. If the file doesn't exist, then it defaults to "Areas". code from Marc SCHAEFER - -DFIDOIZE and -DMOREFIDOIZE are replaced by -DLEVEL=X option. - done a timid incursion in implementing fsc-0047 ^aSPLIT kludges. Somebody can take a look and help me ? - corrected a bug in ifcico/nodelist.c that caused sigsevs when no domain was specified in "address" lines of the config file. Thanks to Jerko Golubovic for pointing me this out. - "magicname" (UUCP) is used in a different way. Now even if it is defined the messages are scanned for RFC lines, but if the FTN to header is different of magicname then the rfc "To: " line isn't used. This is useful for mailing lists for exemple, and all kind of messages where the address in To: line is different of the address of the addressee (the "enveloppe adress") Changes in 2.8e-tx7.3 --------------------- - fixed some bugs in mkftnhdr()/DONT_REGATE code. Addresses like: X-FTN-Sender: . <.@domain> gave serious errors. (changes made by Wim Van Sebroeck (vsebro@medelec.uia.ac.be)). - corrected a bug with "ACUPDATE: DELETE" - added removesupersedes and function chkftnmsgid that checks if a rfc msgid can be entirely translated to an FTN MSGID. - minor fixes to charset retrieval in ifmail.c - added yet another field to Areas file so we can define an address for Approved lines. So read-only FTN areas can be defined as Moderated in rfc side; which is their equivalent. - added removesupersedes and removereplyto to ifgate/message.c so we don't Write Reply-To: when it is the same as From, and ^aRFC-Supersedes: when the message-id can be losselessly converted to a FTN MSGID. - Rewrite the code that converts FTN 'to' fields. Now an FTN header which have '.' or '_' in it will generate an address whith "quoted" local part (ex: John A. Smith 1:2/3 --> "John A. Smith"@f3.n2.z1.fidonet.org) So the '.' and '_' chars can be retrieved when converting back to FTN. 8bit chars, if outside a "local quoted part" are "backslashed" (ex: Jorge Peña 2:3/4 --> Jorge.Pe\ña@f4.n3.z2.fidonet.org but Jorge P. Pérez 3:4/5 --> "Jorge P. Pérez"@f5.n4.z3.fidonet.org) '\' becomes \\ outside quotes but not changes inside of them. '"' allways become \" in any case. So complicated names like This is.a \complicated "name" 1:2/3 can be handled, the exemple becomes "This is.a \complicated \"name\""@f3.n2.z1.fidonet.org This _absolutely_ needs that sendmail doesn't strip off the ' " ' char (the double quote). So check in sendmail.cf that there is NOT an "s" flag for the ifmail definition (flags are those letters after F=....). The range 0x80 - 0xBF produces problems with sendmail, so they should be quoted, like in quoted-printable form. - added domain support and 16 bit product code support in yoohoo code. - FTN \001REPLYTO can be used same way as an rfc Reply-To, so I modified mkrfcmsg.c so it creates a correct Reply-To line if itsn't one, nor a \001REPLYADDR, but there is \001REPLYTO. (it isn't just the same text, it has to be parsed and converted to rfc822 address) - -DTERMINATE_HACK allows incomin calls from Terminate to pick their waiting mail, receive files, etc. (otherwise the connection hangs after we finish receiving, and nothing is sent). I don't know if my hack broke something other, so I made it available as -D Changes in 2.8e-tx7.2 --------------------- - Secure mode option added for ifmail. (code written by Wim Van Sebroeck (vsebro@medelec.uia.ac.be)). This options checks wether or not a node is in the nodelist before gating a message from rfc to FTN. - fixed some bugs in mkftnhdr() code. Addresses like: From: gave errors. - Changed -DDONT_REGATE code so that it works with parserfcaddr(). - corrected restamp date code. Now it does only if newsmode is set. Changes in 2.8e-tx7.1 --------------------- - I upgraded my kernel from an a.out linux kernel to an ELF format one, with this new format bugs that have no effect on my machine before became visible I think they are corrected now, sorry for the trouble m(__)m Changes in 2.8e-tx7.0 --------------------- - Merged with 2.8e source tree Changes in 2.8d-tx6 --------------------- - Modified respfreq.c for correctly handling file requests with paths, when the file is also a magic one. - Corrected a little bug about charsets and JE-style Areas file and netmail. - Now -DRESTAMP_OLD_POSTINGS tells the maximum number of days that can be tolerated for old messages (ex: -DRESTAMP_OLD_POSTINGS=25) - Added support for LATIN1QP CHRS kludge (latin-1 quoted printable) - Added -DHAS_PGP. When a message is PGP signed iftoss doesn't attempt any charset conversion, so signature isn't invalidated. - Updated e-mail address of Tsuneo Tanaka. - Corrected a problem about buffers too small Changes in 2.8d-tx5 ------------------- - Corrected a bug with hdrconv(), sometimes in MIME headers are truncated, and there isn't a "?=" at the end (this specially arrives with gated inet messages received trough FTN, as 'to' and 'from' FTN headers are only 35 char long). It now handles such cases without crashing. - Corrected a bug that I introduced in ftn.c. Thanks to Thomas Quinot for correcting it. - The lib (utlib.a in ifmail/iflib) uses some functions defined in rfcmsg.c, so I moved that file to iflib/ directory to let the lib be independent, I move too the file batchrd.c, used by rfcmsg.c; and done the changes to reflect that in the Makefiles. - added an improvement to tcpproto.c by Jean-Louis Noel - added -DDONT_REGATE code; that keep first FTN gateway address. By Wim Van Sebroeck . - corrected a problem with akas in emsidat.c - added koi8-u (Ukranian) - added support for domain#zone:net/node[.point] format of addresses - added an option (-DRESTAMP_OLD_POSTINGS) to change the Date of old FTN messages. FTN networks are sometimes very slow in routing, when messages arrive, they are deleted by the news agent as they have more than 15 days. This one rewrites their date, and puts the old date in X-Origin-Date: - When gating from inet --> FTN, if X-Origin-Date: exists, date is taken from there. - Modified -DRESTAMP_FUTURE_POSTINGS so it uses X-Origin-Date to store the original date. - Corrected a bug in X-PcBoard-From: handling - Applied a bugfix from ifmail mailing list to emsidat.c Changes in 2.8c-tx4 / 2.8d-tx4 ------------------------------ - the base against which diffs are done is now v 2.8d - added cp852 (MS-DOS codage used in Poland). - corrected support for Polish thanks to fidomazovia<-->iso-8859-2 tables given by Krzysztof Halasa - changed the way incode is found when gating from rfc to FTN. Now if there is a Content-Type line but the charset can't be retrieved (not text/plain or unknown charset) ifmail will look if there is any X-FTN-CHRS: line - added MAZOVIA/FIDOMAZOVIA charset code. - added -DRNEWSB; when compiled with it, the result of ifnews -N is an rnews readable file. - I've had to change Makefile so ifunpack and ifpack are not linked with areas.o (that caused problems when compiling with -DJE). I don't understand why areas.o was linked, there is no use of the functions of areas.c in if(un)pack For the reason why it caused problems at compilation, I know. iflib/utlib.a uses a function ( hdr() ) defined in ifgate/rfcmsg.c, it will be cleaner to move this to iflib directory, but I don't know yet all the consequencies of doing that, so I'll wait. - corrected a little bug in dequote() - added recognition of X-Apparently-To: generated by the french ftn->usenet gate (it contains th FTN "to" in echomails) - keyword "maptabdir" now is used. - modified iflib/kconv.c (after my alphabetical sorting of codes, errors were introduced, I repair that) - CHRS_NEW replaced by CHRS_ISO_2202_JP - readareas modified so it uses getcode() and readchrs() to get incode and outcode from Areas (#ifdef JE) - if there isn't a "paketpassword" for an adress, the "password" is used. - added other functions of JE version. Some of them have their own compile-time configurable parameter. See CONFIG file for -DIGNORE_SOFTCR, -DNEWDB, -DKEEP_TEARLINES_CLEAN, -DREPLACE_TEARLINES_WITH=, -DRESTAMP_FUTURE_POSTINGS - Added support for JE version Areas file, and the ability of retrieving a default charset/CHRS for there (needs -DJE when compiling) - added paketpassword keyword. - Rewritten iflib/charset.c - Added -DFIDOIZE option. If used gated messages to FTN are more "fido-like" X-Newsreader or X-Mailer are written to: ^aPID: kludges, Path: line is skipped. - added removemsgid and removeinreply to check if Message-ID or In-Reply-To: should or not be written as ^aRFC-... - rewritten the code writting ^aREPLY: from References: , now it works also ok when the last isn't separated from the previuos by an espace (ex: it is at a new line, so separated by "\n\t") Changes in 2.8c-tx3 ------------------- - changed charset translation code. Now the ftncode is conserved in a X-FTN-ORIGCHRS: line, and when it is gated back to ftn, this codage is used in preference. - corrected a bug with the code that puts "UUCP" in the ftn header when the adress is too long. - Corrected problem with MSGID's, it should now be ok with even the strangiest MSGID's. If you still encounter problems let me know. Not only "^aMSGID: 1:23/45@domain 152ad589", but also "^aMSGID: 1:23/45@@domain 152ad589", "^aMSGID: domain#1:23/45 152ad589" and even "^aMSGID: 1:23/45@ 152ad589" - added support to dequote MIME quoted printable messages. Code by T.Tanaka - modified parsefnode to parse '"1:215/33@FIDO NET" 125ab158' found in some MSGID. It has yet to be improved, so parsefnode can recognize as well "username ftnadress" and "ftnadress username" - added generation of correct MIME headers containing the charset value. - support to decode MSGID from fidogate "Message-ID: " (the same for REPLY too). - little change to removemime() to work when there isn't a Content-Transfer-Encoding: header - added default values for CHRS_... (customize them according to the charset used in your country/region). - added hdrconv() which decodes mime encoded headers and then calls the charset translation routine. - Changed the charset retrieval from message.c to ifmail.c, now putmessage() and mkftnhdr() have incode and outcode as parameters, so all headers can be translated too. These changes are activated, according to the presence or not of -DFORCE_CHRS. Now all headers are charset-translation-able. NOTE: base64 doesn't work yet, I've commented it out. Changes in 2.8c-tx2 ------------------- - I add a lot of compile time configurable -D.... for the changes in tx1 - Added an option -DFORCE_CHRS for charset support - The gateway puddle.fidonet.org (1:102/45 I think), put the Usenet header lines in the text body when gating; but Newsgroups: line have ", " (comma, space) instead of "," (only comma) to separate different newsgroups. If you receive groups from there, -DPUDDLE_GATE will repair that. - Note that all -D*_GATE are for people receiving newsgroups in FTN format, if you have a direct usenet feed, you probably don't nedd all that. I have defined it for me ( I haven't yet a direct link ), so the messages passing trough my system are all standardized in the output. - Added -DFORCE_REPLYTO_LOCAL, to force the creation of ^aREPLYTO: and ^aREPLYADDR:, even if we use the database. And use the local address, even if there is already a ^aREPLYTO: (it is rewritten) - There was too much comment lines, so I leave explicit /* ### Modified by .... */ .... code .... /* ### */ only for code that is not clean/beatiful/pretty/..., things that are ok (or I think that are ;-), I only told briefly at the beginning of the .c file and here. - Added support for unrar (and there is a new keyword in config file: unrar). There is an improved algorithm to determine the compressing format, and a some others formats can be defined by just uncommenting the related lines in the source (in ifgate/unpacker.c, iflib/config.h and iflib/rdconfig.c) - Modified ifmail so if we send an email message to a FTN->e-mail gateway, and the email adress is greater than 30 chars, "UUCP" is used instead in the FTN header. (And a "To: address@domain" is put in the body, but that was already done before). So people who, like me, hasn't yet an email connectivity other than by FTN<->email gateways can send mails whitout worrying - Added charset conversion functions from JE version. (kconv.c) - added some improvements to ifcico by TCP (code from Tsuneo Tanaka), particularly the ability to tell a port number in the command line. - added ISO_8859_* and CP437 as codage identifiers. - All write functions that handle text (body+subject+Originline) use strkconv function. It receive as parameters the string to convert, incode, outcode and "tofullsize" (some codage add some special caracters). - Write a manpage for ifcico(8) - cleaned bwrite.c and bread.c of old transcodage code (now it's done by kconv.c) - modified kconv.c; if (rfccode == ftncode) noconv() is called - Written all the stuff needed for charset recognition (in iflib/charset.c). - Changed iflib/Makefile to create needed.h according to the value of ${NEEDED} - Corrected ACUPDATE code in message.c, now an rfc message containing a header of "Supersedes: " or "Control: cancel " will generate a ^aACUPDATE: kludge (which is the FTN equivalent). That doesn't work very well if the original message has been splitted and/or copied to more than one FTN echoarea; as the FTN messages will have different MSGID than the one generated this way. But it will hopefully work for not splitted messages. You have to use -DALLOW_CONTROL for this to work. - added "man" and "man.gz" (for storing man pages in gzipped form) to Makefiles. You can now install man pages by typing "make man" (or "make man.gz" if you want to save disk space). Chek if the user "man" and group "man" exists; if not, change them in CONFIG. - modified the way ^aREPLYADDR and ftn 'to:' are created (I use the function parserfcaddr() ), so the address of the "Reply-To: " line (if exists) is used for ^aREPLYADDR and registration database. - Added support for Hebrew (cp862 (PC), cp424 (EBCDIC), iso-8859-8) - added recognition of X-Fsc- (generated by the gateway gnfido.fidonet.org) - added recognition for "^aMSGID 0124587" created by fidogate. - Added code to write CHRS: from identifiers (ftncode, rfccode) - A new function : eight2eight to do 8bit -> 8bit transcodage. Copied from transcodage in original 2.8c (using outtab/intab). This one receives the caracter map (that I called "maptab") as an argument; the same can serve for ftn->rfc and rfc->ftn. Changes in 2.8c-tx1 ------------------- - I've included some changes taken from 2.8c-JE modified by Tsuneo Tanaka . [marked as (JE) in the list] - And some of my own, mainly to include some strange kludges and/or headers generated by other gateway softwares. - There is a Usenet-->PcBoard-->FTN gateway that puts in the FTN text body some usenet headers, but some are changed in their syntax :-(, so I modified ifgate/rfcmsg.c to force their acceptation: @FROM : ---> X-PcBoard-FROM: @SUBJECT: ---> X-PcBoard-SUBJECT: @PACKOUT: ---> X-PcBoard-PACKOUT: Then, in ifgate/mkrfcmsg.c, added the lines to map X-PcBoard-FROM: --> From: X-PcBoard-SUBJECT: --> Subject: And also: ^aApparently-To: --> Apparently-To: ^aORIGID: --> Message-ID: ^aORIGREF: --> References: ^aMessage-ID: --> Message-ID: ^aApproved: --> Approved: (JE) - In ifgate/getmessage.c, added code to force create MSGID's when there isn't one (with compilation option -DFORCE_MSGID) (JE) - In ifgate/message.c, and ifgate/mkftnheader.c added recognition of X-FTN-To: - This is the most important for me: in mkftnheader.c, changed the way that the FTN From: field is done, to put a real name rather than a userid (JE) - Now ^aRFC-Newsgroups: is created if more than one ng - I've tried to generate ^aACUPDATE: kludges from Supersedes: and Control: cancel but I have no luck :) The other way (ftn ---> usenet) works fine. ifmail-2.14tx8.10.orig/Credits.TX100644 0 0 6114 6701151722 14457 0ustar rootrootThere is the people who has contributed with ideas, pieces of code, and debugging to the "tx" versions. First of all I want to thanks Eugene Crosser , the author, for doing this all possible. - Tsuneo Tanaka , who has been the main contributor, with lots of useful ideas and code, taken from his JE version as well as posterior contributions. - Ken Lunde , which has written the Japanese conversion code from which is the derived the Japanese code included here. - Thomas Quinot , for correcting a bug about a null pointer that I introduced (it was not visible with an a.out kernel, so I missed it for long time). - Jean-Louis Noel , for fool-proofing improvements in tcpproto.c. - Wim Van Sebroeck , for the -DDONT_REGATE code and the "secure mode"-code for ifmail. - Krzysztof Halasa , for pointing me to the CHRS: values used in Poland. - Yar Tikhiy who sent to the mailing list a patch for SEEN-BY database building improvement and an ifpack.c patch. - Dmitry Kohmanyuk for the mxlookup code. - Marc SCHAEFER for the references stuff and the Areas.site feature. - Marco d'Itri for the DEFAULT_ORIGIN idea - Jerko Golubovic for correcting a bug in ifcico/nodelist.c - Igor Vinokurov for the specific hacks for FreeBSD - Roland Rosenfeld 2:2450/42 for the ifmaprequest patch - Urko Lusa for several comments on quoting 8bit characters from/to FTN packet headers (spanish use very often 8bit chars on their fido names...) - Frank Ellermann for his very good explanation of differences between packet types 2, 2+ and 2.2 in the fido area NET_DEV. - Luc Moreau for translating the manpages into french. - Michael Holzt for help implementing Gatebau stlye MSGID/Message-ID conversions - Pavel Pavlov for the info on Bulgarian charset mik-cyr and the translation tables koi8__mik, mik_koi8, mik__iso-8859-5, iso-8859-5__mik and correction of base64 code. - Erik Warmelink (2:282/1.60) for a nice rewritting of MACHIGAI code. - Stanislav Meduna for the map tables of the "Kamenicky" encoding used in Cz and Sk. - "Marco d'Itri" for the italian language file - Erik Warmelink (2:282/1.60) for the idea to enable '#' on echoareas names. - Andrzej Jordanow for some ideas to support "FTN only" nodes and various bug reports. - Vladimir Zarozhevsky 2:5050/17 for the hydra code. - Boris Tobotras for the Txy nodelist flag code. - Christof Meerwald , for his ifcico-3.0-cm version from which I borrowed the hydra code and several utilities and man pages. http://www.cosy.sbg.ac.at/~cmeer/ifcico/ And many people that tested and show interest in the "tx" versions. Thanks folks ! Pablo Saratxaga ~ ~ :wq ;-) PGP Key available, key ID: 8F0E4975 ifmail-2.14tx8.10.orig/iflib/ 40755 1751 50 0 6701151723 13140 5ustar mdsrcifmail-2.14tx8.10.orig/iflib/lutil.c100644 0 0 11331 6701151723 15205 0ustar rootroot#include #include #include #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #else #define LOG_USER 0 #endif #ifdef HAS_SYSLOG static int syslog_opened=0; #else FILE *logfile=NULL; FILE *errfile=NULL; #endif int logfacility=LOG_USER; char *myname="unknown"; char *logname="/tmp/tmplog"; char *errname="/tmp/tmplog"; unsigned long verbose=0L; void setmyname(arg) char *arg; { if ((myname=strrchr(arg,'/'))) myname++; else myname=arg; myname=xstrcpy(myname); } void setnamesfx(arg) char *arg; { char *p; if (arg == NULL) return; if ((p=strchr(myname,'.'))) *p='\0'; myname=xstrcat(myname,"."); myname=xstrcat(myname,arg); #ifdef HAS_SYSLOG if (syslog_opened) closelog(); openlog(myname,LOG_PID|LOG_CONS,logfacility); #endif } static char *mon[] = { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; char *date(t) time_t t; { struct tm ptm; time_t now; static char buf[20]; if (t) now=t; else time(&now); ptm=*localtime(&now); sprintf(buf,"%s %02d %02d:%02d:%02d", mon[ptm.tm_mon],ptm.tm_mday, ptm.tm_hour,ptm.tm_min,ptm.tm_sec); return(buf); } static char *pbuff = NULL; char *printable(s,l) char *s; int l; { int len; char *p; if (pbuff) free(pbuff); pbuff=NULL; if (s == NULL) return "(null)"; if (l > 0) len=l; else if (l == 0) len=strlen(s); else { len=strlen(s); if (len > -l) len=-l; } pbuff=(char*)malloc(len*4+1); p=pbuff; while (len--) { if (*(unsigned char*)s >= ' ') *p++=*s; else switch (*s) { case '\\': *p++='\\'; *p++='\\'; break; case '\r': *p++='\\'; *p++='r'; break; case '\n': *p++='\\'; *p++='n'; break; case '\t': *p++='\\'; *p++='t'; break; case '\b': *p++='\\'; *p++='b'; break; default: sprintf(p,"\\%03o",*s); p+=4; break; } s++; } *p='\0'; return pbuff; } char *printablec(c) char c; { return printable(&c,1); } /* log and debug outputs */ #define PRINT_DEBUG(fmt,args) \ vfprintf(stderr,*fmt == '$' ? fmt+1 : fmt,args);\ if (*fmt == '$')\ fprintf(stderr,"\n\terrno=%d : %s\n",\ errno,strerror(errno));\ else\ fprintf(stderr,"\n");\ fflush(stderr); #define PRINT_LOGFILE(lfile,fmt,args) \ fprintf(lfile,"%s local %s[%d]: ",date(0L),myname,getpid());\ vfprintf(lfile,*fmt == '$' ? fmt+1 : fmt,args);\ if (*fmt == '$')\ fprintf(lfile,"\n\terrno=%d : %s\n",\ errno,strerror(errno));\ else\ fprintf(lfile,"\n");\ fflush(lfile); #define PRINT_SYSLOG(level,fmt,args) \ vsyslog(level,*fmt == '$' ? fmt+1 : fmt,args);\ if (*fmt == '$')\ syslog(level,"\terrno=%d : %s",\ errno,strerror(errno)); void loginf(va_alist) va_dcl { va_list args; char *fmt; #ifndef HAS_SYSLOG int oldmask; #endif va_start(args); fmt=va_arg(args, char*); if (verbose) { PRINT_DEBUG(fmt,args); } #ifdef HAS_SYSLOG if (!syslog_opened) { openlog(myname,LOG_PID|LOG_CONS,logfacility); syslog_opened=1; } PRINT_SYSLOG(LOG_INFO,fmt,args); #else if (!logfile) { oldmask=umask(066); logfile=fopen(logname,"a"); umask(oldmask); if (logfile == NULL) { perror("Cannot open log file"); return; } } PRINT_LOGFILE(logfile,fmt,args); #endif va_end(args); return; } void logerr(va_alist) va_dcl { va_list args; char *fmt; #ifndef HAS_SYSLOG int oldmask; #endif va_start(args); fmt=va_arg(args, char*); if (verbose) { PRINT_DEBUG(fmt,args); } #ifdef HAS_SYSLOG if (!syslog_opened) { openlog(myname,LOG_PID|LOG_CONS,logfacility); syslog_opened=1; } PRINT_SYSLOG(LOG_ERR,fmt,args); #else if (!errfile) { oldmask=umask(066); errfile=fopen(errname,"a"); umask(oldmask); if (errfile == NULL) { perror("Cannot open log file"); return; } } PRINT_LOGFILE(errfile,fmt,args); #endif va_end(args); return; } void debug(va_alist) va_dcl { va_list args; unsigned long level; char *fmt; va_start(args); level=va_arg(args, unsigned long); fmt=va_arg(args, char*); if ((verbose && (level == 0)) || (verbose & (1 << (level-1)))) { PRINT_DEBUG(fmt,args); } va_end(args); return; } unsigned long setverbose(s) char *s; { int shift; unsigned long tv=0L; int bad=0; if (strlen(s) == strspn(s,"0123456789")) { shift=atoi(s); if ((shift > 0) && (shift <= 32)) while (--shift >= 0) tv |= 1<= 'A') && (shift <= 'Z')) shift += ('a'-'A'); if ((shift >= 'a') && (shift <= 'z')) tv |= 1<<(shift -'a'); else bad=1; } if (tv && ((shift=getuid()) != 0) && (shift != geteuid())) { fprintf(stderr,"Debug request denied, run as user id %d\n", (int)geteuid()); return 0L; } if (bad) fprintf(stderr,"invalid debug verbosity code\n"); return tv; } ifmail-2.14tx8.10.orig/iflib/xutil.c100644 1751 50 1167 6156667505 14571 0ustar mdsrc#include #include #include #include "xutil.h" #include "lutil.h" char *xmalloc(size) size_t size; { char *tmp; tmp=malloc(size); if (!tmp) abort(); return tmp; } char *xstrcpy(src) char *src; { char *tmp; if (src == NULL) return(NULL); tmp=xmalloc(strlen(src)+1); strcpy(tmp,src); return tmp; } char *xstrcat(src,add) char *src,*add; { char *tmp; size_t size=0; if ((add == NULL) || (strlen(add) == 0)) return src; if (src) size=strlen(src); size+=strlen(add); tmp=xmalloc(size+1); *tmp='\0'; if (src) { strcpy(tmp,src); free(src); } strcat(tmp,add); return tmp; } ifmail-2.14tx8.10.orig/iflib/ulock.c100644 1751 50 4456 6016674224 14534 0ustar mdsrc#include #include #include #include #include #include #include #include #include "lutil.h" #ifndef LOCKDIR #define LOCKDIR "/usr/spool/uucp" #endif #define LCKPREFIX LOCKDIR"/LCK.." #define LCKTMP LOCKDIR"/TMP." #ifdef DONT_HAVE_PID_T #define pid_t int #endif int lock(line) char *line; { pid_t mypid,rempid=0; int tmppid; char tmpname[256],lckname[256]; char *p; int i,rc; FILE *f; rc=-1; if ((p=strrchr(line,'/')) == NULL) p=line; else p++; mypid=getpid(); sprintf(tmpname,"%s%d",LCKTMP,mypid); if ((f=fopen(tmpname,"w")) == NULL) { debug(4,"lock cannot create %s",tmpname); return(-1); } #if defined(ASCII_LOCKFILES) fprintf(f,"%10d\n",mypid); #elif defined(BINARY_LOCKFILES) fwrite(&mypid,sizeof(mypid),1,f); #else #error Must define ASCII_LOCKFILES or BINARY_LOCKFILES #endif fclose(f); chmod(tmpname,0444); sprintf(lckname,"%s%s",LCKPREFIX,p); p=lckname+strlen(lckname)-1; *p=tolower(*p); debug(4,"Trying to create %s for %d",lckname,mypid); for (i=0; (i++<5) && ((rc=link(tmpname,lckname)) != 0) && (errno == EEXIST); ) { if ((f=fopen(lckname,"r")) == NULL) { debug(4,"cannot open existing lock file"); } else { #if defined(ASCII_LOCKFILES) fscanf(f,"%d",&tmppid); rempid=tmppid; #elif defined(BINARY_LOCKFILES) fread(&rempid,sizeof(rempid),1,f); #endif fclose(f); debug(4,"lock file read for process %d",rempid); } if (kill(rempid,0) && (errno == ESRCH)) { debug(4,"process inactive, unlink file"); unlink(lckname); } else { debug(4,"process active, sleep a bit"); sleep(2); } } unlink(tmpname); debug(4,"lock result %d (errno %d)",rc,errno); return(rc); } int ulock(line) char *line; { pid_t mypid,rempid; int tmppid; char lckname[256]; char *p; int rc; FILE *f; rc=-1; if ((p=strrchr(line,'/')) == NULL) p=line; else p++; mypid=getpid(); sprintf(lckname,"%s%s",LCKPREFIX,p); p=lckname+strlen(lckname)-1; *p=tolower(*p); if ((f=fopen(lckname,"r")) == NULL) { logerr("$cannot open lock file %s",lckname); return rc; } #if defined(ASCII_LOCKFILES) fscanf(f,"%d",&tmppid); rempid=tmppid; #elif defined(BINARY_LOCKFILES) fread(&rempid,sizeof(rempid),1,f); #endif fclose(f); if (rempid == mypid) rc=unlink(lckname); return(rc); } ifmail-2.14tx8.10.orig/iflib/rfcdate.c100644 1751 50 2575 6316467063 15033 0ustar mdsrc#include #include static char *wdays[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; static char *months[]={"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"}; char *gmtoffset(time_t); char *rfcdate(now) time_t now; { static char buf[40]; struct tm ptm; if (!now) time(&now); ptm=*localtime(&now); sprintf(buf,"%s, %02d %s %02d %02d:%02d:%02d %s", wdays[ptm.tm_wday],ptm.tm_mday,months[ptm.tm_mon], ptm.tm_year%100,ptm.tm_hour,ptm.tm_min,ptm.tm_sec, gmtoffset(now)); return(buf); } char *gmtoffset(now) time_t now; { static char buf[6]="+0000"; struct tm ptm; #if defined(DONT_HAVE_TM_GMTOFF) struct tm gtm; #endif char sign; int hr,min; long offset; if (!now) time(&now); ptm=*localtime(&now); #if defined(DONT_HAVE_TM_GMTOFF) /* To get the timezone, compare localtime with GMT. */ gtm=*gmtime(&now); /* Assume we are never more than 24 hours away. */ offset = gtm.tm_yday - ptm.tm_yday; if (offset > 1) offset = -24; else if (offset < -1) offset = 24; else offset *= 24; /* Scale in the hours and minutes; ignore seconds. */ offset += gtm.tm_hour - ptm.tm_hour; offset *= 60; offset += gtm.tm_min - ptm.tm_min; #else offset=-ptm.tm_gmtoff/60L; #endif if (offset <= 0) { sign='+'; offset=-offset; } else sign='-'; hr=offset/60L; min=offset%60L; sprintf(buf,"%c%02d%02d",sign,hr,min); return(buf); } ifmail-2.14tx8.10.orig/iflib/sequencer.c100644 1751 50 1013 6374437354 15403 0ustar mdsrc#include #include #include #include #include "lutil.h" #include "config.h" unsigned INT32 sequencer(void) { FILE *fp; struct flock fl; unsigned long id; time((time_t*)&id); if ((fp=fopen(sequence,"r+")) == NULL) fp=fopen(sequence,"w"); if (fp == NULL) return id; fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; fcntl(fileno(fp),F_SETLKW,&fl); fscanf(fp,"%lu",&id); rewind(fp); fprintf(fp,"%lu\n",++id); fclose(fp); return (unsigned INT32)id; } ifmail-2.14tx8.10.orig/iflib/ftnmsg.c100644 1751 50 5345 6240214301 14674 0ustar mdsrc#include #include #include #include "lutil.h" #include "bwrite.h" #include "ftn.h" #include "ftnmsg.h" extern FILE *openpkt(FILE *,faddr *,char); static char *months[] = { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; char *ftndate(t) time_t t; { static char buf[32]; struct tm *ptm; ptm=localtime(&t); sprintf(buf,"%02d %s %02d %02d:%02d:%02d",ptm->tm_mday, months[ptm->tm_mon],ptm->tm_year%100, ptm->tm_hour,ptm->tm_min,ptm->tm_sec); return buf; } FILE *ftnmsghdr(fmsg,pkt,route,flavor) ftnmsg *fmsg; FILE *pkt; faddr *route; char flavor; { if (route == NULL) route=fmsg->to; pkt=openpkt(pkt,route,flavor); if (pkt == NULL) return NULL; iwrite(MSGTYPE, pkt); #ifndef USE_REAL_BINARY_FROM if (fmsg->area) iwrite(bestaka_s(fmsg->to)->node,pkt); else #endif iwrite(fmsg->from->node,pkt); iwrite(fmsg->to->node, pkt); #ifndef USE_REAL_BINARY_FROM if (fmsg->area) iwrite(bestaka_s(fmsg->to)->net,pkt); else #endif iwrite(fmsg->from->net, pkt); iwrite(fmsg->to->net, pkt); iwrite(fmsg->flags, pkt); iwrite(0, pkt); awrite(ftndate(fmsg->date),pkt); awrite(fmsg->to->name?fmsg->to->name:"Sysop", pkt); awrite(fmsg->from->name?fmsg->from->name:"Sysop",pkt); awrite(fmsg->subj?fmsg->subj:"",pkt); if (fmsg->area) { fprintf(pkt,"AREA:%s\r",fmsg->area); } else { if (fmsg->to->point) fprintf(pkt,"\1TOPT %u\r",fmsg->to->point); if (fmsg->from->point) fprintf(pkt,"\1FMPT %u\r",fmsg->from->point); #ifndef FORCEINTL if (fmsg->to->zone != fmsg->from->zone) #endif fprintf(pkt,"\1INTL %u:%u/%u %u:%u/%u\r", fmsg->to->zone, fmsg->to->net, fmsg->to->node, fmsg->from->zone, fmsg->from->net, fmsg->from->node ); } if (fmsg->msgid_s) fprintf(pkt,"\1MSGID: %s\r",fmsg->msgid_s); else if (fmsg->msgid_a) fprintf(pkt,"\1MSGID: %s %08lx\r", fmsg->msgid_a, fmsg->msgid_n); if (fmsg->reply_s) fprintf(pkt,"\1REPLY: %s\r",fmsg->reply_s); else if (fmsg->reply_a) fprintf(pkt,"\1REPLY: %s %08lx\r", fmsg->reply_a, fmsg->reply_n); if (ferror(pkt)) return NULL; else return pkt; } void tidy_ftnmsg(tmsg) ftnmsg *tmsg; { if (tmsg == NULL) return; tmsg->flags=0; if (tmsg->to) tidy_faddr(tmsg->to); tmsg->to=NULL; if (tmsg->from) tidy_faddr(tmsg->from); tmsg->from=NULL; if (tmsg->subj) free(tmsg->subj); tmsg->subj=NULL; if (tmsg->msgid_s) free(tmsg->msgid_s); tmsg->msgid_s=NULL; if (tmsg->msgid_a) free(tmsg->msgid_a); tmsg->msgid_a=NULL; if (tmsg->reply_s) free(tmsg->reply_s); tmsg->reply_s=NULL; if (tmsg->reply_a) free(tmsg->reply_a); tmsg->reply_a=NULL; if (tmsg->origin) free(tmsg->origin); tmsg->origin=NULL; if (tmsg->area) free(tmsg->area); tmsg->area=NULL; free(tmsg); } ifmail-2.14tx8.10.orig/iflib/hdr.c100644 1751 50 424 6352322573 14143 0ustar mdsrc#include #include #include #include #include "xutil.h" #include "lutil.h" #include "rfcmsg.h" char *hdr(key,msg) char *key; rfcmsg *msg; { for (;msg;msg=msg->next) if (!strcasecmp(key,msg->key)) return(msg->val); return(NULL); } ifmail-2.14tx8.10.orig/iflib/crc.c100644 0 0 24424 6573551267 14650 0ustar rootroot/* First, the polynomial itself and its table of feedback terms. The */ /* polynomial is */ /* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */ /* Note that we take it "backwards" and put the highest-order term in */ /* the lowest-order bit. The X^32 term is "implied"; the LSB is the */ /* X^31 term, etc. The X^0 term (usually shown as "+1") results in */ /* the MSB being 1. */ /* Note that the usual hardware shift register implementation, which */ /* is what we're using (we're merely optimizing it by doing eight-bit */ /* chunks at a time) shifts bits into the lowest-order term. In our */ /* implementation, that means shifting towards the right. Why do we */ /* do it this way? Because the calculated CRC must be transmitted in */ /* order from highest-order term to lowest-order term. UARTs transmit */ /* characters in order from LSB to MSB. By storing the CRC this way, */ /* we hand it to the UART in the order low-byte to high-byte; the UART */ /* sends each low-bit to hight-bit; and the result is transmission bit */ /* by bit from highest- to lowest-order term without requiring any bit */ /* shuffling on our part. Reception works similarly. */ /* The feedback terms table consists of 256, 32-bit entries. Notes: */ /* */ /* The table can be generated at runtime if desired; code to do so */ /* is shown later. It might not be obvious, but the feedback */ /* terms simply represent the results of eight shift/xor opera- */ /* tions for all combinations of data and CRC register values. */ /* */ /* The values must be right-shifted by eight bits by the "updcrc" */ /* logic; the shift must be unsigned (bring in zeroes). On some */ /* hardware you could probably optimize the shift in assembler by */ /* using byte-swap instructions. */ unsigned INT32 crc32tab[] = { /* CRC polynomial 0xedb88320 */ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; unsigned INT16 crc16tab[256] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 }; unsigned INT16 crc16ccitttab[256] = { /* CRC polynomial 0x8408 */ 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; unsigned INT32 crc(str) char *str; { unsigned INT32 crc; for (crc=0L;*str;str++) crc = crc32tab[((int)crc^(*str)) & 0xff] ^ ((crc>>8) & 0x00ffffff); return crc; } unsigned INT32 crc32(str,l) char *str; int l; { unsigned INT32 crc; for (crc=0L;l--;str++) crc = crc32tab[((int)crc^(*str)) & 0xff] ^ ((crc>>8) & 0x00ffffff); return crc; } unsigned INT32 crc32ccitt(str,l) char *str; int l; { unsigned INT32 crc; for (crc=0xffffffffL;l--;str++) crc = crc32tab[((int)crc^(*str)) & 0xff] ^ ((crc>>8) & 0x00ffffff); return crc; } unsigned INT32 crcgatebau(str) char *str; { unsigned INT32 crc; for (crc=0xffffffff;*str;str++) crc = crc32tab[((int)crc^(*str)) & 0xff] ^ (crc>>8); return ~crc & 0xffffffff; } unsigned INT16 crc16(str,l) char *str; int l; { unsigned INT16 crc; for (crc=0;l--;str++) crc = crc16tab[(((crc>>8)&0xff)^(*str)) & 0xff] ^ (crc<<8); return crc; } unsigned INT16 crc16ccitt(str,l) char *str; int l; { unsigned INT16 crc; for (crc = 0xffff; l--; str++) crc = crc16ccitttab[(crc ^ (*str)) & 0xff] ^ ((crc >> 8) & 0x00ff); return crc; } unsigned char checksum(str,l) char *str; int l; { unsigned char cs; for (cs=0;l--;str++) cs += (unsigned char)(*str); return cs; } ifmail-2.14tx8.10.orig/iflib/strcasestr.c100644 1751 50 466 6261367473 15600 0ustar mdsrc#include #include char *strcasestr(a,b) char *a,*b; { char *p,*max; int l; if (a && b) { l=strlen(b); max=a+strlen(a)-l; for (p=a;p<=max;p++) if (!strncasecmp(p,b,l)) return(p); return((char *)0); } else { return ((char *) 0); } } ifmail-2.14tx8.10.orig/iflib/strncasecmp.c100644 1751 50 334 5476207026 15711 0ustar mdsrc#include int strncasecmp(s1,s2,n) register unsigned char *s1, *s2; register int n; { while (*s1 && *s2 && (toupper(*s1) == toupper(*s2)) && --n) { s1++; s2++; } return (toupper(*s1) - toupper(*s2)); } ifmail-2.14tx8.10.orig/iflib/strcasecmp.c100644 1751 50 302 5440660414 15521 0ustar mdsrc#include int strcasecmp(s1,s2) register unsigned char *s1, *s2; { while (*s1 && *s2 && (toupper(*s1) == toupper(*s2))) { s1++; s2++; } return (toupper(*s1) - toupper(*s2)); } ifmail-2.14tx8.10.orig/iflib/rename.c100644 1751 50 254 5550072360 14631 0ustar mdsrc#include #include int rename(old,new) char *old,*new; { register int rc; if ((rc=link(old,new)) == 0) return unlink(old); else return rc; } ifmail-2.14tx8.10.orig/iflib/mkdir.c100644 1751 50 700 5550072330 14461 0ustar mdsrc#include #include #include #include #define MKDIR "/bin/mkdir" #define DEVNULL "/dev/null" int mkdir(dir) char *dir; { int pid,rc,status; if ((pid=fork()) == 0) { freopen(DEVNULL,"w",stdout); freopen(DEVNULL,"w",stderr); rc=execl(MKDIR,MKDIR,dir,NULL); return rc; } while (((rc=wait(&status)) == pid) || (rc == 0)); return ((status & 0xff) == 0) ? (status >> 8) : (status & 0xff); } ifmail-2.14tx8.10.orig/iflib/parsedate.y100644 1751 50 54337 6175636505 15446 0ustar mdsrc%{ /* $Revision: 1.13 $ ** ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz ** and Jim Berets in August, 1990. ** Further revised (removed obsolete constructs and cleaned up timezone ** names) in August, 1991, by Rich. Paul Eggert ** helped in September, 1992. ** ** This grammar has six shift/reduce conflicts. ** ** This code is in the public domain and has no copyright. ** ** Revision 01/03/95 by schaefer@alphanet.ch ** Adding heuristic for my needs. Hacking, hacking. ** Can be used by defing MIPS_DATE_HACKING. */ /* SUPPRESS 530 *//* Empty body for statement */ /* SUPPRESS 593 on yyerrlab *//* Label was not used */ /* SUPPRESS 593 on yynewstate *//* Label was not used */ /* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */ #include "configdata.h" #include #include #include #if defined(DO_NEED_TIME) #include #endif /* defined(DO_NEED_TIME) */ #include #include "libinn.h" #include "macros.h" #define yyparse date_parse #define yylex date_lex #define yyerror date_error /* See the LeapYears table in Convert. */ #define EPOCH 1970 #define END_OF_TIME 2038 /* Constants for general time calculations. */ #define DST_OFFSET 1 #define SECSPERDAY (24L * 60L * 60L) /* Readability for TABLE stuff. */ #define HOUR(x) (x * 60) #define LPAREN '(' #define RPAREN ')' #define IS7BIT(x) ((unsigned int)(x) < 0200) /* ** An entry in the lexical lookup table. */ typedef struct _TABLE { STRING name; int type; time_t value; } TABLE; /* ** Daylight-savings mode: on, off, or not yet known. */ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; /* ** Meridian: am, pm, or 24-hour style. */ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; /* ** Global variables. We could get rid of most of them by using a yacc ** union, but this is more efficient. (This routine predates the ** yacc %union construct.) */ static char *yyInput; static DSTMODE yyDSTmode; static int yyHaveDate; static int yyHaveRel; static int yyHaveTime; static time_t yyTimezone; static time_t yyDay; static time_t yyHour; static time_t yyMinutes; static time_t yyMonth; static time_t yySeconds; static time_t yyYear; static MERIDIAN yyMeridian; static time_t yyRelMonth; static time_t yyRelSeconds; extern struct tm *localtime(); static void date_error(); %} %union { time_t Number; enum _MERIDIAN Meridian; } %token tDAY tDAYZONE tMERIDIAN tMONTH tMONTH_UNIT tSEC_UNIT tSNUMBER %token tUNUMBER tZONE %type tDAYZONE tMONTH tMONTH_UNIT tSEC_UNIT %type tSNUMBER tUNUMBER tZONE numzone zone %type tMERIDIAN o_merid %% spec : /* NULL */ | spec item ; item : time { yyHaveTime++; #if defined(lint) /* I am compulsive about lint natterings... */ if (yyHaveTime == -1) { YYERROR; } #endif /* defined(lint) */ } | time zone { yyHaveTime++; yyTimezone = $2; } | date { yyHaveDate++; } | rel { yyHaveRel = 1; } ; time : tUNUMBER o_merid { if ($1 < 100) { yyHour = $1; yyMinutes = 0; } else { yyHour = $1 / 100; yyMinutes = $1 % 100; } yySeconds = 0; yyMeridian = $2; } | tUNUMBER ':' tUNUMBER o_merid { yyHour = $1; yyMinutes = $3; yySeconds = 0; yyMeridian = $4; } | tUNUMBER ':' tUNUMBER numzone { yyHour = $1; yyMinutes = $3; yyTimezone = $4; yyMeridian = MER24; yyDSTmode = DSToff; } | tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid { yyHour = $1; yyMinutes = $3; yySeconds = $5; yyMeridian = $6; } | tUNUMBER ':' tUNUMBER ':' tUNUMBER numzone { yyHour = $1; yyMinutes = $3; yySeconds = $5; yyTimezone = $6; yyMeridian = MER24; yyDSTmode = DSToff; } ; zone : tZONE { $$ = $1; yyDSTmode = DSToff; } | tDAYZONE { $$ = $1; yyDSTmode = DSTon; } | tZONE numzone { /* Only allow "GMT+300" and "GMT-0800" */ if ($1 != 0) { YYABORT; } $$ = $2; yyDSTmode = DSToff; } | numzone { $$ = $1; yyDSTmode = DSToff; } ; numzone : tSNUMBER { int i; /* Unix and GMT and numeric timezones -- a little confusing. */ if ($1 < 0) { /* Don't work with negative modulus. */ $1 = -$1; if ($1 > 9999 || (i = $1 % 100) >= 60) { YYABORT; } $$ = ($1 / 100) * 60 + i; } else { if ($1 > 9999 || (i = $1 % 100) >= 60) { YYABORT; } $$ = -(($1 / 100) * 60 + i); } } ; date : tUNUMBER '/' tUNUMBER { yyMonth = $1; yyDay = $3; } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { if ($1 > 100) { yyYear = $1; yyMonth = $3; yyDay = $5; } else { yyMonth = $1; yyDay = $3; yyYear = $5; } } | tMONTH tUNUMBER { yyMonth = $1; yyDay = $2; } | tMONTH tUNUMBER ',' tUNUMBER { yyMonth = $1; yyDay = $2; yyYear = $4; } | tUNUMBER tMONTH { yyDay = $1; yyMonth = $2; } | tUNUMBER tMONTH tUNUMBER { yyDay = $1; yyMonth = $2; yyYear = $3; } | tDAY ',' tUNUMBER tMONTH tUNUMBER { yyDay = $3; yyMonth = $4; yyYear = $5; } ; rel : tSNUMBER tSEC_UNIT { yyRelSeconds += $1 * $2; } | tUNUMBER tSEC_UNIT { yyRelSeconds += $1 * $2; } | tSNUMBER tMONTH_UNIT { yyRelMonth += $1 * $2; } | tUNUMBER tMONTH_UNIT { yyRelMonth += $1 * $2; } ; o_merid : /* NULL */ { $$ = MER24; } | tMERIDIAN { $$ = $1; } ; %% /* Month and day table. */ static TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, { "april", tMONTH, 4 }, { "may", tMONTH, 5 }, { "june", tMONTH, 6 }, { "july", tMONTH, 7 }, { "august", tMONTH, 8 }, { "september", tMONTH, 9 }, { "october", tMONTH, 10 }, { "november", tMONTH, 11 }, { "december", tMONTH, 12 }, /* The value of the day isn't used... */ { "sunday", tDAY, 0 }, { "monday", tDAY, 0 }, { "tuesday", tDAY, 0 }, { "wednesday", tDAY, 0 }, { "thursday", tDAY, 0 }, { "friday", tDAY, 0 }, { "saturday", tDAY, 0 }, }; /* Time units table. */ static TABLE UnitsTable[] = { { "year", tMONTH_UNIT, 12 }, { "month", tMONTH_UNIT, 1 }, { "week", tSEC_UNIT, 7 * 24 * 60 * 60 }, { "day", tSEC_UNIT, 1 * 24 * 60 * 60 }, { "hour", tSEC_UNIT, 60 * 60 }, { "minute", tSEC_UNIT, 60 }, { "min", tSEC_UNIT, 60 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, }; /* Timezone table. */ static TABLE TimezoneTable[] = { { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR( 0) }, /* Universal */ { "utc", tZONE, HOUR( 0) }, /* Universal Coordinated */ { "cut", tZONE, HOUR( 0) }, /* Coordinated Universal */ { "z", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "wet", tZONE, HOUR( 0) }, /* Western European */ { "bst", tDAYZONE, HOUR( 0) }, /* British Summer */ { "nst", tZONE, HOUR(3)+30 }, /* Newfoundland Standard */ { "ndt", tDAYZONE, HOUR(3)+30 }, /* Newfoundland Daylight */ { "ast", tZONE, HOUR( 4) }, /* Atlantic Standard */ { "adt", tDAYZONE, HOUR( 4) }, /* Atlantic Daylight */ { "est", tZONE, HOUR( 5) }, /* Eastern Standard */ { "edt", tDAYZONE, HOUR( 5) }, /* Eastern Daylight */ { "cst", tZONE, HOUR( 6) }, /* Central Standard */ { "cdt", tDAYZONE, HOUR( 6) }, /* Central Daylight */ { "mst", tZONE, HOUR( 7) }, /* Mountain Standard */ { "mdt", tDAYZONE, HOUR( 7) }, /* Mountain Daylight */ { "pst", tZONE, HOUR( 8) }, /* Pacific Standard */ { "pdt", tDAYZONE, HOUR( 8) }, /* Pacific Daylight */ { "yst", tZONE, HOUR( 9) }, /* Yukon Standard */ { "ydt", tDAYZONE, HOUR( 9) }, /* Yukon Daylight */ { "akst", tZONE, HOUR( 9) }, /* Alaska Standard */ { "akdt", tDAYZONE, HOUR( 9) }, /* Alaska Daylight */ { "hst", tZONE, HOUR(10) }, /* Hawaii Standard */ { "hast", tZONE, HOUR(10) }, /* Hawaii-Aleutian Standard */ { "hadt", tDAYZONE, HOUR(10) }, /* Hawaii-Aleutian Daylight */ { "ces", tDAYZONE, -HOUR(1) }, /* Central European Summer */ { "cest", tDAYZONE, -HOUR(1) }, /* Central European Summer */ { "mez", tZONE, -HOUR(1) }, /* Middle European */ { "mezt", tDAYZONE, -HOUR(1) }, /* Middle European Summer */ { "cet", tZONE, -HOUR(1) }, /* Central European */ { "met", tZONE, -HOUR(1) }, /* Middle European */ { "eet", tZONE, -HOUR(2) }, /* Eastern Europe */ { "msk", tZONE, -HOUR(3) }, /* Moscow Winter */ { "msd", tDAYZONE, -HOUR(3) }, /* Moscow Summer */ { "wast", tZONE, -HOUR(8) }, /* West Australian Standard */ { "wadt", tDAYZONE, -HOUR(8) }, /* West Australian Daylight */ { "hkt", tZONE, -HOUR(8) }, /* Hong Kong */ { "cct", tZONE, -HOUR(8) }, /* China Coast */ { "jst", tZONE, -HOUR(9) }, /* Japan Standard */ { "kst", tZONE, -HOUR(9) }, /* Korean Standard */ { "kdt", tZONE, -HOUR(9) }, /* Korean Daylight */ { "cast", tZONE, -(HOUR(9)+30) }, /* Central Australian Standard */ { "cadt", tDAYZONE, -(HOUR(9)+30) }, /* Central Australian Daylight */ { "east", tZONE, -HOUR(10) }, /* Eastern Australian Standard */ { "eadt", tDAYZONE, -HOUR(10) }, /* Eastern Australian Daylight */ { "nzst", tZONE, -HOUR(12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR(12) }, /* New Zealand Daylight */ /* For completeness we include the following entries. */ #if 0 /* Duplicate names. Either they conflict with a zone listed above * (which is either more likely to be seen or just been in circulation * longer), or they conflict with another zone in this section and * we could not reasonably choose one over the other. */ { "fst", tZONE, HOUR( 2) }, /* Fernando De Noronha Standard */ { "fdt", tDAYZONE, HOUR( 2) }, /* Fernando De Noronha Daylight */ { "bst", tZONE, HOUR( 3) }, /* Brazil Standard */ { "est", tZONE, HOUR( 3) }, /* Eastern Standard (Brazil) */ { "edt", tDAYZONE, HOUR( 3) }, /* Eastern Daylight (Brazil) */ { "wst", tZONE, HOUR( 4) }, /* Western Standard (Brazil) */ { "wdt", tDAYZONE, HOUR( 4) }, /* Western Daylight (Brazil) */ { "cst", tZONE, HOUR( 5) }, /* Chile Standard */ { "cdt", tDAYZONE, HOUR( 5) }, /* Chile Daylight */ { "ast", tZONE, HOUR( 5) }, /* Acre Standard */ { "adt", tDAYZONE, HOUR( 5) }, /* Acre Daylight */ { "cst", tZONE, HOUR( 5) }, /* Cuba Standard */ { "cdt", tDAYZONE, HOUR( 5) }, /* Cuba Daylight */ { "est", tZONE, HOUR( 6) }, /* Easter Island Standard */ { "edt", tDAYZONE, HOUR( 6) }, /* Easter Island Daylight */ { "sst", tZONE, HOUR(11) }, /* Samoa Standard */ { "ist", tZONE, -HOUR(2) }, /* Israel Standard */ { "idt", tDAYZONE, -HOUR(2) }, /* Israel Daylight */ { "idt", tDAYZONE, -(HOUR(3)+30) }, /* Iran Daylight */ { "ist", tZONE, -(HOUR(3)+30) }, /* Iran Standard */ { "cst", tZONE, -HOUR(8) }, /* China Standard */ { "cdt", tDAYZONE, -HOUR(8) }, /* China Daylight */ { "sst", tZONE, -HOUR(8) }, /* Singapore Standard */ /* Dubious (e.g., not in Olson's TIMEZONE package) or obsolete. */ { "gst", tZONE, HOUR( 3) }, /* Greenland Standard */ { "wat", tZONE, -HOUR(1) }, /* West Africa */ { "at", tZONE, HOUR( 2) }, /* Azores */ { "gst", tZONE, -HOUR(10) }, /* Guam Standard */ { "nft", tZONE, HOUR(3)+30 }, /* Newfoundland */ { "idlw", tZONE, HOUR(12) }, /* International Date Line West */ { "mewt", tZONE, -HOUR(1) }, /* Middle European Winter */ { "mest", tDAYZONE, -HOUR(1) }, /* Middle European Summer */ { "swt", tZONE, -HOUR(1) }, /* Swedish Winter */ { "sst", tDAYZONE, -HOUR(1) }, /* Swedish Summer */ { "fwt", tZONE, -HOUR(1) }, /* French Winter */ { "fst", tDAYZONE, -HOUR(1) }, /* French Summer */ { "bt", tZONE, -HOUR(3) }, /* Baghdad */ { "it", tZONE, -(HOUR(3)+30) }, /* Iran */ { "zp4", tZONE, -HOUR(4) }, /* USSR Zone 3 */ { "zp5", tZONE, -HOUR(5) }, /* USSR Zone 4 */ { "ist", tZONE, -(HOUR(5)+30) }, /* Indian Standard */ { "zp6", tZONE, -HOUR(6) }, /* USSR Zone 5 */ { "nst", tZONE, -HOUR(7) }, /* North Sumatra */ { "sst", tZONE, -HOUR(7) }, /* South Sumatra */ { "jt", tZONE, -(HOUR(7)+30) }, /* Java (3pm in Cronusland!) */ { "nzt", tZONE, -HOUR(12) }, /* New Zealand */ { "idle", tZONE, -HOUR(12) }, /* International Date Line East */ { "cat", tZONE, HOUR(10) }, /* -- expired 1967 */ { "nt", tZONE, HOUR(11) }, /* -- expired 1967 */ { "ahst", tZONE, HOUR(10) }, /* -- expired 1983 */ { "hdt", tDAYZONE, HOUR(10) }, /* -- expired 1986 */ #endif /* 0 */ }; /* ARGSUSED */ static void date_error(s) char *s; { /* NOTREACHED */ } static time_t ToSeconds(Hours, Minutes, Seconds, Meridian) time_t Hours; time_t Minutes; time_t Seconds; MERIDIAN Meridian; { if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 61) return -1; if (Meridian == MER24) { if (Hours < 0 || Hours > 23) return -1; } else { if (Hours < 1 || Hours > 12) return -1; if (Hours == 12) Hours = 0; if (Meridian == MERpm) Hours += 12; } return (Hours * 60L + Minutes) * 60L + Seconds; } static time_t Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, dst) time_t Month; time_t Day; time_t Year; time_t Hours; time_t Minutes; time_t Seconds; MERIDIAN Meridian; DSTMODE dst; { static int DaysNormal[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static int DaysLeap[13] = { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static int LeapYears[] = { 1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036 }; register int *yp; register int *mp; register time_t Julian; register int i; time_t tod; if (Year < 0) Year = -Year; if (Year < 100) Year += 1900; if (Year < EPOCH) Year += 100; for (mp = DaysNormal, yp = LeapYears; yp < ENDOF(LeapYears); yp++) if (Year == *yp) { mp = DaysLeap; break; } if (Year < EPOCH || Year > END_OF_TIME || Month < 1 || Month > 12 /* NOSTRICT *//* conversion from long may lose accuracy */ || Day < 1 || Day > mp[(int)Month]) return -1; Julian = Day - 1 + (Year - EPOCH) * 365; for (yp = LeapYears; yp < ENDOF(LeapYears); yp++, Julian++) if (Year <= *yp) break; for (i = 1; i < Month; i++) Julian += *++mp; Julian *= SECSPERDAY; Julian += yyTimezone * 60L; if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0) return -1; Julian += tod; tod = Julian; if (dst == DSTon || (dst == DSTmaybe && localtime(&tod)->tm_isdst)) Julian -= DST_OFFSET * 60 * 60; return Julian; } static time_t DSTcorrect(Start, Future) time_t Start; time_t Future; { time_t StartDay; time_t FutureDay; StartDay = (localtime(&Start)->tm_hour + 1) % 24; FutureDay = (localtime(&Future)->tm_hour + 1) % 24; return (Future - Start) + (StartDay - FutureDay) * DST_OFFSET * 60 * 60; } static time_t RelativeMonth(Start, RelMonth) time_t Start; time_t RelMonth; { struct tm *tm; time_t Month; time_t Year; tm = localtime(&Start); Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; Year = Month / 12; Month = Month % 12 + 1; return DSTcorrect(Start, Convert(Month, (time_t)tm->tm_mday, Year, (time_t)tm->tm_hour, (time_t)tm->tm_min, (time_t)tm->tm_sec, MER24, DSTmaybe)); } static int LookupWord(buff, length) char *buff; register int length; { register char *p; register STRING q; register TABLE *tp; register int c; p = buff; c = p[0]; /* See if we have an abbreviation for a month. */ if (length == 3 || (length == 4 && p[3] == '.')) for (tp = MonthDayTable; tp < ENDOF(MonthDayTable); tp++) { q = tp->name; if (c == q[0] && p[1] == q[1] && p[2] == q[2]) { yylval.Number = tp->value; return tp->type; } } else for (tp = MonthDayTable; tp < ENDOF(MonthDayTable); tp++) if (c == tp->name[0] && strcmp(p, tp->name) == 0) { yylval.Number = tp->value; return tp->type; } /* Try for a timezone. */ for (tp = TimezoneTable; tp < ENDOF(TimezoneTable); tp++) if (c == tp->name[0] && p[1] == tp->name[1] && strcmp(p, tp->name) == 0) { yylval.Number = tp->value; return tp->type; } /* Try the units table. */ for (tp = UnitsTable; tp < ENDOF(UnitsTable); tp++) if (c == tp->name[0] && strcmp(p, tp->name) == 0) { yylval.Number = tp->value; return tp->type; } /* Strip off any plural and try the units table again. */ if (--length > 0 && p[length] == 's') { p[length] = '\0'; for (tp = UnitsTable; tp < ENDOF(UnitsTable); tp++) if (c == tp->name[0] && strcmp(p, tp->name) == 0) { p[length] = 's'; yylval.Number = tp->value; return tp->type; } p[length] = 's'; } length++; /* Drop out any periods. */ for (p = buff, q = (STRING)buff; *q; q++) if (*q != '.') *p++ = *q; *p = '\0'; /* Try the meridians. */ if (buff[1] == 'm' && buff[2] == '\0') { if (buff[0] == 'a') { yylval.Meridian = MERam; return tMERIDIAN; } if (buff[0] == 'p') { yylval.Meridian = MERpm; return tMERIDIAN; } } /* If we saw any periods, try the timezones again. */ if (p - buff != length) { c = buff[0]; for (p = buff, tp = TimezoneTable; tp < ENDOF(TimezoneTable); tp++) if (c == tp->name[0] && p[1] == tp->name[1] && strcmp(p, tp->name) == 0) { yylval.Number = tp->value; return tp->type; } } /* Unknown word -- assume GMT timezone. */ yylval.Number = 0; return tZONE; } static int date_lex() { register char c; register char *p; char buff[20]; register int sign; register int i; register int nesting; for ( ; ; ) { /* Get first character after the whitespace. */ for ( ; ; ) { while (CTYPE(isspace, *yyInput)) yyInput++; c = *yyInput; /* Ignore RFC 822 comments, typically time zone names. */ if (c != LPAREN) break; for (nesting = 1; (c = *++yyInput) != RPAREN || --nesting; ) if (c == LPAREN) nesting++; else if (!IS7BIT(c) || c == '\0' || c == '\r' || (c == '\\' && ((c = *++yyInput) == '\0' || !IS7BIT(c)))) /* Lexical error: bad comment. */ return '?'; yyInput++; } /* A number? */ if (CTYPE(isdigit, c) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; yyInput++; if (!CTYPE(isdigit, *yyInput)) /* Skip the plus or minus sign. */ continue; } else sign = 0; for (i = 0; (c = *yyInput++) != '\0' && CTYPE(isdigit, c); ) i = 10 * i + c - '0'; yyInput--; yylval.Number = sign < 0 ? -i : i; return sign ? tSNUMBER : tUNUMBER; } /* A word? */ if (CTYPE(isalpha, c)) { for (p = buff; (c = *yyInput++) == '.' || CTYPE(isalpha, c); ) if (p < &buff[sizeof buff - 1]) *p++ = CTYPE(isupper, c) ? tolower(c) : c; *p = '\0'; yyInput--; return LookupWord(buff, p - buff); } return *yyInput++; } } time_t parsedate(p, now) char *p; TIMEINFO *now; { extern int date_parse(); struct tm *tm; TIMEINFO ti; time_t Start; yyInput = p; if (now == NULL) { now = &ti; (void)GetTimeInfo(&ti); } tm = localtime(&now->time); yyYear = tm->tm_year; yyMonth = tm->tm_mon + 1; yyDay = tm->tm_mday; yyTimezone = now->tzone; yyDSTmode = DSTmaybe; yyHour = 0; yyMinutes = 0; yySeconds = 0; yyMeridian = MER24; yyRelSeconds = 0; yyRelMonth = 0; yyHaveDate = 0; yyHaveRel = 0; yyHaveTime = 0; if (date_parse() || yyHaveTime > 1 || yyHaveDate > 1) #ifdef MIPS_DATE_HACKING # define MAXLINELEN 1000 { /* Effects with Start != 0 ? */ char buf1[MAXLINELEN]; char themonth[MAXLINELEN]; if (sscanf(p, "%s %s %d %2d:%2d:%2d %d", buf1, themonth, &yyDay, &yyHour, &yyMinutes, &yySeconds, &yyYear) == 7) { yyHaveDate = 1; yyHaveTime = 1; } else { if (sscanf(p, "%s %d %s %d %2d:%2d %s %s", buf1, &yyDay, themonth, &yyYear, &yyHour, &yyMinutes, buf1, buf1) >= 8) { yyHaveDate = 1; yyHaveTime = 1; yyDSTmode = DSTon; } else { return -1; } } } #else return -1; #endif if (yyHaveDate || yyHaveTime) { Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, yyMeridian, yyDSTmode); if (Start < 0) return -1; } else { Start = now->time; if (!yyHaveRel) Start -= (tm->tm_hour * 60L + tm->tm_min) * 60L + tm->tm_sec; } Start += yyRelSeconds; if (yyRelMonth) Start += RelativeMonth(Start, yyRelMonth); /* Have to do *something* with a legitimate -1 so it's distinguishable * from the error return value. (Alternately could set errno on error.) */ return Start == -1 ? 0 : Start; } #if defined(TEST) #if YYDEBUG extern int yydebug; #endif /* YYDEBUG */ /* ARGSUSED */ int main(ac, av) int ac; char *av[]; { char buff[128]; time_t d; #if YYDEBUG yydebug = 1; #endif /* YYDEBUG */ (void)printf("Enter date, or blank line to exit.\n\t> "); for ( ; ; ) { (void)printf("\t> "); (void)fflush(stdout); if (gets(buff) == NULL || buff[0] == '\n') break; #if YYDEBUG if (strcmp(buff, "yydebug") == 0) { yydebug = !yydebug; printf("yydebug = %s\n", yydebug ? "on" : "off"); continue; } #endif /* YYDEBUG */ d = parsedate(buff, (TIMEINFO *)NULL); if (d == -1) (void)printf("Bad format - couldn't convert.\n"); else (void)printf("%s", ctime(&d)); } exit(0); /* NOTREACHED */ } #endif /* defined(TEST) */ ifmail-2.14tx8.10.orig/iflib/gettime.c100644 1751 50 3413 5444361046 15044 0ustar mdsrc/* $Revision: 1.4 $ ** */ #include #include #include "configdata.h" #if defined(DO_NEED_TIME) #include #endif /* defined(DO_NEED_TIME) */ #include #include "clibrary.h" #include "libinn.h" int GetTimeInfo(Now) TIMEINFO *Now; { static time_t LastTime; static long LastTzone; struct tm *tm; #if defined(DO_HAVE_GETTIMEOFDAY) struct timeval tv; #endif /* defined(DO_HAVE_GETTIMEOFDAY) */ #if defined(DONT_HAVE_TM_GMTOFF) struct tm local; struct tm gmt; #endif /* !defined(DONT_HAVE_TM_GMTOFF) */ /* Get the basic time. */ #if defined(DO_HAVE_GETTIMEOFDAY) if (gettimeofday(&tv, (struct timezone *)NULL) == -1) return -1; Now->time = tv.tv_sec; Now->usec = tv.tv_usec; #else /* Can't check for -1 since that might be a time, I guess. */ (void)time(&Now->time); Now->usec = 0; #endif /* defined(DO_HAVE_GETTIMEOFDAY) */ /* Now get the timezone if it's been an hour since the last time. */ if (Now->time - LastTime > 60 * 60) { LastTime = Now->time; if ((tm = localtime(&Now->time)) == NULL) return -1; #if defined(DONT_HAVE_TM_GMTOFF) /* To get the timezone, compare localtime with GMT. */ local = *tm; if ((tm = gmtime(&Now->time)) == NULL) return -1; gmt = *tm; /* Assume we are never more than 24 hours away. */ LastTzone = gmt.tm_yday - local.tm_yday; if (LastTzone > 1) LastTzone = -24; else if (LastTzone < -1) LastTzone = 24; else LastTzone *= 24; /* Scale in the hours and minutes; ignore seconds. */ LastTzone += gmt.tm_hour - local.tm_hour; LastTzone *= 60; LastTzone += gmt.tm_min - local.tm_min; #else LastTzone = (0 - tm->tm_gmtoff) / 60; #endif /* defined(DONT_HAVE_TM_GMTOFF) */ } Now->tzone = LastTzone; return 0; } ifmail-2.14tx8.10.orig/iflib/rdconfig.c100644 1751 50 46027 6540753002 15224 0ustar mdsrc/* ### Modified by P.Saratxaga on 5 Sep 1995 ### * - added unrar (support for RAR desarchiver) and for others (but as I's * never heard of a unix version for them, i've let those commented out) * - added modemaftercall keyword (string to send to modem after calling) * code from T. Tanaka * - deleted intab[] and outtab[] and getctab() (is now getmaptab in charconv.c) * - added maptabdir * - deleted ctoi() (used by getctab, I move it to kconv.c) * - added pktpwlist - code from T.Tanaka */ #include #include #include #include #include #include #include #ifdef HAVE_LOCALE_H #include #endif #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "charset.h" #ifndef PUBDIR #define PUBDIR "/var/spool/uucppublic" #endif #ifndef CONFIGFILE #define CONFIGFILE "config" #endif #ifndef MAPTABDIR #define MAPTABDIR "/etc/ifmail/maptabs" #endif #ifndef LOGFILE #define LOGFILE "iflog" #endif #ifndef DEBUGFILE #define DEBUGFILE NULL #endif #ifndef BUFSIZ #define BUFSIZ 512 #endif #ifndef LOCAL_DOMAIN #define LOCAL_DOMAIN NULL #endif /* Global configuration variables */ char *configname=CONFIGFILE; char *nlbase=NULL; dom_trans *domtrans=NULL; moderator_list *approve=NULL; fa_list *whoami=NULL; fa_list *pwlist=NULL; fa_list *pktpwlist=NULL; fa_list *nllist=NULL; #ifdef DIRTY_CHRS fa_list *dirtychrslist=NULL; #endif modem_string *modemport=NULL; modem_string *phonetrans=NULL; modem_string *modemreset=NULL; modem_string *modemdial=NULL; modem_string *modemhangup=NULL; modem_string *modemaftercall=NULL; modem_string *modemok=NULL; modem_string *modemconnect=NULL; modem_string *modemerror=NULL; modem_string *options=NULL; area_list *badgroups=NULL; #ifdef GATEBAU_MSGID area_list *gatebaugroups=NULL; #endif long maxfsize=65536L; long maxpsize=0L; long maxmsize=12300L; long speed=0L; long maxgroups=0L; long timeoutreset=2L; long timeoutconnect=75L; long dialdelay=0L; char *oldfilemap=NULL; char maptab[] = { "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057" "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077" "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117" "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137" "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157" "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177" "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217" "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237" "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" }; char *name="Unknown"; char *location="Somewhere"; char *sysop="Sysop"; char *phone="-Unpublished-"; char *flags=""; char *inbound="/tmp"; char *norminbound=NULL; char *listinbound=NULL; char *protinbound=NULL; char *outbound=NULL; char *database=NULL; char *aliasfile=NULL; char *myfqdn=NULL; char *ftnmsgidstyle=NULL; char *localdomain=LOCAL_DOMAIN; char *sequence=NULL; char *sendmail=NULL; char *rnews=NULL; char *iftoss=NULL; char *packer=NULL; char *unzip=NULL; char *unarj=NULL; char *unlzh=NULL; char *unarc=NULL; char *unzoo=NULL; char *unrar=NULL; char *unjar=NULL; char *unsqz=NULL; char *unhpk=NULL; char *unuc2=NULL; char *unhap=NULL; char *unha=NULL; char *areafile=NULL; char *newslog=NULL; char *msgidbm=NULL; char *refdbm=NULL; char *pubdir=PUBDIR; char *reqmap=NULL; char *magic=NULL; char *debugfile=NULL; char *routefile=NULL; char *nonpacked=NULL; char *magicname=NULL; char *dosoutbound=NULL; char *maptabdir=MAPTABDIR; int defaultrfcchar=CHRS_DEFAULT_RFC; int defaultftnchar=CHRS_DEFAULT_FTN; int toftnchar=CHRS_NOTSET; time_t configtime=0L; /* Local */ static int verbset=0; static char *k,*v; static int linecnt=0; static int include_level=0; static dom_trans defdomtrans = {NULL,"fidonet","fidonet.org"}; /* External variables */ extern char *myname; extern char *version; extern char *reldate; extern char *copyright; extern char *logname; extern char *errname; extern unsigned long verbose; extern unsigned long setverbose(char*); extern void usage(void); /* parser prototypes */ static int getincl(char**); static int getstr(char**); static int getaddr(char**); static int getadnl(char**); static int getadpw(char**); static int getarea(char**); static int getmstr(char**); static int getdtrn(char**); static int getmdl(char**); static int getlong(char**); static int getverbose(char**); static int getdefcode(char**); /* check rfc charset names first */ static int getdefcode2(char**); /* checks FTN charset names first */ /* keyword table */ static struct _keytab { char *key; int (*prc)(char**); char** dest; } keytab[] = { {"include", getincl, NULL}, {"address", getaddr, (char**)&whoami}, {"password", getadpw, (char**)&pwlist}, {"packetpasswd",getadpw, (char**)&pktpwlist}, {"nodelist", getadnl, (char**)&nllist}, #ifdef DIRTY_CHRS {"dirtychrs", getadpw, (char**)&dirtychrslist}, #endif {"domtrans", getdtrn, (char**)&domtrans}, {"approve", getmdl, (char**)&approve}, {"modemport", getmstr, (char**)&modemport}, {"phonetrans", getmstr, (char**)&phonetrans}, {"modemreset", getmstr, (char**)&modemreset}, {"modemdial", getmstr, (char**)&modemdial}, {"modemhangup", getmstr, (char**)&modemhangup}, {"modemaftercall",getmstr, (char**)&modemaftercall}, {"modemok", getmstr, (char**)&modemok}, {"modemconnect",getmstr, (char**)&modemconnect}, {"modemerror", getmstr, (char**)&modemerror}, {"options", getmstr, (char**)&options}, {"badgroup", getarea, (char**)&badgroups}, #ifdef GATEBAU_MSGID {"gatebaugroup",getarea, (char**)&gatebaugroups}, #endif {"verbose", getverbose, (char**)&verbose}, {"maxfsize", getlong, (char**)&maxfsize}, {"maxpsize", getlong, (char**)&maxpsize}, {"maxmsize", getlong, (char**)&maxmsize}, {"speed", getlong, (char**)&speed}, {"maxgroups", getlong, (char**)&maxgroups}, {"timeoutreset",getlong, (char**)&timeoutreset}, {"timeoutconnect",getlong, (char**)&timeoutconnect}, {"dialdelay", getlong, (char**)&dialdelay}, {"name", getstr, &name}, {"location", getstr, &location}, {"sysop", getstr, &sysop}, {"phone", getstr, &phone}, {"flags", getstr, &flags}, {"inbound", getstr, &norminbound}, {"protinbound", getstr, &protinbound}, {"listinbound", getstr, &listinbound}, {"outbound", getstr, &outbound}, {"database", getstr, &database}, {"sysalias", getstr, &aliasfile}, {"myfqdn", getstr, &myfqdn}, {"ftnmsgidstyle", getstr, &ftnmsgidstyle}, {"localdomain", getstr, &localdomain}, {"sequencer", getstr, &sequence}, {"sendmail", getstr, &sendmail}, {"rnews", getstr, &rnews}, {"iftoss", getstr, &iftoss}, {"packer", getstr, &packer}, {"unzip", getstr, &unzip}, {"unarj", getstr, &unarj}, {"unlzh", getstr, &unlzh}, {"unarc", getstr, &unarc}, {"unzoo", getstr, &unzoo}, {"unrar", getstr, &unrar}, {"unjar", getstr, &unjar}, {"unsqz", getstr, &unsqz}, {"unhpk", getstr, &unhpk}, {"unuc2", getstr, &unuc2}, {"unhap", getstr, &unhap}, {"unha", getstr, &unha }, {"areas", getstr, &areafile}, {"newslog", getstr, &newslog}, {"msgidbm", getstr, &msgidbm}, {"refdbm", getstr, &refdbm}, {"public", getstr, &pubdir}, {"reqmap", getstr, &reqmap}, {"magic", getstr, &magic}, {"logfile", getstr, &logname}, {"errfile", getstr, &errname}, {"debugfile", getstr, &debugfile}, {"routefile", getstr, &routefile}, {"nonpacked", getstr, &nonpacked}, {"magicname", getstr, &magicname}, {"dosoutbound", getstr, &dosoutbound}, {"maptabdir", getstr, &maptabdir}, {"defaultrfcchar", getdefcode, (char**)&defaultrfcchar}, {"defaultftnchar", getdefcode2, (char**)&defaultftnchar}, {"toftnchar", getdefcode2, (char**)&toftnchar}, {NULL, NULL, NULL} }; /* public entry point */ int readconfig(void); int readconfig(void) { int maxrc=0,rc,i; FILE *fp; char buf[BUFSIZ],*p; struct stat st; if (stat(configname,&st) != 0) { fprintf(stderr,"readconfig: cannot stat file \"%s\" ", S(configname)); perror(""); return 1; } if (st.st_mtime > configtime) configtime=st.st_mtime; if ((fp=fopen(configname,"r")) == NULL) { fprintf(stderr,"readconfig: cannot open file \"%s\" ", S(configname)); perror(""); return 1; } if (include_level == 0) { logname=LOGFILE; errname=LOGFILE; debugfile=DEBUGFILE; } while (fgets(buf,sizeof(buf)-1,fp)) { linecnt++; if (*(p=buf+strlen(buf)-1) != '\n') { fprintf(stderr,"%s(%d): %s - line too long\n", configname,linecnt,buf); while (fgets(buf,sizeof(buf)-1,fp) && (*(p=buf+strlen(buf)-1) != '\n')); continue; } *p--='\0'; while ((p >= buf) && isspace(*p)) *p--='\0'; k=buf; while (*k && isspace(*k)) k++; p=k; while (*p && !isspace(*p)) p++; *p++='\0'; v=p; while (*v && isspace(*v)) v++; if ((*k == '\0') || (*k == '#')) { if (verbose & (1<<15)) fprintf(stderr,"%s(%d): \"%s\" \"%s\" - ignore\n", configname,linecnt,S(k),S(v)); continue; } if (verbose & (1<<15)) fprintf(stderr,"%s(%d): \"%s\" \"%s\" - parsed\n", configname,linecnt,S(k),S(v)); for (i=0;keytab[i].key;i++) if (strcasecmp(k,keytab[i].key) == 0) break; if (keytab[i].key == NULL) { fprintf(stderr,"%s(%d): %s %s - unknown keyword\n", configname,linecnt,S(k),S(v)); } else if ((rc=keytab[i].prc(keytab[i].dest)) > maxrc) maxrc=rc; } fclose(fp); if (include_level == 0) { if (whoami == NULL) { fprintf(stderr,"%s(EOF): address not specified\n", configname); if (maxrc < 1) maxrc=1; } #if 0 else if (whoami->addr->domain == NULL) { whoami->addr->domain=xstrcpy("fidonet"); } #endif if (outbound == NULL) { fprintf(stderr,"%s(EOF): outbound not specified\n", configname); if (maxrc < 1) maxrc=1; } if (whoami && (nllist == NULL)) { nllist=(fa_list*)xmalloc(sizeof(fa_list)); nllist->next=NULL; nllist->addr=whoami->addr; } if (whoami && (nllist->addr->domain == NULL)) nllist->addr->domain=whoami->addr->domain; if (norminbound) inbound=norminbound; if (protinbound == NULL) protinbound=inbound; if (listinbound == NULL) listinbound=inbound; if (errname == NULL) errname=logname; if (domtrans == NULL) domtrans=&defdomtrans; if (verbose & (1<<15)) { fprintf(stderr,"globals set in rdconfig:\n"); fprintf(stderr,"verbose: %lu\n",verbose); fprintf(stderr,"logname: %s\n",S(logname)); fprintf(stderr,"errname: %s\n",S(errname)); fprintf(stderr,"debugfile: %s\n",S(debugfile)); fprintf(stderr,"configname: %s\n",S(configname)); fprintf(stderr,"configtime: %s",ctime(&configtime)); } if (debugfile) freopen(debugfile,"a",stderr); debug(0,"start %s ver %s of %s, verbose 0x%08lx", myname,version,reldate,verbose); } return maxrc; } /* check option + optarg for being config option */ int confopt(c,arg) int c; char *arg; { switch (c) { case 'h': usage(); exit(0); case 'x': verbset=1; verbose=setverbose(arg); break; case 'I': configname=arg; break; default: return 1; /* unrecognized option */ } return 0; /* recognized option */ } void confusage(extra) char *extra; { #ifdef HAVE_LOCALE_H /* set up the correct locale */ setlocale(LC_MESSAGES, "" ); bindtextdomain(NLS_CAT_NAME, NLS_LOCALE_PATH); textdomain(NLS_CAT_NAME); #endif fprintf(stderr,_("%s ver. %s of %s; (c) %s\n"), myname,version,reldate,copyright); fprintf(stderr,_(" This is free software. You can do what you wish \ with it\n as long as this copyright notice is preserved.\n\n")); fprintf(stderr,_("usage: %s -h -x -I %s\n"),myname,S(extra)); fprintf(stderr,_("-h\t\tget this help\n")); fprintf(stderr,_("-x\t\tset debug level \t[%08lx]\n"), verbose); fprintf(stderr,_("\t\t may be a number from 0 to 32 to set `on'\n")); fprintf(stderr,_("\t\tbits from 1 to number, or a string of letters\n")); fprintf(stderr,_("\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n")); fprintf(stderr,_("-I\tuse config file\t\t[%s]\n"), configname); } /* parsers */ static int getincl(dest) char **dest; { int rc=0; char *saveconfigname=configname; int savelinecnt=linecnt; if (verbose & (1<<15)) fprintf(stderr,"getincl: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); configname=v; linecnt=0; include_level++; rc=readconfig(); include_level--; configname=saveconfigname; linecnt=savelinecnt; return rc; } static int getstr(dest) char **dest; { if (verbose & (1<<15)) fprintf(stderr,"getstr: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); *dest=xstrcpy(v); return 0; } static int addalist(fa_list**,char*,char*); static int addalist(lst,addr,nm) fa_list **lst; char *addr,*nm; { faddr *tmp; fa_list **tmpl; if (verbose & (1<<15)) fprintf(stderr,"addalist: %s(%d): %s %s\n", configname,linecnt,S(addr),S(nm)); if (nm && (*nm == '\0')) { fprintf(stderr,"%s(%d): no value for address %s\n", configname,linecnt,S(addr)); return 0; } if (addr) { if ((tmp=parsefnode(addr)) == NULL) { fprintf(stderr,"%s(%d): unparsable address %s\n", configname,linecnt,S(addr)); return 0; } } else { tmp=(faddr*)xmalloc(sizeof(faddr)); memset(tmp,0,sizeof(faddr)); } /* check for "" (that is a NULL name, it is used to specify * NULL passwords) */ if (nm && (*nm == '\"')) { if ((strlen(nm)==2) && (*(nm+1) == '\"')) *nm='\0'; } for (tmpl=lst;*tmpl;tmpl=&((*tmpl)->next)); *tmpl=(fa_list*)xmalloc(sizeof(fa_list)); (*tmpl)->next=NULL; (*tmpl)->addr=tmp; (*tmpl)->addr->name=xstrcpy(nm); return 0; } static int getaddr(dest) char **dest; { if (verbose & (1<<15)) fprintf(stderr,"getaddr: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); return addalist((fa_list**)dest,v,NULL); } static int getadnl(dest) char **dest; { char *p,*q,*tmp; int rc; if (verbose & (1<<15)) fprintf(stderr,"getadnl: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); p=v; while (*p && !isspace(*p)) p++; if (*p == '\0') p=NULL; else { *p++='\0'; while (*p && isspace(*p)) p++; } if (nlbase == NULL) { nlbase=xstrcpy(v); if (*nlbase != '/') nlbase[0]='\0'; if ((q=strrchr(nlbase,'/'))) *++q='\0'; if ((q=strrchr(v+1,'/'))) q++; else q=v; } else q=v; tmp=xstrcpy(nlbase); tmp=xstrcat(tmp,q); rc=addalist((fa_list**)dest,p,tmp); free(tmp); return rc; } static int getadpw(dest) char **dest; { char *p; if (verbose & (1<<15)) fprintf(stderr,"getadpw: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); p=v; while (*p && !isspace(*p)) p++; if (*p == '\0') { fprintf(stderr,"%s(%d): no password for address %s\n", configname,linecnt,S(v)); return 0; } *p++='\0'; while (*p && isspace(*p)) p++; return addalist((fa_list**)dest,v,p); } static int getarea(dest) char **dest; { area_list **tmpl; if (verbose & (1<<15)) fprintf(stderr,"getarea: %s(%d): %s %s\n", configname,linecnt,k,v); for (tmpl=(area_list**)dest;*tmpl;tmpl=&((*tmpl)->next)); *tmpl=(area_list*)xmalloc(sizeof(area_list)); (*tmpl)->next=NULL; (*tmpl)->name=xstrcpy(v); return 0; } static int getmstr(dest) char **dest; { modem_string **tmpm; int dep=0; char *p,*q; if (verbose & (1<<15)) fprintf(stderr,"getmstr: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); if (*v == '(') { p=v+1; q=v; do { if (*q == '(') dep++; if (*q == ')') dep--; } while (dep && *q++); if (*q == '\0') { fprintf(stderr,"%s(%d): %s - unbalanced brackets\n", configname,linecnt,S(v)); return 0; } *q++='\0'; while (*q && isspace(*q)) q++; if (*q == '\0') { fprintf(stderr,"%s(%d): %s - no value for expression\n", configname,linecnt,S(p)); return 0; } } else { p=NULL; q=v; } for (tmpm=(modem_string**)dest;*tmpm;tmpm=&((*tmpm)->next)); (*tmpm)=(modem_string *) xmalloc(sizeof(modem_string)); (*tmpm)->next=NULL; (*tmpm)->expr=xstrcpy(p); (*tmpm)->line=xstrcpy(q); if (verbose & (1<<15)) fprintf(stderr,"getmstr: %s(%d): expr \"%s\" line \"%s\"\n", configname,linecnt,S(p),S(q)); return 0; } static int getdtrn(dest) char **dest; { dom_trans **tmpm; char *p; if (verbose & (1<<15)) fprintf(stderr,"getdtrn: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); for (p=v;*p && !isspace(*p);p++); if (*p) *p++='\0'; while (*p && isspace(*p)) p++; if (*p == '\0') { fprintf(stderr,"%s(%d): less than two tokens in domtrans", configname,linecnt); } else { for (tmpm=(dom_trans**)dest;*tmpm;tmpm=&((*tmpm)->next)); (*tmpm)=(dom_trans *) xmalloc(sizeof(dom_trans)); (*tmpm)->next=NULL; (*tmpm)->ftndom=xstrcpy(v); (*tmpm)->intdom=xstrcpy(p); if (verbose & (1<<15)) fprintf(stderr,"getdtrn: %s(%d): expr \"%s\" line \"%s\"\n", configname,linecnt,S(v),S(p)); } return 0; } static int getmdl(dest) char **dest; { moderator_list **tmpm; char *p; if (verbose & (1<<15)) fprintf(stderr,"getmdl: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); for (p=v;*p && !isspace(*p);p++); if (*p) *p++='\0'; while (*p && isspace(*p)) p++; if (*p == '\0') { fprintf(stderr,"%s(%d): less than two tokens in moderator list", configname,linecnt); } else { for (tmpm=(moderator_list**)dest;*tmpm;tmpm=&((*tmpm)->next)); (*tmpm)=(moderator_list *) xmalloc(sizeof(moderator_list)); (*tmpm)->next=NULL; (*tmpm)->prefix=xstrcpy(v); (*tmpm)->address=xstrcpy(p); if (verbose & (1<<15)) fprintf(stderr,"getmdl: %s(%d): expr \"%s\" line \"%s\"\n", configname,linecnt,S(v),S(p)); } return 0; } static int getlong(dest) char **dest; { if (verbose & (1<<15)) fprintf(stderr,"getlong: %s(%d): %s %s\n", configname,linecnt,k,v); if (strspn(v,"0123456789") != strlen(v)) fprintf(stderr,"%s(%d): %s %s - bad numeric\n", configname,linecnt,S(k),S(v)); else *((long*)dest)=atol(v); return 0; } static int getverbose(dest) char **dest; { if (verbose & (1<<15)) fprintf(stderr,"getverbose: %s(%d): %s %s\n", configname,linecnt,S(k),S(v)); if (verbset) { if (verbose & (1<<15)) fprintf(stderr,"getverbose: already set, ignore\n"); return 0; } *((unsigned long*)dest)=setverbose(v); if (verbose & (1<<15)) fprintf(stderr,"getverbose: %lu\n", *((unsigned long*)dest)); return 0; } static int getdefcode(dest) char **dest; { int charset; if (verbose & (1<<15)) fprintf(stderr,"getdefcode: %s(%d): %s %s\n", configname,linecnt,k,v); charset=getcode(v); if ( charset == CHRS_NOTSET) charset=readchrs(v); if ( charset != CHRS_NOTSET) *((int*)dest)=charset; return 0; } static int getdefcode2(dest) char **dest; { int charset; if (verbose & (1<<15)) fprintf(stderr,"getdefcode2: %s(%d): %s %s\n", configname,linecnt,k,v); charset=readchrs(v); if ( charset == CHRS_NOTSET) charset=getcode(v); if ( charset != CHRS_NOTSET) *((int*)dest)=charset; return 0; } #ifdef TESTING int main(argc,argv) int argc; char *argv[]; { verbose = 1<<15; if (argv[1]) configname=argv[1]; return readconfig(); } #endif ifmail-2.14tx8.10.orig/iflib/ftn.c100644 1751 50 26004 6540753002 14211 0ustar mdsrc/* ### Modified by P.Saratxaga on 13 Dec 1995 ### * - commented out the line cuting lenght of ->name to MAXNAME (35) * it is done in mail.c and/or mkftnhdr.c * I've done this to allow the code in ifmail.c which puts 'UUCP' when * the 'to' address in netmail mode has a lenght greater than MAXNAME * instead of just truncating the adress * - sometimes, in MSGID, there is '"1:215/33@FIDO NET" 12458aba' * so I added a line to check not only "username ftnadress" but also * "ftnadress username" in parsefnode * - added support for domain#zone:net/node[.point] format of addresses * - rewritted ascinode() to avoid unvalid characters in rfc822 address * - added support for 8bit and some other strange/forbidden chars in the * adresses, so rfc <--> FTN conversion of addresses don't loses them when * rewritting back the FTN 'to' field. (specially is the '.' '"' and '\') * - added chkftnmsgid(messageid) returns 1 if it is a converted FTN MSGID * 0 otherwise (a true rfc Message-ID) */ #include #include #include #include #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "rfcaddr.h" #include "config.h" #include "mime.h" #ifndef MAXUSHORT #define MAXUSHORT 65535 #endif #ifndef BLANK_SUBS #define BLANK_SUBS '.' #endif void tidy_faddr(addr) faddr *addr; { if (addr == NULL) return; if (addr->name) free(addr->name); if (addr->domain) free(addr->domain); free(addr); } void tidy_falist(fap) fa_list **fap; { fa_list *tmp,*old; debug(8,"tidy_falist beginning from %s", *fap?ascinode((*fap)->addr,0x06):""); for (tmp=*fap;tmp;tmp=old) { old=tmp->next; tidy_faddr(tmp->addr); free(tmp); } *fap=NULL; } faddr *parsefaddr(s) char *s; { faddr *tmpaddr=NULL; parsedaddr rfcaddr; int gotzone=0,gotnet=0,gotnode=0,gotpoint=0; int zone=0,net=0,node=0,point=0; char *domain=NULL,*freename=NULL; long num; char *p,*q,*t; int quoted; int l; dom_trans *dt; rfcaddr.target=NULL; rfcaddr.remainder=NULL; rfcaddr.comment=NULL; t=xstrcpy(s); if (*(q=t+strlen(t)-1) == '\n') *q='\0'; if (((*(p=t) == '(') && (*(q=p+strlen(p)-1) == ')')) || ((*p == '\"') && (*q == '\"'))) { p++; *q='\0'; } if (strchr(s,'@') || strchr(s,'%') || strchr(s,'!')) rfcaddr=parserfcaddr(p); else { addrerror=0; rfcaddr.target=xstrcpy(p); } free(t); if ((addrerror) || (rfcaddr.target == NULL)) goto leave; p=rfcaddr.target; for (dt=domtrans;dt;dt=dt->next) { q=p+strlen(p)-strlen(dt->intdom); if ((q >= p) && (strcasecmp(dt->intdom,q) == 0)) { *q='\0'; q=xmalloc(strlen(p)+strlen(dt->ftndom)+1); strcpy(q,p); strcat(q,dt->ftndom); p=q; free(rfcaddr.target); rfcaddr.target=p; break; } } if (((l=strlen(rfcaddr.target)) > 4) && (strcasecmp(rfcaddr.target+l-4,".ftn") == 0)) { rfcaddr.target[l-4]='\0'; } for (p=strtok(rfcaddr.target,"."); p; p=strtok(NULL,".")) { if (((l=strlen(p+1)) > 0) && (l <= 5) && (strspn(p+1,"0123456789") == l)) { num=atol(p+1); switch (*p) { case 'z': case 'Z': gotzone++; if (num > MAXUSHORT) addrerror |= ADDR_BADTOKEN; zone=num; break; case 'n': case 'N': gotnet++; if (num > MAXUSHORT) addrerror |= ADDR_BADTOKEN; net=num; break; case 'f': case 'F': gotnode++; if (num > MAXUSHORT) addrerror |= ADDR_BADTOKEN; node=num; break; case 'p': case 'P': gotpoint++; if (num > MAXUSHORT) addrerror |= ADDR_BADTOKEN; point=num; break; default: if (gotnet && gotnode) { if (domain == NULL) domain=xstrcpy(p); } else addrerror |= ADDR_BADTOKEN; break; } } else /* not "cNNNN" token */ { if (gotnet && gotnode) { if (domain == NULL) domain=xstrcpy(p); } else addrerror |= ADDR_BADTOKEN; } } if ((gotzone > 1) || (gotnet != 1) || (gotnode != 1) || (gotpoint > 1)) { addrerror |= ADDR_BADSTRUCT; } if (addrerror) goto leave; if (rfcaddr.remainder) { quoted=0; if ((*(p=rfcaddr.remainder) == '\"') && (*(q=p+strlen(p)-1) == '\"')) { p++; *q='\0'; quoted=1; } if (strchr(p,'@') || strchr(p,'%') || strchr(p,'!')) { if (((q=strrchr(p,'%'))) && !strchr(p,'@')) *q='@'; } else if ((!quoted) && (!strchr(p,' '))) { for (q=p;*q;q++) { if (*q == BLANK_SUBS) *q=' '; else if (*q == '.') *q=' '; else if (*q == '_') *q=' '; } } for (q=p;*q;q++) { if ((*q == '\\') && ((*(q+1) == '"') || ((*(q+1) == '\\') && (!quoted)))) { *q='\0'; strcat(p,q+1); } } /* if (strlen(p) > MAXNAME) p[MAXNAME]='\0'; */ /* ##### */ if (strspn(p," ") != strlen(p)) freename=xstrcpy(qp_decode(p)); } tmpaddr=(faddr*)xmalloc(sizeof(faddr)); tmpaddr->zone=zone; tmpaddr->net=net; tmpaddr->node=node; tmpaddr->point=point; tmpaddr->domain=domain; domain=NULL; tmpaddr->name=freename; freename=NULL; leave: if (domain) free(domain); if (freename) free(freename); tidyrfcaddr(rfcaddr); return tmpaddr; } faddr *parsefnode(s) char *s; { faddr addr,*tmp; char *buf,*str,*p,*q,*n; int good = 1; if (s == NULL) return NULL; str=buf=xstrcpy(s); while (isspace(*str)) str++; if (*(p=str+strlen(str)-1) == '\n') *(p--)='\0'; while (isspace(*p)) *(p--) = '\0'; p=str + strlen(str) - 1; if (((*str == '(') && (*p == ')')) || ((*str == '\"') && (*p == '\"')) || ((*str == '\'') && (*p == '\'')) || ((*str == '<') && (*p == '>')) || ((*str == '[') && (*p == ']')) || ((*str == '{') && (*p == '}'))) { str++; *p='\0'; } addr.name=NULL; if ((p=strrchr(str,' '))) { n=str; str=p+1; while (isspace(*p)) *(p--) = '\0'; if (!strcasecmp(p-2," of")) *(p-2) = '\0'; else if (!strcasecmp(p-1," @")) *(p-1) = '\0'; p-=3; while (isspace(*p) || (*p == ',')) *(p--) = '\0'; if (strlen(n) > MAXNAME) n[MAXNAME]='\0'; if (*n != '\0') addr.name=xstrcpy(n); } if ((p=strrchr(str,'@'))) *(p++)='\0'; else if ((p=strrchr(str,'%'))) *(p++)='\0'; else if ((q=strrchr(str,'#'))) { *(q++)='\0'; p=str; str=q; } /* ### */ /* Has yet to be improved */ else if (addr.name && (strrchr(addr.name,'@'))) { str=xstrcpy(addr.name); if ((p=strrchr(str,'@'))) *(p++)='\0'; else if ((p=strrchr(str,'%'))) *(p++)='\0'; } /* ### */ else p=NULL; if (p && ((q=strchr(p,'.')))) *q='\0'; addr.point=0; addr.node=0; addr.net=0; addr.zone=0; addr.domain=xstrcpy(p); if ((p=strchr(str,':'))) { *(p++)='\0'; if (strspn(str,"0123456789") == strlen(str)) addr.zone=atoi(str); else if (strcmp(str,"*") == 0) addr.zone=-1; else good=0; str=p; } if ((p=strchr(str,'/'))) { *(p++)='\0'; if (strspn(str,"0123456789") == strlen(str)) addr.net=atoi(str); else if (strcmp(str,"*") == 0) addr.net=-1; else good=0; str=p; } if ((p=strchr(str,'.'))) { *(p++)='\0'; if (strspn(str,"0123456789") == strlen(str)) addr.node=atoi(str); else if (strcmp(str,"*") == 0) addr.node=-1; else good=0; str=p; } else { if (strspn(str,"0123456789") == strlen(str)) addr.node=atoi(str); else if (strcmp(str,"*") == 0) addr.node=-1; else good=0; str=NULL; } if (str) { if (strspn(str,"0123456789") == strlen(str)) addr.point=atoi(str); else if (strcmp(str,"*") == 0) addr.point=-1; else good=0; } if (buf) free(buf); if (good) { tmp=(faddr *)xmalloc(sizeof(addr)); tmp->name=addr.name; tmp->domain=addr.domain; tmp->point=addr.point; tmp->node=addr.node; tmp->net=addr.net; tmp->zone=addr.zone; return tmp; } else { if (addr.name) free(addr.name); if (addr.domain) free(addr.domain); return NULL; } } char *ascinode(a,fl) faddr *a; int fl; { static char buf[128],*f,*t,*q; dom_trans *dt; fa_list *tmpl; int skip; if (a == NULL) { strcpy(buf,""); return buf; } buf[0]='\0'; if ((fl & 0x80) && (a->name)) { if ((strchr(a->name,'.')) || (strchr(a->name,'@')) || (strchr(a->name,'\'')) || (strchr(a->name,',')) || (strchr(a->name,'<')) || (strchr(a->name,'>'))) sprintf(buf+strlen(buf),"\"%s\" <",a->name); else sprintf(buf+strlen(buf),"%s <",a->name); } if ((fl & 0x40) && (a->name)) { f=qp_encode(a->name,0); t=buf+strlen(buf); skip=0; if ((!strchr(f,'@')) && ((strchr(f,BLANK_SUBS)) || (strchr(f,'.')) || (strchr(f,'_')))) { skip=1; *t++='"'; } while (*f) { switch (*f) { case '_': case '.': *t++=*f; break; case ' ': if (!skip) *t++=BLANK_SUBS; else { *t++='='; *t++='2'; *t++='0'; } break; case ',': { /* "," is a problem on mail addr */ if (!skip) *t++='\\'; *t++='='; *t++='2'; *t++='c'; } case '@': if (skip) { *t++='"'; skip=0; } *t++='%'; break; case '"': *t++='\\'; *t++=*f; break; case '>': case '<': case '\'': if (!skip) *t++='\\'; *t++=*f; break; default: if ((((*f & 0xff) > 0x29) && ((*f & 0xff) < 0x3a)) || (((*f & 0xff) > 0x40) && ((*f & 0xff) < 0x5b)) || (((*f & 0xff) > 0x60) && ((*f & 0xff) < 0x7b))) *t++=*f; else { if (!skip) *t++='\\'; *t++=*f; } break; } f++; } if (skip) *t++='"'; skip=0; *t++='@'; *t++='\0'; } if ((fl & 0x01) && (a->point)) sprintf(buf+strlen(buf),"p%u.",a->point); if (fl & 0x02) sprintf(buf+strlen(buf),"f%u.",a->node); if (fl & 0x04) sprintf(buf+strlen(buf),"n%u.",a->net); if ((fl & 0x08) && (a->zone)) sprintf(buf+strlen(buf),"z%u.",a->zone); buf[strlen(buf)-1]='\0'; if (fl & 0x10) { if (a->domain) sprintf(buf+strlen(buf),".%s",a->domain); } if (fl & 0x20) { if (a->domain) { if ((fl & 0x10) == 0) sprintf(buf+strlen(buf),".%s",a->domain); } else { for (tmpl=nllist;tmpl;tmpl=tmpl->next) if (tmpl->addr->zone == a->zone) break; if (tmpl && tmpl->addr->domain) sprintf(buf+strlen(buf),".%s", tmpl->addr->domain); else sprintf(buf+strlen(buf),".fidonet"); } for (dt=domtrans;dt;dt=dt->next) { q=buf+strlen(buf)-strlen(dt->ftndom); if ((q >= buf) && (strcasecmp(dt->ftndom,q) == 0)) { strcpy(q,dt->intdom); break; } } if (dt == NULL) sprintf(buf+strlen(buf),".ftn"); } if ((fl & 0x80) && (a->name)) sprintf(buf+strlen(buf),">"); return buf; } char *ascfnode(a,fl) faddr *a; int fl; { static char buf[128]; if (a == NULL) { strcpy(buf,""); return buf; } buf[0]='\0'; if ((fl & 0x40) && (a->name)) sprintf(buf+strlen(buf),"%s of ",a->name); if ((fl & 0x08) && (a->zone)) sprintf(buf+strlen(buf),"%u:",a->zone); if (fl & 0x04) sprintf(buf+strlen(buf),"%u/",a->net); if (fl & 0x02) sprintf(buf+strlen(buf),"%u",a->node); if ((fl & 0x01) && (a->point)) sprintf(buf+strlen(buf),".%u",a->point); if ((fl & 0x10) && (a->domain)) sprintf(buf+strlen(buf),"@%s",a->domain); return buf; } int chkftnmsgid(msgid) char *msgid; { faddr *p; while (isspace(*msgid)) msgid++; if ((p=parsefaddr(msgid))) { if (p->name && (strspn(p->name,"0123456789") == strlen(p->name))) return 1; } else if ((!strncmp(msgid," #include #include #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "bwrite.h" #ifdef PKT_2_2 #undef FSC_0048 /* mutually exclusive */ #define HDR_RATE 2 #define HDR_VER 2 #define HDR_PRODX 0x0000 #define HDR_FILLER 0x0000 #define HDR_PRODDATA 0L #else #define HDR_RATE 19200 #define HDR_VER 2 #define HDR_PRODX 0x0000 #define HDR_FILLER 0x0000 #define HDR_CAPVALID 0x0100 #define HDR_PRODCODE 0x0201 #define HDR_CAPWORD 0x0001 #define HDR_PRODDATA 0L #endif char passwd[9] = "\0\0\0\0\0\0\0\0"; static FILE *pktfp=NULL; static faddr pktroute = { NULL,0,0,0,0,NULL }; void closepkt(void); extern char *pktname(faddr *,char); extern char *floname(faddr *,char); #ifndef PATH_MAX #define PATH_MAX 512 #endif void mkdirs(name) char *name; { char buf[PATH_MAX],*p,*q; int rc; strncpy(buf,name,sizeof(buf)-1); buf[sizeof(buf)-1]='\0'; debug(2,"creating directory tree for \"%s\"",buf); p=buf+1; while ((q=strchr(p,'/'))) { *q='\0'; rc=mkdir(buf,0700); debug(2,"mkdir(\"%s\") errno %d",buf,rc?errno:0); *q='/'; p=q+1; } } FILE *openpkt(pkt,addr,flavor) FILE *pkt; faddr *addr; char flavor; { off_t pos; struct flock fl; struct stat st; char *name,*pktpassword; struct tm *ptm; fa_list *pa; time_t t; int i; faddr *bestaka; debug(3,"openpkt entered"); if (pkt == NULL) { if (pktfp) { debug(3,"packet opened, check address"); if (metric(addr,&pktroute) == 0) { debug(3,"same address"); if ((maxpsize == 0L) || ((fstat(fileno(pktfp),&st) == 0) && (st.st_size < maxpsize))) { debug(3,"return existing fp"); return pktfp; } debug(3,"packet too big, open new"); closepkt(); } else { debug(3,"address changed, closing fp"); closepkt(); } } debug(3,"open new packet file"); pktroute.zone=addr->zone; pktroute.net=addr->net; pktroute.node=addr->node; pktroute.point=addr->point; pktroute.domain=xstrcpy(addr->domain); pktroute.name=NULL; pktpassword=NULL; /* look at packet passwords */ for (pa=pktpwlist;pa;pa=pa->next) { if (metric(pa->addr,addr) == 0) pktpassword=pa->addr->name; } /* if not found, look at general (connections) passwords */ if (!pktpassword) for (pa=pwlist;pa;pa=pa->next) { if (metric(pa->addr,addr) == 0) pktpassword=pa->addr->name; } if (pktpassword) strncpy(passwd,pktpassword,8); name=pktname(addr,flavor); mkdirs(name); if ((pktfp=fopen(name,"r+")) == NULL) pktfp=fopen(name,"w"); if (pktfp == NULL) { logerr("$Unable to open packet %s",S(name)); return NULL; } fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if (fcntl(fileno(pktfp),F_SETLKW,&fl) < 0) { logerr("$Unable to lock packet %s",S(name)); fclose(pktfp); return NULL; } pkt=pktfp; pos=fseek(pkt,-2L,SEEK_END); debug(2,"fseek (pkt,-2L,SEEK_END) result is %ld",(long)pos); } pos=ftell(pkt); debug(3,"ftell (pkt) result is %ld",(long)pos); if (pos <= 0L) { #ifdef NEGATIVE_SEEK_BUG fseek(pkt,0L,SEEK_SET); #endif time(&t); ptm=localtime(&t); bestaka=bestaka_s(addr); iwrite(bestaka->node ,pkt); iwrite(addr->node ,pkt); #ifdef PKT_2_2 iwrite(bestaka->point ,pkt); iwrite(addr->point ,pkt); iwrite(HDR_FILLER ,pkt); iwrite(HDR_FILLER ,pkt); iwrite(HDR_FILLER ,pkt); iwrite(HDR_FILLER ,pkt); #else iwrite(ptm->tm_year+1900 ,pkt); iwrite(ptm->tm_mon ,pkt); iwrite(ptm->tm_mday ,pkt); iwrite(ptm->tm_hour ,pkt); iwrite(ptm->tm_min ,pkt); iwrite(ptm->tm_sec ,pkt); #endif iwrite(HDR_RATE ,pkt); iwrite(HDR_VER ,pkt); #ifdef FSC_0048 if (bestaka->point!=0) iwrite(-1 ,pkt); else #endif iwrite(bestaka->net ,pkt); iwrite(addr->net ,pkt); iwrite(HDR_PRODX ,pkt); for (i=0;i<8;i++) putc(passwd[i],pkt); iwrite(bestaka->zone,pkt); if (addr->zone) iwrite(addr->zone,pkt); else iwrite(bestaka->zone,pkt); #ifdef PKT_2_2 for (i=0;i<8;i++) (*(bestaka->domain)+i) ? putc(*(bestaka->domain)+i),pkt) : putc('\0',pkt); for (i=0;i<8;i++) (*(addr->domain)+i) ? putc(*(addr->domain+i),pkt) : putc('\0',pkt); #else #ifdef FSC_0048 if (bestaka->point!=0) iwrite(bestaka->net,pkt); else #endif iwrite(HDR_FILLER ,pkt); iwrite(HDR_CAPVALID ,pkt); iwrite(HDR_PRODCODE ,pkt); iwrite(HDR_CAPWORD ,pkt); iwrite(bestaka->zone,pkt); if (addr->zone) iwrite(addr->zone,pkt); else iwrite(bestaka->zone,pkt); iwrite(bestaka->point,pkt); iwrite(addr->point ,pkt); #endif lwrite(HDR_PRODDATA ,pkt); } return pkt; } FILE *openflo(addr,flavor) faddr *addr; char flavor; { FILE *flo; struct flock fl; char *name; debug(3,"openflo entered"); name=floname(addr,flavor); mkdirs(name); if ((flo=fopen(name,"r+")) == NULL) flo=fopen(name,"w"); if (flo == NULL) { logerr("$Unable to open flo file %s",S(name)); return NULL; } fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if (fcntl(fileno(flo),F_SETLKW,&fl) < 0) { logerr("$Unable to lock flo file %s",S(name)); fclose(flo); return NULL; } return flo; } void closepkt(void) { debug(3,"closepkt entered"); if (pktfp) { iwrite(0,pktfp); fclose(pktfp); /* close also discards lock */ } pktfp=NULL; if (pktroute.domain) free(pktroute.domain); } ifmail-2.14tx8.10.orig/iflib/pktname.c100644 1751 50 11743 6374437254 15102 0ustar mdsrc/* This module hopefully implements BinkleyTerm packet naming conventions */ #include #include #include #include "directory.h" #include #include #include #include #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "config.h" #ifndef PATH_MAX #define PATH_MAX 512 #endif #ifndef FAKEDIR #define FAKEDIR "/tmp/ifmail/" #endif #define ptyp "ut" #define ftyp "lo" #define ttyp "pk" #define rtyp "req" #define styp "spl" #define btyp "bsy" #define qtyp "sts" extern unsigned INT32 sequencer(void); int fakeoutbound=0; static char buf[PATH_MAX]; static char *prepbuf(faddr*); static char *prepbuf(addr) faddr *addr; { char *p,*domain=NULL; char zpref[8]; fa_list *tmpl; if (fakeoutbound) { strcpy(buf,FAKEDIR); if (whoami->addr->domain) strcat(buf,whoami->addr->domain); else strcat(buf,"fidonet"); } else { strcpy(buf,outbound); } if (addr->domain) domain=addr->domain; else for (tmpl=nllist;tmpl;tmpl=tmpl->next) if (tmpl->addr->zone == addr->zone) { domain=tmpl->addr->domain; break; } debug(1,"using domain \"%s\" for outbound",S(domain)); if ((domain != NULL) && (whoami->addr->domain != NULL) && (strcasecmp(domain,whoami->addr->domain) != 0)) { debug(1,"this is not our primary domain"); if ((p=strrchr(buf,'/'))) p++; else p=buf; strcpy(p,domain); for (;*p;p++) *p=tolower(*p); for (tmpl=nllist;tmpl;tmpl=tmpl->next) if ((tmpl->addr->domain) && (strcasecmp(tmpl->addr->domain,domain) == 0)) break; if (tmpl && (tmpl->addr->zone == addr->zone)) zpref[0]='\0'; else sprintf(zpref,".%03x",addr->zone); } else /* this is our primary domain */ { debug(1,"this is our primary domain"); if ((addr->zone == 0) || (addr->zone == whoami->addr->zone)) zpref[0]='\0'; else sprintf(zpref,".%03x",addr->zone); } p=buf+strlen(buf); if (addr->point) sprintf(p,"%s/%04x%04x.pnt/%08x.", zpref,addr->net,addr->node,addr->point); else sprintf(p,"%s/%04x%04x.",zpref,addr->net,addr->node); p=buf+strlen(buf); return p; } char *pktname(addr,flavor) faddr *addr; char flavor; { char *p; struct stat st; char newname[PATH_MAX]; if (is_local(addr) && !fakeoutbound) { debug(1,"local address, put packet into inbound"); strncpy(buf,protinbound,sizeof(buf)-10); sprintf(buf+strlen(buf),"/%08lx.pkt", (unsigned long)sequencer()); } else { p=prepbuf(addr); if (flavor == 'f') flavor='o'; if (maxpsize && (strchr(nonpacked,flavor) == 0)) { sprintf(p,"%c%s/current.tmp",flavor,ttyp); if ((stat(buf,&st) == 0) && (st.st_size >= maxpsize)) { strcpy(newname,buf); sprintf(newname+strlen(newname)-11, "%08lx.pkt",(unsigned long)sequencer()); if (rename(buf,newname)) logerr("$error renaming \"%s\" to \"%s\"", S(buf),S(newname)); } } else { sprintf(p,"%c%s",flavor,ptyp); } } debug(1,"packet name is \"%s\"",buf); return buf; } char *floname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'o') flavor='f'; sprintf(p,"%c%s",flavor,ftyp); debug(1,"flo file name is \"%s\"",buf); return buf; } char *reqname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'o') flavor='f'; /* in fact this is ignored for reqs */ sprintf(p,"%s",rtyp); debug(1,"req file name is \"%s\"",buf); return buf; } char *splname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'o') flavor='f'; /* in fact this is ignored for spls */ sprintf(p,"%s",styp); debug(1,"spl file name is \"%s\"",buf); return buf; } char *bsyname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'o') flavor='f'; /* in fact this is ignored for bsys */ sprintf(p,"%s",btyp); debug(1,"bsy file name is \"%s\"",buf); return buf; } char *stsname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'o') flavor='f'; /* in fact this is ignored for bsys */ sprintf(p,"%s",qtyp); debug(1,"sts file name is \"%s\"",buf); return buf; } char *pkdname(addr,flavor) faddr *addr; char flavor; { char *p; p=prepbuf(addr); if (flavor == 'f') flavor='o'; sprintf(p,"%c%s",flavor,ttyp); while ((p > buf) && (*p != '/')) p--; p++; debug(1,"pkd name is \"%s\"",p); return p; } static char *dow[] = {"su","mo","tu","we","th","fr","sa"}; char *arcname(addr,flavor) faddr *addr; char flavor; { char *p; char *ext; time_t tt; struct tm *ptm; faddr *bestaka; (void)time(&tt); ptm=localtime(&tt); ext=dow[ptm->tm_wday]; bestaka=bestaka_s(addr); (void)prepbuf(addr); p=strrchr(buf,'/'); if (addr->point) { sprintf(p,"/%04x%04x.%s0", ((bestaka->net) - (addr->net)) & 0xffff, ((bestaka->node) - (addr->node) + (addr->point)) & 0xffff, ext); } else { sprintf(p,"/%04x%04x.%s0", ((bestaka->net) - (addr->net)) & 0xffff, ((bestaka->node) - (addr->node)) & 0xffff, ext); } debug(1,"arc file name is \"%s\" (flavor '%c' ignored)",buf,flavor); return buf; } ifmail-2.14tx8.10.orig/iflib/bwrite.c100644 1751 50 2413 6240214065 14672 0ustar mdsrc/* ### Modified by P.Saratxaga on 29 Oct 1995 ### * - deleted transcodage (outtab & intab) code (now transcodage is done by * strconv() function. */ #include #include #include "bwrite.h" #include "config.h" /* write short (16bit) integer in "standart" byte order */ int iwrite(i,fp) int i; FILE *fp; { putc(i & 0xff,fp); putc((i >> 8) & 0xff,fp); return 0; } /* write long (32bit) integer in "standart" byte order */ int lwrite(i,fp) long i; FILE *fp; { int c; for (c=0;c<32;c+=8) putc((i >> c) & 0xff,fp); return 0; } int awrite(s,fp) char *s; FILE *fp; { if (s) while (*s) putc(*(s++), fp); putc(0,fp); return 0; } /* write an arbitrary line to message body: change \n to \r, if a line starts with three dashes, insert a dash and a blank */ int cwrite(s,fp) char *s; FILE *fp; { #ifdef PGP_LIKE_DASHES if ((strlen(s) >= 3) && (strncmp(s,"---",3) == 0) && (s[3] != '-')) { putc('-',fp); putc(' ',fp); } #endif while (*s) { if (*s == '\n') putc('\r',fp); else putc(*s, fp); s++; } return 0; } /* write (multiline) header to kluge: change \n to ' ' and end line with \r */ int kwrite(s,fp) char *s; FILE *fp; { while (*s) { if (*s != '\n') putc(*s, fp); else if (*(s+1)) putc(' ',fp); s++; } putc('\r',fp); return 0; } ifmail-2.14tx8.10.orig/iflib/bread.c100644 1751 50 2442 6213176012 14454 0ustar mdsrc/* ### Modified by P.Saratxaga on 29 Oct 1995 ### * - deleted transcodage (outtab & intab) code (now transcodage is done by * strconv() function. * - added IGNORE_SOFTCR option from T.Tanaka. * - added pgpsigned. If true then text is unchanged PGP */ #include #include "bread.h" #include "config.h" #ifndef IGNORE_SOFTCR extern int pgpsigned; #endif /* read short (16bit) integer in "standart" byte order */ int iread(fp) FILE *fp; { unsigned char lo,hi; fread(&lo,1,1,fp); fread(&hi,1,1,fp); return (hi<<8) | lo; } /* read long (32bit) integer in "standart" byte order */ long lread(fp) FILE *fp; { int c; unsigned char buf; long ret=0L; for (c=0;c<32;c+=8) { fread(&buf,1,1,fp); ret |= ((unsigned long)buf << c); } return ret; } static int at_zero=0; char *aread(s,count,fp) char *s; int count; FILE *fp; { int i,c,next; if (feof(fp)) return(NULL); if (s == NULL) return NULL; if (at_zero) { at_zero=0; return NULL; } for (i=0,next=1;(i #include #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "bread.h" #include "config.h" #define min(a,b) ((a) <= (b) ? (a) : (b)) faddr pktfrom; char pktpwd[9]; int getheader(f,t,pkt) faddr *f,*t; FILE *pkt; { int i,pwdok; int capword,capvalid; int tome,pointcheck; int pkt_sub; fa_list *al; char *p,*pktpassword; f->domain=NULL; f->name=NULL; t->domain=NULL; t->name=NULL; debug(5,"from node: %u",f->node=iread(pkt)); debug(5,"to node: %u",t->node=iread(pkt)); debug(5,"year : %u",capword=iread(pkt)); debug(5,"month : %u",capvalid=iread(pkt)); debug(5,"day : %u",iread(pkt)); debug(5,"hour : %u",iread(pkt)); debug(5,"min : %u",iread(pkt)); debug(5,"sec : %u",iread(pkt)); debug(5,"rate : %u",pkt_sub=iread(pkt)); if (pkt_sub==2) { debug(5,"In fact it is a pkt 2.2 packet; so we have"); debug(5,"from pnt : %u",f->point=capword); debug(5,"to pnt : %u",t->point=capvalid); debug(5,"subver : %u",pkt_sub); debug(5,"instead of year, month and rate respectively"); debug(5,"(hour, min, sec are meaningless)"); } else { pkt_sub=0; /* keep pkt sub version at 0 */ } debug(5,"ver : %u",iread(pkt)); f->net=iread(pkt); if ((f->net==-1) && (pkt_sub==0)) { debug(5,"This is an fsc-0048 packet from a point"); } else { debug(5,"from net : %u",f->net); } debug(5,"to net : %u",t->net=iread(pkt)); debug(5,"prodx : 0x%04x",iread(pkt)); for (i=0;i<8;i++) pktpwd[i]=getc(pkt); pktpwd[8]='\0'; for (p=pktpwd+7;(p >= pktpwd) && (*p == ' ');p--) *p='\0'; debug(5,"password : %s",pktpwd); if (pktpwd[0]) f->name=pktpwd; debug(5,"from zone: %u",f->zone=iread(pkt)); debug(5,"to zone: %u",t->zone=iread(pkt)); if (pkt_sub==2) { for (i=0;i<8;i++) *(p+i)=getc(pkt); *(p+8)='\0'; debug(5,"from dom : %s",p); if (*p) f->domain=xstrcpy(p); for (i=0;i<8;i++) *(p+i)=getc(pkt); *(p+8)='\0'; debug(5,"to dom : %s",p); if (*p) t->domain=xstrcpy(p); } else { if ((f->net==-1) && (pkt_sub==0)) { debug(5,"from net : %u",f->net=iread(pkt)); } else { debug(5,"filler : 0x%04x",iread(pkt)); } debug(5,"capvalid : 0x%04x",capvalid=iread(pkt)); debug(5,"prodcode : 0x%04x",iread(pkt)); debug(5,"capword : 0x%04x",capword=iread(pkt)); debug(5,"from zone: %u",iread(pkt)); debug(5,"to zone: %u",iread(pkt)); debug(5,"from pnt : %u",f->point=iread(pkt)); debug(5,"to pnt : %u",t->point=iread(pkt)); } debug(5,"proddata : 0x%08lx",lread(pkt)); if (feof(pkt) || ferror(pkt)) { logerr("$Could not read packet header"); return 2; } pointcheck=0; if (pkt_sub==2) { pointcheck=1; } else { if (((capword >> 8) == (capvalid & 0xff)) && ((capvalid >> 8) == (capword & 0xff))) pointcheck=(capword & 0x0001); else capword=0; } debug(5,"capword=%04x, pointcheck=%s",capword,pointcheck?"yes":"no"); pktfrom.name=NULL; pktfrom.domain=f->domain; pktfrom.zone=f->zone; pktfrom.net=f->net; pktfrom.node=f->node; if (pointcheck) pktfrom.point=f->point; else pktfrom.point=0; tome=0; for (al=whoami;al;al=al->next) { if (((t->domain == NULL) || (strncasecmp(al->addr->domain,t->domain, min(strlen(al->addr->domain),strlen(t->domain))))) && ((t->zone == 0) || (t->zone == al->addr->zone)) && (t->net == al->addr->net) && (t->node == al->addr->node) && ((!pointcheck) || (t->point == al->addr->point))) tome=1; } pwdok=0; pktpassword=NULL; /* look between packetpasswd lines */ for (al=pktpwlist;al;al=al->next) { if (((f->domain == NULL) || (strncasecmp(al->addr->domain,f->domain, min(strlen(al->addr->domain),strlen(f->domain))))) && ((f->zone == 0) || (f->zone == al->addr->zone)) && (f->net == al->addr->net) && (f->node == al->addr->node) && ((!pointcheck) || (f->point == al->addr->point))) { pktpassword=al->addr->name; pwdok=1; } } /* if not matching packetpasswd lines, search in password ones */ if (!pwdok) for (al=pwlist;al;al=al->next) { if (((f->domain == NULL) || (strncasecmp(al->addr->domain,f->domain, min(strlen(al->addr->domain),strlen(f->domain))))) && ((f->zone == 0) || (f->zone == al->addr->zone)) && (f->net == al->addr->net) && (f->node == al->addr->node) && ((!pointcheck) || (f->point == al->addr->point))) { pktpassword=al->addr->name; pwdok=1; } } /* if we have a password (general or for packets) for that address */ if ((pwdok) && (strcasecmp(pktpassword,pktpwd) != 0)) { loginf("password got \"%s\", expected \"%s\"", pktpwd,pktpassword); pwdok=0; } loginf("packet from node %s",ascfnode(f,0x1f)); loginf(" to node %s",ascfnode(t,0x1f)); if (!tome) return 3; else if (!pwdok) return 4; else return 0; } ifmail-2.14tx8.10.orig/iflib/scanout.c100644 1751 50 13470 6240215001 15066 0ustar mdsrc#include #include #include "directory.h" #include #include #include "xutil.h" #include "config.h" #include "ftn.h" #include "scanout.h" #include "lutil.h" #ifndef PATH_MAX #define PATH_MAX 512 #endif extern int fakeoutbound; #ifndef FAKEDIR #define FAKEDIR "/tmp/ifmail/" #endif typedef struct _strl { struct _strl *next; char *str; char *dom; int zone; } strl; static faddr addr = { NULL, 0,0,0,0, NULL }; static int scan_dir(int (*)(faddr*,char,int,char*),char*,int); static int scan_dir(fn,dname,ispoint) int (*fn)(faddr*,char,int,char*); char *dname; int ispoint; { int rc=0; char fname[PATH_MAX]; char flavor='?'; DIR *dp=NULL; struct dirent *de; int isflo; debug(7,"enter scan_dir \"%s\" (%s)",S(dname),ispoint?"point":"node"); if ((dp=opendir(dname)) == NULL) { debug(7,"outbound \"%s\" cannot be opened, proceed",S(dname)); return 0; } while ((de=readdir(dp))) if ((strlen(de->d_name) == 12) && (de->d_name[8] == '.') && (strspn(de->d_name,"0123456789abcdefABCDEF") == 8)) { debug(7,"checking: \"%s\"",de->d_name); addr.point=0; strncpy(fname,dname,PATH_MAX-2); strcat(fname,"/"); strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2); if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) { sscanf(de->d_name,"%04x%04x",&addr.net,&addr.node); if ((rc=scan_dir(fn,fname,1))) goto exout; } else if ((strcasecmp(de->d_name+8,".out") == 0) || (strcasecmp(de->d_name+8,".cut") == 0) || (strcasecmp(de->d_name+8,".hut") == 0) || (strcasecmp(de->d_name+8,".opk") == 0) || (strcasecmp(de->d_name+8,".cpk") == 0) || (strcasecmp(de->d_name+8,".hpk") == 0) || (strcasecmp(de->d_name+8,".flo") == 0) || (strcasecmp(de->d_name+8,".clo") == 0) || (strcasecmp(de->d_name+8,".hlo") == 0) || (strcasecmp(de->d_name+8,".req") == 0)) { if (ispoint) sscanf(de->d_name,"%08x", &addr.point); else sscanf(de->d_name,"%04x%04x", &addr.net,&addr.node); flavor=tolower(de->d_name[9]); if (flavor == 'f') flavor='o'; if (strcasecmp(de->d_name+10,"ut") == 0) isflo=OUT_PKT; else if (strcasecmp(de->d_name+10,"pk") == 0) isflo=OUT_DIR; else if (strcasecmp(de->d_name+10,"lo") == 0) isflo=OUT_FLO; else if (strcasecmp(de->d_name+9,"req") == 0) isflo=OUT_REQ; else isflo=-1; debug(7,"%s \"%s\"", (isflo == OUT_FLO) ? "flo file" : "packet", de->d_name); if ((rc=fn(&addr,flavor,isflo,fname))) goto exout; } else if ((strncasecmp(de->d_name+9,"su",2) == 0) || (strncasecmp(de->d_name+9,"mo",2) == 0) || (strncasecmp(de->d_name+9,"tu",2) == 0) || (strncasecmp(de->d_name+9,"we",2) == 0) || (strncasecmp(de->d_name+9,"th",2) == 0) || (strncasecmp(de->d_name+9,"fr",2) == 0) || (strncasecmp(de->d_name+9,"sa",2) == 0)) { isflo=OUT_ARC; if ((rc=fn(&addr,flavor,isflo,fname))) goto exout; debug(7,"arcmail file \"%s\"",de->d_name); } else { debug(7,"skipping \"%s\"",de->d_name); } } exout: closedir(dp); return rc; } int scanout(fn) int (*fn)(faddr*,char,int,char*); { int rc=0; char fname[PATH_MAX]; fa_list *dom; strl *doml=NULL,*tmp,**tmpd; char *p,*q; DIR *dp; struct dirent *de; if (fakeoutbound) { strcpy(fname,FAKEDIR); if (whoami->addr->domain) strcat(fname,whoami->addr->domain); else strcat(fname,"fidonet"); } else { strncpy(fname,outbound,PATH_MAX-1); } if ((p=strrchr(fname+1,'/'))) *p='\0'; else fname[0]='\0'; if ((dp=opendir(fname)) == NULL) { logerr("$cannot open outbound directory \"%s\" for reading", S(fname)); return 1; } for (dom=nllist;dom;dom=dom->next) { debug(7,"checking domain %s",S(dom->addr->domain)); if ((p=dom->addr->domain) == NULL) p=whoami->addr->domain; q=p; if (((p == NULL) || (whoami->addr->domain == NULL) || (strcasecmp(p,whoami->addr->domain) == 0)) && (!fakeoutbound)) { if (dom->addr->zone == 0) dom->addr->zone=whoami->addr->zone; if ((p=strrchr(outbound,'/'))) p++; else p=outbound; } for (tmpd=&doml;*tmpd;tmpd=&((*tmpd)->next)) if (strcasecmp(p,(*tmpd)->str) == 0) break; if (*tmpd == NULL) { *tmpd=(strl*)xmalloc(sizeof(strl)); (*tmpd)->next=NULL; (*tmpd)->str=p; (*tmpd)->dom=q; (*tmpd)->zone=dom->addr->zone; } } while ((de=readdir(dp))) for (tmpd=&doml;*tmpd;tmpd=&((*tmpd)->next)) { debug(7,"checking directory %s against %s", de->d_name,S((*tmpd)->str)); if ((strncasecmp(de->d_name,(*tmpd)->str,strlen((*tmpd)->str)) == 0) && ((*(p=de->d_name+strlen((*tmpd)->str)) == '\0') || ((*p == '.') && (strlen(p+1) == 3) && (strspn(p+1,"01234567890abcdefABCDEF") == 3)))) { if (*p) sscanf(p+1,"%03x",&addr.zone); else addr.zone=(*tmpd)->zone; if (fakeoutbound) { strncpy(fname,FAKEDIR,PATH_MAX-2); } else { strncpy(fname,outbound,PATH_MAX-2); } if ((p=strrchr(fname,'/'))) *p='\0'; else p=fname+strlen(fname); strcat(fname,"/"); strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2); addr.domain=(*tmpd)->dom; if ((rc=scan_dir(fn,fname,0))) goto exout; } else { debug(7,"skipping \"%s\"",de->d_name); } } exout: closedir(dp); for (tmp=doml;tmp;tmp=doml) { doml=tmp->next; free(tmp); } return rc; } #ifdef TESTING extern char *configname; extern int readconfig(); int each(faddr*,char,int,char*); int each(addr,flavor,isflo,name) faddr *addr; char flavor; int isflo; char *name; { debug(0,"addr \"%s\" flavor '%c', %s, name \"%s\"", ascfnode(addr,0xff),flavor,isflo?"flo":"pkt",name); return 0; } int main(argc,argv) int argc; char *argv[]; { int rc; if (argv[1]) configname=argv[1]; else configname="config"; if ((rc=readconfig())) { debug(0,"readconfig failed - %d",rc); return rc; } verbose=1<<6; rc=scanout(each); debug(0,"scanout rc=%d",rc); return rc; } #endif ifmail-2.14tx8.10.orig/iflib/matchaka.c100644 1751 50 2560 5665447524 15174 0ustar mdsrc#include #include #include "ftn.h" #include "lutil.h" #include "config.h" int metric(a1,a2) faddr *a1,*a2; { if ((a1->domain != NULL) && (a2->domain != NULL) && (strcasecmp(a1->domain,a2->domain) != 0)) return METRIC_DOMAIN; if ((a1->zone != 0) && (a2->zone != 0) && (a1->zone != a2->zone)) return METRIC_ZONE; if (a1->net != a2->net) return METRIC_NET; if (a1->node != a2->node) return METRIC_NODE; if (a1->point != a2->point) return METRIC_POINT; return METRIC_EQUAL; } faddr *bestaka_s(addr) faddr *addr; { fa_list *tmp; faddr *best; int minmetric,wt; debug(6,"bestaka_s for %s",ascfnode(addr,0x1f)); best=whoami->addr; if (addr == NULL) return best; minmetric=metric(addr,best); for (tmp=whoami;tmp;tmp=tmp->next) { wt=metric(addr,tmp->addr); debug(6,"addr %s metric %d",ascfnode(tmp->addr,0x1f),wt); if ((wt < minmetric) && ((best->point != 0) || (minmetric > METRIC_NODE))) /* In the same network, use node address even when routing to the node where we have a point address */ { debug(6,"setting best"); minmetric=wt; best=tmp->addr; } } debug(6,"bestaka_s is %s",ascfnode(best,0x1f)); return best; } int is_local(addr) faddr *addr; { fa_list *tmp; for (tmp=whoami;tmp;tmp=tmp->next) { if (metric(tmp->addr,addr) == METRIC_EQUAL) return 1; /* yes */ } return 0; /* no */ } ifmail-2.14tx8.10.orig/iflib/usleep.c100644 1751 50 2742 5550072446 14710 0ustar mdsrc/* usleep.c * simulate the usleep() function on machines where it isn't available * code taken from "mgetty+sendfax" (io.c) by Gert Doering */ #if !defined(USE_SELECT) && !defined(USE_POLL) && !defined(USE_NAP) #define USE_SELECT #endif #ifdef USE_SELECT #undef USE_POLL #undef USE_NAP #endif #ifdef USE_POLL #undef USE_NAP #endif #include #include #include #ifndef _NOSTDLIB_H #include #endif #include #ifdef USE_POLL # include /*int poll _PROTO(( struct pollfd fds[], unsigned long nfds, int timeout ));*/ int poll (); #endif #ifdef USE_SELECT # include # if defined (linux) || defined (sun) || defined (SVR4) || \ defined (__hpux) || defined (MEIBE) || defined(sgi) # include # include # else # include # endif #endif void usleep ( unsigned long waittime ) /* wait waittime microseconds */ { #ifdef USE_POLL struct pollfd sdummy; poll( &sdummy, 0, waittime ); #else #ifdef USE_NAP nap( waittime ); #else #ifdef USE_SELECT struct timeval s; s.tv_sec = waittime / 1000000; s.tv_usec = waittime % 1000000; select( 0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL, &s ); #else /* neither poll nor nap nor select available */ if ( waittime < 2000000 ) waittime = 2000000; /* round up, */ sleep( waittime / 1000000); /* a sleep of 1 may not sleep at all */ #endif /* use select */ #endif /* use nap */ #endif /* use poll */ } ifmail-2.14tx8.10.orig/iflib/execute.c100644 1751 50 3667 6374435757 15101 0ustar mdsrc#include #include #include #include #include #include #include #include #include "lutil.h" int execute(cmd,file,pkt,in,out,err) char *cmd,*file,*pkt,*in,*out,*err; { char buf[512]; char *vector[16]; int i; char *p,*q,*f=file,*k=pkt; int pid,status,rc,sverr; for (p=cmd,q=buf;(*p) && (q < (buf+sizeof(buf)-1));p++) switch (*p) { case '$': switch (*(++p)) { case 'f': case 'F': if (f) while ((*f) && (q < (buf+sizeof(buf)-1))) *(q++)=*(f++); f=file; break; case 'p': case 'P': if (k) while ((*k) && (q < (buf+sizeof(buf)-1))) *(q++)=*(k++); k=pkt; break; default: *(q++)='$'; *(q++)=*p; break; } break; case '\\': *(q++)=*(++p); break; default: *(q++)=*p; break; } *q='\0'; loginf("Execute: %s",buf); i=0; vector[i++]=strtok(buf," \t\n"); while ((vector[i++]=strtok(NULL," \t\n")) && (i<16)); vector[15]=NULL; fflush(stdout); fflush(stderr); if ((pid=fork()) == 0) { if (in) { close(0); if (open(in,O_RDONLY) != 0) { logerr("$Reopen of stdin to %s failed",S(in)); exit(-1); } } if (out) { close(1); if (open(out,O_WRONLY | O_APPEND | O_CREAT,0600) != 1) { logerr("$Reopen of stdout to %s failed",S(out)); exit(-1); } } if (err) { close(2); if (open(err,O_WRONLY | O_APPEND | O_CREAT,0600) != 2) { logerr("$Reopen of stderr to %s failed",S(err)); exit(-1); } } rc=execv(vector[0],vector); logerr("$Exec \"%s\" returned %d",S(vector[0]),rc); exit(-1); } do { rc=wait(&status); sverr=errno; debug(2,"$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); } while (((rc > 0) && (rc != pid)) || ((rc == -1) && (sverr == EINTR))); if (rc == -1) { logerr("$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); return -1; } debug(2,"status=%d",status); return status; } ifmail-2.14tx8.10.orig/iflib/execsh.c100644 1751 50 2434 6374435651 14676 0ustar mdsrc#include #include #include #include #include #include #include #include #include "lutil.h" #define SHELL "/bin/sh" int execsh(cmd,in,out,err) char *cmd,*in,*out,*err; { int pid,status,rc,sverr; loginf("Execute command: %s",S(cmd)); fflush(stdout); fflush(stderr); if ((pid=fork()) == 0) { if (in) { close(0); if (open(in,O_RDONLY) != 0) { logerr("$Reopen of stdin to %s failed",S(in)); exit(-1); } } if (out) { close(1); if (open(out,O_WRONLY | O_APPEND | O_CREAT,0600) != 1) { logerr("$Reopen of stdout to %s failed",S(out)); exit(-1); } } if (err) { close(2); if (open(err,O_WRONLY | O_APPEND | O_CREAT,0600) != 2) { logerr("$Reopen of stderr to %s failed",S(err)); exit(-1); } } rc=execl(SHELL,"sh","-c",cmd,NULL); logerr("$Exec \"%s\" returned %d",S(cmd),rc); exit(-1); } do { rc=wait(&status); sverr=errno; debug(2,"$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); } while (((rc > 0) && (rc != pid)) || ((rc == -1) && (sverr == EINTR))); if (rc == -1) { logerr("$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); return -1; } debug(2,"status=%d",status); return status; } ifmail-2.14tx8.10.orig/iflib/signal.c100644 1751 50 766 5563243444 14656 0ustar mdsrc/* * signal() for BSD systems like SUNOS where a signal not automatically * interrupts a read() system call. Contributed by Martin Junius. */ #include void (*signal(sig, func))() int sig; void (*func)(); { struct sigaction sa, sa_old; sa.sa_mask = 0; sa.sa_handler = func; #if defined(SA_INTERRUPT) && defined(SA_RESETHAND) sa.sa_flags = SA_INTERRUPT | SA_RESETHAND; #else sa.sa_flags = 0; #endif sigaction(sig, &sa, &sa_old); return sa_old.sa_handler; } ifmail-2.14tx8.10.orig/iflib/regexpr.c100644 1751 50 761 5524503262 15042 0ustar mdsrc#include #if defined(HAS_REGEX_H) #include #elif defined(HAS_LIBGEN_H) #include #else char *regcmp(); char *regex(); #endif static char *compiled_reg=NULL; extern char *__loc1; char *re_comp(mask) char *mask; { if (compiled_reg) free(compiled_reg); compiled_reg=regcmp(mask,NULL); return NULL; } int re_exec(str) char *str; { char *first_unmatched; return ((first_unmatched=regex(compiled_reg,str)) && (__loc1 == str) && (*first_unmatched == '\0')); } ifmail-2.14tx8.10.orig/iflib/atoul.c100644 1751 50 304 5502333652 14503 0ustar mdsrc#include #include unsigned long atoul(char*); unsigned long atoul(str) char *str; { unsigned long x; if (sscanf(str,"%lu",&x) == 1) return x; else return 0xffffffff; } ifmail-2.14tx8.10.orig/iflib/nodelock.c100644 1751 50 5132 6374437137 15214 0ustar mdsrc#include #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #ifdef NEED_BSY #if defined(SHORT_PID_T) #define pid_t short #elif defined(INT_PID_T) #define pid_t int #endif extern char *bsyname(faddr *); extern void mkdirs(char*); int nodelock(addr) faddr *addr; { char *fn,*tfn,*p; char tmp[16]; FILE *fp; pid_t pid,mypid; int tmppid,sverr; debug(4,"try locking node %s",ascfnode(addr,0x1f)); fn=bsyname(addr); tfn=xstrcpy(fn); if ((p=strrchr(tfn,'/'))) *++p='\0'; mypid=getpid(); sprintf(tmp,"aa%d",mypid); tfn=xstrcat(tfn,tmp); mkdirs(tfn); if ((fp=fopen(tfn,"w")) == NULL) { logerr("$cannot open tmp file for bsy lock \"%s\"",tfn); free(tfn); return 1; } fprintf(fp,"%10d\n",mypid); fclose(fp); chmod(tfn,0444); if (link(tfn,fn) == 0) { debug(4,"created lock OK"); unlink(tfn); free(tfn); return 0; } else { sverr=errno; debug(4,".bsy file present, check staleness"); } if (sverr != EEXIST) { logerr("$could not link \"%s\" to \"%s\"",tfn,fn); unlink(tfn); free(tfn); return 1; } if ((fp=fopen(fn,"r")) == NULL) { logerr("$could not open existing lock file \"%s\"",fn); unlink(tfn); free(tfn); return 1; } fscanf(fp,"%d",&tmppid); pid=tmppid; fclose(fp); debug(4,"opened bsy file for pid %d",pid); if (kill(pid,0) && (errno == ESRCH)) { loginf("found stale bsy file for %s, unlink", ascfnode(addr,0x1f)); unlink(fn); } else { debug(4,"process active, lock failed"); unlink(tfn); free(tfn); return 1; } if (link(tfn,fn) == 0) { debug(4,"created lock OK"); unlink(tfn); free(tfn); return 0; } else { logerr("$could not link \"%s\" to \"%s\"",tfn,fn); unlink(tfn); free(tfn); return 1; } } int nodeulock(addr) faddr *addr; { char *fn; FILE *fp; pid_t pid,mypid; int tmppid; debug(4,"try unlocking node %s",ascfnode(addr,0x1f)); fn=bsyname(addr); if ((fp=fopen(fn,"r")) == NULL) { logerr("$cannot open lock file \"%s\"",fn); return 1; } fscanf(fp,"%d",&tmppid); pid=tmppid; fclose(fp); mypid=getpid(); if (pid == mypid) { debug(4,"unlinking lock file"); unlink(fn); return 0; } else { logerr("trying unlock file for process %u, we are %u", pid,mypid); return 1; } } #else /* don't NEED_BSY */ int nodelock(addr) faddr *addr; { debug(4,"try locking node %s - no locking",ascfnode(addr,0x1f)); return 0; } int nodeulock(addr) faddr *addr; { debug(4,"try unlocking node %s - no locking",ascfnode(addr,0x1f)); return 0; } #endif /* NEED_BSY */ ifmail-2.14tx8.10.orig/iflib/trap.c100644 0 0 11405 6701151723 15024 0ustar rootroot#ifdef NEED_TRAP #include #include "lutil.h" #include "trap.h" #ifdef TESTING #define logerr printf #else #include "lutil.h" #endif #if defined(linux) # ifndef __GLIBC__ # define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) # include # if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0) # define sigcontext sigcontext_struct # endif # define __KERNEL__ # include # undef __KERNEL__ # endif /* __GLIBC__ */ # ifdef __i386__ # define iBCS2 # else # define SUNSTYLE # endif /* __i386__ */ #elif defined(sun) #define SUNSTYLE #elif defined(SVR4) #define SVR4STYLE #endif #include #ifdef HAS_SYSLOG #include #include #include #endif static char *nm=""; static struct _signames { int sig; char *name; } signames[] = { #ifdef SIGSEGV {SIGSEGV,"SIGSEGV"}, #endif #ifdef SIGBUS {SIGBUS,"SIGBUS"}, #endif #ifdef SIGFPE {SIGFPE,"SIGFPE"}, #endif #ifdef SIGSTKFLT {SIGSTKFLT,"SIGSTKFLT"}, #endif {0,NULL} }; static char *signame(sig) int sig; { int i; static char buf[8]; for (i=0;signames[i].name;i++) if (signames[i].sig == sig) break; if (signames[i].name) return signames[i].name; sprintf(buf,"%d",sig); return buf; } #if defined(iBCS2) static void trap(sig,context) int sig; struct sigcontext context; #elif defined(SVR4STYLE) static void trap(sig,context) int sig; siginfo_t *si; #elif defined(SUNSTYLE) static void trap(sig,code,context,addr) int sig; int code; struct sigcontext *context; char *addr; #else static void trap(sig) int sig; #endif { #if defined(iBCS2) long *stack; #ifdef TESTING int i; printf("conext.gs=%04hx,%04hx\n",context.__gsh,context.gs); printf("conext.fs=%04hx,%04hx\n",context.__fsh,context.fs); printf("conext.es=%04hx,%04hx\n",context.__esh,context.es); printf("conext.ds=%04hx,%04hx\n",context.__dsh,context.ds); printf("conext.edi=%08lx\n",context.edi); printf("conext.esi=%08lx\n",context.esi); printf("conext.ebp=%08lx\n",context.ebp); printf("conext.esp=%08lx\n",context.esp); printf("conext.ebx=%08lx\n",context.ebx); printf("conext.edx=%08lx\n",context.edx); printf("conext.ecx=%08lx\n",context.ecx); printf("conext.eax=%08lx\n",context.eax); printf("conext.trapno=%08lx\n",context.trapno); printf("conext.err=%08lx\n",context.err); printf("conext.eip=%08lx\n",context.eip); printf("conext.cs=%04hx,%04hx\n",context.__csh,context.cs); printf("conext.eflags=%08lx\n",context.eflags); printf("conext.esp_at_signal=%08lx\n",context.esp_at_signal); printf("conext.ss=%04hx,%04hx\n",context.__ssh,context.ss); printf("conext.i387=%08lx\n",context.i387); printf("conext.oldmask=%08lx\n",context.oldmask); printf("conext.cr2=%08lx\n",context.cr2); stack=(long *)context.esp_at_signal; for (i=-2;i<10;i++) printf("stack %2d: 0x%08lx: 0x%08lx\n",i,(long)&(stack[i]),stack[i]); #endif signal(sig,SIG_DFL); /* for BSD compatibility, won't harm SysV */ logerr("caught %s at offset 0x%08lx",signame(sig),context.eip); /* Follows an awful, nasty kludge. The problem is that when interrupt occurs in a function compiled with -fomit-frame-pointer, there is no way (or at least I don't know one) to catch the beginning of the stack frame chain. So, the only thing I could think of is to scan the stack in search of a value the _looks_like_ a frame chain pointer. Generally, this approach may cause all kind of problems: from false backtrace information to segfault inside the handler. If you know a better way, _please_ make me know! */ for (stack=(long *)context.esp_at_signal; stack && ((unsigned)((long *)stack[0]-stack) > 20); stack++); for (;stack && stack[1];stack=(long*)stack[0]) { #ifdef TESTING printf("\n[0x%08lx] next 0x%08lx, ret 0x%08lx ",(long)stack, stack[0],stack[1]); #endif logerr("called from 0x%08lx",stack[1]); } #elif defined(SVR4STYLE) if (context) psiginfo(si,nm); else psignal(sig,nm); #elif defined(SUNSTYLE) logerr("caught %s at offset 0x%08lx",signame(sig),addr); #else #warning Cannot provide detailed info on this architecture logerr("caught %s",signame(sig)); psignal(sig,nm); #endif #ifdef HAS_SYSLOG debug(2,"closing syslog"); closelog(); #endif #ifdef TESTING printf("\n"); #else abort(); /* stupid, but BSD will cycle otherwise */ #endif return; } void catch(name) char *name; { int i=0; nm=name; for (i=0;signames[i].name;i++) debug(2,"catch: signal(%d) return %d", signames[i].sig,signal(signames[i].sig,trap)); return; } #ifdef TESTING void faulty(s) int *s; { int w=1234; memcpy(s,&w,sizeof(int)); *s=1234; return; } int good(s) int *s; { faulty(s); return 0; } int main() { int *s=NULL; int i; catch("trap test"); printf("\nbefore fault\n"); i=good(s); printf("\nafter fault\n"); return 0; } #endif /* TESTING */ #endif /* NEED_TRAP */ ifmail-2.14tx8.10.orig/iflib/rfcaddr.c100644 1751 50 13630 6215375567 15047 0ustar mdsrc#include #include #include #ifdef TESTING #include #endif #include "xutil.h" #include "rfcaddr.h" int addrerror; static char *errname[] = { "nested <>", "multiple <>", "unmatched <>""()", "badtoken", "badstructure", }; char *addrerrstr(err) int err; { int i; static char buf[128]; buf[0]='\0'; for (i=0;i': if (quotes) break; if (brackets) brackets--; else addrerror |= ADDR_UNMATCHED; if (!brackets) anglecomplete=1; break; } *((*x)++)=*p; if (!brackets) x=&r; } *q='\0'; *r='\0'; if (brackets || quotes) addrerror |= ADDR_UNMATCHED; #ifdef TESTING printf(" inbrackets: \"%s\"\n",inbrackets); printf("outbrackets: \"%s\"\n",outbrackets); printf("addrerror: 0x%04x\n",addrerror); #endif if (addrerror) goto leave1; cleanbuf=xmalloc(strlen(s)+1); *cleanbuf='\0'; combuf=xmalloc(strlen(s)+1); *combuf='\0'; if (*inbrackets) /* there actually is an angled portion */ { strcpy(combuf,outbrackets); c=combuf+strlen(combuf); p=inbrackets+1; *(p+strlen(p)-1)='\0'; } else { c=combuf; p=outbrackets; } #ifdef TESTING printf(" now parsing: \"%s\"\n",p); printf("current comment: \"%s\"\n",result.comment); #endif /* OK, now we have result.comment filled with wat was outside angle brackets, c pointing past the end of it, p pointing to what is supposed to be address, with angle brackets already removed */ quotes=brackets=escaped=0; for (r=cleanbuf,x=&r; *p; p++) { if (escaped) { escaped=0; *((*x)++)=*p; } else /* process all special chars */ if (isspace(*p)) { if ((quotes) || (brackets)) *((*x)++)=*p; } else switch (*p) { case '\\': escaped=1; /* pass backslash itself only inside quotes and comments, or for the special cases \" and \\ otherwise eat it away */ if ((quotes) || (brackets)) *((*x)++)=*p; else if ((*(p+1)=='"') || (*(p+1)=='\\')) *((*x)++)=*p; break; case '\"': quotes=!quotes; *((*x)++)=*p; break; case '(': brackets++; x=&c; break; case ')': if (brackets) brackets--; else addrerror |= ADDR_UNMATCHED; if (!brackets) x=&r; break; default: *((*x)++)=*p; break; } } *r='\0'; *c='\0'; if (brackets || quotes) addrerror |= ADDR_UNMATCHED; #ifdef TESTING printf(" now parsing: \"%s\"\n",inbrackets); printf("complete comment: \"%s\"\n",result.comment); printf(" addrerror: 0x%04x\n",addrerror); #endif if (addrerror) goto leave2; /* OK, now we have inangles buffer filled with the 'clean' address, all comments removed, and result.comment is ready filled */ /* seach for special chars that are outside quotes */ firstat=lastat=percent=colon=comma=exclam=NULL; quotes=0; escaped=0; for (p=cleanbuf; *p; p++) if (*p == '\\') p++; else if (*p == '\"') quotes = !quotes; else if (!quotes) switch (*p) { case '@': if (!firstat) firstat=p; lastat=p; break; case '%': percent=p; break; case ':': colon=p; break; case ',': comma=p; break; case '!': if (!exclam) exclam=p; break; } if ((firstat == cleanbuf) && colon) { #ifdef TESTING printf("@aaa,@bbb:xxx@yyy construct\n"); #endif if (comma && (comma < colon)) { *comma='\0'; r=comma+1; } else { *colon='\0'; r=colon+1; } t=firstat+1; } else if (lastat) { #ifdef TESTING printf("anything@somewhere construct\n"); #endif *lastat='\0'; r=cleanbuf; t=lastat+1; } else if (exclam) { #ifdef TESTING printf("domain!something construct (without @'s)\n"); #endif *exclam='\0'; r=exclam+1; t=cleanbuf; } else if (percent) { #ifdef TESTING printf("anything%%somewhere construct (without !'s and @'s)\n"); #endif *percent='\0'; r=cleanbuf; t=percent+1; } else { #ifdef TESTING printf("remainder only present\n"); #endif /* unquote it if necessary */ if ((*cleanbuf == '\"') && (*(p=(cleanbuf+strlen(cleanbuf)-1)) == '\"')) { *p='\0'; r=cleanbuf+1; } else r=cleanbuf; t=NULL; } if (t && (*t != '\0')) result.target=xstrcpy(t); if (r && (*r != '\0')) result.remainder=xstrcpy(r); if (*combuf != '\0') result.comment=xstrcpy(combuf); leave1: /* this is also normal exit */ free(cleanbuf); free(combuf); free(inbrackets); free(outbrackets); return result; leave2: /* if error found on second stage, free */ free(cleanbuf); free(combuf); return result; } #ifdef TESTING int main() { parsedaddr tmp; char buffer[128]; while(gets(buffer)) { printf(" parsing: \"%s\"\n",buffer); tmp=parserfcaddr(buffer); printf(" target: \"%s\"\n",tmp.target); printf("remainder: \"%s\"\n",tmp.remainder); printf(" comment: \"%s\"\n",tmp.comment); } tidyrfcaddr(tmp); return 0; } #endif ifmail-2.14tx8.10.orig/iflib/expipe.c100644 1751 50 5614 6374436710 14711 0ustar mdsrc#include #include #include #include #include #include #include #include #include #include "lutil.h" static struct _fppid { FILE *fp; int pid; } fppid[] = { {NULL,0}, {NULL,0}, {NULL,0} }; #define maxfppid 2 FILE *expipe(cmd,from,to) char *cmd,*from,*to; { char buf[256],*buflimit; char *vector[16]; int i,rc; char *p,*q,*f=from,*t=to; int pipedes[2]; FILE *fp; int pid,slot; buflimit=buf+sizeof(buf)-1- (f&&t&&(strlen(f)>strlen(t))?strlen(f):t?strlen(t):0); for (slot=0;slot<=maxfppid;slot++) { if (fppid[slot].fp == NULL) break; } if (slot > maxfppid) { logerr("attemt to pipe more than %d processes",maxfppid + 1); return NULL; } for (p=cmd,q=buf;(*p);p++) { if (q > buflimit) { logerr("attemt to pipe too long command"); return NULL; } switch (*p) { case '$': switch (*(++p)) { case 'f': case 'F': if ((f)) while (*f) *(q++)=*(f++); f=from; break; case 't': case 'T': if ((t)) while (*t) *(q++)=*(t++); t=to; break; default: *(q++)='$'; *(q++)=*p; break; } break; case '\\': *(q++)=*(++p); break; default: *(q++)=*p; break; } } *q='\0'; loginf("Expipe: %s",buf); i=0; vector[i++]=strtok(buf," \t\n"); while ((vector[i++]=strtok(NULL," \t\n")) && (i<16)); vector[15]=NULL; fflush(stdout); fflush(stderr); if (pipe(pipedes) != 0) { logerr("$pipe failed for command \"%s\"",S(vector[0])); return NULL; } debug(2,"pipe() returned %d,%d",pipedes[0],pipedes[1]); if ((pid=fork()) == 0) { close(pipedes[1]); close(0); if (dup(pipedes[0]) != 0) { logerr("$Reopen of stdin for command %s failed", S(vector[0])); exit(-1); } rc=execv(vector[0],vector); logerr("$Exec \"%s\" returned %d",S(vector[0]),rc); exit(-1); } close(pipedes[0]); if ((fp=fdopen(pipedes[1],"w")) == NULL) { logerr("$fdopen failed for pipe to command \"%s\"", S(vector[0])); } fppid[slot].fp=fp; fppid[slot].pid=pid; return fp; } int exclose(fp) FILE *fp; { int status,rc; int pid,slot,sverr; for (slot=0;slot<=maxfppid;slot++) { if (fppid[slot].fp == fp) break; } if (slot > maxfppid) { logerr("attempt to close unopened pipe"); return -1; } pid=fppid[slot].pid; fppid[slot].fp=NULL; fppid[slot].pid=0; debug(2,"closing pipe to the child process %d",pid); if ((rc=fclose(fp)) != 0) { logerr("$error closing pipe to transport (rc=%d)",rc); if ((rc=kill(pid,SIGKILL)) != 0) logerr("$kill for pid %d returned %d",pid,rc); } debug(2,"waiting for process %d to finish",pid); do { rc=wait(&status); sverr=errno; debug(2,"$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); } while (((rc > 0) && (rc != pid)) || ((rc == -1) && (sverr == EINTR))); if (rc == -1) { logerr("$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); return -1; } debug(2,"status=%d",status); return status; } ifmail-2.14tx8.10.orig/iflib/callstat.c100644 1751 50 1541 5643530260 15212 0ustar mdsrc#include #include #include #include "lutil.h" #include "ftn.h" #include "callstat.h" extern char *stsname(faddr *,char); static callstat st; callstat *getstatus(addr) faddr *addr; { FILE *fp; time_t now; st.trytime=0L; st.tryno=0; st.trystat=0; if ((fp=fopen(stsname(addr,'f'),"r"))) { fscanf(fp,"%lu %u %u",&st.trytime,&st.tryno,&st.trystat); fclose(fp); } (void)time(&now); return &st; } void putstatus(addr,incr,sts) faddr *addr; int incr; int sts; { FILE *fp; (void)getstatus(addr); if ((fp=fopen(stsname(addr,'f'),"w"))) { if (sts == 0) st.tryno=0; else st.tryno+=incr; st.trystat=sts; (void)time(&st.trytime); fprintf(fp,"%lu %u %u\n", st.trytime,st.tryno,(unsigned)st.trystat); fclose(fp); } else { logerr("$cannot create status file for node %s", ascfnode(addr,0x1f)); } } ifmail-2.14tx8.10.orig/iflib/setprocn.c100644 1751 50 1424 6212730775 15246 0ustar mdsrc#include #ifdef SETPROCTITLE /* * clobber argv so ps will show what we're doing. * (stolen from BSD ftpd where it was stolen from sendmail) * warning, since this is usually started from inetd.conf, it * often doesn't have much of an environment or arglist to overwrite. */ static char *cmdstr=NULL; static char *cmdstrend=NULL; void setargspace(argv,envp) char *argv[]; char *envp[]; { cmdstr=argv[0]; while (*envp) envp++; envp--; cmdstrend=(*envp)+strlen(*envp); } void setproctitle(str) char *str; { char *p; /* make ps print our process name */ for (p=cmdstr;(p < cmdstrend) && (*str);p++,str++) *p=*str; while (p < cmdstrend) *p++ = ' '; } #else void setargspace(argv,envp) char *argv[]; char *envp[]; {} void setproctitle(str) char *str; {} #endif ifmail-2.14tx8.10.orig/iflib/ref.c100644 1751 50 30110 6420407564 14175 0ustar mdsrc#ifdef REFERENCES_MSC96 /* Projet References -- Generation de References: correctes pour ifmail * Auteur: Marc SCHAEFER * Date creation: 19/02/96 * Date modification: 14/06/97 * V1.0 PV003 MSC97 * DESCRIPTION * Lorsqu'on recoit des articles de news a destination de FTN on * stocke dans la base DBM ref_db * o une cle: le MSG-ID FTN * o une valeur: le Message-ID: RFC-1036 * Il y a une semantique de remplacement. * Si un message Usenet correspond a plusieurs messages FTN, toutes * les entrees necessaires sont stockees: les parties supplementaires * d'un grand message sont donc vues comme duplicates (j'appelle cela * une feature). * Lorsqu'on recoit un article EchoMail FTN, on recherche dans la base * pour le champ Message-ID: et le champ References: * * Avantages: meilleure detection des doublons (en particulier multi-parts) * References: correctes. * * FTN 1 ------- 1 RFC * La base doit etre scannee periodiquement pour y supprimer les entrees * plus vieille qu'une certaine duree (au lieu de scanner history). * * Si une association n'est pas trouvee, on garde l'ancien MSGID/REF * FTN (qui est mieux que rien). Cela ne devrait se produire que * si l'association n'est plus dans la base, donc si ref_cleanup * l'a supprime, et donc l'article n'est plus dans l'history. * NOTES * - utilise dbm BSD43 donc -L/usr/ucblib -ldbm, cf Makefile * - ifmail 2.8patche ne genere pas pour les References: ce qui * n'est pas important (ils ont aussi passe), ni pour les Message-ID * en reverse (ce qui empeche des controles de loop etendus). * - CHECK_IN_HISTORY n'est pas implemente correctement, et serait d'une * complexite tres grande. L'expiration se base sur une date maintenue * dans la base. * ASSUMPTIONS * - rfcmsgid and ftnmsgid are null-terminated strings. * BUGS * - locking * - dbm errmsg not printed * - pas de parcoureur * - dbm_delete ne compacte pas. * - MAXDAYS devrait etre configurable * TODO * - implement locking in ref_init/ref_deinit with * waiting for delocking. * MODIFICATION-HISTORY * PV002 schaefer implemented cleanup correctly; especially * added some debugging information and bugfix * for end detection. See also cleanup_ref.c * PV003 14/06/97 schaefer interface change see ref_interface.h */ #include #include #include #include #ifdef HAS_NDBM_H #include #include #else #include #endif #include "config.h" #include "ref_interface.h" #ifdef TESTING #include "lutil.h" #endif #define MAXBUFLEN 1024 #define DAYSEC 86400 #define MAXDAYS 30 #define CHECK_DBASE(dbase, txt, x) if (!dbase) {\ fprintf(stderr,\ "FATAL: ref.c: %s: dbase not opened.\n",\ txt);\ x\ } #ifdef CHECK_IN_HISTORY /* OBSOLETE (and will not work anymore because of changes in some * structures) */ static int in_history(char *history, char *name, int len) { FILE *f; char buf[MAXBUFLEN]; int result = 0; f = fopen(history, "r"); if (f) { char *s; while (!result && fgets(buf, MAXBUFLEN, f)) { s = strchr(buf, '\t'); if (s && ((s - buf) == len)) { *s = '\0'; if (!strncmp(name, buf, len)) { result = -1; #ifdef DEBUG printf("found %s.\n", buf); #endif } } } fclose(f); } else { result = -1; } return result; } #endif ref_private_t *ref_init(char *dbm_file_name) { DBM *dbase; dbase = dbm_open(dbm_file_name, O_RDWR|O_CREAT, 0600); return (ref_private_t *) dbase; } int ref_store(ref_private_t *dbase, char *ftn_msgid, char *rfc_msgid) { time_t maintenant = time(NULL); return ref_store_extended(dbase, ftn_msgid, rfc_msgid, maintenant); } int ref_store_extended(ref_private_t *dbase, char *ftn_msgid, char *rfc_msgid, time_t save_time) { datum value; datum key; char buf[MAXBUFLEN]; int rfc_msgid_len = strlen(rfc_msgid); CHECK_DBASE(dbase, "ref_store", return 0;); if (MAXBUFLEN < rfc_msgid_len + sizeof(time_t)) { fprintf(stderr, "FATAL: ref.c: ref_store: internal limit.\n"); return 0; } /* Nous stockons sans le zero final. Pour DBM, il s'agit * de structures (pas forcement des chaines terminees par * zero). Nous mettons d'abord le temps, puis la chaine. */ key.dptr = ftn_msgid; key.dsize = strlen(ftn_msgid); value.dptr = buf; memcpy(buf, &save_time, sizeof(time_t)); strcpy(buf + sizeof(time_t), rfc_msgid); value.dsize = rfc_msgid_len + sizeof(time_t); if (dbm_store(dbase, key, value, DBM_REPLACE)) { /* politique de * remplacement */ return 0; } else { return -1; } } int ref_get(ref_private_t *dbase, char *ftn_msgid, char *rfc_msgid, int rfc_msgid_len) { time_t ignored; return ref_get_extended(dbase, ftn_msgid, rfc_msgid, rfc_msgid_len, &ignored); } int ref_get_extended(ref_private_t *dbase, char *ftn_msgid, char *rfc_msgid, int rfc_msgid_len, time_t *saved_time) { datum value; datum key; CHECK_DBASE(dbase, "ref_get", return 0;); key.dptr = ftn_msgid; key.dsize = strlen(ftn_msgid); value = dbm_fetch(dbase, key); if (value.dptr) { /* Nous devons compter avec le zero final */ if (rfc_msgid_len > (value.dsize - sizeof(time_t))) { memcpy(saved_time, value.dptr, sizeof(time_t)); strncpy(rfc_msgid, value.dptr + sizeof(time_t), value.dsize - sizeof(time_t)); rfc_msgid[value.dsize - sizeof(time_t)] = '\0'; return -1; } else { fprintf(stderr, "ERROR: ref: ref_get: size too small for rfc_msgid.\n"); return 0; /* taille trop petite */ } } else { return 0; /* entree non trouvee */ } } void ref_deinit(ref_private_t *dbase) { CHECK_DBASE(dbase, "ref_deinit", return;); dbm_close(dbase); } int ref_first_key(ref_private_t *dbase, char *ftnmsgid, int len) { datum key; CHECK_DBASE(dbase, "ref_first_key", return 0;); key = dbm_firstkey(dbase); /* I don't know what this is for START */ if (key.dsize < 0) { return 0; } if ((key.dsize + 1) > len) { /* y.c. zero */ return 0; } memcpy(ftnmsgid, key.dptr, key.dsize); ftnmsgid[key.dsize] = '\0'; return -1; } int ref_next_key(ref_private_t *dbase, char *ftnmsgid, int len) { datum key; CHECK_DBASE(dbase, "ref_next_key", return 0;); key = dbm_nextkey(dbase); /* I don't know what this is for START */ if ((key.dsize < 0) || (key.dptr == NULL)) { return 0; } if ((key.dsize + 1) > len) { /* y.c. zero */ return 0; } memcpy(ftnmsgid, key.dptr, key.dsize); ftnmsgid[key.dsize] = '\0'; return -1; } /* BUGS * - Should use the key functions */ int ref_cleanup(ref_private_t *dbase, char *history) { datum value, key, new_key; int result = -1; char buf[MAXBUFLEN]; char buf2[MAXBUFLEN]; char buf3[MAXBUFLEN]; time_t nouveau = time(NULL); time_t ancien; CHECK_DBASE(dbase, "ref_cleanup", return 0;); if (1) { /* was dbm open from history -- not working */ key = dbm_firstkey(dbase); while (key.dptr != NULL) { int todel = 0; #ifdef DEBUG fwrite("? ", 2, 1, stdout); fwrite(key.dptr, key.dsize, 1, stdout); fwrite(".\n", 2, 1, stdout); #endif value = dbm_fetch(dbase, key); /* Attention: les chaines ne sont pas terminees par zero. * Cette magouille est necessaire a cause des allocations * statiques par DBM. */ if ((value.dsize - sizeof(time_t)) <= MAXBUFLEN) { strncpy(buf, value.dptr + sizeof(time_t), value.dsize - sizeof(time_t)); memcpy(&ancien, value.dptr, sizeof(time_t)); if (key.dsize <= MAXBUFLEN) { strncpy(buf2, key.dptr, key.dsize); key.dptr = buf2; #ifdef DEBUG fwrite("chk ", 4, 1, stdout); fwrite(buf, value.dsize - sizeof(time_t), 1, stdout); fwrite(".\n", 2, 1, stdout); #endif #ifdef CHECK_IN_HISTORY /* Une erreur dans in_history doit retourner -1 !! */ if (!in_history(history, buf, value.dsize)) { todel = -1; } #else /* Verifie la date */ if (ancien <= nouveau) { int days; if ( (days = ((nouveau - ancien) / DAYSEC)) > MAXDAYS) { todel = -1; #ifdef DEBUG printf("will delete because %d days.\n", days); #endif } #ifdef DEBUG else { printf("will NOT delete, days=%d.\n", days); } #endif } else { fprintf(stderr, "ERROR: ref.c: ref_cleanup: time collapsus now %ld before %ld\nTO FIX: call Einstein for more information.\n", nouveau, ancien); result = 0; } #endif } else { fprintf(stderr, "FATAL: ref.c: ref_cleanup: built-in limits 1.\nTO FIX: increase MAXBUFLEN to %d.\n", key.dsize); result = 0; } } else { fprintf(stderr, "FATAL: ref.c: ref_cleanup: built-in limits 2.\nTO FIX: increase MAXBUFLEN to %d.\n", (value.dsize - sizeof(time_t))); result = 0; } new_key = dbm_nextkey(dbase); /* overwrites dptr !! */ /* I don't know what this is for START */ if (new_key.dsize < 0) { break; } /* I don't know what this is for END. * NOTES * - Without it, it does not work correctly. */ if (new_key.dptr && (new_key.dsize <= MAXBUFLEN)) { strncpy(buf3, new_key.dptr, new_key.dsize); new_key.dptr = buf3; /* parce que dbm_delete utilise probablement * la zone interne. */ } else { if (new_key.dptr) { fprintf(stderr, "FATAL: ref.c: ref_cleanup: built-in limits 3.\nTO FIX: increase MAXBUFLEN to %d.\n", new_key.dsize); result = 0; } } if (todel) { #ifdef DEBUG fwrite("del ", 4, 1, stdout); fwrite(key.dptr, key.dsize, 1, stdout); fwrite(".\n", 2, 1, stdout); #endif if (dbm_delete(dbase, key)) { fprintf(stderr, "ERROR: ref.c: ref_cleanup: delete error.\n"); result = 0; } } key.dptr = new_key.dptr; key.dsize = new_key.dsize; if (key.dsize < 0) { /* Is that necessary ??? */ break; } } } else { fprintf(stderr, "ERROR: ref.c: ref_cleanup: can't open %s.\n", history); result = 0; } return result; } int ref_store_msgid(ref_private_t *ref_dbase, ftnmsg *fmsg, char *p) { int value=0; char buf[1024]; char buf2[1024]; char *start = strchr(p, '<'); char *end = strchr(p, '>'); time_t maintenant = time(NULL); if (start && end && ((end-start) + 2) <= 1024) { strncpy(buf, start, (end-start) + 1); buf[(end-start) +1] = '\0'; start = strchr(p, '@'); sprintf(buf2, "<%lu%s", fmsg->msgid_n, start); buf2[strlen(buf2)-1] = '\0'; #ifdef TESTING loginf("RFC-1036-Message-ID: %s.\n", buf); loginf("FTN-MSGID: %s %lu.\n", S(fmsg->msgid_a), fmsg->msgid_n); loginf("ftn Message-ID: %s.\n", buf2); #endif value=ref_store_extended(ref_dbase, buf2, buf, maintenant); } return value; } #endif ifmail-2.14tx8.10.orig/iflib/charset.c100644 0 0 41645 6701151723 15520 0ustar rootroot/* ### Created by P.Saratxaga on 7 Nov 1995 ### * Functions for charset reading * - bugfix for bad Content-Type lines lacking ";". By Marc Schaeffer. */ #include #include #include #include #include "lutil.h" #include "xutil.h" #include "rfcmsg.h" #include "needed.h" #include "config.h" #include "mime.h" #include "charset.h" /* tailor getoutcode() and getincode() to show your transcodage preferences */ int getoutcode(code) /* rfc -> FTN */ int code; { if ((code==CHRS_MACINTOSH) && (toftnchar!=CHRS_NOTSET)) return toftnchar; else if (code==CHRS_MACINTOSH) return CHRS_ISO_8859_1; else if ((toftnchar!=CHRS_NOTSET) && (code==defaultrfcchar)) return toftnchar; else if (code==CHRS_UTF_7||code==CHRS_UTF_8) return CHRS_AUTODETECT; else if (code==CHRS_ZW) return CHRS_GB; else return code; } int getincode(code) /* FTN -> rfc */ int code; { if (code==CHRS_CP437) return CHRS_ISO_8859_1; else if (code==CHRS_CP850) return CHRS_ISO_8859_1; else if (code==CHRS_CP852) return CHRS_ISO_8859_2; else if (code==CHRS_CP862) return CHRS_ISO_8859_8; else if (code==CHRS_CP866) return CHRS_KOI8_R; else if (code==CHRS_CP895) return CHRS_ISO_8859_2; else if (code==CHRS_EUC_JP) return CHRS_ISO_2022_JP; /* else if (code==CHRS_EUC_KR) return CHRS_ISO_2022_KR; */ else if (code==CHRS_FIDOMAZOVIA) return CHRS_ISO_8859_2; else if (code==CHRS_ISO_11) return CHRS_ISO_8859_1; else if (code==CHRS_ISO_4) return CHRS_ISO_8859_1; else if (code==CHRS_ISO_60) return CHRS_ISO_8859_1; else if (code==CHRS_ISO_8859_1_QP) return CHRS_ISO_8859_1_QP; else if (code==CHRS_MACINTOSH) return CHRS_ISO_8859_1; else if (code==CHRS_MIK_CYR) return CHRS_ISO_8859_5; else if (code==CHRS_SJIS) return CHRS_ISO_2022_JP; else if (code==defaultftnchar) return CHRS_AUTODETECT; else return code; } char *getcharset(code) int code; { char *charset; if (code==CHRS_ASCII) charset="us-ascii"; else if (code==CHRS_BIG5) charset="x-CN-Big5"; else if (code==CHRS_CP424) charset="x-cp424"; else if (code==CHRS_CP437) charset="x-cp437"; else if (code==CHRS_CP850) charset="x-cp850"; else if (code==CHRS_CP852) charset="x-cp852"; else if (code==CHRS_CP862) charset="x-cp862"; else if (code==CHRS_CP866) charset="x-cp866"; else if (code==CHRS_CP895) charset="x-cp895"; else if (code==CHRS_EUC_JP) charset="EUC-jp"; else if (code==CHRS_EUC_KR) charset="EUC-kr"; else if (code==CHRS_FIDOMAZOVIA) charset="x-FIDOMAZOVIA"; else if (code==CHRS_GB) charset="x-CN-GB"; else if (code==CHRS_HZ) charset="x-HZ"; else if (code==CHRS_ISO_2022_CN) charset="iso-2022-cn"; else if (code==CHRS_ISO_2022_JP) charset="iso-2022-jp"; else if (code==CHRS_ISO_2022_KR) charset="iso-2022-kr"; else if (code==CHRS_ISO_2022_TW) charset="iso-2022-tw"; else if (code==CHRS_ISO_8859_1) charset="iso-8859-1"; else if (code==CHRS_ISO_8859_1_QP) charset="iso-8859-1"; else if (code==CHRS_ISO_8859_2) charset="iso-8859-2"; else if (code==CHRS_ISO_8859_3) charset="iso-8859-3"; else if (code==CHRS_ISO_8859_4) charset="iso-8859-4"; else if (code==CHRS_ISO_8859_5) charset="iso-8859-5"; else if (code==CHRS_ISO_8859_6) charset="iso-8859-6"; else if (code==CHRS_ISO_8859_7) charset="iso-8859-7"; else if (code==CHRS_ISO_8859_8) charset="iso-8859-8"; else if (code==CHRS_ISO_8859_9) charset="iso-8859-5"; else if (code==CHRS_ISO_8859_10) charset="iso-8859-10"; else if (code==CHRS_ISO_8859_11) charset="iso-8859-11"; else if (code==CHRS_ISO_8859_15) charset="iso-8859-15"; else if (code==CHRS_KOI8_R) charset="koi8-r"; else if (code==CHRS_KOI8_U) charset="koi8-u"; else if (code==CHRS_MACINTOSH) charset="x-mac-roman"; else if (code==CHRS_MIK_CYR) charset="x-mik-cyr"; else if (code==CHRS_NEC) charset="x-NEC-JIS"; else if (code==CHRS_SJIS) charset="x-sjis"; else if (code==CHRS_UTF_7) charset="utf-7"; else if (code==CHRS_UTF_8) charset="utf-8"; else if (code==CHRS_VISCII_11) charset="viscii"; else if (code==CHRS_ZW) charset="x-zW"; else charset="us-ascii"; /* mime default */ return charset; } int getcode(p) char *p; { int code; while (*p && isspace(*p)) p++; if (strncmp(p,"\"",1) == 0) p++; /* if (strncasecmp(p,"us-ascii",8) == 0) code=CHRS_ASCII; */ /* most newsreaders/mail user agents are misconfigured and put "us-ascii" when in fact they use the local charset. */ if (strncasecmp(p,"us-ascii",8) == 0) code=defaultrfcchar; else if (strncasecmp(p,"CN-GB",5) == 0) code=CHRS_GB; else if (strncasecmp(p,"CN-Big5",7) == 0) code=CHRS_BIG5; else if (strncasecmp(p,"EUC-jp",6) == 0) code=CHRS_EUC_JP; else if (strncasecmp(p,"EUC-kr",6) == 0) code=CHRS_EUC_KR; else if (strncasecmp(p,"iso-2022-cn",11) == 0) code=CHRS_ISO_2022_CN; else if (strncasecmp(p,"iso-2022-jp",11) == 0) code=CHRS_ISO_2022_JP; else if (strncasecmp(p,"iso-2022-kr",11) == 0) code=CHRS_ISO_2022_KR; else if (strncasecmp(p,"iso-2022-tw",11) == 0) code=CHRS_ISO_2022_TW; else if (strncasecmp(p,"iso8859-1",9) == 0) code = CHRS_ISO_8859_1; /* erroneous iso8859-1 */ else if (strncasecmp(p,"iso-8859-10",11) == 0) code=CHRS_ISO_8859_10; else if (strncasecmp(p,"iso-8859-11",11) == 0) code=CHRS_ISO_8859_11; else if (strncasecmp(p,"iso-8859-15",11) == 0) code=CHRS_ISO_8859_15; else if (strncasecmp(p,"iso-8859-1",10) == 0) code = CHRS_ISO_8859_1; else if (strncasecmp(p,"iso-8859-2",10) == 0) code=CHRS_ISO_8859_2; else if (strncasecmp(p,"iso-8859-3",10) == 0) code=CHRS_ISO_8859_3; else if (strncasecmp(p,"iso-8859-4",10) == 0) code=CHRS_ISO_8859_4; else if (strncasecmp(p,"iso-8859-5",10) == 0) code=CHRS_ISO_8859_5; else if (strncasecmp(p,"iso-8859-6",10) == 0) code=CHRS_ISO_8859_6; else if (strncasecmp(p,"iso-8859-7",10) == 0) code=CHRS_ISO_8859_7; else if (strncasecmp(p,"iso-8859-8",10) == 0) code=CHRS_ISO_8859_8; else if (strncasecmp(p,"iso-8859-9",10) == 0) code=CHRS_ISO_8859_9; else if (strncasecmp(p,"koi8-r",6) == 0) code=CHRS_KOI8_R; else if (strncasecmp(p,"koi8-u",6) == 0) code=CHRS_KOI8_U; else if (strncasecmp(p,"macintosh",9) == 0) code=CHRS_MACINTOSH; else if (strncasecmp(p,"Shift_JIS",9) == 0) code=CHRS_SJIS; else if (strncasecmp(p,"utf-7",5) == 0) code=CHRS_UTF_7; else if (strncasecmp(p,"utf-8",5) == 0) code=CHRS_UTF_8; else if (strncasecmp(p,"viscii",6) == 0) code=CHRS_VISCII_11; else if (strncasecmp(p,"x-cp424",7) == 0) code=CHRS_CP424; else if (strncasecmp(p,"x-cp437",7) == 0) code=CHRS_CP437; else if (strncasecmp(p,"x-cp850",7) == 0) code=CHRS_CP850; else if (strncasecmp(p,"x-cp852",7) == 0) code=CHRS_CP852; else if (strncasecmp(p,"x-cp862",7) == 0) code=CHRS_CP862; else if (strncasecmp(p,"x-cp866",7) == 0) code=CHRS_CP866; else if (strncasecmp(p,"x-cp895",7) == 0) code=CHRS_CP895; else if (strncasecmp(p,"x-CN-GB",7) == 0) code=CHRS_GB; else if (strncasecmp(p,"x-CN-Big5",9) == 0) code=CHRS_BIG5; else if (strncasecmp(p,"x-EUC-jp",8) == 0) code=CHRS_EUC_JP; else if (strncasecmp(p,"x-FIDOMAZ",9) == 0) code=CHRS_FIDOMAZOVIA; else if (strncasecmp(p,"x-gb2312",8) == 0) code=CHRS_GB; else if (strncasecmp(p,"x-HZ",4) == 0) code=CHRS_HZ; else if (strncasecmp(p,"x-mac-roman",11) == 0) code=CHRS_MACINTOSH; else if (strncasecmp(p,"x-MAZOVIA",9) == 0) code=CHRS_FIDOMAZOVIA; else if (strncasecmp(p,"x-mik",5) == 0) code=CHRS_MIK_CYR; else if (strncasecmp(p,"x-NEC-JIS",9) == 0) code=CHRS_NEC; else if (strncasecmp(p,"x-Shift-JIS",11) == 0) code=CHRS_SJIS; else if (strncasecmp(p,"x-sjis",6) == 0) code=CHRS_SJIS; else if (strncasecmp(p,"x-tis620",8) == 0) code=CHRS_ISO_8859_11; else if (strncasecmp(p,"x-x-big5",8) == 0) code=CHRS_BIG5; else if (strncasecmp(p,"x-zW",4) == 0) code=CHRS_ZW; /* only intended to be in Areas file. So we can try to found the * from the values of chars in message itself */ else if (strncasecmp(p,"AUTODETECT",10) == 0) code=CHRS_AUTODETECT; else if (strncasecmp(p,"default",7) == 0) code=CHRS_NOTSET; else { code=CHRS_NOTSET; loginf("Unknown charset: %s",p); } return code; } int readcharset(p) char *p; { int code; if (!strchr(p, ';')) /* foolproof MSC96 */ return CHRS_NOTSET; else if ((strcasestr(p,"text/plain")) && (strcasestr(p,"charset="))) code=getcode(strcasestr(strchr(p,';'),"charset=")+8); else if ((strcasestr(p,"text/html")) && (strcasestr(p,"charset="))) code=getcode(strcasestr(strchr(p,';'),"charset=")+8); else code=CHRS_NOTSET; return code; } /* readchrs() is also used to read outcode in Areas file (if JE defined) */ int readchrs(p) char *p; { int code; while (*p && isspace(*p)) p++; if (strncasecmp(p,"8859",4) == 0) code=CHRS_ISO_8859_1; /* for X-FTN-CODEPAGE: */ else if (strncasecmp(p,"437",3) == 0) code=CHRS_CP437; else if (strncasecmp(p,"850",3) == 0) code=CHRS_CP850; else if (strncasecmp(p,"Arabic",6) == 0) code=CHRS_ISO_8859_6; else if (strncasecmp(p,"ASCII",5) == 0) code=CHRS_ASCII; else if (strncasecmp(p,"BIG",3) == 0) code=CHRS_BIG5; else if (strncasecmp(p,"CP 852",6) == 0) code=CHRS_CP852; else if (strncasecmp(p,"CP424",5) == 0) code=CHRS_CP424; else if (strncasecmp(p,"CP437",5) == 0) code=CHRS_CP437; else if (strncasecmp(p,"CP850",5) == 0) code=CHRS_CP850; else if (strncasecmp(p,"CP852",5) == 0) code=CHRS_CP852; else if (strncasecmp(p,"CP862",5) == 0) code=CHRS_CP862; else if (strncasecmp(p,"CP866",5) == 0) code=CHRS_CP866; /* ??? */ else if (strncasecmp(p,"CP895",5) == 0) code=CHRS_CP895; else if (strncasecmp(p,"CP932",5) == 0) code=CHRS_SJIS; else if (strncasecmp(p,"CP942",5) == 0) code=CHRS_SJIS; else if (strncasecmp(p,"Cyrillic",8) == 0) code=CHRS_ISO_8859_5; else if (strncasecmp(p,"EUC-JP",6) == 0) code=CHRS_EUC_JP; else if (strncasecmp(p,"EUC-KR",6) == 0) code=CHRS_EUC_KR; else if (strncasecmp(p,"EUC",3) == 0) code=CHRS_EUC_JP; else if (strncasecmp(p,"FIDOMAZ",7) == 0) code=CHRS_FIDOMAZOVIA; else if (strncasecmp(p,"GB",2) == 0) code=CHRS_GB; else if (strncasecmp(p,"Greek",5) == 0) code=CHRS_ISO_8859_7; else if (strncasecmp(p,"Hebrew",6) == 0) code=CHRS_ISO_8859_8; else if (strncasecmp(p,"HZ",2) == 0) code=CHRS_HZ; /* Some FTN programs are misconfigured and use "IBMPC 2" kludge * for the local DOS charset, even if it is DOS cyrillic or other * so we will assume defaultftnchar here */ else if (strncasecmp(p,"IBMPC",5) == 0) code=defaultftnchar; else if (strncasecmp(p,"IBM",3) == 0) code=CHRS_CP437; /* "IBMPC 1" "IBMPC 2" "IBM CMP" */ else if (strncasecmp(p,"ISO-11",6) == 0) code=CHRS_ISO_11; else if (strncasecmp(p,"ISO-2022-CN",11) == 0) code=CHRS_ISO_2022_CN; else if (strncasecmp(p,"ISO-2022-KR",11) == 0) code=CHRS_ISO_2022_KR; else if (strncasecmp(p,"ISO-2022-TW",11) == 0) code=CHRS_ISO_2022_TW; else if (strncasecmp(p,"ISO-4",5) == 0) code=CHRS_ISO_4; else if (strncasecmp(p,"ISO-60",6) == 0) code=CHRS_ISO_60; else if (strncasecmp(p,"ISO-8859",8) == 0) code=CHRS_ISO_8859_1; else if (strncasecmp(p,"JIS",3) == 0) code=CHRS_ISO_2022_JP; /* ??? - JE */ else if (strncasecmp(p,"Kanji",5) == 0) code=CHRS_ISO_2022_JP; else if (strncasecmp(p,"KOI8-R",6) == 0) code=CHRS_KOI8_R; else if (strncasecmp(p,"KOI8-U",6) == 0) code=CHRS_KOI8_U; else if (strncasecmp(p,"KOI8",4) == 0) code=CHRS_KOI8_R; else if (strncasecmp(p,"LATIN-0",7) == 0) code=CHRS_ISO_8859_15; else if (strncasecmp(p,"LATIN1QP",8) == 0) code=CHRS_ISO_8859_1_QP; else if (strncasecmp(p,"LATIN-1",7) == 0) code=CHRS_ISO_8859_1; else if (strncasecmp(p,"Latin-2",7) == 0) code=CHRS_ISO_8859_2; else if (strncasecmp(p,"Latin-3",7) == 0) code=CHRS_ISO_8859_3; else if (strncasecmp(p,"Latin-4",7) == 0) code=CHRS_ISO_8859_4; else if (strncasecmp(p,"Latin-5",7) == 0) code=CHRS_ISO_8859_9; else if (strncasecmp(p,"Latin-6",7) == 0) code=CHRS_ISO_8859_10; else if (strncasecmp(p,"MAC",3) == 0) code=CHRS_MACINTOSH; else if (strncasecmp(p,"MIK",3) == 0) code=CHRS_MIK_CYR; else if (strncasecmp(p,"MAZOVIA",7) == 0) code=CHRS_FIDOMAZOVIA; else if (strncasecmp(p,"NEC",3) == 0) code=CHRS_NEC; /* ??? - JE */ else if (strncasecmp(p,"PC-8",4) == 0) code=CHRS_CP437; else if (strncasecmp(p,"SJIS",4) == 0) code=CHRS_SJIS; /* ??? - JE */ else if (strncasecmp(p,"Thai",4) == 0) code=CHRS_ISO_8859_11; else if (strncasecmp(p,"UJIS",4) == 0) code=CHRS_EUC_JP; else if (strncasecmp(p,"UTF-7",5) == 0) code=CHRS_UTF_7; else if (strncasecmp(p,"UTF-8",5) == 0) code=CHRS_UTF_8; else if (strncasecmp(p,"VISCII",6) == 0) code=CHRS_VISCII_11; else if (strncasecmp(p,"ZW",2) == 0) code=CHRS_ZW; /* only intended to be in Areas file. So we can try to found the * from the values of chars in message itself */ else if (strncasecmp(p,"AUTODETECT",10) == 0) code=CHRS_AUTODETECT; else if (strncasecmp(p,"default",7) == 0) code=CHRS_NOTSET; else { code=CHRS_NOTSET; loginf("Unknown CHRS: %s",p); } return code; /* if you know of other CHRS: values which are in use, let me know so I can include them. Mail me to srtxg@chanae.alphanet.ch or srtxg (2:293/2219) */ } char *getchrs(code) int code; { char *chrs=NULL; if (code == CHRS_ASCII) chrs="ASCII 2"; else if (code == CHRS_BIG5) chrs="BIG5"; /* ??? */ else if (code == CHRS_CP424) chrs="CP424"; /* ??? */ else if (code == CHRS_CP437) chrs="IBMPC 2"; else if (code == CHRS_CP850) chrs="CP850 2"; else if (code == CHRS_CP852) chrs="CP852"; /* ??? */ else if (code == CHRS_CP862) chrs="CP862"; /* ??? */ else if (code == CHRS_CP866) chrs="CP866"; else if (code == CHRS_CP895) chrs="CP895 2"; else if (code == CHRS_EUC_JP) chrs="UJIS"; /* ??? */ else if (code == CHRS_EUC_KR) chrs="EUC-KR"; /* ??? */ else if (code == CHRS_FIDOMAZOVIA) chrs="FIDOMAZ 2"; else if (code == CHRS_GB) chrs="GB"; /* ??? */ else if (code == CHRS_HZ) chrs="HZ 2"; /* ??? */ else if (code == CHRS_ISO_2022_CN) chrs="ISO-2022-CN"; /* ??? */ else if (code == CHRS_ISO_2022_JP) chrs="JIS"; else if (code == CHRS_ISO_2022_KR) chrs="ISO-2022-KR"; /* ??? */ else if (code == CHRS_ISO_2022_TW) chrs="ISO-2022-TW"; /* ??? */ else if (code == CHRS_ISO_8859_1) chrs="LATIN-1 2"; else if (code == CHRS_ISO_8859_1_QP) chrs="LATIN-1 2"; else if (code == CHRS_ISO_8859_2) chrs="Latin-2 3"; else if (code == CHRS_ISO_8859_3) chrs="Latin-3 3"; else if (code == CHRS_ISO_8859_4) chrs="Latin-4 3"; else if (code == CHRS_ISO_8859_5) chrs="Cyrillic 3"; /* ??? */ else if (code == CHRS_ISO_8859_6) chrs="Arabic 3"; /* ??? */ else if (code == CHRS_ISO_8859_7) chrs="Greek 3"; /* ??? */ else if (code == CHRS_ISO_8859_8) chrs="Hebrew 3"; /* ??? */ else if (code == CHRS_ISO_8859_9) chrs="Latin-5 3"; else if (code == CHRS_ISO_8859_10) chrs="Latin-6 3"; else if (code == CHRS_ISO_8859_11) chrs="Thai 3"; else if (code == CHRS_ISO_8859_15) chrs="LATIN-0 2"; else if (code == CHRS_KOI8_R) chrs="KOI8-R"; /* ??? */ else if (code == CHRS_KOI8_U) chrs="KOI8-U"; /* ??? */ else if (code == CHRS_MACINTOSH) chrs="MAC 2"; else if (code == CHRS_MIK_CYR) chrs="MIK-CYR"; else if (code == CHRS_NEC) chrs="NEC-JIS"; /* ??? */ else if (code == CHRS_SJIS) chrs="SJIS"; /* ??? */ else if (code == CHRS_UTF_7) chrs="UTF-7"; else if (code == CHRS_UTF_8) chrs="UTF-8"; else if (code == CHRS_VISCII_11) chrs="VISCII 3"; else if (code == CHRS_ZW) chrs="ZW"; /* ??? */ else chrs=NULL; return chrs; } void writechrs(code,pkt,ispkt) int code; FILE *pkt; int ispkt; { char *akludge,*endline,*chrs=NULL; akludge = endline = NULL; if (ispkt==0) { akludge="X-FTN-"; endline="\n"; } else if (ispkt==1) { akludge="\1"; endline="\r"; } else if (ispkt==2) { akludge="X-FTN-ORIG"; endline="\n"; } chrs=getchrs(code); if (chrs) fprintf(pkt,"%sCHRS: %s%s",akludge,chrs,endline); } void writecharset(code,pip,msg,kmsg) int code; FILE *pip; rfcmsg *msg, *kmsg; { char *p, *charset=NULL; charset=getcharset(code); if ((p=hdr("Mime-Version",msg))) fprintf(pip,"Mime-Version:%s",p); else if ((p=hdr("RFC-Mime-Version",kmsg))) fprintf(pip,"Mime-Version: %s",p); else if ((p=hdr("Mime-Version",kmsg))) fprintf(pip,"Mime-Version: %s",p); else if ((charset) && (code != CHRS_NOTSET)) fprintf(pip,"Mime-Version: 1.0\n"); if ((p=hdr("Content-Type",msg))) fprintf(pip,"Content-Type:%s",p); else if ((p=hdr("RFC-Content-Type",kmsg))) fprintf(pip,"Content-Type: %s",p); else if ((p=hdr("Content-Type",kmsg))) fprintf(pip,"Content-Type: %s",p); else if ((charset) && (code != CHRS_NOTSET)) { if ((p=hdr("FSCHTML",kmsg)) || (p=hdr("HTML",kmsg))) fprintf(pip,"Content-Type: text/html; charset=%s\n",charset); else fprintf(pip,"Content-Type: text/plain; charset=%s\n",charset); } if ((p=hdr("Content-Length",msg))) fprintf(pip,"Content-Length%s",p); else if ((p=hdr("RFC-Content-Length",kmsg))) fprintf(pip,"Content-Length: %s",p); else if ((p=hdr("Content-Length",kmsg))) fprintf(pip,"Content-Length: %s",p); if ((p=hdr("Content-Transfer-Encoding",msg))) fprintf(pip,"Content-Transfer-Encoding:%s",p); else if ((p=hdr("RFC-Content-Transfer-Encoding",kmsg))) fprintf(pip,"Content-Transfer-Encoding: %s",p); else if ((p=hdr("Content-Transfer-Encoding",kmsg))) fprintf(pip,"Content-Transfer-Encoding: %s",p); else if ((charset) && (code == CHRS_ISO_8859_1_QP)) fprintf(pip,"Content-Transfer-Encoding: quoted-printable\n"); else if ((charset) && (code != CHRS_NOTSET)) { fprintf(pip,"Content-Transfer-Encoding: "); if ((code == CHRS_ASCII || code == CHRS_UTF_7)) fprintf(pip,"7bit\n"); else if (strncasecmp(charset,"iso-2022-",9) == 0) fprintf(pip,"7bit\n"); else fprintf(pip,"8bit\n"); /* all others are 8 bit */ } } ifmail-2.14tx8.10.orig/iflib/mime.c100644 1751 50 13654 6352273265 14371 0ustar mdsrc#include #include #include #include #include "needed.h" #include "lutil.h" #include "xutil.h" /* QP-Decode code by T.Tanaka */ /* QP-Encode inspired from sendmail code of Berkley */ /* XD() converts hexadecimal digit to decimal */ #define XD(c) ( (((c) >= '0') && ((c) <= '9')) ? (c) - '0' : \ (((c) >= 'A') && ((c) <= 'F')) ? (c) - 'A' + 10 : \ (((c) >= 'a') && ((c) <= 'f')) ? (c) - 'a' + 10 : 0) /* chars to be converted in qp_encode() */ char badchars[] = "\001\002\003\004\005\006\007" \ "\010\011\012\013\014\015\016\017" \ "\020\021\022\023\024\025\026\027" \ "\030\031\032\033\034\035\036\037" \ "\177" \ "\200\201\202\203\204\205\206\207" \ "\210\211\212\213\214\215\216\217" \ "\220\221\222\223\224\225\226\227" \ "\230\231\232\233\234\235\236\237" \ "\240\241\242\243\244\245\246\247" \ "\250\251\252\253\254\255\256\257" \ "\260\261\262\263\264\265\266\267" \ "\270\271\272\273\274\275\276\277" \ "\300\301\302\303\304\305\306\307" \ "\310\311\312\313\314\315\316\317" \ "\320\321\322\323\324\325\326\327" \ "\330\331\332\333\334\335\336\337" \ "\340\341\342\343\344\345\346\347" \ "\350\351\352\353\354\355\356\357" \ "\360\361\362\363\364\365\366\367" \ "\370\371\372\373\374\375\376\377"; char badchars2[] = "!\"#$@[\\]^`{|}~()<>,;:/_"; char Base16Code[] = "0123456789ABCDEF"; char Base64Code[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* returns numeric value from a Base64Code[] digit */ static int index_hex[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,0x3e, -1, -1, -1,0x3f, 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b, 0x3c,0x3d, -1, -1, -1, -1, -1, -1, -1,0x00,0x01,0x02,0x03,0x04,0x05,0x06, 0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e, 0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16, 0x17,0x18,0x19, -1, -1, -1, -1, -1, -1,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20, 0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30, 0x31,0x32,0x33, -1, -1, -1, -1, -1 }; char *qp_decode(s) char *s; { static char *buf; char *p, *q; if (buf) free(buf); if ((buf = malloc(strlen(s) + 1 * sizeof(char))) == NULL) { loginf("qp_decode:out of memory:string too long:\"%s\"", s); return s; } for (p = s, q = buf; *p != '\0';) { if (*p == '=') { ++p; if (*p == '\0') { /* ends with "=(null)" */ *q++ = '='; break; } else if (*p == '\n') break; else if (isxdigit(*p) && isxdigit(*(p + 1))) { *q++ = 16 * XD(*p) + XD(*(p + 1)); ++p; ++p; } else { /* "=1x" "=5(null)" "=G\n" "=0=" etc. */ *q++ = '='; *q++ = *p++; } } else *q++ = *p++; } *q = '\0'; return buf; } char *qp_encode(s,mode) char *s; int mode; { static char *buf; char *p, *q; int linelen=0; if (buf) free(buf); if ((buf = malloc(3 * strlen(s) + 1 * sizeof(char))) == NULL) { loginf("qp_encode:out of memory:string too long:\"%s\"", s); return s; } for (p = s, q = buf; *p != '\0';) { if (*p == '\n') { *q++ = *p++; linelen = 0; } else if ((mode == 1) && (*p == ' ')) { *q++ = '_'; p++; linelen += 1; } else if (*p == ' ' || *p == '\t') { if ((linelen > 72) && (*(p+1) != '\n')) { *q++ = *p++; *q++ = '='; *q++ = '\n'; linelen = 0; } else if (*(p+1) == '\n') { *q++ = *p++; *q++ = '='; *q++ = *p++; linelen = 0; } else { *q++ = *p++; linelen += 1; } } else if ((strchr(badchars,*p)) || (*p == '=') || ((mode==1) && (strchr(badchars2,*p))) ) { if (linelen > 72) { *q++ = '\n'; linelen = 0; } *q++ = '='; *q++ = Base16Code[(*p >> 4) & 0x0f]; *q++ = Base16Code[*p & 0x0f]; linelen += 3; p++; } else { *q++ = *p++; linelen++; } } *q = '\0'; return buf; } /* * Base64 stores 3 bytes of 8bits into 4 bytes of six bits (the 2 remaining * bits are left to 0). * * AAAAAAAA BBBBBBBB CCCCCCCC --> 00AAAAAA 00AABBBB 00BBBBCC 00CCCCCC * */ char *b64_decode(s) char *s; { static char *buf; static char buf2[4]; char *p, *q; int i,t; if (buf) free(buf); if ((buf = malloc(3 * strlen(s) + 1 * sizeof(char))) == NULL) { loginf("b64_decode:out of memory:string too long:\"%s\"", s); return s; } for (p = s, q = buf; *p != '\0';) { for (i=0;i<4;i++) buf2[i]=0x40; for (i=0;((i<4) && (*p != '\0'));) { t=(index_hex[(unsigned int)*p]); if (*p == '=') buf2[i++]=0x40; else if (t != -1) buf2[i++]=(char)t; p++; } if ((buf2[0] < 0x40) && (buf2[1] < 0x40)) *q++=(((buf2[0] & 0x3f) << 2) | ((buf2[1] >> 4) & 0x03)); if ((buf2[1] < 0x40) && (buf2[2] < 0x40)) *q++=(((buf2[1] & 0x0f) << 4) | ((buf2[2] >> 2) & 0x0f)); if ((buf2[2] < 0x40) && (buf2[3] < 0x40)) *q++=(((buf2[2] & 0x03) << 6) | (buf2[3] & 0x3f)); } *q = '\0'; return buf; } char *b64_encode(s) char *s; { static char *buf; static char buf2[3]; char *p, *q; int i; if (buf) free(buf); if ((buf = malloc(3 * strlen(s) + 1 * sizeof(char))) == NULL) { loginf("b64_encode:out of memory:string too long:\"%s\"", s); return s; } for (p = s, q = buf; *p != '\0';) { for (i=0;((i<3) && (*p != '\0'));) buf2[i++]=*p++; *q++=Base64Code[((buf2[0] >> 2) & 0x3f)]; *q++=Base64Code[(((buf2[0] & 0x03) << 4) | ((buf2[1] >> 4) & 0x0f))]; if (i<2) *q++='='; else *q++=Base64Code[(((buf2[1] & 0x0f) << 2) | ((buf2[2] >> 6) & 0x03))]; if (i<3) *q++='='; else *q++=Base64Code[(buf2[2] & 0x3f)]; } *q = '\0'; return buf; } ifmail-2.14tx8.10.orig/iflib/cleanup_ref.c100644 1751 50 2644 6351073537 15701 0ustar mdsrc/* Projet References -- Effacement des entrees expirees de la base. * Auteur: Marc SCHAEFER * Date creation: 01/12/96 * Date modification: 16/06/97 * V1.0 PV003 MSC97 * DESCRIPTION * Ce programme supprime les entrees de la base de references, en * fonction de l'implementation de cette suppression dans ref.c. * Ce module est une interface (wrapper). * A l'aide de la fonction ref_cleanup() supprime les * vieilles entrees dans la base. * RESULT * 0 si ok * 1 si error * 2 si pas de dbm * NOTES * BUGS * - Hard-coded constants; maybe should use lib.a * - See ref.c * TODO * BASED-ON * refcleanup.c PV001 of 19/02/96 MSC96 * MODIFICATION-HISTORY * PV002 14/06/97 schaefer Interface change in ref_interface.h */ #include #include "config.h" #include "ref_interface.h" #define HISTORY_FILE "not_used" #ifndef REF_DBM #define REF_DBM "/var/spool/ifmail/refdb" #endif int main(void) { ref_private_t *ref_db = ref_init(REF_DBM); if (ref_db) { if (ref_cleanup(ref_db, HISTORY_FILE)) { ref_deinit(ref_db); exit(0); /* NOT REACHED */ } else { perror("can't cleanup"); ref_deinit(ref_db); exit(1); /* NOT REACHED */ } /* NOT REACHED */ } else { perror("could not open ref_db"); exit(2); /* NOT REACHED */ } /* NOT REACHED */ } ifmail-2.14tx8.10.orig/iflib/make_new_ref.c100644 1751 50 5531 6351073537 16036 0ustar mdsrc/* Projet References -- Effacement des entrees expirees de la base par * recopie. * Auteur: Marc SCHAEFER * Date creation: 14/06/97 * Date modification: 14/06/97 * V1.0 PV001 MSC97 * DESCRIPTION * Ce programme copie les entrées non expirées de la base de * référence dans un nouveau fichier, qui peut ensuite remplacer * l'ancien. * RESULT * 0 si ok * 1 si error * 2 si pas de dbm * NOTES * - Théoriquement plus efficace que le standard cleanup_ref(). * BUGS * - Partly tested. * - Hard-coded constants; maybe should use lib.a * - See ref.c * TODO * - Rename the original file first. * BASED-ON * cleanup_ref.c PV002 of 15/02/97. */ #include #include "config.h" #include "ref_interface.h" #define BOOL signed char #define TRUE -1 #define FALSE 0 #define HISTORY_FILE "not_used" #ifndef REF_DBM #define REF_DBM "/var/spool/ifmail/refdb" #endif #ifndef NEW_REF_DBM #define NEW_REF_DBM "/var/spool/ifmail/refdb_new" #endif #define MAX_ENTRY_LEN 1024 #define DAYSEC 86400 #define MAXDAYS 30 /* BUGS: should be configurable */ int main(void) { ref_private_t *ref_db = ref_init(REF_DBM); BOOL had_error = FALSE; if (ref_db) { ref_private_t *new_ref_db = ref_init(NEW_REF_DBM); if (new_ref_db) { char rfc_msgid[MAX_ENTRY_LEN]; char ftn_msgid[MAX_ENTRY_LEN]; time_t the_time; time_t nouveau = time(NULL); if (ref_first_key(ref_db, ftn_msgid, MAX_ENTRY_LEN)) { do { if (ref_get_extended(ref_db, ftn_msgid, rfc_msgid, MAX_ENTRY_LEN, &the_time)) { /* Verifie la date */ if (the_time<= nouveau) { int days; if ( (days = ((nouveau - the_time) / DAYSEC)) > MAXDAYS) { #ifdef DEBUG printf("will not copy because %d days.\n", days); #endif } else { #ifdef DEBUG printf("will copy, days=%d.\n", days); #endif if (!ref_store_extended(new_ref_db, ftn_msgid, rfc_msgid, the_time)) { had_error = TRUE; fprintf(stderr, "error while storing\n"); } } } } else { had_error = TRUE; fprintf(stderr, "error while getting value\n"); } } while (!had_error && ref_next_key(ref_db, ftn_msgid, MAX_ENTRY_LEN)); } else { had_error = TRUE; fprintf(stderr, "no first key\n"); } ref_deinit(new_ref_db); ref_deinit(ref_db); } else { perror("could not open new_ref_db"); ref_deinit(ref_db); exit(2); /* NOT REACHED */ } } else { perror("could not open ref_db"); exit(2); /* NOT REACHED */ } exit(had_error ? 1 : 0); } ifmail-2.14tx8.10.orig/iflib/tmpfile.c100644 1751 50 460 6327762147 15035 0ustar mdsrc/* Contributed by Igor Sharfmesser */ #include #include FILE *tmpfile() { char *name; FILE *file; name = tempnam("/tmp", "ifm"); if(name) { file = fopen(name,"w+"); if( file ) { unlink(name); return file; } } return NULL; } ifmail-2.14tx8.10.orig/iflib/dirent.c100644 1751 50 2071 5662405420 14667 0ustar mdsrc/* * This routines have been written to replace the stuff of the Motorola * BSD Compatibility Package on a M88k with System V Release 4.1, which * did not seem to do the things described on the manual pages when I * tried to compile IFMail. * I don't know, if they are useful on other systems as well. * * Written by stefan@space.s-link.de (Stefan Westerfeld) */ #include "directory.h" #include DIR *opendir(char *name) { static struct e_dirent *de; if((de=(struct e_dirent *)malloc(sizeof(struct e_dirent))) == NULL) return(NULL); de->nbytes=0; if((de->fd=open(name,O_RDONLY)) > 0) return(de); free(de); return(NULL); } void closedir(struct e_dirent *de) { close(de->fd); free(de); } void rewinddir(struct e_dirent *de) { lseek(de->fd,0,SEEK_SET); } struct dirent *readdir(struct e_dirent *de) { if(de->nbytes==0) { de->nbytes=getdents(de->fd,(struct dirent *)de->buf,1024); de->bp=de->buf; if(de->nbytes==0) return(NULL); } de->dp=(struct dirent *)de->bp; de->nbytes-=de->dp->d_reclen; de->bp+=de->dp->d_reclen; return(de->dp); } ifmail-2.14tx8.10.orig/iflib/lhash.c100640 1751 50 24276 6330772173 14535 0ustar mdsrc/* crypto/lhash/lhash.c */ /* Copyright (C) 1995-1996 Eric Young (eay@mincom.oz.au) * All rights reserved. * * This file is part of an SSL implementation written * by Eric Young (eay@mincom.oz.au). * The implementation was written so as to conform with Netscapes SSL * specification. This library and applications are * FREE FOR COMMERCIAL AND NON-COMMERCIAL USE * as long as the following conditions are aheared to. * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. If this code is used in a product, * Eric Young should be given attribution as the author of the parts used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Eric Young (eay@mincom.oz.au) * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ char *lh_version="lhash part of SSLeay 0.6.4 30-Aug-1996"; /* Code for dynamic hash table routines * Author - Eric Young v 2.0 * * 2.0 eay - Fixed a bug that occured when using lh_delete * from inside lh_doall(). As entries were deleted, * the 'table' was 'contract()ed', making some entries * jump from the end of the table to the start, there by * skiping the lh_doall() processing. eay - 4/12/95 * * 1.9 eay - Fixed a memory leak in lh_free, the LHASH_NODEs * were not being free()ed. 21/11/95 * * 1.8 eay - Put the stats routines into a seperate file, lh_stats.c * 19/09/95 * * 1.7 eay - Removed the fputs() for realloc failures - the code * should silently tolerate them. I have also fixed things * lint complained about 04/05/95 * * 1.6 eay - Fixed an invalid pointers in contract/expand 27/07/92 * * 1.5 eay - Fixed a misuse of realloc in expand 02/03/1992 * * 1.4 eay - Fixed lh_doall so the function can call lh_delete 28/05/91 * * 1.3 eay - Fixed a few lint problems 19/3/1991 * * 1.2 eay - Fixed lh_doall problem 13/3/1991 * * 1.1 eay - Added lh_doall * * 1.0 eay - First version */ #include #include #include #include "lhash.h" #undef MIN_NODES #define MIN_NODES 16 #define UP_LOAD (2*LH_LOAD_MULT) /* load times 256 (default 2) */ #define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */ #ifndef NOPROTO #define P_CP char * #define P_CPP char *,char * static void expand(LHASH *lh); static void contract(LHASH *lh); static LHASH_NODE **getrn(LHASH *lh, char *data, unsigned long *rhash); #else #define P_CP #define P_CPP static void expand(); static void contract(); static LHASH_NODE **getrn(); #endif LHASH *lh_new(h, c) unsigned long (*h)(); int (*c)(); { LHASH *ret; int i; if ((ret=(LHASH *)malloc(sizeof(LHASH))) == NULL) goto err0; if ((ret->b=(LHASH_NODE **)malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL) goto err1; for (i=0; ib[i]=NULL; ret->comp=((c == NULL)?(int (*)())strcmp:c); ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h); ret->num_nodes=MIN_NODES/2; ret->num_alloc_nodes=MIN_NODES; ret->p=0; ret->pmax=MIN_NODES/2; ret->up_load=UP_LOAD; ret->down_load=DOWN_LOAD; ret->num_items=0; ret->num_expands=0; ret->num_expand_reallocs=0; ret->num_contracts=0; ret->num_contract_reallocs=0; ret->num_hash_calls=0; ret->num_comp_calls=0; ret->num_insert=0; ret->num_replace=0; ret->num_delete=0; ret->num_no_delete=0; ret->num_retreve=0; ret->num_retreve_miss=0; ret->num_hash_comps=0; return(ret); err1: free((char *)ret); err0: return(NULL); } void lh_free(lh) LHASH *lh; { unsigned int i; LHASH_NODE *n,*nn; for (i=0; inum_nodes; i++) { n=lh->b[i]; while (n != NULL) { nn=n->next; free(n); n=nn; } } free((char *)lh->b); free((char *)lh); } char *lh_insert(lh, data) LHASH *lh; char *data; { unsigned long hash; LHASH_NODE *nn,**rn; char *ret; if (lh->up_load <= (lh->num_items*LH_LOAD_MULT/lh->num_nodes)) expand(lh); rn=getrn(lh,data,&hash); if (*rn == NULL) { if ((nn=(LHASH_NODE *)malloc(sizeof(LHASH_NODE))) == NULL) return(NULL); nn->data=data; nn->next=NULL; #ifndef NO_HASH_COMP nn->hash=hash; #endif *rn=nn; ret=NULL; lh->num_insert++; lh->num_items++; } else /* replace same key */ { ret= (*rn)->data; (*rn)->data=data; lh->num_replace++; } return(ret); } char *lh_delete(lh, data) LHASH *lh; char *data; { unsigned long hash; LHASH_NODE *nn,**rn; char *ret; rn=getrn(lh,data,&hash); if (*rn == NULL) { lh->num_no_delete++; return(NULL); } else { nn= *rn; *rn=nn->next; ret=nn->data; free((char *)nn); lh->num_delete++; } lh->num_items--; if ((lh->num_nodes > MIN_NODES) && (lh->down_load >= (lh->num_items*LH_LOAD_MULT/lh->num_nodes))) contract(lh); return(ret); } char *lh_retrieve(lh, data) LHASH *lh; char *data; { unsigned long hash; LHASH_NODE **rn; char *ret; rn=getrn(lh,data,&hash); if (*rn == NULL) { lh->num_retreve_miss++; return(NULL); } else { ret= (*rn)->data; lh->num_retreve++; } return(ret); } void lh_doall(lh, func) LHASH *lh; void (*func)(); { lh_doall_arg(lh,func,NULL); } void lh_doall_arg(lh, func, arg) LHASH *lh; void (*func)(); char *arg; { int i; LHASH_NODE *a,*n; /* reverse the order so we search from 'top to bottom' * We were having memory leaks otherwise */ for (i=lh->num_nodes-1; i>=0; i--) { a=lh->b[i]; while (a != NULL) { /* 28/05/91 - eay - n added so items can be deleted * via lh_doall */ n=a->next; func(a->data,arg); a=n; } } } static void expand(lh) LHASH *lh; { LHASH_NODE **n,**n1,**n2,*np; unsigned int p,i,j; unsigned long hash,nni; lh->num_nodes++; lh->num_expands++; p=(int)lh->p++; n1= &(lh->b[p]); n2= &(lh->b[p+(int)lh->pmax]); *n2=NULL; /* 27/07/92 - eay - undefined pointer bug */ nni=lh->num_alloc_nodes; for (np= *n1; np != NULL; ) { #ifndef NO_HASH_COMP hash=np->hash; #else hash=(*(lh->hash))(np->data); lh->num_hash_calls++; #endif if ((hash%nni) != p) { /* move it */ *n1= (*n1)->next; np->next= *n2; *n2=np; } else n1= &((*n1)->next); np= *n1; } if ((lh->p) >= lh->pmax) { j=(int)lh->num_alloc_nodes*2; n=(LHASH_NODE **)realloc((char *)lh->b, (unsigned int)sizeof(LHASH_NODE *)*j); if (n == NULL) { /* fputs("realloc error in lhash",stderr); */ lh->p=0; return; } /* else */ for (i=(int)lh->num_alloc_nodes; ipmax=lh->num_alloc_nodes; lh->num_alloc_nodes=j; lh->num_expand_reallocs++; lh->p=0; lh->b=n; } } static void contract(lh) LHASH *lh; { LHASH_NODE **n,*n1,*np; np=lh->b[lh->p+lh->pmax-1]; lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */ if (lh->p == 0) { n=(LHASH_NODE **)realloc((char *)lh->b, (unsigned int)(sizeof(LHASH_NODE *)*lh->pmax)); if (n == NULL) { /* fputs("realloc error in lhash",stderr); */ return; } lh->num_contract_reallocs++; lh->num_alloc_nodes/=2; lh->pmax/=2; lh->p=lh->pmax-1; lh->b=n; } else lh->p--; lh->num_nodes--; lh->num_contracts++; n1=lh->b[(int)lh->p]; if (n1 == NULL) lh->b[(int)lh->p]=np; else { while (n1->next != NULL) n1=n1->next; n1->next=np; } } static LHASH_NODE **getrn(lh, data, rhash) LHASH *lh; char *data; unsigned long *rhash; { LHASH_NODE **ret,*n1; unsigned long hash,nn; int (*cf)(); hash=(*(lh->hash))(data); lh->num_hash_calls++; *rhash=hash; nn=hash%lh->pmax; if (nn < lh->p) nn=hash%lh->num_alloc_nodes; cf=lh->comp; ret= &(lh->b[(int)nn]); for (n1= *ret; n1 != NULL; n1=n1->next) { #ifndef NO_HASH_COMP lh->num_hash_comps++; if (n1->hash != hash) { ret= &(n1->next); continue; } #endif lh->num_comp_calls++; if ((*cf)(n1->data,data) == 0) break; ret= &(n1->next); } return(ret); } /* static unsigned long lh_strhash(str) char *str; { int i,l; unsigned long ret=0; unsigned short *s; if (str == NULL) return(0); l=(strlen(str)+1)/2; s=(unsigned short *)str; for (i=0; i>2)^v)&0x0f; ret=(ret<>(32-r)); ret&=0xFFFFFFFFL; ret^=v*v; c++; } return((ret>>16)^ret); } ifmail-2.14tx8.10.orig/iflib/hash.c100644 1751 50 431 6330772154 14307 0ustar mdsrc#include #include "hash.h" #include "lhash.h" void hash_update_s(id,mod) unsigned long *id; char *mod; { *id ^= lh_strhash(mod); } void hash_update_n(id,mod) unsigned long *id; unsigned long mod; { char buf[32]; sprintf(buf,"%030lu",mod); *id ^= lh_strhash(buf); } ifmail-2.14tx8.10.orig/iflib/lutil.h100644 0 0 2016 6701151723 15172 0ustar rootroot#ifndef IFMAIL_LUTIL_H #define IFMAIL_LUTIL_H #define S(x) (x)?(x):"(null)" #define DBG_LOCK 4 #define DBG_AKA 6 #define DBG_OUTBOUND 7 #define DBG_CALL 8 #define DBG_HANDSHAKE 10 #define DBG_PROTOCOL 11 #define DBG_FILELIST 12 #define DBG_NLFLAG 13 #define DBG_MODEM 18 #define DBG_NODELIST 20 #define DBG_HYDRA 26 extern unsigned long verbose; extern char *myname; extern int logfacility; void setmyname(char*); void setnamesfx(char*); unsigned long setverbose(char*); void debug(unsigned long,char*,...); void loginf(char*,...); void logerr(char*,...); char *date(long); char *printable(char*,int); char *printablec(char); #ifdef DONT_HAVE_GETOPT extern int getopt(); extern char *optarg; extern int optind; #endif #if defined(HAS_TCP) || defined(HAS_TERM) #define FIDOPORT 60179 /* my birthday */ #define BINKPPORT 24554 #endif #define TCPMODE_IFC 0 /* ifcico native EMSI on raw TCP */ #define TCPMODE_TELNET 1 /* EMSI encapsulation through telnet */ #define TCPMODE_BINKP 2 /* Binkp protocol */ #endif /* IFMAIL_LUTIL_H */ ifmail-2.14tx8.10.orig/iflib/xutil.h100644 1751 50 177 5440105654 14541 0ustar mdsrc#ifndef size_t #define size_t unsigned int #endif char *xmalloc(size_t); char *xstrcpy(char *); char *xstrcat(char *,char *); ifmail-2.14tx8.10.orig/iflib/ulock.h100644 1751 50 45 5341565340 14465 0ustar mdsrcint lock(char *); int ulock(char *); ifmail-2.14tx8.10.orig/iflib/libinn.h100644 1751 50 2731 5444364272 14674 0ustar mdsrc/* $Revision: 1.14 $ ** ** Here be declarations of functions in the InterNetNews library. */ /* Memory allocation. */ /* Worst-case alignment, in order to shut lint up. */ /* =()@ *ALIGNPTR;>()= */ typedef int *ALIGNPTR; extern ALIGNPTR xmalloc(); extern ALIGNPTR xrealloc(); /* Headers. */ extern char *GenerateMessageID(); extern char *HeaderFind(); extern void HeaderCleanFrom(); extern struct _DDHANDLE *DDstart(); extern void DDcheck(); extern char *DDend(); /* NNTP functions. */ extern int NNTPlocalopen(); extern int NNTPremoteopen(); extern int NNTPconnect(); extern int NNTPsendarticle(); extern int NNTPsendpassword(); /* Opening the active file on a client. */ extern FILE *CAopen(); extern FILE *CAlistopen(); extern void CAclose(); /* Parameter retrieval. */ extern char *GetFQDN(); extern char *GetConfigValue(); extern char *GetFileConfigValue(); extern char *GetModeratorAddress(); /* Time functions. */ typedef struct _TIMEINFO { time_t time; long usec; long tzone; } TIMEINFO; extern time_t parsedate(); extern int GetTimeInfo(); /* Miscellaneous. */ extern int getfdcount(); extern int wildmat(); extern int waitnb(); extern int xread(); extern int xwrite(); extern int xwritev(); extern int LockFile(); extern int GetResourceUsage(); extern int SetNonBlocking(); extern void CloseOnExec(); extern void Radix32(); extern char *INNVersion(); extern char *ReadInDescriptor(); extern char *ReadInFile(); extern FILE *xfopena(); ifmail-2.14tx8.10.orig/iflib/macros.h100644 1751 50 5652 5444364272 14712 0ustar mdsrc/* $Revision: 1.13 $ ** ** Here be some useful macros. */ /* ** Memory allocation. Wrappers around wrapper functions. ** Don't replace any existing definitions, for use with malloc-debug ** packages, e.g. */ #if defined(_DEBUG_MALLOC_INC) #undef _DEBUG_MALLOC_INC #include "malloc.h" #else #define malloc_enter(func) #define malloc_leave(func) #define malloc_chain_check() #define malloc_dump(fd) #define malloc_list(a,b,c) #define malloc_size(hist) (*(hist) = 0, 0) #endif /* defined(_DEBUG_MALLOC_INC) */ #if !defined(NEW) #define NEW(T, c) \ ((T *)xmalloc((unsigned int)(sizeof (T) * (c)))) #define RENEW(p, T, c) \ (p = (T *)xrealloc((char *)(p), (unsigned int)(sizeof (T) * (c)))) /* =()<#define DISPOSE(p) free((@@ *)p)>()= */ #define DISPOSE(p) free((char *)p) /* This properly belongs in libinn.h. */ extern int (*xmemfailure)(); #define ONALLLOCFAIL(func) (xmemfailure = (func)) #endif /* !defined(NEW) */ /* ** Copy a string to allocated memory. */ #define COPY(p) \ strcpy(NEW(char, strlen(p) + 1), p) /* ** Wrappers around str[n]cmp. Don't add the ((a) == (b)) test here; it's ** already been done in places where it's time-critical. */ #define EQ(a, b) (strcmp((a), (b)) == 0) #define EQn(a, b, n) (strncmp((a), (b), (SIZE_T)(n)) == 0) #define caseEQ(a, b) (strcasecmp((a), (b)) == 0) #define caseEQn(a, b, n) (strncasecmp((a), (b), (SIZE_T)(n)) == 0) /* ** Cast a pointer into another point, but keep lint quiet. */ #if !defined(lint) #define CAST(t, p) ((t)(p)) #else #define CAST(t, p) ((p) ? (t)NULL : (t)NULL) #endif /* !defined(lint) */ /* ** usually includes \n, which is not what we want. */ #define ISWHITE(c) ((c) == ' ' || (c) == '\t') /* ** Get the number of elements in a fixed-size array, or a pointer just ** past the end of it. */ #define SIZEOF(array) ((int)(sizeof array / sizeof array[0])) #define ENDOF(array) (&array[SIZEOF(array)]) /* ** Get the length of a string constant. */ #define STRLEN(string) ((int)(sizeof string - 1)) /* ** Turn a TIMEINFO into a floating point number. */ #define TIMEINFOasDOUBLE(t) \ ((double)(t).time + ((double)(t).usec) / 1000000.0) /* ** Test data from a stat(2) call to see if it's a file or directory. */ #if !defined(S_ISDIR) #define S_ISDIR(st_mode) (((st_mode) & S_IFMT) == S_IFDIR) #endif /* !defined(S_ISDIR) */ #if !defined(S_ISREG) #define S_ISREG(st_mode) (((st_mode) & S_IFMT) == S_IFREG) #endif /* !defined(S_ISREG) */ /* ** Get the size when binding an AF_UNIX socket. */ #if defined(DO_BIND_USE_SIZEOF) #define AF_UNIX_SOCKSIZE(S) (sizeof S) #else #define AF_UNIX_SOCKSIZE(S) (sizeof S.sun_family + strlen(S.sun_path) + 1) #endif /* defined(DO_BIND_USE_SIZEOF) */ /* ** Use a read or recv call to read a descriptor. */ #if defined(DO_HAVE_UNIX_DOMAIN) #define RECVorREAD(fd, p, s) recv((fd), (p), (s), 0) #else #define RECVorREAD(fd, p, s) read((fd), (p), (s)) #endif /* defined(DO_HAVE_UNIX_DOMAIN) */ ifmail-2.14tx8.10.orig/iflib/configdata.h100644 1751 50 35176 5444364272 15551 0ustar mdsrc/* $Revision: 1.29 $ ** ** Here be configuration data used by various InterNetNews programs. ** The numbers refer to sections in the config.dist file. */ /* ** 1. MAKE CONFIG PARAMETERS */ /* =()<#define @@_USE_CHAR_CONST>()= */ #define DUNNO_USE_CHAR_CONST #if defined(DO_USE_CHAR_CONST) typedef char const *STRING; typedef char * const CSTRING; #endif /* defined(DO_USE_CHAR_CONST) */ #if defined(DONT_USE_CHAR_CONST) typedef char *STRING; typedef char *CSTRING; #endif /* defined(DONT_USE_CHAR_CONST) */ #if defined(DUNNO_USE_CHAR_CONST) #if defined(__STDC__) typedef char const *STRING; typedef char * const CSTRING; #else typedef char *STRING; typedef char *CSTRING; #endif /* defined(__STDC__) */ #endif /* defined(DUNNO_USE_CHAR_CONST) */ /* ** Declare a function that doesn't return. */ #if defined(__dead) /* BSD4.4 */ #define NORETURN __dead #else #if defined(__GNUC__) /* GCC */ #define NORETURN volatile void #else /* Everyone else */ #define NORETURN void #endif /* defined(__GNUC__) */ #endif /* defined(__dead) */ /* ** 3. OWNERSHIPS AND FILE MODES */ /* =()<#define NEWSUSER "@@">()= */ #define NEWSUSER "news" /* =()<#define NEWSGID "@@">()= */ #define NEWSGID "news" /* =()<#define NEWSMASTER "@@">()= */ #define NEWSMASTER "usenet" /* =()<#define PATHMASTER "@@">()= */ #define PATHMASTER "not-for-mail" /* Umask to set. */ /* =()<#define NEWSUMASK @@>()= */ #define NEWSUMASK 0 /* Mode that incoming articles are created under. */ /* =()<#define ARTFILE_MODE @@>()= */ #define ARTFILE_MODE 0664 /* Mode that batch files are created under. */ /* =()<#define BATCHFILE_MODE @@>()= */ #define BATCHFILE_MODE 0664 /* Mode that directories are created under. */ /* =()<#define GROUPDIR_MODE @@>()= */ #define GROUPDIR_MODE 0775 /* ** 4. C LIBRARY DIFFERENCES */ /* Use have stdargs, varargs, or neither? */ /* =()<#define VAR_@@>()= */ #define VAR_VARARGS /* Use BSD4.2 or Posix directory names? */ /* =()<#define DIR_@@>()= */ #define DIR_DIRENT /* Use flock, lockf, or nothing to lock files? */ /* =()<#define LOCK_@@>()= */ #define LOCK_FLOCK /* Do you have ? */ /* =()<#define @@_HAVE_UNISTD>()= */ #define DONT_HAVE_UNISTD /* Do you have setbuffer? */ /* =()<#define @@_HAVE_SETBUFFER>()= */ #define DO_HAVE_SETBUFFER /* Do you have gettimeofday? */ /* =()<#define @@_HAVE_GETTIMEOFDAY>()= */ #define DO_HAVE_GETTIMEOFDAY /* Do you have fchmod? */ /* =()<#define @@_HAVE_FCHMOD>()= */ #define DO_HAVE_FCHMOD /* Do you have setsid()? */ /* =()<#define @@_HAVE_SETSID>()= */ #define DONT_HAVE_SETSID /* Does your (struct tm) have a tm_gmtoff field? */ /* =()<#define @@_HAVE_TM_GMTOFF>()= */ #define DO_HAVE_TM_GMTOFF /* Does your (struct stat) have a st_blksize field? */ /* =()<#define @@_HAVE_ST_BLKSIZE>()= */ #define DO_HAVE_ST_BLKSIZE /* Use waitpid instead of wait3? */ /* =()<#define @@_HAVE_WAITPID>()= */ #define DONT_HAVE_WAITPID /* Use "union wait" instead of int? */ /* =()<#define @@_USE_UNION_WAIT>()= */ #define DO_USE_UNION_WAIT /* How to fork? */ /* =()<#define FORK() @@()>()= */ #define FORK() vfork() /* Do you have symbolic links? */ /* =()<#define @@_HAVE_SYMLINK>()= */ #define DO_HAVE_SYMLINK /* Does your AF_UNIX bind use sizeof for the socket size? */ /* =()<#define @@_BIND_USE_SIZEOF>()= */ #define DO_BIND_USE_SIZEOF /* Do you have Unix-domain sockets? */ /* =()<#define @@_HAVE_UNIX_DOMAIN>()= */ #define DO_HAVE_UNIX_DOMAIN /* How should close-on-exec be done? */ /* =()<#define CLX_@@>()= */ #define CLX_IOCTL /* How should non-blocking I/O be done? */ /* =()<#define NBIO_@@>()= */ #define NBIO_FCNTL /* How should resource-totalling be done? */ /* =()<#define RES_@@>()= */ #define RES_RUSAGE /* How to get number of available descriptors? */ /* =()<#define FDCOUNT_@@>()= */ #define FDCOUNT_GETDTAB /* If greater than -1, then use [gs]etrlimit to set that many descriptors. */ /* If -1, then no [gs]etrlimit calls are done. */ /* =()<#define NOFILE_LIMIT @@>()= */ #define NOFILE_LIMIT 250 /* Do you need as well as ? */ /* =()<#define @@_NEED_TIME>()= */ #define DONT_NEED_TIME /* What predicate, if any, the macros need. */ /* =()<#define CTYPE(isXXXXX, c) (@@)>()= */ #define CTYPE(isXXXXX, c) ((isascii((c)) && isXXXXX((c)))) /* ** 6. MISCELLANEOUS CONFIG DATA */ /* Use mmap() to read the active file, or read it in? */ /* =()<#define ACT_@@>()= */ #define ACT_MMAP /* Use our NNTP-server-open routine, or the one in NNTP? */ /* INND is nicer, but you must install inn.conf files everywhere; NNTP */ /* is better if you already have lots of /usr/lib/news/server files. */ /* =()<#define REM_@@>()= */ #define REM_INND /* Should rnews save articles that the server rejects? */ /* =()<#define @@_RNEWS_SAVE_BAD>()= */ #define DO_RNEWS_SAVE_BAD /* Should rnews syslog articles innd already has? */ /* =()<#define @@_RNEWS_LOG_DUPS>()= */ #define DONT_RNEWS_LOG_DUPS /* Look in _PATH_RNEWSPROGS for rnews unpackers? */ /* =()<#define @@_RNEWSPROGS>()= */ #define DO_RNEWSPROGS /* Should rnews try the local host? */ /* =()<#define @@_RNEWSLOCALCONNECT>()= */ #define DO_RNEWSLOCALCONNECT /* Disallow posts with more than 50% inclusion (">") lines? */ /* (This is only for inews and nnrpd.) */ /* =()<#define @@_CHECK_INCLUDED_TEXT>()= */ #define DO_CHECK_INCLUDED_TEXT /* Put hosts in the inews Path header? */ /* =()<#define @@_INEWS_PATH>()= */ #define DONT_INEWS_PATH /* Munge the gecos field of password entry? */ /* =()<#define @@_MUNGE_GECOS>()= */ #define DO_MUNGE_GECOS /* How many times to try before giving up */ /* =()<#define MAX_FORKS @@>()= */ #define MAX_FORKS 10 /* Largest acceptable article size; 0 allows any size */ /* =()<#define MAX_ART_SIZE @@>()= */ #define MAX_ART_SIZE 1000000 /* Value of dbzincore(FLAG) call in innd. */ /* =()<#define INND_DBZINCORE @@>()= */ #define INND_DBZINCORE 1 /* Should sub-processes get a nice(2) value? */ /* =()<#define @@_INND_NICE_KIDS>()= */ #define DONT_INND_NICE_KIDS /* Value for nice(2) call in innd. */ /* =()<#define INND_NICE_VALUE @@>()= */ #define INND_NICE_VALUE 10 /* Null-terminated list of unknown commands to not log to syslog. */ /* =()<#define INND_QUIET_BADLIST @@>()= */ #define INND_QUIET_BADLIST NULL /* Null-terminated set of illegal distribution patterns. */ /* =()<#define BAD_DISTRIBS @@>()= */ #define BAD_DISTRIBS "*.*",NULL /* Check that poster is the person doing the cancel? */ /* =()<#define @@_VERIFY_CANCELS>()= */ #define DO_VERIFY_CANCELS /* Log "ctlinnd cancel" commands to syslog? */ /* =()<#define @@_LOG_CANCEL_COMMANDS>()= */ #define DO_LOG_CANCEL_COMMANDS /* File unknown "to.*" groups into the "to" newsgroup? */ /* =()<#define @@_MERGE_TO_GROUPS>()= */ #define DO_MERGE_TO_GROUPS /* File articles in unknown newsgroups into junk? */ /* =()<#define @@_WANT_TRASH>()= */ #define DO_WANT_TRASH /* Record rejected articles in history? */ /* =()<#define @@_REMEMBER_TRASH>()= */ #define DONT_REMEMBER_TRASH /* Check the linecount against the Lines header? */ /* =()<#define @@_CHECK_LINECOUNT>()= */ #define DONT_CHECK_LINECOUNT /* If checking, the error must be within LINECOUNT_FUZZ lines. */ /* =()<#define LINECOUNT_FUZZ @@>()= */ #define LINECOUNT_FUZZ 5 /* Have innd throttle itself after this many I/O errors. */ /* =()<#define IO_ERROR_COUNT @@>()= */ #define IO_ERROR_COUNT 50 /* Default value for ctlinnd -t flag. */ /* =()<#define CTLINND_TIMEOUT @@>()= */ #define CTLINND_TIMEOUT 0 /* Flush logs (and NNRP connections) if we go this long with no I/O. */ /* =()<#define DEFAULT_TIMEOUT @@>()= */ #define DEFAULT_TIMEOUT 300 /* INND closes channel if inactive this long (seconds). */ /* =()<#define PEER_TIMEOUT @@>()= */ #define PEER_TIMEOUT (1 * 60 * 60) /* NNRP exits if inactive this long (seconds). */ /* =()<#define CLIENT_TIMEOUT @@>()= */ #define CLIENT_TIMEOUT (2 * 60 * 60) /* Allow nnrpd readers when paused or throttled? */ /* =()<#define @@_ALLOW_READERS>()= */ #define DO_ALLOW_READERS /* Refuse NNTP connections if load is higher then this; -1 disables. */ /* =()<#define NNRP_LOADLIMIT @@>()= */ #define NNRP_LOADLIMIT 16 /* Don't readdir() spool dir if same group within this many seconds. */ /* =()<#define NNRP_RESCAN_DELAY @@>()= */ #define NNRP_RESCAN_DELAY 60 /* Do gethostbyaddr on client addresses in nnrp? */ /* =()<#define @@_NNRP_GETHOSTBYADDR>()= */ #define DO_NNRP_GETHOSTBYADDR /* Should nnrpd do a dbzincore? */ /* =()<#define NNRP_DBZINCORE_DELAY @@>()= */ #define NNRP_DBZINCORE_DELAY 40 /* Strip Sender from posts that did authenticate? */ /* =()<#define @@_NNRP_AUTH_SENDER>()= */ #define DONT_NNRP_AUTH_SENDER /* How many read/write failures until channel is put to sleep or closed? */ /* =()<#define BAD_IO_COUNT @@>()= */ #define BAD_IO_COUNT 5 /* Multiplier for sleep in EWOULDBLOCK writes (seconds). */ /* =()<#define BLOCK_BACKOFF @@>()= */ #define BLOCK_BACKOFF (2 * 60) /* How many article-writes between active and history updates? */ /* =()<#define ICD_SYNC_COUNT @@>()= */ #define ICD_SYNC_COUNT 1 /* Tell resolver _res.options to be fast? */ /* =()<#define @@_FAST_RESOLV>()= */ #define DONT_FAST_RESOLV /* Drop articles that were posted this many days ago. */ /* =()<#define DEFAULT_CUTOFF @@>()= */ #define DEFAULT_CUTOFF 14 /* Maximum number of incoming NNTP connections. */ /* =()<#define DEFAULT_CONNECTIONS @@>()= */ #define DEFAULT_CONNECTIONS 50 /* Wait this many seconds before channel restarts. */ /* =()<#define CHANNEL_RETRY_TIME @@>()= */ #define CHANNEL_RETRY_TIME (5 * 60) /* Wait this many seconds before seeing if pause is ended. */ /* =()<#define PAUSE_RETRY_TIME @@>()= */ #define PAUSE_RETRY_TIME (5 * 60) /* Wait this many seconds before seeing if pause is ended. */ /* =()<#define CHANNEL_INACTIVE_TIME @@>()= */ #define CHANNEL_INACTIVE_TIME (10 * 60) /* Put nntplink info (filename) into the log? */ /* =()<#define @@_NNTPLINK_LOG>()= */ #define DO_NNTPLINK_LOG /* Log by host IP address, rather than from Path line? */ /* =()<#define @@_IPADDR_LOG>()= */ #define DO_IPADDR_LOG /* Log NNTP activity after this many articles. */ /* =()<#define NNTP_ACTIVITY_SYNC @@>()= */ #define NNTP_ACTIVITY_SYNC 200 /* Free buffers bigger than this when we're done with them. */ /* =()<#define BIG_BUFFER @@>()= */ #define BIG_BUFFER (2 * START_BUFF_SIZE) /* A general small buffer. */ /* =()<#define SMBUF @@>()= */ #define SMBUF 256 /* Buffer for a single article name. */ /* =()<#define MAXARTFNAME @@>()= */ #define MAXARTFNAME 10 /* Buffer for a single pathname in the spool directory. */ /* =()<#define SPOOLNAMEBUFF @@>()= */ #define SPOOLNAMEBUFF 256 /* Maximum size of a single header. */ /* =()<#define MAXHEADERSIZE @@>()= */ #define MAXHEADERSIZE 1024 /* Byte limit on locally-posted articles; 0 to disable the check. */ /* =()<#define LOCAL_MAX_ARTSIZE @@>()= */ #define LOCAL_MAX_ARTSIZE 0 /* Function that returns no value, and a pointer to it. */ /* =()<#define FUNCTYPE @@>()= */ #define FUNCTYPE void typedef FUNCTYPE (*FUNCPTR)(); /* While reading input, if we have less than LOW_WATER bytes free, we * use the current buffersize as input to GROW_AMOUNT to determine how * much to realloc. (Doubling seems to be the best thing right now.) * Growth must be at least NNTP_STRLEN bytes! */ #define START_BUFF_SIZE (4 * 1024) #define LOW_WATER (1 * 1024) #define GROW_AMOUNT(x) ((x)) /* Some debuggers might need this set to an empty string. */ #define STATIC static /* How to store article numbers; note that INN is not int/long clean. */ typedef unsigned long ARTNUM; /* A general convenience; you shouldn't have to change this. */ typedef int BOOL; /* General values that you should not have to change. */ #define MEMCPY_THRESHOLD 12 #define MAX_BUILTIN_ARGV 20 #define NNTP_PORT 119 #define TRUE 1 #define FALSE 0 #define MAXLISTEN 5 #define STDIN 0 #define STDOUT 1 #define PIPE_READ 0 #define PIPE_WRITE 1 #define DATE_FUZZ (24L * 60L * 60L) #define COMMENT_CHAR '#' #define ART_ACCEPT '+' #define ART_CANC 'c' #define ART_JUNK 'j' #define ART_REJECT '-' #define EXP_CONTROL '!' #define FEED_MAXFLAGS 20 #define FEED_BYTESIZE 'b' #define FEED_FULLNAME 'f' #define FEED_HDR_DISTRIB 'D' #define FEED_HDR_NEWSGROUP 'N' #define FEED_MESSAGEID 'm' #define FEED_FNLNAMES '*' #define FEED_HEADERS 'H' #define FEED_NAME 'n' #define FEED_NEWSGROUP 'g' #define FEED_OVERVIEW 'O' #define FEED_REPLIC 'R' #define FEED_SITE 's' #define FEED_TIMERECEIVED 't' #define HIS_BADCHAR '_' #define HIS_FIELDSEP '\t' #define HIS_NOEXP "-" #define HIS_SUBFIELDSEP '~' #define NF_FIELD_SEP ':' #define NF_FLAG_ALIAS '=' #define NF_FLAG_EXCLUDED 'j' #define NF_FLAG_MODERATED 'm' #define NF_FLAG_OK 'y' #define NF_FLAG_NOLOCAL 'n' #define NF_FLAG_IGNORE 'x' #define NF_SUBFIELD_SEP '/' #define NG_SEPARATOR "," #define NG_ISSEP(c) ((c) == ',') #define RNEWS_MAGIC1 '#' #define RNEWS_MAGIC2 '!' #define SIG_MAXLINES 4 #define SIG_SEPARATOR "-- \n" #define SUB_DEFAULT FALSE #define SUB_NEGATE '!' #define LOOPBACK_HOST "127.0.0.1" ifmail-2.14tx8.10.orig/iflib/clibrary.h100644 1751 50 7572 6211706646 15236 0ustar mdsrc/* $Revision: 1.17 $ ** ** Here be declarations of routines and variables in the C library. ** You must #include and before this file. ** ** FreeBSD specific hack by Igor Vinokurov 960831 */ #if defined(DO_HAVE_UNISTD) #include #endif /* defined(DO_HAVE_UNISTD) */ #if defined(DO_HAVE_VFORK) #include #endif /* defined(DO_HAVE_VFORK) */ /* Generic pointer, used by memcpy, malloc, etc. */ /* =()@ *POINTER;>()= */ typedef char *POINTER; /* What is a file offset? Will not work unless long! */ /* =()@ OFFSET_T;>()= */ typedef long OFFSET_T; /* What is the type of an object size? */ /* =()@ SIZE_T;>()= */ typedef int SIZE_T; /* What is the type of a passwd uid and gid, for use in chown(2)? */ /* =()@ UID_T;>()= */ typedef int UID_T; /* =()@ GID_T;>()= */ typedef int GID_T; /* =()@ PID_T;>()= */ typedef int PID_T; /* What should a signal handler return? */ /* =()<#define SIGHANDLER @@>()= */ #define SIGHANDLER void #if defined(SIG_DFL) /* What types of variables can be modified in a signal handler? */ /* =()@ SIGVAR;>()= */ typedef int SIGVAR; #endif /* defined(SIG_DFL) */ /* =()<#include @@>()= */ #include /* =()<#include @@>()= */ #include /* ** It's a pity we have to go through these contortions, for broken ** systems that have fd_set but not the FD_SET. */ #if defined(FD_SETSIZE) #define FDSET fd_set #else #include #if !defined(NOFILE) error -- #define NOFILE to the number of files allowed on your machine! #endif /* !defined(NOFILE) */ #if !defined(howmany) #define howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif /* !defined(howmany) */ #define FD_SETSIZE NOFILE #define NFDBITS (sizeof (long) * 8) typedef struct _FDSET { long fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } FDSET; #define FD_SET(n, p) (p)->fds_bits[(n) / NFDBITS] |= (1 << ((n) % NFDBITS)) #define FD_CLR(n, p) (p)->fds_bits[(n) / NFDBITS] &= ~(1 << ((n) % NFDBITS)) #define FD_ISSET(n, p) ((p)->fds_bits[(n) / NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) (void)memset((POINTER)(p), 0, sizeof *(p)) #endif /* defined(FD_SETSIZE) */ #if !defined(SEEK_SET) #define SEEK_SET 0 #endif /* !defined(SEEK_SET) */ #if !defined(SEEK_END) #define SEEK_END 2 #endif /* !defined(SEEK_END) */ /* ** We must use #define to set FREEVAL, since "typedef void FREEVAL;" doesn't ** work on some broken compilers, sigh. */ /* =()<#define FREEVAL @@>()= */ #define FREEVAL int extern int optind; extern char *optarg; #if !defined(__STDC__) extern int errno; #endif /* !defined(__STDC__) */ extern char *getenv(); extern char *inet_ntoa(); extern char *mktemp(); #if !defined(strerror) extern char *strerror(); #endif /* !defined(strerror) */ extern long atol(); extern time_t time(); extern unsigned long inet_addr(); extern FREEVAL free(); extern POINTER malloc(); extern POINTER realloc(); #if defined(ACT_MMAP) extern char *mmap(); #endif /* defined(ACT_MMAP) */ /* Some backward systems need this. */ extern FILE *popen(); /* This is in , but not in some system string headers, * so we put it here just in case. */ extern int strncasecmp(); /* =()@ abort();>()= */ extern int abort(); /* =()@ alarm();>()= */ extern int alarm(); /* =()@ exit();>()= */ extern void exit(); /* =()@ getpid();>()= */ extern int getpid(); /* =()@ lseek();>()= */ #ifndef __FreeBSD__ extern long lseek(); #else extern off_t lseek(); #endif /* =()@ qsort();>()= */ extern int qsort(); /* =()@ sleep();>()= */ extern int sleep(); /* =()@ _exit();>()= */ extern int _exit(); ifmail-2.14tx8.10.orig/iflib/config.h100644 1751 50 6100 6376675022 14663 0ustar mdsrc/* ### Modified by P.Saratxaga on 5 Sep 1995 ### * - added unrar (support for RAR desarchiver) and a bunch of others (but I * never heard of a unix version for them,...) * - added modemaftercall keyword (string to send to modem after calling) * code from T. Tanaka * - deleted intab[] and outtab[] * - added maptabdir * - added pktpwlist, passwords for packets. code from T.Tanaka */ #ifndef _CONFIG_H #define _CONFIG_H #ifdef HAVE_LOCALE_H #include #define _(String) gettext((String)) #else #define _(String) (String) #endif #include "ftn.h" #ifndef AREA_LIST_TYPE #define AREA_LIST_TYPE typedef struct _area_list { struct _area_list *next; char *name; } area_list; #endif typedef struct _modem_string { struct _modem_string *next; char *line; char *expr; } modem_string; typedef struct _dom_trans { struct _dom_trans *next; char *ftndom; char *intdom; } dom_trans; typedef struct _moderator_list { struct _moderator_list *next; char *prefix; char *address; } moderator_list; extern char *configname; extern char *nlbase; extern fa_list *whoami; extern fa_list *pwlist; extern fa_list *pktpwlist; extern fa_list *nllist; #ifdef DIRTY_CHRS extern fa_list *dirtychrslist; #endif extern dom_trans *domtrans; extern moderator_list *approve; extern modem_string *modemport; extern modem_string *phonetrans; extern modem_string *modemreset; extern modem_string *modemdial; extern modem_string *modemhangup; extern modem_string *modemaftercall; extern modem_string *modemok; extern modem_string *modemconnect; extern modem_string *modemerror; extern modem_string *options; extern area_list *badgroups; #ifdef GATEBAU_MSGID extern area_list *gatebaugroups; #endif extern long configverbose; extern long configtime; extern long maxfsize; extern long maxpsize; extern long maxmsize; extern long speed; extern long maxgroups; extern long timeoutconnect; extern long timeoutreset; extern long dialdelay; extern char *oldfilemap; extern char maptab[]; extern char *name; extern char *location; extern char *sysop; extern char *phone; extern char *flags; extern char *inbound; extern char *norminbound; extern char *listinbound; extern char *protinbound; extern char *outbound; extern char *database; extern char *aliasfile; extern char *myfqdn; extern char *ftnmsgidstyle; extern char *localdomain; extern char *sequence; extern char *sendmail; extern char *rnews; extern char *iftoss; extern char *packer; extern char *unzip; extern char *unarj; extern char *unlzh; extern char *unarc; extern char *unzoo; extern char *unrar; extern char *unjar; extern char *unsqz; extern char *unhpk; extern char *unuc2; extern char *unhap; extern char *unha; extern char *areafile; extern char *newslog; extern char *msgidbm; extern char *refdbm; extern char *pubdir; extern char *reqmap; extern char *magic; extern char *debugfile; extern char *routefile; extern char *nonpacked; extern char *magicname; extern char *dosoutbound; extern char *maptabdir; extern int defaultrfcchar; extern int defaultftnchar; extern int toftnchar; int readconfig(void); int confopt(int,char*); void confusage(char*); #endif ifmail-2.14tx8.10.orig/iflib/ftn.h100644 1751 50 1314 6246172327 14203 0ustar mdsrc#ifndef _FTN_H #define _FTN_H #define MAXNAME 35 typedef struct _faddr { char *name; unsigned int point; unsigned int node; unsigned int net; unsigned int zone; char *domain; } faddr; typedef struct _fa_list { struct _fa_list *next; faddr *addr; } fa_list; faddr *parsefaddr(char *); faddr *parsefnode(char *); char *ascinode(faddr *,int); char *ascfnode(faddr *,int); int chkftnmsgid(char *); void tidy_faddr(faddr *); void tidy_falist(fa_list **); faddr *bestaka_s(faddr *); int is_local(faddr *); int metric(faddr*,faddr*); #define METRIC_EQUAL 0 #define METRIC_POINT 1 #define METRIC_NODE 2 #define METRIC_NET 3 #define METRIC_ZONE 4 #define METRIC_DOMAIN 5 #define METRIC_MAX METRIC_DOMAIN #endif ifmail-2.14tx8.10.orig/iflib/bwrite.h100644 1751 50 226 5376633120 14665 0ustar mdsrc#include int iwrite(int,FILE *); int lwrite(long,FILE *); int awrite(char *,FILE *); int cwrite(char *,FILE *); int kwrite(char *,FILE *); ifmail-2.14tx8.10.orig/iflib/bread.h100644 1751 50 133 6157134704 14445 0ustar mdsrc#include int iread(FILE *); long lread(FILE *); char *aread(char *,int,FILE *); ifmail-2.14tx8.10.orig/iflib/getheader.h100644 1751 50 122 5377002060 15306 0ustar mdsrc#include #include "ftn.h" extern int getheader(faddr *,faddr*,FILE *); ifmail-2.14tx8.10.orig/iflib/getopt.h100644 1751 50 136 6343574402 14675 0ustar mdsrc#ifdef DONT_HAVE_GETOPT extern int getopt(); extern char *optarg; extern int optind; #endif ifmail-2.14tx8.10.orig/iflib/scanout.h100644 1751 50 315 5642110020 15025 0ustar mdsrc#ifndef SCANOUT_H #define SCANOUT_H #include "ftn.h" #define OUT_PKT 0 #define OUT_DIR 1 #define OUT_FLO 2 #define OUT_ARC 3 #define OUT_REQ 4 extern int scanout(int (*)(faddr*,char,int,char*)); #endif ifmail-2.14tx8.10.orig/iflib/trap.h100644 1751 50 147 5610007660 14334 0ustar mdsrc#ifndef TRAP_H #define TRAP_H #ifdef NEED_TRAP void catch(char*); #else #define catch(x) #endif #endif ifmail-2.14tx8.10.orig/iflib/rfcaddr.h100644 1751 50 556 5621214374 15003 0ustar mdsrctypedef struct _parsedaddr { char *target; char *remainder; char *comment; } parsedaddr; extern int addrerror; #define ADDR_NESTED 1 #define ADDR_MULTIPLE 2 #define ADDR_UNMATCHED 4 #define ADDR_BADTOKEN 8 #define ADDR_BADSTRUCT 16 #define ADDR_ERRMAX 5 extern parsedaddr parserfcaddr(char *); extern void tidyrfcaddr(parsedaddr); extern char *addrerrstr(int); ifmail-2.14tx8.10.orig/iflib/ftnmsg.h100644 1751 50 1664 6277633160 14723 0ustar mdsrc#ifndef _FTNMSG_H #define _FTNMSG_H #include #include #include "ftn.h" #include "rfcmsg.h" #define MAXSUBJ 71 #define MSGTYPE 2 typedef struct _ftnmsg { int flags; int ftnorigin; faddr *to; faddr *from; time_t date; char *subj; char *msgid_s; char *msgid_a; unsigned long msgid_n; char *reply_s; char *reply_a; unsigned long reply_n; char *origin; char *area; } ftnmsg; #define FLG_PVT 0x0001 #define FLG_CRS 0x0002 #define FLG_RCV 0x0004 #define FLG_SNT 0x0008 #define FLG_ATT 0x0010 #define FLG_TRN 0x0020 #define FLG_ORP 0x0040 #define FLG_K_S 0x0080 #define FLG_LOC 0x0100 #define FLG_HLD 0x0200 #define FLG_RSV 0x0400 #define FLG_FRQ 0x0800 #define FLG_RRQ 0x1000 #define FLG_RRC 0x2000 #define FLG_ARQ 0x4000 #define FLG_FUP 0x8000 extern char *ftndate(time_t); extern void tidy_ftnmsg(ftnmsg *); extern ftnmsg *mkftnhdr(rfcmsg *,int,int); extern FILE *ftnmsghdr(ftnmsg *,FILE *,faddr *,char); #endif ifmail-2.14tx8.10.orig/iflib/rfcmsg.h100644 1751 50 353 5375243512 14654 0ustar mdsrc#ifndef _RFCMSG_H #define _RFCMSG_H typedef struct _rfcmsg { struct _rfcmsg *next; char *key; char *val; } rfcmsg; rfcmsg *parsrfc(FILE *); void tidyrfc(rfcmsg *); void dumpmsg(rfcmsg *,FILE *); char *hdr(char *,rfcmsg *); #endif ifmail-2.14tx8.10.orig/iflib/callstat.h100644 1751 50 410 5643530220 15165 0ustar mdsrc#ifndef CALLSTAT_H #define CALLSTAT_H #include #include #include "ftn.h" typedef struct _callstat { time_t trytime; int tryno; int trystat; } callstat; extern callstat *getstatus(faddr*); extern void putstatus(faddr*,int,int); #endif ifmail-2.14tx8.10.orig/iflib/charset.h100644 0 0 7063 6701151723 15501 0ustar rootroot#ifndef IFMAIL_CHARSET_H #define IFMAIL_CHARSET_H #include "rfcmsg.h" /* recognized charsets */ #define CHRS_AUTODETECT -1 #define CHRS_NOTSET 0 #define CHRS_ASCII 1 /* us-ascii */ #define CHRS_BIG5 2 /* Chinese Big5 charset */ #define CHRS_CP424 3 /* hebrew EBCDIC */ #define CHRS_CP437 4 /* Latin-1 MS codage (cp437) */ #define CHRS_CP850 5 /* Latin-1 MS codage (cp850) */ #define CHRS_CP852 6 /* Polish MS-DOS codage */ #define CHRS_CP862 7 /* Hebrew PC */ #define CHRS_CP866 8 /* Cyrillic Alt-PC (cp866) */ #define CHRS_CP895 9 /* Kamenicky (DOS charset in CZ & SK) */ #define CHRS_EUC_JP 10 /* Japanese EUC */ #define CHRS_EUC_KR 11 /* Korean EUC */ #define CHRS_FIDOMAZOVIA 12 /* Polish "FIDOMAZOVIA" charset */ #define CHRS_GB 13 /* Chinese GB 2312 8 bits */ #define CHRS_HZ 14 /* Chinese HZ coding */ #define CHRS_ISO_2022_CN 15 /* Chinese GB 2312 7 bits */ #define CHRS_ISO_2022_JP 16 /* Japanese iso-2022-jp */ #define CHRS_ISO_2022_KR 17 /* Korean iso-2022-kr */ #define CHRS_ISO_2022_TW 18 /* Taiwanese iso-2022-tw */ #define CHRS_ISO_8859_1 19 /* Latin-1, Western Europe, America */ #define CHRS_ISO_8859_1_QP 20 #define CHRS_ISO_8859_2 21 /* Latin-2, Eastern Europe */ #define CHRS_ISO_8859_3 22 /* Latin-3, Balkanics languages */ #define CHRS_ISO_8859_4 23 /* Latin-4, Scandinavian, Baltic */ #define CHRS_ISO_8859_5 24 /* Cyrillic (iso-8859-5) */ #define CHRS_ISO_8859_6 25 /* Arabic (iso-8859-6) */ #define CHRS_ISO_8859_7 26 /* Greek (iso-8859-7) */ #define CHRS_ISO_8859_8 27 /* Hebrew (iso-8859-8) */ #define CHRS_ISO_8859_9 28 /* Latin-5, Turkish */ #define CHRS_ISO_8859_10 29 /* Latin-6, Lappish/Nordic/Eskimo */ #define CHRS_ISO_8859_11 30 /* Thai (iso-8859-11, aka TIS620) */ #define CHRS_ISO_8859_15 31 /* Latin-0 (Latin-1 + a few letters) */ #define CHRS_KOI8_R 32 /* Cyrillic Koi8 (Russian) */ #define CHRS_KOI8_U 33 /* Cyrillic Koi8 (Ukranian) */ #define CHRS_MACINTOSH 34 /* Macintosh */ #define CHRS_MIK_CYR 35 /* Bulgarian "Mik" cyrillic charset */ #define CHRS_NEC 36 /* Japanese NEC-JIS charset */ #define CHRS_SJIS 37 /* Japanese Shift-JIS (MS codage) */ #define CHRS_UTF_7 38 /* Unicode in UTF-7 encoding */ #define CHRS_UTF_8 39 /* Unicode in UTF-8 encoding */ #define CHRS_VISCII_10 40 /* VISCII 1.0 */ #define CHRS_VISCII_11 41 /* VISCII 1.1 */ #define CHRS_ZW 42 /* Chinese Zw encoding */ #define CHRS_ISO_11 91 #define CHRS_ISO_4 92 #define CHRS_ISO_60 93 /* languages (used for LANG_DEFAULT definition) */ #define LANG_WEST 1 /* West-European languages */ #define LANG_EAST 2 /* East-Eurpean languages */ #define LANG_JAPAN 3 /* japanese */ #define LANG_KOREA 4 /* korean */ #define LANG_CHINA 5 /* chinese */ #define LANG_CYRILLIC 6 /* Cyrillic based languages */ /* Define these according to the values used in your country */ #define CHRS_DEFAULT_FTN CHRS_CP437 #define CHRS_DEFAULT_RFC CHRS_ISO_8859_1 #define LANG_DEFAULT LANG_WEST #if (LANG_DEFAULT==LANG_JAPAN || LANG_DEFAULT==LANG_KOREA || LANG_DEFAULT==LANG_CHINA) #define LANG_BITS 16 #else #define LANG_BITS 8 #endif /* used to recognize pgpsigned messages */ #define PGP_SIGNED_BEGIN "-----BEGIN PGP SIGNED MESSAGE-----" #define PGP_SIG_BEGIN "-----BEGIN PGP SIGNATURE-----" #define PGP_SIG_END "-----END PGP SIGNATURE-----" /* charset reading functions */ int getoutcode(int); int getincode(int); char *getcharset(int); char *getchrs(int); int getcode(char *); int readchrs(char *); int readcharset(char *); void writechrs(int,FILE *,int); void writecharset(int,FILE *,rfcmsg *,rfcmsg *); #endif /* IFMAIL_CHARSET_H */ ifmail-2.14tx8.10.orig/iflib/mime.h100644 1751 50 262 6336150204 14312 0ustar mdsrcchar *qp_decode(char *); /* int=0 for text (normal mode), int=1 for headers and gatebau MSGID */ char *qp_encode(char *,int); char *b64_decode(char *); char *b64_encode(char *); ifmail-2.14tx8.10.orig/iflib/crc.h100644 1751 50 210 6047227162 14132 0ustar mdsrcunsigned long crc(char *); /* unsigned long crc32(char *,int); unsigned short crc16(char *,int); unsigned char checksum(char *,int); */ ifmail-2.14tx8.10.orig/iflib/strcasestr.h100644 1751 50 111 6046564020 15554 0ustar mdsrc#include #include char *strcasestr(char *,char *); ifmail-2.14tx8.10.orig/iflib/strncasecmp.h100644 1751 50 147 6050163447 15715 0ustar mdsrc#include int strncasecmp(register unsigned char *, register unsigned char *, register int); ifmail-2.14tx8.10.orig/iflib/strcasecmp.h100644 1751 50 127 6050163520 15525 0ustar mdsrc#include int strcasecmp(register unsigned char *,register unsigned char *); ifmail-2.14tx8.10.orig/iflib/rename.h100644 1751 50 107 6050163564 14636 0ustar mdsrc#include #include int rename(char *,char *); ifmail-2.14tx8.10.orig/iflib/mkdir.h100644 1751 50 240 6050163615 14470 0ustar mdsrc#include #include #include #include #define MKDIR "/bin/mkdir" #define DEVNULL "/dev/null" int mkdir(char *); ifmail-2.14tx8.10.orig/iflib/usleep.h100644 1751 50 136 6050163772 14667 0ustar mdsrc#include #include #include void usleep (unsigned long); ifmail-2.14tx8.10.orig/iflib/ref_interface.h100644 1751 50 5764 6420407564 16223 0ustar mdsrc/* Projet References -- Definitions d'interface * Auteur: Marc SCHAEFER * Date creation: 19/02/96 * Date modification: 14/06/97 * V1.0 PV002 MSC96 * DESCRIPTION * Ceci décrit de manière simpliste l'interface des * fonctions du module ref.c * NOTES * - ref is now able to handle more than one open ref database at the * same time. * BUGS * - Incomplete prototypes. * TODO * - Ajouter les spécifications de fonctions. * MODIFICATION-HISTORY * PV002 14/06/97 schaefer Ajouté nom de fichier dbm en paramètre à * ref_init(). */ #ifndef REF_IF_H #define REF_IF_H #ifndef _TIME_H #include #endif #include "ftnmsg.h" /* Type opaque */ typedef void ref_private_t; /* NAME * ref_init * DESCRIPTION * Opens a specific DBM database implemented as a ref_db database. * RESULT * NULL if error. Else ref_private_t * * NOTES * BUGS * TODO */ ref_private_t *ref_init(char *dbm_file_name); /* NAME * ref_store * DESCRIPTION * Stores a new association between two strings and sets the * date to be now on that association. * RESULT * !0 if ok. * NOTES * BUGS * TODO */ int ref_store(ref_private_t *, char *, char *); /* NAME * ref_store_extended * DESCRIPTION * Stores a new association between two strings and the date. * RESULT * -1 if ok. * NOTES * - Should only be used in case we want to compact the database. * BUGS * TODO */ int ref_store_extended(ref_private_t *, char *, char *, time_t); /* NAME * ref_get * DESCRIPTION * Gets the association from the first parameter. * RESULT * 0 if not found or database not open. -1 if ok * NOTES * BUGS * TODO */ int ref_get(ref_private_t *, char *, char *, int); /* NAME * ref_get_extended * DESCRIPTION * Gets the association from the first parameter. * RESULT * 0 if not found or database not open. -1 if OK. * NOTES * - Use only for expire by copying. * BUGS * TODO */ int ref_get_extended(ref_private_t *, char *, char *, int, time_t *); /* NAME * ref_first_key * DESCRIPTION * Gets the first key. * RESULT * 0 if not found or database not open. -1 if OK. * NOTES * BUGS * TODO */ int ref_first_key(ref_private_t *, char *, int); /* NAME * ref_next_key * DESCRIPTION * Gets the next key. * RESULT * 0 if not found or database not open. -1 if OK. * NOTES * BUGS * TODO */ int ref_next_key(ref_private_t *, char *, int); /* NAME * ref_deinit * DESCRIPTION * Closes the specified ref database. * RESULT * NONE * NOTES * BUGS * TODO */ void ref_deinit(ref_private_t *); /* NAME * ref_cleanup * DESCRIPTION * Deletes old entries. * RESULT * NOTES * - Does not compact the database. * BUGS * TODO */ int ref_cleanup(ref_private_t *, char *); /* NAME * ref_store_msgid * DESCRIPTION * Front end for ref_store_extended * RESULT * NOTES * BUGS * TODO */ int ref_store_msgid(ref_private_t *ref_dbase, ftnmsg *fmsg, char *p); #endif ifmail-2.14tx8.10.orig/iflib/tmpfile.h100644 1751 50 121 6327762214 15027 0ustar mdsrc/* Contributed by Igor Sharfmesser */ /* FILE *tmpfile (void); */ ifmail-2.14tx8.10.orig/iflib/version.h100644 1751 50 104 5654460424 15055 0ustar mdsrcextern char *version; extern char *copyright; extern char *reldate; ifmail-2.14tx8.10.orig/iflib/directory.h100644 1751 50 1447 5660762644 15435 0ustar mdsrc/* * This routines have been written to replace the stuff of the Motorola * BSD Compatibility Package on a M88k with System V Release 4.1, which * did not seem to do the things described on the manual pages when I * tried to compile IFMail. * I don't know, if they are useful on other systems as well. * * Written by stefan@space.s-link.de (Stefan Westerfeld) */ #include #ifdef DONT_HAVE_DIRENT #include #define opendir my_opendir #define readdir my_readdir #define rewinddir my_rewinddir #define closedir my_closedir struct e_dirent { struct dirent *dp; char buf[1024],*bp; int fd; long nbytes; }; typedef struct e_dirent E_DIR; #define DIR E_DIR DIR *opendir(char *name); void closedir(DIR *de); void rewinddir(DIR *de); struct dirent *readdir(DIR *de); #endif ifmail-2.14tx8.10.orig/iflib/lhash.h100640 1751 50 11231 6330772173 14525 0ustar mdsrc/* crypto/lhash/lhash.h */ /* Copyright (C) 1995-1996 Eric Young (eay@mincom.oz.au) * All rights reserved. * * This file is part of an SSL implementation written * by Eric Young (eay@mincom.oz.au). * The implementation was written so as to conform with Netscapes SSL * specification. This library and applications are * FREE FOR COMMERCIAL AND NON-COMMERCIAL USE * as long as the following conditions are aheared to. * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. If this code is used in a product, * Eric Young should be given attribution as the author of the parts used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Eric Young (eay@mincom.oz.au) * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ /* Header for dynamic hash table routines * Author - Eric Young */ #ifndef HEADER_LHASH_H #define HEADER_LHASH_H #ifdef __cplusplus extern "C" { #endif typedef struct lhash_node_st { char *data; struct lhash_node_st *next; #ifndef NO_HASH_COMP unsigned long hash; #endif } LHASH_NODE; typedef struct lhash_st { LHASH_NODE **b; int (*comp)(); unsigned long (*hash)(); unsigned int num_nodes; unsigned int num_alloc_nodes; unsigned int p; unsigned int pmax; unsigned long up_load; /* load times 256 */ unsigned long down_load; /* load times 256 */ unsigned long num_items; unsigned long num_expands; unsigned long num_expand_reallocs; unsigned long num_contracts; unsigned long num_contract_reallocs; unsigned long num_hash_calls; unsigned long num_comp_calls; unsigned long num_insert; unsigned long num_replace; unsigned long num_delete; unsigned long num_no_delete; unsigned long num_retreve; unsigned long num_retreve_miss; unsigned long num_hash_comps; } LHASH; #define LH_LOAD_MULT 256 #ifndef NOPROTO LHASH *lh_new(unsigned long (*h)(), int (*c)()); void lh_free(LHASH *lh); char *lh_insert(LHASH *lh, char *data); char *lh_delete(LHASH *lh, char *data); char *lh_retrieve(LHASH *lh, char *data); void lh_doall(LHASH *lh, void (*func)(/* char *b */)); void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg); unsigned long lh_strhash(char *c); #ifndef WIN16 void lh_stats(LHASH *lh, FILE *out); void lh_node_stats(LHASH *lh, FILE *out); void lh_node_usage_stats(LHASH *lh, FILE *out); #endif #ifdef HEADER_BUFFER_H void lh_stats_bio(LHASH *lh, BIO *out); void lh_node_stats_bio(LHASH *lh, BIO *out); void lh_node_usage_stats_bio(LHASH *lh, BIO *out); #else void lh_stats_bio(LHASH *lh, char *out); void lh_node_stats_bio(LHASH *lh, char *out); void lh_node_usage_stats_bio(LHASH *lh, char *out); #endif #else LHASH *lh_new(); void lh_free(); char *lh_insert(); char *lh_delete(); char *lh_retrieve(); void lh_doall(); void lh_doall_arg(); unsigned long lh_strhash(); #ifndef WIN16 void lh_stats(); void lh_node_stats(); void lh_node_usage_stats(); #endif void lh_stats_bio(); void lh_node_stats_bio(); void lh_node_usage_stats_bio(); #endif #ifdef __cplusplus } #endif #endif ifmail-2.14tx8.10.orig/iflib/hash.h100644 1751 50 141 6366772572 14327 0ustar mdsrc#ifndef HASH_H #define HASH_H extern void hash_update_n(); extern void hash_update_s(); #endif ifmail-2.14tx8.10.orig/iflib/Makefile100644 0 0 14617 6701151723 15362 0ustar rootroot# Makefile for iflib - part of ifmail FidoNet package # Copyright (c) 1993-1997 by Eugene G. Crosser INCDIR = . include ../CONFIG DEFINES = -DDEBUGFILE=\"${DEBUGFILE}\" \ -DLOGFILE=\"${LOGFILE}\" \ -DCONFIGFILE=\"${CONFIGFILE}\" \ -DMAPTABDIR=\"${MAPTABDIR}\" \ -DLOCKDIR=\"${LOCKDIR}\" \ -DPUBDIR=\"${PUBDIR}\" \ -DFAKEDIR=\"${FAKEDIR}\" \ -DMAILLOG=${MAILLOG} \ -DNEWSLOG=${NEWSLOG} \ -DCICOLOG=${CICOLOG} \ ${OPTS} OBJS = lutil.o xutil.o ulock.o rfcdate.o sequencer.o ftnmsg.o hdr.o \ crc.o parsedate.o gettime.o execute.o execsh.o \ rdconfig.o ftn.o packet.o pktname.o bwrite.o \ bread.o getheader.o scanout.o matchaka.o atoul.o \ nodelock.o trap.o rfcaddr.o expipe.o callstat.o \ cspace.o setprocn.o \ charset.o mime.o \ lhash.o hash.o falists.o ${NEEDED} SRCS = lutil.c xutil.c ulock.c rfcdate.c sequencer.c ftnmsg.c hdr.c \ crc.c strcasestr.c strncasecmp.c strcasecmp.c \ rename.c mkdir.c parsedate.y gettime.c \ rdconfig.c ftn.c packet.c pktname.c bwrite.c \ bread.c getheader.c scanout.c matchaka.c usleep.c \ execute.c execsh.c signal.c regexpr.c atoul.c \ nodelock.c trap.c rfcaddr.c expipe.c callstat.c \ cspace.c setprocn.c ref.c \ charset.c mime.c \ cleanup_ref.c make_new_ref.c tmpfile.c \ dirent.c lhash.c hash.c falists.c HDRS = lutil.h xutil.h ulock.h libinn.h macros.h configdata.h clibrary.h \ config.h ftn.h bwrite.h bread.h getheader.h getopt.h \ scanout.h trap.h rfcaddr.h ftnmsg.h rfcmsg.h callstat.h \ cspace.h charset.h mime.h \ crc.h strcasestr.h strncasecmp.h strcasecmp.h rename.h \ mkdir.h usleep.h ref_interface.h tmpfile.h \ version.h directory.h lhash.h hash.h falists.h OTHER = Makefile README parsedate.3 cleanup_ref.8 make_new_ref.8 ifdef REFERENCES_MSC96 OBJS += ref.o #REF_FILES=cleanup_ref make_new_ref REF_FILES=make_new_ref REF_MAN=man_ref REF_INSTALL=install_ref endif ############################################################################# ifeq (yes,${SHARED}) .c.o: ${CC} ${CFLAGS} -fPIC ${INCLUDES} ${DEFINES} -c $< all: needed.h libifmail.so.${SHVER} ${REF_FILES} else .c.o: ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< all: needed.h utlib.a ${REF_FILES} endif parsedate.c: parsedate.y @echo expect 6 shift/reduce conflicts ${YACC} parsedate.y mv y.tab.c parsedate.c @echo expect 4 warnings compiling parsedate.c libifmail.so.${SHVER}: ${OBJS} ${CC} -o libifmail.so.${SHVER} -shared -Wl,-soname,libifmail.so.${SHVER} ${OBJS} ln -s libifmail.so.${SHVER} libifmail.so utlib.a: ${OBJS} ${AR} r $@ $? ${RANLIB} $@ needed.h: (for f in ${NEEDED} ;do BASE=`basename $$f .o`; BASE=\"$${BASE}.h\" ; \ echo "#include $${BASE}"; done) > needed.h cleanup_ref: cleanup_ref.o ref.o ${CC} ${CFLAGS} cleanup_ref.o ref.o ${LIBS} -o cleanup_ref make_new_ref: make_new_ref.o ref.o ${CC} ${CFLAGS} make_new_ref.o ref.o ${LIBS} -o make_new_ref clean: rm -f utlib.a libifmail.so* *.o getdate.c parsedate.c testscan \ testconf testtrap testrfcaddr core filelist Makefile.bak needed.h \ cleanup_ref make_new_ref install: all ${REF_INSTALL} ifeq (1,${SHARED}) ${INSTALL} -o${OWNER} -g${GROUP} -m644 libifmail.so.${SHVER} ${LIBDIR}/libifmail.so.${SHVER} endif install_ref: #${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} cleanup_ref ${BINDIR}/cleanup_ref ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} make_new_ref ${BINDIR}/make_new_ref tar: utlib.tar.z utlib.tar.z: ${SRCS} ${HDRS} ${OTHER} ${TAR} cf - ${SRCS} ${HDRS} ${OTHER} \ | gzip >$@ filelist: Makefile BASE=`pwd`; \ BASE=`basename $${BASE}`; \ (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ifmail/$${BASE}/$$f; done) \ >filelist man: ${REF_MAN} ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} parsedate.3 ${MANDIR}/man3/parsedate.3 man_ref: ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} cleanup_ref.8 ${MANDIR}/man8/cleanup_ref.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} make_new_ref.8 ${MANDIR}/man8/make_new_ref.8 testconf: rdconfig.c config.h utlib.a cc -g -Wall -DTESTING rdconfig.c utlib.a -o $@ tryconf: testconf ./testconf ../misc/config testscan: scanout.c scanout.h utlib.a cc -g -Wall -DTESTING scanout.c utlib.a -o $@ tryscan: testscan ./testscan ../misc/config testtrap: trap.c cc -g -Wall -DNEED_TRAP -DTESTING trap.c utlib.a -o $@ trytrap: testtrap ./testtrap testrfcaddr: rfcaddr.c rfcaddr.h cc -g -Wall -DTESTING rfcaddr.c utlib.a -o $@ tryrfcaddr: testrfcaddr ./testrfcaddr depend: @rm -f Makefile.bak; \ mv Makefile Makefile.bak; \ sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ >>Makefile; \ ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ for f in ${SRCS}; \ do \ ${ECHO} "Dependencies for $$f:\c"; \ ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ for h in `sed -n -e \ 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ do \ ${ECHO} " $$h\c"; \ ${ECHO} " $$h\c" >>Makefile; \ done; \ ${ECHO} " done."; \ ${ECHO} "" >>Makefile; \ done; \ ${ECHO} '# End of generated dependencies' >>Makefile # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend lutil.o: xutil.o: xutil.h lutil.h ulock.o: lutil.h rfcdate.o: sequencer.o: lutil.h config.h ftnmsg.o: lutil.h bwrite.h ftn.h ftnmsg.h hdr.o: xutil.h lutil.h rfcmsg.h crc.o: strcasestr.o: strncasecmp.o: strcasecmp.o: rename.o: mkdir.o: parsedate.y.o: configdata.h libinn.h macros.h gettime.o: configdata.h clibrary.h libinn.h rdconfig.o: xutil.h lutil.h ftn.h config.h charset.h ftn.o: lutil.h xutil.h ftn.h rfcaddr.h config.h mime.h packet.o: xutil.h lutil.h ftn.h config.h bwrite.h pktname.o: directory.h lutil.h xutil.h ftn.h config.h bwrite.o: bwrite.h config.h bread.o: bread.h config.h getheader.o: lutil.h xutil.h ftn.h bread.h config.h scanout.o: directory.h xutil.h config.h ftn.h scanout.h lutil.h matchaka.o: ftn.h lutil.h config.h usleep.o: execute.o: lutil.h execsh.o: lutil.h signal.o: regexpr.o: atoul.o: nodelock.o: xutil.h lutil.h ftn.h trap.o: lutil.h trap.h lutil.h rfcaddr.o: xutil.h rfcaddr.h expipe.o: lutil.h callstat.o: lutil.h ftn.h callstat.h setprocn.o: ref.o: config.h ref_interface.h lutil.h charset.o: lutil.h xutil.h rfcmsg.h needed.h config.h mime.h charset.h mime.o: needed.h lutil.h xutil.h cleanup_ref.o: config.h ref_interface.h make_new_ref.o: config.h ref_interface.h tmpfile.o: dirent.o: directory.h lhash.o: lhash.h hash.o: hash.h lhash.h falists.o: xutil.h lutil.h ftn.h falists.h # End of generated dependencies ifmail-2.14tx8.10.orig/iflib/README100644 1751 50 1640 6331373042 14115 0ustar mdsrcCopyright (c) 1993-1997 Eugene G. Crosser utlib is a collection of useful subroutines used in various programs. Several modules are taken from INN 1.4 and are subject to INN's copyright and distribution policy, others are allowed for free distribution and use for any purpose. The INN's modules are: parsedate.c gettime.c configdata.h libinn.h clibrary.h macros.h. In the other programs, some ideas are taken from "RFmail" package. usleep() implementation contributed by Gert Doering , signal() suitable for some BSD-ish systems contributed by Martin Junius . When compiling, specify: cc ... -I${LIBDIR} ... ${LIBDIR}/utlib.a ... Compiling utlib programs on some systems (as SCO and ISC) you will need to hack INN's "configdata.h" (and maybe "clibrary.h" too) accordingly. Even better, if you have INN installed, just take these files from INN source tree (*after* configuring). ifmail-2.14tx8.10.orig/iflib/parsedate.3100644 1751 50 7011 5444357652 15304 0ustar mdsrc.\" $Revision: 1.10 $ .TH PARSEDATE 3 .SH NAME parsedate \- convert time and date string to number .SH SYNOPSIS .nf .ta \w' unsigned long 'u .B "#include " .B "typedef struct _TIMEINFO {" .B " time_t time;" .B " long usec;" .B " long tzone; .B "} TIMEINFO;" .B "time_t" .B "parsedate(text, now)" .B " char *text;" .B " TIMEINFO *now;" .fi .SH DESCRIPTION .I Parsedate converts many common time specifications into the number of seconds since the epoch \(em .IR i.e. , a .IR time_t ; see .IR time (2). .PP .I Parsedate returns the time, or \-1 on error. .I Text is a character string containing the time and date. .I Now is a pointer to the time that should be used for calculating relative dates. If .I now is NULL, then .I GetTimeInfo in .IR libinn (3) is used to obtain the current time and timezone. .PP The character string consists of zero or more specifications of the following form: .TP .I time A time of day, which is of the form .IR hh [ :mm [ :ss ]] .RI [ meridian ] .RI [ zone ] or .IR hhmm .RI [ meridian ] .RI [ zone ]. If no meridian is specified, .I hh is interpreted on a 24-hour clock. .TP .I date A specific month and day with optional year. The acceptable formats are .IR mm/dd [ /yy ], .IR yyyy/mm/dd , .IR "monthname dd" "[, " yy ], .IR "dd monthname" " [" yy "], and .IR "day, dd monthname yy" . The default year is the current year. If the year is less then 100, then 1900 is added to it; if it is less then 21, then 2000 is added to it. .TP .I "relative time" A specification relative to the current time. The format is .IR "number unit" ; acceptable units are .IR year , .IR month , .IR week , .IR day , .IR hour , .I minute (or .IR min ), and .I second (or .IR sec ). The unit can be specified as a singular or plural, as in .IR "3 weeks" . .PP The actual date is calculated according to the following steps. First, any absolute date and/or time is processed and converted. Using that time as the base, day-of-week specifications are added. Next, relative specifications are used. If a date or day is specified, and no absolute or relative time is given, midnight is used. Finally, a correction is applied so that the correct hour of the day is produced after allowing for daylight savings time differences. .PP .I Parsedate ignores case when parsing all words; unknown words are taken to be unknown timezones, which are treated as GMT. The names of the months and days of the week can be abbreviated to their first three letters, with optional trailing period. Periods are ignored in any timezone or meridian values. .SH BUGS .I Parsedate does not accept all desirable and unambiguous constructions. Semantically incorrect dates such as ``February 31'' are accepted. .PP Daylight savings time is always taken as a one-hour change which is wrong for some places. The daylight savings time correction can get confused if parsing a time within an hour of when the reckoning changes, or if given a partial date. .SH HISTORY Originally written by Steven M. Bellovin while at the University of North Carolina at Chapel Hill and distributed under the name .IR getdate . .PP A major overhaul was done by Rich $alz and Jim Berets in August, 1990. .PP It was further revised (primarily to remove obsolete constructs and timezone names) a year later by Rich (now ) for InterNetNews, and the name was changed. .de R$ This is revision \\$3, dated \\$4. .. .R$ $Id: parsedate.3,v 1.10 1993/01/29 16:43:12 rsalz Exp $ .SH "SEE ALSO" date(1), ctime(3), libinn(3), time(2). ifmail-2.14tx8.10.orig/iflib/cleanup_ref.8100644 1751 50 2220 6351073537 15614 0ustar mdsrc.TH CLEANUP_REF 8 "\*(Dt" "Internet-Fidonet Gateway" .UC 4 .SH NAME .B cleanup_ref \- Clean up References database of ifmail FTN gateway .PP .SH SYNOPSIS .B cleanup_ref .PP .SH DESCRIPTION .B cleanup_ref delete old entries of the References database, according to the implementation of this suppression in ref.c. .br This module is a wrapper. .br It uses the ref_cleanup() function to suppress old entries in the database .PP You should run this program regularly from cron in order to purge the References database and avoid it to grow out more than needed. .br It takes no parameters (the References database pathname and days before expire are hardcoded, see section BUGS), and outputs to stdout a report for each entry in the database. .SH FILES .B /var/spool/ifmail/refdb References database .PP .B $IFLIBDIR/config ifmail configuration file. Not used by cleanup_ref but is there that the References database true pathname is set. .PP .SH BUGS \- Hard-coded constants; maybe should use lib.a .br \- See ref.c .PP .SH BASED-ON refcleanup.c PV001 of 19/02/96 MSC96 .SH AUTHOR Marc SCHAEFER .PP .SH SEE ALSO ifmail(8), ifnews(8), iftoss(8) ifmail-2.14tx8.10.orig/iflib/make_new_ref.8100644 1751 50 2304 6351073537 15756 0ustar mdsrc.TH MAKE_NEW_REF 8 "\*(Dt" "Internet-Fidonet Gateway" .UC 4 .SH NAME .B make_new_ref \- Clean up References database of ifmail FTN gateway .PP .SH SYNOPSIS .B make_new_ref .PP .SH DESCRIPTION .B make_new_ref copies active entries of the references database to a new file, compacting the database. .br It uses the ref_*_extended() function to copy entries in the database .PP You should run this program regularly from cron in order to purge the References database and avoid it to grow out more than needed. You need to move the old database file or rm it. .br It takes no parameters (the References database pathname and days before expire are hardcoded, see section BUGS), and outputs to stdout a report for each entry in the database if compiled to do so. .SH FILES .B /var/spool/ifmail/refdb References database .PP .B $IFLIBDIR/config ifmail configuration file. Not used by make_new_ref but is there that the References database true pathname is set. .PP .SH BUGS \- Hard-coded constants; maybe should use lib.a .br \- See ref.c .PP .SH BASED-ON make_new_ref.c PV001 of 16/06/96 MSC97 .SH AUTHOR Marc SCHAEFER .PP .SH SEE ALSO ifmail(8), ifnews(8), iftoss(8), cleanup_ref(8), mv(1), rm(1) ifmail-2.14tx8.10.orig/iflib/falists.c100644 1751 50 11035 6420407564 15073 0ustar mdsrc#include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "falists.h" int in_list(addr,fap) faddr *addr; fa_list **fap; { fa_list *tmp; debug(8,"Seeking seen-by match for %s",ascinode(addr,0x06)); if (addr->point) { debug(8,"No seen-by check for point address"); return 0; } for (tmp=*fap;tmp;tmp=tmp->next) if ((tmp->addr->net == addr->net) && (tmp->addr->node == addr->node)) { debug(8,"Match found"); return 1; } debug(8,"Match not found"); return 0; } void fill_list(fap,str,omit) fa_list **fap; char *str; fa_list **omit; { fa_list *tmp; faddr *ta; static unsigned int oldzone=0, oldnet=0, oldnode=0; char *buf,*p,*q,*r; int allowskip=1; if ((str == NULL) || (*str == '\0'))return; debug(8,"fill_list %s",str); buf=xstrcpy(str); r=buf+strlen(buf); for (p=strtok(buf," \t\n"),q=p+strlen(p)+1; p; p=(qzone == 0) ta->zone=oldzone; else oldzone=ta->zone; if (ta->net == 0) ta->net=oldnet; else oldnet=ta->net; if ((ta->point != 0) && (ta->node == 0)) ta->node=oldnode; else oldnode=ta->node; if (allowskip && omit && *omit && (metric(ta,(*omit)->addr) == 0)) { debug(8,"omit %s",ascfnode(ta,0x1f)); tmp=*omit; *omit=(*omit)->next; tmp->next=NULL; tidy_falist(&tmp); } else { debug(8,"add %s",ascfnode(ta,0x1f)); allowskip=0; tmp=(fa_list *)xmalloc(sizeof(fa_list)); tmp->next=*fap; tmp->addr=ta; *fap=tmp; } } free(buf); oldzone=0; for (tmp=*fap;tmp;tmp=tmp->next) debug(8,"fill_list returns: %s",ascfnode(tmp->addr,0x06)); return; } void fill_rlist(fap,str) fa_list **fap; char *str; { fa_list *tmp; faddr *ta; static unsigned int oldnet; char *buf,*p,*q; if ((str == NULL) || (*str == '\0')) return; debug(8,"fill_rlist %s",str); buf=xstrcpy(str); for (p=buf,q=strchr(p,'!');*p;p=q,q=strchr(p,'!')) { if (q) *q++='\0'; else q=p+strlen(p); if ((ta=parsefaddr(p))) { if (ta->net == 0) ta->net=oldnet; else oldnet=ta->net; tmp=(fa_list *)xmalloc(sizeof(fa_list)); tmp->next=*fap; tmp->addr=ta; *fap=tmp; } } free(buf); for (tmp=*fap;tmp;tmp=tmp->next) debug(8,"fill_rlist returns: %s",ascfnode(tmp->addr,0x06)); return; } void fill_path(fap,str) fa_list **fap; char *str; { fa_list **tmp; faddr *ta; static unsigned int oldnet; char *buf,*p,*q,*r; if ((str == NULL) || (*str == '\0')) return; debug(8,"fill_path %s",str); buf=xstrcpy(str); for (tmp=fap;*tmp;tmp=&((*tmp)->next)) /*nothing*/; r=buf+strlen(buf); for (p=strtok(buf," \t\n"),q=p+strlen(p)+1; p; p=(qnet == 0) ta->net=oldnet; else oldnet=ta->net; *tmp=(fa_list *)xmalloc(sizeof(fa_list)); (*tmp)->next=NULL; (*tmp)->addr=ta; tmp=&((*tmp)->next); } free(buf); for (tmp=fap;*tmp;tmp=&((*tmp)->next)) debug(8,"fill_path returns: %s",ascfnode((*tmp)->addr,0x06)); return; } int compaddr(fa_list **,fa_list **); void uniq_list(fap) fa_list **fap; { fa_list *ta,*tan; debug(8,"uniq_list beginning from %s", *fap?ascinode((*fap)->addr,0x06):""); for (ta=*fap;ta;ta=ta->next) { while ((tan=ta->next) && (compaddr(&ta,&tan) == 0)) { ta->next=tan->next; tidy_faddr(tan->addr); free(tan); } ta->next=tan; debug(8,"path addr after unique: %s", ascfnode(ta->addr,0x06)); } } void sort_list(fap) fa_list **fap; { fa_list *ta,**vector; size_t n=0,i; debug(8,"sort_list beginning from %s", *fap?ascinode((*fap)->addr,0x06):""); for (ta=*fap;ta;ta=ta->next) n++; vector=(fa_list **)xmalloc(n * sizeof(fa_list *)); debug(8,"Sorting %d seen-by entries",n); i=0; for (ta=*fap;ta;ta=ta->next) { vector[i++]=ta; debug(8,"seen-by addr before sort: %s", ascfnode(ta->addr,0x06)); } qsort(vector,n,sizeof(faddr*), (int(*)(const void*,const void*))compaddr); for (i=0;iaddr,0x06)); (*fap)=vector[0]; i=1; for (ta=*fap;ta;ta=ta->next) { while ((i < n) && (compaddr(&ta,&(vector[i])) == 0)) { tidy_faddr((vector[i])->addr); free(vector[i]); i++; } if (i < n) ta->next=vector[i++]; else ta->next=NULL; debug(8,"seen-by addr after unique: %s", ascfnode(ta->addr,0x06)); } free(vector); return; } int compaddr(fap1,fap2) fa_list **fap1,**fap2; { if ((*fap1)->addr->net != (*fap2)->addr->net) return ((*fap1)->addr->net - (*fap2)->addr->net); else return ((*fap1)->addr->node - (*fap2)->addr->node); } ifmail-2.14tx8.10.orig/iflib/falists.h100644 1751 50 467 6420407564 15047 0ustar mdsrc#ifndef _FALIST_H #define _FALIST_H #include "ftn.h" extern void fill_list(fa_list **,char *,fa_list **); extern void fill_rlist(fa_list **,char *); extern void fill_path(fa_list **,char *); extern void sort_list(fa_list **); extern void uniq_list(fa_list **); extern int in_list(faddr *,fa_list **); #endif ifmail-2.14tx8.10.orig/iflib/cspace.c100644 0 0 3632 6701151723 15277 0ustar rootroot#include #include #include #include "lutil.h" #include "cspace.h" #ifndef ULONG_MAX #define ULONG_MAX 4294967295 #endif #if defined(HAS_STATFS) | defined(HAS_STATVFS) #if defined(HAS_STATFS) #if defined(STATFS_IN_VFS_H) #include #elif defined(STATFS_IN_STATFS_H) #include #elif defined(STATFS_IN_STATVFS_H) #include #elif defined(STATFS_IN_MOUNT_H) #include #else #error No include for statfs() call defined #endif #elif defined(HAS_STATVFS) #include #endif int checkspace(dir,fn,factor) char *dir,*fn; int factor; { struct stat st; #ifdef HAS_STATVFS struct statvfs sfs; if ((stat(fn,&st) != 0) || (statvfs(dir,&sfs) != 0)) #else struct statfs sfs; #ifdef SCO_STYLE_STATFS if ((stat(fn,&st) != 0) || (statfs(dir,&sfs,sizeof(sfs),0) != 0)) #else if ((stat(fn,&st) != 0) || (statfs(dir,&sfs) != 0)) #endif #endif { logerr("$cannot stat \"%s\" or statfs \"%s\", assume enough space", S(fn),S(dir)); return 1; } if ((((st.st_size/sfs.f_bsize+1)*factor)/100L) > sfs.f_bfree) { loginf("Only %lu %lu-byte blocks left on device where %s is located", sfs.f_bfree,sfs.f_bsize,S(dir)); return 0; } return 1; } unsigned long freespace(dir) char *dir; { #ifdef HAS_STATVFS struct statvfs sfs; if (statvfs(dir,&sfs) != 0) #else struct statfs sfs; #ifdef SCO_STYLE_STATFS if (statfs(dir,&sfs,sizeof(sfs),0) != 0) #else if (statfs(dir,&sfs) != 0) #endif #endif { logerr("$cannot statfs \"%s\", assume plenty space",S(dir)); return ULONG_MAX; } if (sfs.f_bfree > (ULONG_MAX / sfs.f_bsize)) return ULONG_MAX; else return (sfs.f_bsize * sfs.f_bfree); } #else /* does not have stat[v]fs */ int checkspace(dir,fn,factor) char *dir,*fn; int factor; { return 1; /* Assume space is enough */ } unsigned long freespace(dir) char *dir; { return ULONG_MAX; /* assume there is plenty space */ } #endif ifmail-2.14tx8.10.orig/iflib/cspace.h100644 0 0 175 6701151723 15263 0ustar rootroot#ifndef CSPACE_H #define CSPACE_H extern int checkspace(char *,char *,int); extern unsigned long freespace(char *); #endif ifmail-2.14tx8.10.orig/ifgate/ 40755 1751 50 0 6701151723 13312 5ustar mdsrcifmail-2.14tx8.10.orig/ifgate/ifmail.c100644 1751 50 32025 6540753002 15035 0ustar mdsrc/* ### Modified by P.Saratxaga on 9 Aug 1995 ### * - added ALLOW_CONTROL to allow Control: lines to be gated * - added a line so if fmsg->to->name is greater than MAXNAME (35), * and "@" or "%" or "!" is in it; then UUCP is used instead. So we can * send messages to old style fido->email gates (that is, using another * soft than ifmail ;-) ) with long adresses. * - REFERENCES_MSC96 added from Marc Schaeffer * - added AREAS_HACKING from Marc Schaeffer * - added LEVEL stuff */ #include #include #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "rfcaddr.h" #include "falists.h" #include "rfcmsg.h" #include "ftnmsg.h" #include "areas.h" #include "config.h" #include "version.h" #include "trap.h" #include "hash.h" #include "needed.h" #include "nodecheck.h" #include "charset.h" #ifdef REFERENCES_MSC96 #include "ref_interface.h" ref_private_t *ref_dbase; #endif #ifdef GATEBAU_MSGID extern unsigned long crcgatebau(char*); extern char *rfcmsgid(char*,faddr*,int); extern int ftnmsgid(char*,char**,unsigned long*,char*); #endif #ifndef LEVEL #define LEVEL 1 #endif #ifndef FAKEDIR #define FAKEDIR "/tmp/ifmail/" #endif extern int newsmode; extern char *configname; extern char passwd[]; extern int putmessage(rfcmsg *,ftnmsg *,FILE *,faddr*,char,fa_list **,int,int); extern void closepkt(void); extern char *bgets(char *,int,FILE *); #ifdef AREAS_HACKING extern void readareas(char *, char *); #else extern void readareas(char *); #endif extern void try_attach(char *,int,faddr *,char); extern int flag_on(char *,char *); extern unsigned INT16 crc(char *); int usetmp=0; faddr *bestaka; extern int fakeoutbound; int rfclevel=LEVEL; int nosplitmode=0; int pgpsigned; void usage(void) { confusage("-N -o -n -r -g ..."); fprintf(stderr,_("-N\t\tput packets to %s directory\n"),FAKEDIR); fprintf(stderr,_("-o\tforce `out' mode for these flavors\n")); fprintf(stderr,_("-o+\t\tforce `out' mode for all flavors\n")); fprintf(stderr,_("-o-\t\treset `out' mode for all flavors\n")); fprintf(stderr,_("-n\t\tset news mode\n")); fprintf(stderr,_("-s\t\trun in secure mode (check nodelist)\n")); fprintf(stderr,_("-r\taddress to route packet\n")); fprintf(stderr,_("-g\t[ n | c | h ] \"flavor\" of packet\n")); #ifdef DIRTY_CHRS fprintf(stderr,_("-c\tforce the given charset\n")); #endif fprintf(stderr,_("-l\tforce the given level (default=%d)\n"),LEVEL); fprintf(stderr,_("-b\t\tdon't split the messages\n")); fprintf(stderr,_("\t\tlist of receipient addresses\n")); } int main(argc,argv) int argc; char *argv[]; { int c; char *p; char buf[BUFSIZ]; FILE *fp; char *routec=NULL; faddr *route = NULL; fa_list **envrecip, *envrecip_start = NULL; int envrecip_count=0; area_list *area = NULL, *area_start = NULL; int area_count=0; int msg_in=0,msg_out=0; rfcmsg *msg=NULL,*tmsg; ftnmsg *fmsg=NULL; faddr *taddr; char cflavor='\0',flavor; fa_list *sbl = NULL; unsigned long svmsgid,svreply; char *outmode=NULL; int secure=0; int incode, outcode; #ifdef DIRTY_CHRS int dirtyoutcode=CHRS_NOTSET; #endif #if defined(HAS_SYSLOG) && defined(MAILLOG) logfacility=MAILLOG; #endif setmyname(argv[0]); catch(myname); #ifdef DIRTY_CHRS while ((c=getopt(argc,argv,"g:r:x:I:c:l:bnNhos")) != -1) #else while ((c=getopt(argc,argv,"g:r:x:I:l:bnNhos")) != -1) #endif if (confopt(c,optarg)) switch (c) { case 'N': fakeoutbound=1; break; case 'o': outmode=optarg; break; case 'g': if (optarg && ((*optarg == 'n') || (*optarg == 'c') || (*optarg == 'h'))) { cflavor=*optarg; } else { usage(); exit(EX_USAGE); } break; case 'r': routec=optarg; break; case 'n': newsmode=1; break; case 's': secure=1; break; #ifdef DIRTY_CHRS case 'c': dirtyoutcode=readchrs(optarg); if (dirtyoutcode == CHRS_NOTSET) dirtyoutcode=getcode(optarg); break; #endif case 'l': rfclevel=atoi(optarg); break; case 'b': nosplitmode=1; break; default: usage(); exit(EX_USAGE); } if (cflavor == 'n') cflavor='o'; if (readconfig()) { fprintf(stderr,"Error getting configuration, aborting\n"); exit(EX_DATAERR); } if (outmode) { if (*outmode == '-') nonpacked=""; else if (*outmode == '+') nonpacked="och"; else nonpacked=outmode; } if (nonpacked == NULL) nonpacked=""; for (p=nonpacked;*p;p++) if ((*p == 'f') || (*p == 'n')) *p='o'; /* constant values will not be modified anyway */ if ((routec) && ((route=parsefaddr(routec)) == NULL)) logerr("unparsable route address \"%s\" (%s)", S(routec),addrerrstr(addrerror)); if ((p=strrchr(argv[0],'/'))) p++; else p=argv[0]; if (!strcmp(p,"ifnews")) newsmode=1; if (newsmode) { #ifdef REFERENCES_MSC96 if (refdbm) ref_dbase = ref_init(refdbm); #endif #ifdef AREAS_HACKING if (routec) { readareas(areafile, routec); } else { readareas(areafile, getenv("NEWSSITE")); } #else readareas(areafile); #endif #if defined(HAS_SYSLOG) && defined(NEWSLOG) logfacility=NEWSLOG; #endif } else { if (strchr(nonpacked,'m')) nonpacked="och"; } envrecip=&envrecip_start; while (argv[optind]) if ((taddr=parsefaddr(argv[optind++]))) { if ((!secure) || ((secure) && (chknlent(taddr)))) { (*envrecip)=(fa_list*)xmalloc(sizeof(fa_list)); (*envrecip)->next=NULL; (*envrecip)->addr=taddr; envrecip=&((*envrecip)->next); envrecip_count++; } else logerr("unexistent recipient: \"%s\" not in nodelist", argv[optind-1]); } else logerr("unparsable recipient \"%s\" (%s), ignored", argv[optind-1], addrerrstr(addrerror)); if ((!newsmode) && (!envrecip_count)) { logerr("No valid receipients specified, aborting"); exit(EX_NOUSER); } if (!route && newsmode && envrecip_count) route=envrecip_start->addr; if (!route) if ((routec=getenv("NEWSSITE"))) route=parsefaddr(routec); if (!route) { logerr("Routing address not specified, aborting"); exit(EX_USAGE); } if (fakeoutbound) { mkdir(FAKEDIR,0777); loginf("packets will go to %s",FAKEDIR); } bestaka=bestaka_s(route); for(envrecip=&envrecip_start;*envrecip;envrecip=&((*envrecip)->next)) loginf("envrecip: %s",ascfnode((*envrecip)->addr,0x7f)); loginf("route: %s",ascfnode(route,0x1f)); umask(066); /* packets may contain confidential information */ while (!feof(stdin)) { usetmp=0; tidyrfc(msg); msg=parsrfc(stdin); incode = outcode = CHRS_NOTSET; pgpsigned = 0; p=hdr("Content-Type",msg); if (p) incode=readcharset(p); if (incode == CHRS_NOTSET) { p=hdr("X-FTN-CHRS",msg); if (p == NULL) p=hdr("X-FTN-CHARSET",msg); if (p == NULL) p=hdr("X-FTN-CODEPAGE",msg); if (p) incode=readchrs(p); #ifdef JE if (!newsmode) #else if (1) #endif { if ((p=hdr("Message-ID",msg)) && (chkftnmsgid(p))) incode=defaultftnchar; else incode=defaultrfcchar; } } if ((p=hdr("Content-Type",msg)) && ((strcasestr(p,"multipart/signed")) || (strcasestr(p,"application/pgp")))) { pgpsigned=1; outcode=incode; } #ifndef TOGATE else if ((p=hdr("X-FTN-ORIGCHRS",msg))) outcode=readchrs(p); #endif #ifdef DIRTY_CHRS else if (dirtyoutcode != CHRS_NOTSET) outcode=dirtyoutcode; #endif #ifdef JE else if (!newsmode) outcode=getoutcode(incode); #else else outcode=getoutcode(incode); #endif flavor=cflavor; if (newsmode) { if (!flavor) flavor='o'; tidy_arealist(area_start); area_start=areas(hdr("Newsgroups",msg),1); area_count=0; for(area=area_start;area;area=area->next) { area_count++; debug(9,"area: %s",S(area->name)); } tidy_falist(&sbl); for (tmsg=msg;tmsg;tmsg=tmsg->next) if (strcasecmp(tmsg->key,"X-FTN-SEEN-BY") == 0) fill_list(&sbl,tmsg->val,NULL); } else { if ((p=hdr("X-FTN-FLAGS",msg))) { if (!flavor) { if (flag_on("CRS",p)) flavor='c'; else if (flag_on("HLD",p)) flavor='h'; else flavor='o'; } if (flag_on("ATT",p)) try_attach(hdr("Subject",msg), 0,route,flavor); if (flag_on("TFS",p)) try_attach(hdr("Subject",msg), 1,route,flavor); if (flag_on("KFS",p)) try_attach(hdr("Subject",msg), 2,route,flavor); } if ((!flavor) && ((p=hdr("Priority",msg)) || (p=hdr("Precedence",msg)) || (p=hdr("X-Class",msg)))) { while (isspace(*p)) p++; if ((strncasecmp(p,"fast",4) == 0) || (strncasecmp(p,"high",4) == 0) || (strncasecmp(p,"crash",5) == 0) || (strncasecmp(p,"airmail",5) == 0) || (strncasecmp(p,"special-delivery",5) == 0) || (strncasecmp(p,"first-class",5) == 0)) flavor='c'; else if ((strncasecmp(p,"slow",4) == 0) || (strncasecmp(p,"low",3) == 0) || (strncasecmp(p,"hold",4) == 0) || (strncasecmp(p,"news",4) == 0) || (strncasecmp(p,"bulk",4) == 0) || (strncasecmp(p,"junk",4) == 0)) flavor='h'; } if (!flavor) flavor='o'; } if (((!newsmode) && (envrecip_count > 1)) || ((newsmode) && (area_count > 1))) { if ((fp=tmpfile()) == NULL) { logerr("$Cannot open temporary file"); exit(EX_OSERR); } while(bgets(buf,sizeof(buf)-1,stdin)) fputs(buf,fp); rewind(fp); usetmp=1; } else { fp=stdin; usetmp=0; } if (newsmode && ((area_count < 1) || (maxgroups && (group_count > maxgroups)) || #ifndef ALLOW_CONTROL (hdr("Control",msg) && (rfclevel < 5)) || #endif (in_list(route,&sbl)))) { debug(9,"skipping news message"); while(bgets(buf,sizeof(buf)-1,fp)); } else { tidy_ftnmsg(fmsg); if ((fmsg=mkftnhdr(msg,incode,outcode)) == NULL) { logerr("Unable to create FTN headers from RFC ones, aborting"); exit(EX_UNAVAILABLE); } if (newsmode) { fill_list(&sbl,ascfnode(bestaka,0x06),NULL); fill_list(&sbl,ascfnode(route,0x06),NULL); fmsg->to->zone=route->zone; fmsg->to->net=route->net; fmsg->to->node=route->node; fmsg->to->point=route->point; } if (!newsmode) for(envrecip=&envrecip_start;*envrecip;envrecip=&((*envrecip)->next)) { fmsg->to=(*envrecip)->addr; if ((!fmsg->to->name) || ((strlen(fmsg->to->name) > MAXNAME) && ((strstr(fmsg->to->name,"@")) || (strstr(fmsg->to->name,"%")) || (strstr(fmsg->to->name,"!"))))) fmsg->to->name="UUCP"; if (putmessage(msg,fmsg,fp,route,flavor,&sbl,incode,outcode)) { logerr("Unable to put netmail message into the packet, aborting"); exit(EX_CANTCREAT); } if (usetmp) rewind(fp); fmsg->to=NULL; msg_out++; } else for(area=area_start;area;area=area->next) { fmsg->area=area->name; svmsgid=fmsg->msgid_n; svreply=fmsg->reply_n; if ((p=hdr("Message-ID",msg))) { ftnmsgid(p,&fmsg->msgid_a, &fmsg->msgid_n,fmsg->area); #ifdef GATEBAU_MSGID if (areagatebau(fmsg->area)) { p=xstrcpy(fmsg->msgid_a); p=xstrcat(p,(fmsg->area)); fmsg->msgid_n = crcgatebau(p); } else { #endif hash_update_s(&fmsg->msgid_n, fmsg->area); #ifdef REFERENCES_MSC96 if ((refdbm) && (newsmode) && (!chkftnmsgid(p))) ref_store_msgid(ref_dbase,fmsg,p); #endif #ifdef GATEBAU_MSGID } #endif } if ((p=hdr("References",msg))) { p=strrchr(p,' '); ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area); if (!chkftnmsgid(p)) { #ifdef GATEBAU_MSGID if (areagatebau(fmsg->area)) { p=xstrcpy(fmsg->reply_a); p=xstrcat(p,(fmsg->area)); fmsg->reply_n = crcgatebau(p); } else { #endif hash_update_s(&fmsg->reply_n, fmsg->area); #ifdef GATEBAU_MSGID } #endif } } else if ((p=hdr("In-Reply-To",msg))) { ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area); if (!chkftnmsgid(p)) { #ifdef GATEBAU_MSGID if (areagatebau(fmsg->area)) { p=xstrcpy(fmsg->reply_a); p=xstrcat(p,(fmsg->area)); fmsg->reply_n = crcgatebau(p); } else { #endif hash_update_s(&fmsg->reply_n, fmsg->area); #ifdef GATEBAU_MSGID } #endif } } #ifdef JE areacharset(fmsg->area, &incode, &outcode); if ((incode==CHRS_NOTSET) && (hdr("Message-ID",msg))) { if (chkftnmsgid(hdr("Message-ID",msg))) incode=defaultftnchar; else incode=defaultrfcchar; } if (pgpsigned) outcode=incode; else if (outcode==CHRS_NOTSET) outcode=getoutcode(incode); #endif if (putmessage(msg,fmsg,fp,route,flavor,&sbl,incode,outcode)) { logerr("Unable to put echo message into the packet, aborting"); exit(EX_SOFTWARE); } if (usetmp) rewind(fp); fmsg->area=NULL; fmsg->msgid_n=svmsgid; fmsg->reply_n=svreply; msg_out++; } msg_in++; } if (usetmp) fclose(fp); } closepkt(); loginf("end input %d, output %d messages",msg_in,msg_out); #ifdef REFERENCES_MSC96 if ((refdbm) && (newsmode)) ref_deinit(ref_dbase); #endif return EX_OK; } ifmail-2.14tx8.10.orig/ifgate/rfcmsg.c100644 0 0 11706 6573551267 15533 0ustar rootroot/* ### Modified by P.Saratxaga on 6 Aug 1995 ### * - Added PCBOARD_GATE * - changed MACHIGAI code () */ #include #include #include #include #include "xutil.h" #include "lutil.h" #include "rfcmsg.h" #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #ifndef BUFSIZ #define BUFSIZ 512 #endif #define KWDCHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_." extern char *bgets(char *,int,FILE *); rfcmsg *parsrfc(fp) FILE *fp; { int linecont=FALSE,newcont,firstline; rfcmsg *start=NULL, *cur=NULL; char buffer[BUFSIZ]; char *p; while(bgets(buffer,BUFSIZ-1,fp) && strcmp(buffer,"\n")) { newcont=(buffer[strlen(buffer)-1] != '\n'); debug(17,"Line read: \"%s\" - %s continued", buffer,newcont?"to be":"not to be"); if (linecont) { debug(17,"this is a continuation of a long line"); cur->val=xstrcat(cur->val,buffer); } else { if (isspace(buffer[0])) { if (strspn(buffer," \t\n") == strlen(buffer)) { debug(17,"breaking with blank-only line"); break; } debug(17,"this is a continuation line"); if (!cur) { debug(17,"Wrong first line: \"%s\"",buffer); cur=(rfcmsg *) xmalloc(sizeof(rfcmsg)); start=cur; cur->next=NULL; cur->key=xstrcpy("X-Body-Start"); cur->val=xstrcpy(buffer); break; } else cur->val=xstrcat(cur->val,buffer); } else { debug(17,"this is a header line"); if (cur) { firstline=FALSE; (cur->next)=(rfcmsg *) xmalloc(sizeof(rfcmsg)); cur=cur->next; } else { firstline=TRUE; cur=(rfcmsg *) xmalloc(sizeof(rfcmsg)); start=cur; } cur->next=NULL; cur->key=NULL; cur->val=NULL; if (firstline && !strncmp(buffer,"From ",5)) { debug(17,"This is a uucpfrom line"); cur->key=xstrcpy("X-UUCP-From"); cur->val=xstrcpy(buffer+4); } #ifdef PCBOARD_GATE /* These ones are generatd by a usenet-->PcBoard-->FTN gate "@FROM :" has the address of the original "From: " (but not the freename, which is on the fidonet header, don't know how to get it... "@SUBJECT:" is the original "Subject: ", and "@PACKOUT:" seems to be the "Expires: ", the date format is changed to dd-mm-yy */ else if ( !strncmp(buffer,"@FROM :",9)) { debug(17,"@FROM___: line"); cur->key=xstrcpy("X-PcBoard-FROM"); cur->val=xstrcpy(" "); cur->val=xstrcat(cur->val,buffer+9); } else if ( !strncmp(buffer,"@SUBJECT:",9)) { debug(17,"@SUBJECT: line"); cur->key=xstrcpy("X-PcBoard-SUBJECT"); cur->val=xstrcpy(" "); cur->val=xstrcat(cur->val,buffer+9); } else if ( !strncmp(buffer,"@PACKOUT:",9)) { debug(17,"@PACKOUT: line"); cur->key=xstrcpy("X-PcBoard-PACKOUT"); cur->val=xstrcpy(" "); cur->val=xstrcat(cur->val,buffer+9); } #endif /* PCBOARD_GATE */ #ifdef MACHIGAI else if ( !strncasecmp(buffer,"Cc:",3)) { debug(17,"Cc: line"); if (strchr(buffer+3,'@')) { cur->key=xstrcpy("Cc"); cur->val=xstrcpy(buffer+3); } else { debug(17,"FTN Cc: line: \"%s\"", buffer); cur->key=xstrcpy("X-Body-Start"); cur->val=xstrcpy(buffer); break; } } #endif else if ((p=strchr(buffer,':')) && (p > buffer) && /* ':' isn't 1st chr */ isspace(*(p+1)) && /* space past ':' */ #ifdef MACHIGAI /* at least one non blank char */ (strspn(p+2, " \t\n") < strlen(p+2)) && #endif (strspn(buffer,KWDCHARS) == (p-buffer))) { *p='\0'; debug(17,"This is a regular header"); cur->key=xstrcpy(buffer); cur->val=xstrcpy(p+1); } else { debug(17,"Non-header line: \"%s\"",buffer); cur->key=xstrcpy("X-Body-Start"); cur->val=xstrcpy(buffer); break; } } } linecont=newcont; } return(start); } void tidyrfc(msg) rfcmsg *msg; { rfcmsg *nxt; for (;msg;msg=nxt) { nxt=msg->next; if (msg->key) free(msg->key); if (msg->val) free(msg->val); free(msg); } return; } void dumpmsg(msg,fp) rfcmsg *msg; FILE *fp; { char *p; p=hdr("X-Body-Start",msg); for (;msg;msg=msg->next) if (strcasecmp(msg->key,"X-Body-Start")) { if (!strcasecmp(msg->key,"X-UUCP-From")) fputs("From",fp); else { fputs(msg->key,fp); fputs(":",fp); } fputs(msg->val,fp); } fputs("\n",fp); if (p) fputs(p,fp); return; } ifmail-2.14tx8.10.orig/ifgate/message.c100644 0 0 73161 6701151723 15663 0ustar rootroot/* ### Modified by P.Saratxaga on 7 Aug 1995 ### * - Newsgroups: line is now gated if there is more than one newsgroup * - Added support for X-FTN-To and X-FTN-From generated by other gates * - modified removemime to kludgerise lines if charset != us-ascii * - creation of ^aACUPDATE kludges from Supersedes: and cancel's * - added charset support (see Changelog for details) * - added recognition of X-Fsc- * - added support to dequote MIME quoted printable messages. Code by T.Tanaka * - added removemsgid and removeinreply * - added rfclevel stuff. * - added DEFAULT_ORIGIN from an idea of "Marco d'Itri" */ #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "rfcaddr.h" #include "ftnmsg.h" #include "rfcmsg.h" #include "config.h" #include "bwrite.h" #include "falists.h" #include "version.h" #include "hash.h" #include "needed.h" #include "mkftnhdr.h" #ifdef JE #include "areas.h" #endif /* JE */ #include "charset.h" #include "charconv.h" #include "mime.h" #ifdef REFERENCES_MSC96 #include "ref_interface.h" ref_private_t *ref_dbase; #endif #define MAXHDRSIZE 2048 #define MAXSEEN 70 #define MAXPATH 73 #ifndef DEFAULT_ORIGIN #define DEFAULT_ORIGIN "Unknown" #endif extern time_t now; extern int newsmode; extern char *replyaddr; extern faddr *bestaka; extern int rfclevel; extern int nosplitmode; extern int pgpsigned; #ifdef HAS_NDBM_H extern char *idlookup(char *); #endif extern char *bgets(char *,int,FILE *); extern long sequencer(void); extern unsigned INT32 crc32(char*,int); extern char *strip_flags(char *); extern void putbody(int,rfcmsg*,FILE*,FILE*,int,int,int,int,int,int*); static int removemime; static int removeorg; static int removemsgid; static int removeref; static int removeinreply; static int removesupersedes; static int removeapproved; static int removefrom; static int removereplyto; static int removereturnto; static int ftnorigin; static int isftnpath(char*); int needputrfc(rfcmsg*); int needputrfc(msg) rfcmsg *msg; { faddr *ta; /* 0-junk, 1-kludge, 2-pass */ if (!strcasecmp(msg->key,"X-UUCP-From")) return (rfclevel-2); if (!strcasecmp(msg->key,"X-Body-Start")) return (rfclevel-2); if (!strncasecmp(msg->key,".",1)) return 0; if (!strncasecmp(msg->key,"X-FTN-",6)) return 0; if (!strncasecmp(msg->key,"X-Fsc-",6)) return 0; if (!strncasecmp(msg->key,"X-ZC-",5)) return 0; if (!strcasecmp(msg->key,"X-Gateway")) return 0; if (!strcasecmp(msg->key,"Path")) return isftnpath(msg->val)?rfclevel-2:rfclevel-1; if (!strcasecmp(msg->key,"Newsgroups")) { if ((hdr("X-Origin-Newsgroups",msg))) return 0; else if ((!newsmode) || (newsmode && strstr(msg->val,","))) return rfclevel; else return (rfclevel-2); } if (!strcasecmp(msg->key,"X-Origin-Newsgroups")) { if ((!newsmode) || (newsmode && strstr(msg->val,","))) return rfclevel; else return (rfclevel-2); } if (!strcasecmp(msg->key,"Control")) { #ifdef ALLOW_CONTROL if (strstr(msg->val,"cancel")) return rfclevel; else return (rfclevel-4); #else if (strstr(msg->val,"cancel")) return (rfclevel-3); else return (rfclevel-4); #endif } #ifdef ALLOW_RETURNPATH if (!strcasecmp(msg->key,"Return-Path")) return rfclevel; #else if (!strcasecmp(msg->key,"Return-Path")) return (rfclevel-1); #endif if (!strcasecmp(msg->key,"Xref")) return (rfclevel-2); if (!strcasecmp(msg->key,"Approved")) return removeapproved?(rfclevel-2):(rfclevel+1); if (!strcasecmp(msg->key,"X-URL")) return (rfclevel-2); if (!strcasecmp(msg->key,"Return-Receipt-To")) return removereturnto?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Notice-Requested-Upon-Delivery-To")) return (rfclevel-2); if (!strcasecmp(msg->key,"Received")) { if (newsmode) return (rfclevel-2); else return ftnorigin?(rfclevel-1):rfclevel; } if (!strcasecmp(msg->key,"From")) { if ((ta=parsefaddr(msg->val))) { tidy_faddr(ta); return (rfclevel-2); } else return removefrom?(rfclevel-1):(rfclevel+3); } if (!strcasecmp(msg->key,"To")) { if (newsmode) return (rfclevel-2); if ((ta=parsefaddr(msg->val))) { tidy_faddr(ta); return (rfclevel-2); } else return (rfclevel+3); } if (!strcasecmp(msg->key,"Cc")) return (rfclevel+1); if (!strcasecmp(msg->key,"Bcc")) return (rfclevel-1); if (!strcasecmp(msg->key,"Reply-To")) { if ((ta=parsefaddr(msg->val))) { tidy_faddr(ta); return (rfclevel-2); } else return removereplyto?(rfclevel-1):(rfclevel+3); } if (!strcasecmp(msg->key,"Lines")) return (rfclevel-2); if (!strcasecmp(msg->key,"Date")) return (rfclevel-2); if (!strcasecmp(msg->key,"Subject")) { if ((msg->val) && (strlen(msg->val) > MAXSUBJ)) return (rfclevel+1); else return (rfclevel-1); } if (!strcasecmp(msg->key,"Organization")) return removeorg?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Comment-To")) return (rfclevel-1); if (!strcasecmp(msg->key,"X-Comment-To")) return (rfclevel-1); if (!strcasecmp(msg->key,"X-Apparently-To")) return (rfclevel-1); if (!strcasecmp(msg->key,"Apparently-To")) return (rfclevel-1); if (!strcasecmp(msg->key,"X-Fidonet-Comment-To")) return (rfclevel-2); if (!strcasecmp(msg->key,"Keywords")) return (rfclevel+1); if (!strcasecmp(msg->key,"Summary")) return (rfclevel+1); if (!strcasecmp(msg->key,"MIME-Version")) return removemime?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Content-Type")) return removemime?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Content-Length")) return removemime?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Content-Transfer-Encoding")) return removemime?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Content-Name")) return (rfclevel+1); if (!strcasecmp(msg->key,"Content-Description")) return (rfclevel+1); if (!strcasecmp(msg->key,"Message-ID")) return removemsgid?(rfclevel-2):rfclevel; if (!strcasecmp(msg->key,"References")) return removeref?(rfclevel-2):rfclevel; if (!strcasecmp(msg->key,"In-Reply-To")) return removeinreply?(rfclevel-2):rfclevel; if (!strcasecmp(msg->key,"Supersedes")) return removesupersedes?(rfclevel-1):rfclevel; if (!strcasecmp(msg->key,"Distribution")) return ftnorigin?(rfclevel-2):(rfclevel-1); if (!strcasecmp(msg->key,"X-Newsreader")) return (rfclevel-1); if (!strcasecmp(msg->key,"X-Mailer")) return (rfclevel-1); if (!strcasecmp(msg->key,"User-Agent")) return (rfclevel-1); if (!strncasecmp(msg->key,"NNTP-",5)) return (rfclevel-1); if (!strncasecmp(msg->key,"X-Trace",7)) return (rfclevel-1); if (!strncasecmp(msg->key,"X-Complaints",12)) return (rfclevel-1); if (!strncasecmp(msg->key,"X-MSMail",9)) return 0; if (!strncasecmp(msg->key,"X-MimeOLE",9)) return 0; if (!strncasecmp(msg->key,"X-MIME-Autoconverted",20)) return 0; if (!strcasecmp(msg->key,"X-Origin-Date")) return (rfclevel-2); if (!strncasecmp(msg->key,"X-PGP-",6)) return (rfclevel-4); if (!strncasecmp(msg->key,"Resent-",7)) return (rfclevel-2); if (!strcasecmp(msg->key,"X-Mailing-List")) return (rfclevel-2); if (!strcasecmp(msg->key,"X-Loop")) return (rfclevel-2); if (!strcasecmp(msg->key,"Precedence")) return (rfclevel-2); /*if (!strcasecmp(msg->key,"")) return ;*/ return rfclevel; } /* in real life, this never happens... I probably should drop it... */ int isftnpath(path) char *path; { char *p,*q,*r; faddr *fa; int nextftn=1,prevftn=1; debug(3,"checking path \"%s\" for being clear ftn",S(path)); p=xstrcpy(path); if (p == NULL) return 0; for (q=p,r=strchr(q,'!');*q;q=r,r=strchr(q,'!')) { if (r == NULL) r=q+strlen(q); else *r++='\0'; while ((*q) && (isspace(*q))) q++; prevftn=nextftn; if ((fa=parsefaddr(q))) { debug(3,"\"%s\" is ftn address",q); tidy_faddr(fa); } else { debug(3,"\"%s\" is not ftn address",q); nextftn=0; } } free(p); debug(3,"this is%s clear ftn path",prevftn?"":" not"); return prevftn; } static char *months[] = { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; static char *weekday[] = { "Sun","Mon","Tue","Wed","Thu","Fri","Sat" }; char *viadate(void); char *viadate(void) { static char buf[64]; time_t t; struct tm *ptm; time(&t); ptm=localtime(&t); sprintf(buf,"%s %s %d %d at %02d:%02d", weekday[ptm->tm_wday],months[ptm->tm_mon], ptm->tm_mday,ptm->tm_year+1900,ptm->tm_hour,ptm->tm_min); return buf; } int putmessage(msg,fmsg,fp,route,flavor,sbl,incode,outcode) rfcmsg *msg; ftnmsg *fmsg; FILE *fp; faddr *route; char flavor; fa_list **sbl; int incode, outcode; { char buf[BUFSIZ],*p,*q,newsubj[4 * (MAXSUBJ+1)],*oldsubj; rfcmsg *tmp; int rfcheaders; int needsplit,hdrsize,datasize,splitpart,forbidsplit; int sot_kludge, eot_kludge; int qp_or_base64; /* 0=plain text, 1=quoted-printable, 2=base64 */ #ifdef FSCHTML int html_message; #endif int tinyorigin=0; fa_list *tmpl; fa_list *ptl=NULL; faddr *ta; int seenlen; int oldnet; int i; char *acup_a=NULL; unsigned long acup_n=0; char sbe[16]; FILE *pkt; #ifdef JE time_t t; struct tm *ptm; #endif #ifdef FSC_0047 struct tm *ptmsplit; int splitparttotal; #endif static char hostname[MAXHOSTNAMELEN]; debug(3,"putmessage from %s",ascfnode(fmsg->from,0x7f)); debug(3,"putmessage to %s",ascfnode(fmsg->to,0x7f)); debug(3,"putmessage subj %s",S(fmsg->subj)); debug(3,"putmessage flags %04x",fmsg->flags); debug(3,"putmessage msgid %s %lx",S(fmsg->msgid_a),fmsg->msgid_n); debug(3,"putmessage reply %s %lx",S(fmsg->reply_a),fmsg->reply_n); debug(3,"putmessage date %s",ftndate(fmsg->date)); if (newsmode) debug(3,"putmessage area %s",S(fmsg->area)); removemime=0; removeorg=0; removemsgid=0; removeref=0; removeinreply=0; removesupersedes=0; removeapproved=0; removefrom=1; removereplyto=1; removereturnto=1; ftnorigin=fmsg->ftnorigin; sot_kludge=0; eot_kludge=0; qp_or_base64=0; #ifdef FSCHTML html_message=0; #endif if ((hdr("X-PGP-Signed",msg))) pgpsigned=1; q=hdr("Content-Transfer-Encoding",msg); if (q) while (*q && isspace(*q)) q++; if (!(q)) q="8bit"; if ((p=hdr("Content-Type",msg))) { while (*p && isspace(*p)) p++; /* turn the quoted-printable decode mode on; remember FTN is virtually 8-bit clean */ if ((strncasecmp(p, "text/plain", 10) == 0) && (strncasecmp(q, "quoted-printable", 16) == 0)) qp_or_base64 = 1; /* turn the base64 decode mode on */ else if ((strncasecmp(p, "text/plain", 10) == 0) && (strncasecmp(q, "base64", 6) == 0)) qp_or_base64 = 2; /* This is already done in ifmail.c */ /* else if ((strncasecmp(p, "application/pgp", 15) == 0)) pgpsigned=1; */ #ifdef FSCHTML /* text/html support from FSC-HTML 001 proposal of Odinn Sorensen (2:236/77) */ if (strncasecmp(p, "text/html", 9) == 0) html_message = 1; for (tmp=msg;tmp;tmp=tmp->next) if (((strcasecmp(tmp->key,"X-FTN-KLUDGE") == 0) && (strcasecmp(tmp->val,"FSCHTML") == 0)) || (strcasecmp(tmp->key,"X-FTN-HTML") == 0)) html_message = 0; #endif if ((readcharset(p) != CHRS_NOTSET ) && ((q == NULL) || (strncasecmp(q,"7bit",4) == 0) || ((!pgpsigned) && (qp_or_base64==1)) || ((!pgpsigned) && (qp_or_base64==2)) || (strncasecmp(q,"8bit",4) == 0))) removemime=1; /* no need in MIME headers */ /* some old MUA puts "text" instead of "text/plain; charset=..." */ else if ((strcasecmp(p,"text\n") == 0)) removemime=1; } if ((p=hdr("Message-ID",msg))) { if ((rfclevel < 1) && (ftnmsgidstyle) && (q=strchr(p,'@'))) { q++; if (strncasecmp(q,ftnmsgidstyle,strlen(ftnmsgidstyle))==0) removemsgid=1; removeref=1; } if (!removemsgid) removemsgid=chkftnmsgid(p); } if ((!removeref) && (newsmode) && (p=hdr("References",msg))) { p=xstrcpy(p); q=strtok(p," \t\n"); if ((q) && (strtok(NULL," \t\n") == NULL)) removeref=chkftnmsgid(q); free(p); } if ((p=hdr("In-Reply-To",msg)) && (!newsmode)) { p=xstrcpy(p); q=strtok(p," \t\n"); if ((q) && (strtok(NULL," \t\n") == NULL)) removeinreply=chkftnmsgid(q); free(p); } if ((p=hdr("Supersedes",msg))) removesupersedes=chkftnmsgid(p); if ((newsmode) && (p=hdr("Approved",msg))) { int modtype; char *newsgroup,*distribution,*moderator; while(*p && isspace(*p)) p++; if ((q=strchr(p,'\n'))) *q='\0'; /* ngdist(area,newsgroup,distribution,moderator,modtype) */ ngdist(fmsg->area,&newsgroup,&distribution,&moderator,&modtype); if ((modtype > 1) && (strcasestr(moderator,p))) removeapproved=1; if (q) *q='\n'; } if ((p=hdr("From",msg))) { if (rfclevel > -2) removefrom=0; if ((rfclevel < 1) && !(removefrom)) { if ((!gethostname(hostname,sizeof(hostname)-1)) && (strcasestr(p,hostname))) removefrom=1; else if ((localdomain) && (q=strchr(p,'@'))) { q++; if (strcasestr(q,localdomain)) removefrom=1; } } } if ((p=hdr("Reply-To",msg))) { if (rfclevel > -2) removereplyto=0; if ((rfclevel < 1) && !(removereplyto)) { if ((!gethostname(hostname,sizeof(hostname)-1)) && (strcasestr(p,hostname))) removereplyto=1; else if ((localdomain) && (q=strchr(p,'@'))) { q++; if (strcasestr(q,localdomain)) removereplyto=1; } } if ((!removereplyto) && (q=hdr("From",msg))) { char *r; r=xstrcpy(p); p=r; while(*p && isspace(*p)) p++; if (p[strlen(p)-1] == '\n') p[strlen(p)-1]='\0'; if (strcasestr(q,p)) removereplyto=1; free(r); } } if ((p=hdr("Return-Receipt-To",msg))) { if (rfclevel > -1) removereturnto=0; if ((rfclevel < 1) && !(removereturnto)) { if ((!gethostname(hostname,sizeof(hostname)-1)) && (strcasestr(p,hostname))) removereturnto=1; else if ((localdomain) && (q=strchr(p,'@'))) { q++; if (strcasestr(q,localdomain)) removereturnto=1; } } if ((!removereturnto) && (q=hdr("From",msg))) { char *r; r=xstrcpy(p); p=r; while(*p && isspace(*p)) p++; if (p[strlen(p)-1] == '\n') p[strlen(p)-1]='\0'; if (strcasestr(q,p)) removereturnto=1; free(r); } } p=ascfnode(fmsg->from,0x1f); i=79-11-3-strlen(p); if (ftnorigin && fmsg->origin && (strlen(fmsg->origin) > i)) { /* This is a kludge... I don't like it too much. But well, if this is a message of FTN origin, the original origin (:) line MUST have been short enough to fit in 79 chars... So we give it a try. Probably it would be better to keep the information about the address format from the origin line in a special X-FTN-... header, but this seems even less elegant. Any _good_ ideas, anyone? */ /* OK, I am keeping this, though if should never be used al long as X-FTN-Origin is used now */ p=ascfnode(fmsg->from,0x0f); i=79-11-3-strlen(p); tinyorigin=1; } if (fmsg->origin) { if (strlen(fmsg->origin) > i) fmsg->origin[i]='\0'; else removeorg=1; } forbidsplit=(nosplitmode || ftnorigin || (hdr("X-FTN-Split",msg))); needsplit=0; #ifdef FSC_0047 time(&t); ptmsplit=localtime(&t); #endif splitpart=0; hdrsize=20; hdrsize+=(fmsg->subj)?strlen(fmsg->subj):0; hdrsize+=(fmsg->from->name)?strlen(fmsg->from->name):0; hdrsize+=(fmsg->to->name)?strlen(fmsg->to->name):0; do { datasize=0; if (splitpart) { #ifdef GATEBAU_MSGID if (areagatebau(fmsg->area)) sprintf(newsubj,"%02d: ",splitpart+1); else #endif sprintf(newsubj,"[part %d] ",splitpart+1); strncat(newsubj,fmsg->subj,MAXSUBJ-strlen(newsubj)); } else { strncpy(newsubj,fmsg->subj,MAXSUBJ); } strcpy(newsubj, hdrnconv(newsubj, incode, outcode, MAXSUBJ)); newsubj[MAXSUBJ]='\0'; if (splitpart) { #ifdef GATEBAU_MSGID if (areagatebau(fmsg->area)) fmsg->msgid_n += splitpart; else #endif hash_update_n(&fmsg->msgid_n,splitpart); } oldsubj=fmsg->subj; fmsg->subj=newsubj; if ((pkt=ftnmsghdr(fmsg,NULL,route,flavor)) == NULL) { return 1; } fmsg->subj=oldsubj; #ifdef FSC_0047 if (splitpart) { /* For this we need to know, BEFORE writting the message, how many split * parts will be needed. It is not possible with the method actually used * here, maybe a day... */ /* Field 3 ("123" in the exemple) is intended to be the number of the message * in an *.MSG message base :) * as there is nothing similar with ifmail I put the number of day (1-365) */ /* How to retrieve this number ??? (I put a fake 24 here, for testing, but it * must contain the total number of splitted messages) */ splitparttotal=24; /* The kludge line itself */ /* 1 2 3 4 5 * 0123456789012345678901234567890123456789012345678901234 * @SPLIT: 11 Jun 96 05:49:33 @293/2219 123 10/24 +++++++++++ */ fprintf(pkt,"\1SPLIT: %02d %s %02d %02d:%02d:%02d @%-11s %-5d %02d/%02d +++++++++++\r", ptmsplit->tm_mday,months[ptmsplit->tm_mon], ptmsplit->tm_year%100,ptmsplit->tm_hour, ptmsplit->tm_min,ptmsplit->tm_sec, ascfnode(bestaka,0x06),ptmsplit->tm_yday, splitpart,splitparttotal); } #endif if ((p=hdr("X-FTN-REPLYADDR",msg))) { hdrsize += 10+strlen(p); fprintf(pkt,"\1REPLYADDR:"); kwrite(p,pkt); } else if ((replyaddr) && ((!removereplyto) || (!removefrom))) { hdrsize += 10+strlen(replyaddr); fprintf(pkt,"\1REPLYADDR: "); kwrite(replyaddr,pkt); } if ((p=hdr("X-FTN-REPLYTO",msg))) { hdrsize += 8+strlen(p); fprintf(pkt,"\1REPLYTO:"); kwrite(p,pkt); } else if ((replyaddr) && ((!removereplyto) || (!removefrom))) { hdrsize += 15; if (magicname) fprintf(pkt,"\1REPLYTO: %s %s\r", ascfnode(bestaka,0x1f), magicname); else fprintf(pkt,"\1REPLYTO: %s UUCP\r", ascfnode(bestaka,0x1f)); } else if ((p=hdr("Reply-To",msg))) { if ((ta=parsefaddr(p))) { if ((q=hdr("From",msg))) { if (!strcasestr(q,p)) fprintf(pkt,"\1REPLYTO: %s %s\r", ascfnode(ta,0x1f), ta->name); tidy_faddr(ta); } } } if ((p=strip_flags(hdr("X-FTN-FLAGS",msg)))) { hdrsize += 15; fprintf(pkt,"\1FLAGS:%s\r",p); free(p); } #ifndef ADD_PID if (rfclevel==1) #endif if (!hdr("X-FTN-PID", msg)) { p=hdr("User-Agent", msg); if (p==NULL) p=hdr("X-Newsreader", msg); if (p==NULL) p=hdr("X-Mailer", msg); if (p) { hdrsize += 4 + strlen(p); fprintf(pkt, "\1PID:"); kwrite(p, pkt); } } hdrsize += 15; writechrs(outcode,pkt,1); #ifdef FSCHTML if (html_message) { hdrsize += 9; fprintf(pkt, "\1HTML: 5\r"); } #endif #ifdef ALLOW_CONTROL if ((!hdr("X-FTN-ACUPDATE",msg)) && (p=hdr("Control",msg))) { if (strstr(p,"cancel")) { ftnmsgid(p,&acup_a,&acup_n,fmsg->area); if (acup_a) { #ifdef GATEBAU_MSGID if (!areagatebau(fmsg->area)) { hash_update_n(&acup_n,fmsg->area); } #else hash_update_n(&acup_n,fmsg->area); #endif hdrsize += 26 + strlen(acup_a); fprintf(pkt,"\1ACUPDATE: DELETE %s %08lx\r", acup_a,acup_n); } } } #endif if ((!hdr("X-FTN-ACUPDATE",msg)) && (p=hdr("Supersedes",msg))) { ftnmsgid(p,&acup_a,&acup_n,fmsg->area); if (acup_a) { #ifdef GATEBAU_MSGID if (!areagatebau(fmsg->area)) hash_update_n(&acup_n,fmsg->area); #else hash_update_n(&acup_n,fmsg->area); #endif hdrsize += 26 + strlen(acup_a); fprintf(pkt,"\1ACUPDATE: MODIFY %s %08lx\r", acup_a,acup_n); } } #ifdef FSC_0070 /* FSC-0070 */ if((p = hdr("Message-ID", msg)) && !(hdr("X-FTN-RFCID", msg))) { q = strdup(p); fprintf(pkt,"\1RFCID:"); if ((l = strrchr(q, '<')) && (r = strchr(q, '>')) && (l < r)) { *l++ = ' '; while(*l && isspace(*l)) l++; l--; /* leading ' ' */ *r-- = '\0'; while(*r && isspace(*r)) *r-- = '\0'; } else l = q; kwrite(l, pkt); hdrsize += 6 + strlen(l); free(q); } #endif /* FSC_0070 */ #ifdef KEEP_TEARLINES_CLEAN if (!(hdr("X-FTN-Tearline", msg)) && !(hdr("X-FTN-TID", msg))) { sprintf(buf, " ifmail %s", version); hdrsize += 4 + strlen(buf); fprintf(pkt, "\1TID:"); kwrite(buf, pkt); } #endif /* KEEP_TEARLINES_CLEAN */ if ((splitpart == 0) || (hdrsize < MAXHDRSIZE)) { for (tmp=msg;tmp;tmp=tmp->next) if ((!strncmp(tmp->key,"X-Fsc-",6)) || (!strncmp(tmp->key,"X-FTN-",6) && strcasecmp(tmp->key,"X-FTN-Tearline") && strcasecmp(tmp->key,"X-FTN-Origin") && strcasecmp(tmp->key,"X-FTN-Sender") && strcasecmp(tmp->key,"X-FTN-Split") && strcasecmp(tmp->key,"X-FTN-FLAGS") && strcasecmp(tmp->key,"X-FTN-AREA") && strcasecmp(tmp->key,"X-FTN-MSGID") && strcasecmp(tmp->key,"X-FTN-REPLY") && strcasecmp(tmp->key,"X-FTN-SEEN-BY") && strcasecmp(tmp->key,"X-FTN-PATH") && strcasecmp(tmp->key,"X-FTN-REPLYADDR") && strcasecmp(tmp->key,"X-FTN-REPLYTO") && strcasecmp(tmp->key,"X-FTN-To") && strcasecmp(tmp->key,"X-FTN-From") && strcasecmp(tmp->key,"X-FTN-CHARSET") && strcasecmp(tmp->key,"X-FTN-CHRS") && strcasecmp(tmp->key,"X-FTN-CODEPAGE") && strcasecmp(tmp->key,"X-FTN-ORIGCHRS") && strcasecmp(tmp->key,"X-FTN-SOT") && strcasecmp(tmp->key,"X-FTN-EOT") && strcasecmp(tmp->key,"X-FTN-Via"))) if (strcasecmp(tmp->key,"X-FTN-KLUDGE") == 0) { if (!strcasecmp(tmp->val," SOT:\n")) sot_kludge=1; else if (!strcasecmp(tmp->val," EOT:\n")) eot_kludge=1; else { hdrsize += strlen(tmp->val); fprintf(pkt,"\1"); /* we should have restored the original string here... */ kwrite((tmp->val)+1,pkt); } } else { hdrsize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"\1%s:",tmp->key+6); kwrite(tmp->val,pkt); } /* ZConnect are X-ZC-*: in usenet, \1ZC-*: in FTN */ for (tmp=msg;tmp;tmp=tmp->next) if ((!strncmp(tmp->key,"X-ZC-",5))) { hdrsize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"\1%s:",tmp->key+2); kwrite(tmp->val,pkt); } /* mondo.org gateway uses ".MSGID: ..." in usenet */ for (tmp=msg;tmp;tmp=tmp->next) if ((!strncmp(tmp->key,".",1)) && (strcasecmp(tmp->key,".MSGID"))) { hdrsize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"\1%s:",tmp->key+1); kwrite(tmp->val,pkt); } #ifdef GATEBAU_MSGID if ((!ftnorigin) && (rfclevel > 0) && (areagatebau(fmsg->area))) { hdrsize += 12; fprintf(pkt,"\1X-GATEWAY:"); #ifdef XGATEWAY_STRICT if ((p=hdr("X-Gateway",msg))) { hdrsize += strlen(p); if (q=strchr(p,'\n')) *q='\0'; fprintf(pkt," %s,",p); if (q) *q='\n'; } #endif hdrsize += 24+strlen(myfqdn)+strlen(version); fprintf(pkt," RFC1036/822 %s [ifmail %s]\r", myfqdn,version); } #endif rfcheaders=0; for (tmp=msg;tmp;tmp=tmp->next) #ifdef KEEP_MSGID_ON_SPLIT if ((needputrfc(tmp) == 1)) #else if ((needputrfc(tmp) == 1) && ((strcasecmp(tmp->key,"Message-ID")) || (splitpart == 0))) #endif { if (strcasestr("X-Origin-Newsgroups",tmp->key)) { hdrsize += 10+strlen(tmp->val); fprintf(pkt,"\1RFC-Newsgroups:"); } else { hdrsize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"\1RFC-%s:",tmp->key); } kwrite(hdrconv(tmp->val, incode, outcode),pkt); } for (tmp=msg;tmp;tmp=tmp->next) #ifdef KEEP_MSGID_ON_SPLIT if ((needputrfc(tmp) > 1)) #else if ((needputrfc(tmp) > 1) && ((strcasecmp(tmp->key,"Message-ID")) || (splitpart == 0))) #endif { rfcheaders++; if (strcasestr("X-Origin-Newsgroups",tmp->key)) { hdrsize += 10+strlen(tmp->val); fprintf(pkt,"Newsgroups:"); } else { hdrsize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"%s:",tmp->key); } cwrite(hdrconv(tmp->val, incode, outcode),pkt); } if (rfcheaders) cwrite("\n",pkt); if ((hdr("X-FTN-SOT",msg)) || (sot_kludge)) fprintf(pkt,"\1SOT:\r"); if ((splitpart == 0) && (hdr("X-PGP-Signed",msg))) fprintf(pkt,PGP_SIGNED_BEGIN"\r"); } if (replyaddr) { free(replyaddr); replyaddr=NULL; } /* */ if (needsplit) { #ifndef FSC_0047 fprintf(pkt," * Continuation %d of a split message *\r\r", splitpart); #endif needsplit=0; } else if ((p=hdr("X-Body-Start",msg))) { datasize += strlen(p); if (qp_or_base64==1) cwrite(strkconv(qp_decode(p), incode, outcode), pkt); else if (qp_or_base64==2) cwrite(strkconv(b64_decode(p), incode, outcode), pkt); else cwrite(strkconv(p, incode, outcode), pkt); } while (!(needsplit=(!forbidsplit) && (((splitpart && (datasize > maxmsize)) || (!splitpart && ((datasize+hdrsize) > maxmsize)))) ) && (bgets(buf,sizeof(buf)-1,fp))) { debug(19,"putmessage body %s",buf); datasize += strlen(buf); if (qp_or_base64==1) cwrite(strkconv(qp_decode(buf), incode, outcode), pkt); else if (qp_or_base64==2) cwrite(strkconv(b64_decode(buf), incode, outcode), pkt); else cwrite(strkconv(buf, incode, outcode), pkt); } if (needsplit) { #ifndef FSC_0047 fprintf(pkt,"\r * Message split, to be continued *\r"); #endif splitpart++; } else if ((p=hdr("X-PGP-Signed",msg))) { fprintf(pkt,PGP_SIG_BEGIN"\r"); if ((q=hdr("X-PGP-Version",msg))) { fprintf(pkt,"Version:"); cwrite(q,pkt); } if ((q=hdr("X-PGP-Charset",msg))) { fprintf(pkt,"Charset:"); cwrite(q,pkt); } if ((q=hdr("X-PGP-Comment",msg))) { fprintf(pkt,"Comment:"); cwrite(q,pkt); } fprintf(pkt,"\r"); p=xstrcpy(p); q=strtok(p," \t\n"); fprintf(pkt,"%s\r",q); while ((q=(strtok(NULL," \t\n")))) fprintf(pkt,"%s\r",q); fprintf(pkt,PGP_SIG_END"\r"); } /* */ /* putbody(0,msg,fp,pkt,forbidsplit,hdrsize,incode,outcode,qp_or_base64); */ if ((p=hdr("X-FTN-EOT",msg)) || (eot_kludge)) fprintf(pkt,"\1EOT:\r"); if ((p=hdr("X-FTN-Tearline",msg))) { fprintf(pkt,"---"); if (strcasecmp(p," (none)\n") == 0) cwrite("\n",pkt); else cwrite(p,pkt); } else if (newsmode) #ifdef KEEP_TEARLINES_CLEAN fprintf(pkt,"---\r"); #else #ifdef REPLACE_TEARLINES_WITH fprintf(pkt,"--- "/**/REPLACE_TEARLINES_WITH/**/"\r"); #else fprintf(pkt,"--- ifmail v.%s\r",version); #endif /* REPLACE_TEARLINES_WITH */ #endif /* KEEP_TEARLINES_CLEAN */ if ((p=hdr("X-FTN-Origin",msg))) { if (*(q=p+strlen(p)-1) == '\n') *q='\0'; fprintf(pkt," * Origin:"); cwrite(hdrconv(p, incode, outcode),pkt); if (!newsmode) fprintf(pkt,"\r"); } else if (newsmode) { fprintf(pkt," * Origin: "); /* strlen=11 */ if (fmsg->origin) cwrite(hdrconv(fmsg->origin, incode, outcode), pkt); else cwrite(DEFAULT_ORIGIN,pkt); fprintf(pkt," (%s)", ascfnode(fmsg->from,tinyorigin?0x0f:0x1f)); } if (newsmode) { for (tmpl=whoami;tmpl;tmpl=tmpl->next) if ((tmpl->addr->point == 0) && ((bestaka->domain == NULL) || (tmpl->addr->domain == NULL) || (strcasecmp(bestaka->domain, tmpl->addr->domain) == 0)) && (bestaka->zone == tmpl->addr->zone)) fill_list(sbl,ascfnode(tmpl->addr,0x06),NULL); #ifdef HAS_NDBM_H if ((p=hdr("Message-ID",msg))) { while (isspace(*p)) p++; q=xstrcpy(p); if (*(p=q+strlen(q)-1) == '\n') *(p--)='\0'; while (isspace(*p)) *(p--)='\0'; fill_list(sbl,idlookup(q),NULL); free(q); } #endif sort_list(sbl); seenlen=MAXSEEN+1; /* ensure it will not match for the first entry */ oldnet=(*sbl)->addr->net-1; for (tmpl=*sbl;tmpl;tmpl=tmpl->next) { if (tmpl->addr->net == oldnet) sprintf(sbe," %u",tmpl->addr->node); else sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); oldnet=tmpl->addr->net; seenlen+=strlen(sbe); if (seenlen > MAXSEEN) { seenlen=0; fprintf(pkt,"\rSEEN-BY:"); sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); seenlen=strlen(sbe); } fprintf(pkt,"%s",sbe); } for (tmp=msg;tmp;tmp=tmp->next) if (!strcasecmp(tmp->key,"X-FTN-PATH")) { fill_path(&ptl,tmp->val); } sprintf(sbe,"%u/%u",bestaka->net, bestaka->node); fill_path(&ptl,sbe); uniq_list(&ptl); seenlen=MAXPATH+1; /* ensure it will not match for the first entry */ oldnet=ptl->addr->net-1; for (tmpl=ptl;tmpl;tmpl=tmpl->next) { if (tmpl->addr->net == oldnet) sprintf(sbe," %u",tmpl->addr->node); else sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); oldnet=tmpl->addr->net; seenlen+=strlen(sbe); if (seenlen > MAXPATH) { seenlen=0; fprintf(pkt,"\r\1PATH:"); sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); seenlen=strlen(sbe); } fprintf(pkt,"%s",sbe); } fprintf(pkt,"\r"); } else /* mail mode */ { for (tmp=msg;tmp;tmp=tmp->next) if (!strcasecmp(tmp->key,"X-FTN-Via")) { datasize += strlen(tmp->key)+strlen(tmp->val); fprintf(pkt,"\1Via"); kwrite(tmp->val,pkt); } #ifdef JE /* ### Modified by T.Tanaka on 26 Mar 1995 */ time(&t); ptm=gmtime(&t); /* @Via 6:730/18@os2net @19950304.052627 FrontDoor 2.12.SW */ /* fprintf(pkt, "\1Via %s @%04d%02d%02d.%02d%02d%02d.%s ifmail %s\r", ascfnode(bestaka,0x1f), ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec, "UTC", version); */ /* @Via Squish/386 1.11 6:600/500, Fri Mar 24 1995 at 09:32 UTC */ /* fprintf(pkt, "\1Via ifmail %s %s, %s %s %d %d at %02d:%02d %s\r", version, ascfnode(bestaka,0x1f), weekday[ptm->tm_wday], months[ptm->tm_mon], ptm->tm_mday, ptm->tm_year + 1900, ptm->tm_hour, ptm->tm_min, "UTC"); */ #endif /* @Via ifmail 2:293/2219@fidonet, Wed Jan 3 1996 at 07:49 (2.8c) */ fprintf(pkt,"\1Via ifmail %s, %s (%s)\r", ascfnode(bestaka,0x1f), viadate(),version); } awrite("",pkt); /* trailing zero byte */ if (ferror(pkt)) { logerr("$error writing to ftn packet"); return 1; } tidy_falist(&ptl); } while (needsplit); debug(3,"putmessage exiting..."); return 0; } ifmail-2.14tx8.10.orig/ifgate/mkftnhdr.c100644 1751 50 31046 6540753002 15413 0ustar mdsrc/* ### Modified by P.Saratxaga on 19 Sep 1995 ### * - Added X-FTN-From and X-FTN-To support * - added code by T.Tanaka, dated 13 Mar 1995, to put the freename in the ftn * header, instead of the userid, when the address is fido parseable * - modified ^aREPLY: code, to look in In-Reply-To: only if not newsmode, and * in References: only if newsmode * - modified the way ^aREPLYADDR and ftn 'to:' are created (I use the * function parserfcaddr() ), so the address of the "Reply-To: " line (if * exists) is used for ^aREPLYADDR and registration database. * - support to decode MSGID from fidogate "Message-ID: " * - suport for X-Apparently-To: (generated by the french fido->usenet gate) * - added -DDONT_REGATE code by Wim Van Sebroeck * - corriged a bug when Organization: has only blanks */ #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "ftnmsg.h" #include "rfcmsg.h" #include "rfcaddr.h" #include "mime.h" #include "charset.h" #include "charconv.h" #include "config.h" #include "version.h" #include "hash.h" #ifdef GATEBAU_MSGID #include "areas.h" #endif #ifndef ULONG_MAX #define ULONG_MAX 4294967295 #endif int newsmode=0; char *replyaddr=NULL; extern time_t now; extern faddr *bestaka; extern int rfclevel; extern time_t parsedate(char *,void *); extern int registrate(char *,char *); extern unsigned long atoul(char*); extern unsigned INT16 crc(char *); extern int flagset(char *); #ifdef GATEBAU_MSGID extern unsigned long crcgatebau(char*); #endif int ftnmsgid(msgid,s,n,areaname) char *msgid; char **s; unsigned long *n; char *areaname; { char *buf,*l,*r,*p; unsigned long nid=0L; faddr *tmp; int ftnorigin=0; debug(3,"make ftn msgid from \"%s\"",msgid); if (msgid == NULL) { *s=NULL; *n=0L; return ftnorigin; } buf=xmalloc(strlen(msgid)+65); strcpy(buf,msgid); if ((l=strchr(buf,'<'))) l++; else l=buf; while (isspace(*l)) l++; if ((r=strchr(l,'>'))) *r='\0'; r=l+strlen(l)-1; while (isspace(*r) && (r > l)) (*r--)='\0'; if ((tmp=parsefaddr(l))) { if (tmp->name) { if (strspn(tmp->name,"0123456789") == strlen(tmp->name)) nid=atoul(tmp->name); else nid=ULONG_MAX; if (nid == ULONG_MAX) hash_update_s(&nid,tmp->name); else ftnorigin=1; } else { hash_update_s(&nid,l); } *s=xstrcpy(ascfnode(tmp,0x1f)); tidy_faddr(tmp); } else { if ((r=strchr(l,'@')) == NULL) /* should never happen */ { *s=xstrcpy(l); hash_update_s(&nid,l); } else if ((rfclevel < 1) && (bestaka) && (ftnmsgidstyle) && (strncasecmp(r+1,ftnmsgidstyle, strlen(ftnmsgidstyle)) == 0)) { *s=xstrcpy(ascfnode(bestaka,0x1f)); /* FIXME: what to put here ? -- P.Saratxaga */ hash_update_s(&nid,l); } /* */ else if (strncmp(l,"MSGID_",6) == 0) { *r='\0'; r=strrchr(l+6,'_'); if (r) *r++='\0'; *s=xstrcpy(qp_decode(l+6)); if (r) sscanf(r,"%lx",&nid); ftnorigin=1; } /* */ else if (strncmp(l,"NOMSGID_",8) == 0) { *s=NULL; *n=0L; ftnorigin=1; return ftnorigin; } /* */ else if (strncmp(l,"ftn_",4) == 0) { *r='\0'; if ((r=strchr(l+4,'$')) || (r=strchr(l+4,'#'))) { if (*r=='$') *r='@'; if ((r=strchr(l+4,'.'))) *r=':'; if ((r=strchr(l+4,'.'))) *r='/'; } while ((r=strrchr(l+4,'_')) != strchr(l+4,'_')) *r='\0'; r=strchr(l+4,'_'); *r++='\0'; *s=xstrcpy(l+4); sscanf(r,"%lx",&nid); ftnorigin=1; } /* */ else if (strncmp(l,"wgcid$",6) == 0) { *r='\0'; if ((r=strstr(l+6,"$g"))) { *r='\0'; *s=xstrcpy(l+6); *s=xstrcat(*s,":"); l=r+2; } if ((r=strstr(l,"$h"))) { *r++='\0'; *s=xstrcat(*s,l); *s=xstrcat(*s,"/"); l=r+2; } if ((r=strstr(l,"$i"))) { *r='\0'; *s=xstrcat(*s,l); *s=xstrcat(*s,"."); l=r+2; } if ((r=strstr(l,"$k"))) { *r='\0'; *s=xstrcat(*s,l); *s=xstrcat(*s,"@"); l=r+2; } if ((r=strstr(l,"$j"))) { *r='\0'; *s=xstrcat(*s,l); sscanf(r+2,"%lx",&nid); } } #ifdef GATEBAU_MSGID else if (areagatebau(areaname)) { *s=xstrcpy("<"); *s=xstrcat(*s,l); *s=xstrcat(*s,">"); if (areaname) { r=xstrcpy(*s); r=xstrcat(r,areaname); nid=crcgatebau(r); } else { nid=crcgatebau(*s); } } #endif else { *r='\0'; if ((p=strchr(l,'%'))) { *p='\0'; if (strspn(l,"0123456789") == strlen(l)) { *r='@'; r=p; } else *p='%'; } r++; if (strspn(l,"0123456789") == strlen(l)) nid=atoul(l); else nid=ULONG_MAX; if (nid == ULONG_MAX) { hash_update_s(&nid,l); } *s=xstrcpy(r); } } *n=nid; free(buf); return ftnorigin; } ftnmsg *mkftnhdr(msg,incode,outcode) rfcmsg *msg; int incode, outcode; { char *freename=NULL,*rfcfrom=NULL,*p,*q,*l,*r; char *fbuf=NULL; #ifdef DONT_REGATE char *ftnfrom=NULL; #endif ftnmsg *tmsg; int needreplyaddr; tmsg=(ftnmsg *)xmalloc(sizeof(ftnmsg)); tmsg->flags=0; tmsg->ftnorigin=0; tmsg->to=NULL; tmsg->from=NULL; tmsg->date=0L; tmsg->subj=NULL; tmsg->msgid_s=NULL; tmsg->msgid_a=NULL; tmsg->reply_s=NULL; tmsg->reply_a=NULL; tmsg->origin=NULL; tmsg->area=NULL; if (newsmode) { p=xstrcpy(hdr("Comment-To",msg)); if (p == NULL) p=xstrcpy(hdr("X-Comment-To",msg)); if (p == NULL) p=xstrcpy(hdr("X-FTN-To",msg)); if (p == NULL) p=xstrcpy(hdr("X-Fidonet-Comment-To",msg)); if (p == NULL) p=xstrcpy(hdr("X-Apparently-To",msg)); if (p) { debug(6,"getting `to' address from: \"%s\"",p); if ((tmsg->to=parsefaddr(p)) == NULL) tmsg->to=parsefaddr("All@p0.f0.n0.z0"); if ((l=strrchr(p,'<')) && (r=strchr(p,'>')) && (l < r)) { r=l; *r--='\0'; if ((l=strchr(p,'"')) && (r=strrchr(p,'"')) && (l < r)) { l++; *r--='\0'; } while (isspace(*r)) *r--='\0'; if (!l) l=p; while (isspace(*l)) l++; } else if ((l=strrchr(p,'(')) && (r=strchr(p,')')) && (l < r)) { *r--='\0'; while (isspace(*r)) *r--='\0'; l++; while (isspace(*l)) l++; } else { l=p; while (isspace(*l)) l++; r=p+strlen(p)-1; if (*r == '\n') *r--='\0'; while (isspace(*r)) *r--='\0'; } if(*l) { strcpy(l,hdrnconv(l,incode,outcode,MAXNAME)); if (strlen(l) > MAXNAME) l[MAXNAME]='\0'; free(tmsg->to->name); tmsg->to->name=xstrcpy(l); } free(p); } else tmsg->to=parsefaddr("All@p0.f0.n0.z0"); debug(3,"TO: %s",ascinode(tmsg->to,0x7f)); } p=fbuf=xstrcpy(hdr("Reply-To",msg)); if (fbuf == NULL) p=fbuf=xstrcpy(hdr("From",msg)); if (fbuf == NULL) p=fbuf=xstrcpy(hdr("X-UUCP-From",msg)); if (p) { q=p; while (isspace(*q)) q++; fbuf=parserfcaddr(q).remainder; if (parserfcaddr(q).target) { fbuf=xstrcat(fbuf,"@"); fbuf=xstrcat(fbuf,parserfcaddr(q).target); } rfcfrom=fbuf; } if (!rfcfrom) rfcfrom=xstrcpy("postmaster"); p=fbuf=xstrcpy(hdr("From",msg)); if (fbuf == NULL) p=fbuf=xstrcpy(hdr("X-UUCP-From",msg)); if (p) { q=p; while (isspace(*q)) q++; if ((q) && (*q != '\0')) freename=parserfcaddr(q).comment; else freename=NULL; } else freename=xstrcpy("Unidentified User"); if (freename) { while (isspace(*freename)) freename++; } if (rfcfrom) { while (isspace(*rfcfrom)) rfcfrom++; p=rfcfrom+strlen(rfcfrom)-1; while ((isspace(*p)) || (*p == '\n')) *(p--)='\0'; } if ((freename) && (*freename != '\0')) { while (isspace(*freename)) freename++; p=freename+strlen(freename)-1; while ((isspace(*p)) || (*p == '\n')) *(p--)='\0'; strcpy(freename,hdrconv(freename,incode,outcode)); if ((*freename == '\"') && (*(p=freename+strlen(freename)-1) == '\"')) { freename++; *p='\0'; } } if ((!freename) || ((freename) && (*freename == '\0')) || (strcmp(freename,".")==0)) freename=rfcfrom; if (newsmode) debug(3,"FROM: %s <%s>",freename,rfcfrom); else loginf("from: %s <%s>",freename,rfcfrom); needreplyaddr=1; if ((tmsg->from=parsefaddr(rfcfrom)) == NULL) { if (freename && rfcfrom) if (!strchr(freename,'@') && !strchr(freename,'%') && strncasecmp(freename,rfcfrom,MAXNAME) && strncasecmp(freename,"uucp",4) && strncasecmp(freename,"usenet",6) && strncasecmp(freename,"news",4) && strncasecmp(freename,"super",5) && strncasecmp(freename,"admin",5) && strncasecmp(freename,"postmaster",10) && strncasecmp(freename,"sys",3)) needreplyaddr=registrate(freename,rfcfrom); } else { tmsg->ftnorigin=1; tmsg->from->name=xstrcpy(freename); if (strlen(tmsg->from->name) > MAXNAME) tmsg->from->name[MAXNAME]='\0'; } if (replyaddr) { free(replyaddr); replyaddr=NULL; } if (needreplyaddr && (tmsg->from == NULL)) { debug(6,"fill replyaddr with \"%s\"",rfcfrom); replyaddr=xstrcpy(rfcfrom); } debug(6,"From address was%s distinguished as ftn", tmsg->from ? "" : " not"); if ((tmsg->from == NULL) && (bestaka)) { #ifdef DONT_REGATE p=xstrcpy(hdr("X-FTN-Sender",msg)); if (p == NULL) { if ((p=hdr("X-FTN-From",msg))) p=xstrcpy(ascinode(parsefnode(p),0xff)); } if (p) { q=p; while (isspace(*q)) q++; ftnfrom=parserfcaddr(q).remainder; if (parserfcaddr(q).target) { ftnfrom=xstrcat(ftnfrom,"@"); ftnfrom=xstrcat(ftnfrom,parserfcaddr(q).target); } debug(6,"Ftn gateway: \"%s\"", ftnfrom); if (newsmode) debug(3,"FTN-FROM: %s",ftnfrom); else loginf("ftn sender: %s",ftnfrom); if (ftnfrom) tmsg->from=parsefaddr(ftnfrom); if ((tmsg->from) && (!tmsg->from->name)) { tmsg->from->name=xstrcpy(rfcfrom); } } if (tmsg->from == NULL) { #endif tmsg->from=(faddr *)xmalloc(sizeof(faddr)); tmsg->from->name=xstrcpy(freename); if (tmsg->from->name && (strlen(tmsg->from->name) > MAXNAME)) tmsg->from->name[MAXNAME]='\0'; tmsg->from->point=bestaka->point; tmsg->from->node=bestaka->node; tmsg->from->net=bestaka->net; tmsg->from->zone=bestaka->zone; tmsg->from->domain=xstrcpy(bestaka->domain); #ifdef DONT_REGATE } #endif } if (fbuf) free(fbuf); fbuf=NULL; p=hdr("Subject",msg); if (p) { while (isspace(*p)) p++; /* charset conversion for subject line is done in message.c * here we only convert quoted-printable and base64 to 8 bit */ tmsg->subj=xstrcpy(hdrnconv(p, 0, 0, MAXSUBJ)); tmsg->subj=xstrcpy(p); if (*(p=tmsg->subj+strlen(tmsg->subj)-1) == '\n') *p='\0'; if (strlen(tmsg->subj) > MAXSUBJ) tmsg->subj[MAXSUBJ]='\0'; } else tmsg->subj=xstrcpy(" "); debug(3,"SUBJ: \"%s\"",tmsg->subj); if ((p=hdr("X-FTN-FLAGS",msg))) tmsg->flags |= flagset(p); if (hdr("Return-Receipt-To",msg)) tmsg->flags |= FLG_RRQ; if (hdr("Notice-Requested-Upon-Delivery-To",msg)) tmsg->flags |= FLG_RRQ; if (!newsmode) { tmsg->flags |= FLG_PVT; tmsg->flags |= FLG_K_S; } if ((p=hdr("X-Origin-Date",msg))) tmsg->date=parsedate(p,NULL); else if ((p=hdr("Date",msg))) tmsg->date=parsedate(p,NULL); else tmsg->date=time((time_t *)NULL); if ((p=hdr("X-FTN-MSGID",msg))) { tmsg->ftnorigin&=1; while (isspace(*p)) p++; tmsg->msgid_s=xstrcpy(p); if (*(p=tmsg->msgid_s+strlen(tmsg->msgid_s)-1) == '\n') *p='\0'; } else if ((p=hdr(".MSGID",msg))) { tmsg->ftnorigin&=1; while (isspace(*p)) p++; tmsg->msgid_s=xstrcpy(p); if (*(p=tmsg->msgid_s+strlen(tmsg->msgid_s)-1) == '\n') *p='\0'; } else if ((p=hdr("Message-ID",msg))) { tmsg->ftnorigin &= ftnmsgid(p,&(tmsg->msgid_a),&(tmsg->msgid_n),tmsg->area); } else { tmsg->msgid_a=NULL; } if ((p=hdr("X-FTN-REPLY",msg))) { while (isspace(*p)) p++; tmsg->reply_s=xstrcpy(p); if (*(p=tmsg->reply_s+strlen(tmsg->reply_s)-1) == '\n') *p='\0'; } else { if (newsmode) { p=hdr("References",msg); if (p) { l=xstrcpy(p); r=strtok(l," \t\n"); while ((l=strtok(NULL," \t\n")) != NULL) r=l; p=r; free(l); } } else p=hdr("In-Reply-To",msg); } if (p) { (void)ftnmsgid(p,&(tmsg->reply_a),&(tmsg->reply_n),NULL); } else { tmsg->reply_a=NULL; } debug(3,"DATE: %s, MSGID: %s %lx, REPLY: %s %lx", ftndate(tmsg->date), S(tmsg->msgid_a),tmsg->msgid_n, S(tmsg->reply_a),tmsg->reply_n); if ((p=hdr("Organization",msg))) { while (isspace(*p)) p++; tmsg->origin=xstrcpy(hdrconv(p, incode, outcode)); if (tmsg->origin) if (*(p=tmsg->origin+strlen(tmsg->origin)-1) == '\n') *p='\0'; } debug(3,"ORIGIN: %s",S(tmsg->origin)); return tmsg; } ifmail-2.14tx8.10.orig/ifgate/ifdbm.c100644 1751 50 6477 6420407564 14657 0ustar mdsrc/* ### Modified by P.Saratxaga on 19 Sep 1995 ### * - added FORCE_REPLYTO to force return 1 even if we use * an alias database */ #include #include #include #include #include #include #ifdef HAS_NDBM_H #include #include #else #include #endif #include "lutil.h" #include "config.h" #ifndef IF_DBM_SUFFIX #ifdef HAS_BSD_DB #define IF_DBM_SUFFIX ".db" #else #define IF_DBM_SUFFIX ".dir" #endif #endif static int opened=0; #ifdef HAS_NDBM_H static DBM *alias_db = NULL; #endif static int init(void) { #ifndef HAS_BSD_DB char buf[128]; struct stat stbuf; FILE *fp; #endif int tries; if (database == NULL) return -1; if (opened == -1) return -1; if (opened) return 0; #ifndef HAS_BSD_DB sprintf(buf,"%s" IF_DBM_SUFFIX,database); if (stat(buf,&stbuf) != 0) { sprintf(buf,"%s" IF_DBM_SUFFIX,database); fp=fopen(buf,"a"); if (fp) fclose(fp); sprintf(buf,"%s.pag",database); fp=fopen(buf,"a"); if (fp) fclose(fp); } #endif for (tries=0;(1);tries++) { #ifdef HAS_NDBM_H if ((alias_db=dbm_open(database,O_RDWR | O_CREAT,0600)) != NULL) #else if (dbminit(database) == 0) #endif { opened = 1; return 0; } else if ((tries > 5) || (errno != EAGAIN)) { logerr("$could not open alias database"); opened = -1; return -1; } else sleep(2); } } int registrate(freename,address) char *freename,*address; { datum key,val; char buf[128],*p,*q; int first; if (init()) return 1; if (strlen(freename) > MAXNAME) freename[MAXNAME]='\0'; strncpy(buf,freename,sizeof(buf)-1); first=1; for (p=buf,q=buf;*p;p++) switch (*p) { case '.': *p=' '; /* fallthrough */ case ' ': if (first) { *(q++)=*p; first=0; } break; default: *(q++)=*p; first=1; break; } *q='\0'; debug(6,"registrate \"%s\" \"%s\"",S(buf),S(address)); key.dptr=buf; key.dsize=strlen(buf); #ifdef HAS_NDBM_H val=dbm_fetch(alias_db,key); #else val=fetch(key); #endif if (val.dptr) /* already present */ #ifdef FORCE_REPLYTO return 1; #else return 0; #endif else { val.dptr=address; val.dsize=strlen(address); #ifdef HAS_NDBM_H if (dbm_store(alias_db,key,val,0) < 0) #else if (store(key,val) != 0) #endif { logerr("$cannot store: \"%s\" \"%s\"", S(buf),S(address)); return 1; } else { loginf("registered \"%s\" as \"%s\"",S(buf),S(address)); #ifdef FORCE_REPLYTO return 1; #else return 0; #endif } } } char *lookup(freename) char *freename; { datum key,val; static char buf[128],*p,*q; int sz,first; if (init()) return NULL; strncpy(buf,freename,sizeof(buf)-1); first=1; for (p=buf,q=buf;*p;p++) switch (*p) { case '.': *p=' '; /* fallthrough */ case ' ': if (first) { *(q++)=*p; first=0; } break; default: *(q++)=*p; first=1; break; } *q='\0'; debug(6,"lookup \"%s\"",S(freename)); key.dptr=buf; key.dsize=strlen(buf); #ifdef HAS_NDBM_H val=dbm_fetch(alias_db,key); #else val=fetch(key); #endif if (val.dptr) { sz=val.dsize; if (sz > (sizeof(buf)-1)) sz=sizeof(buf)-1; strncpy(buf,val.dptr,sz); buf[sz]='\0'; debug(6,"found: \"%s\"",buf); return(buf); } else return NULL; } void close_alias_db(void) { if (opened != 1) return; #ifndef DONT_HAVE_DBMCLOSE #ifdef HAS_NDBM_H dbm_close(alias_db); #else dbmclose(); #endif #endif opened=0; } ifmail-2.14tx8.10.orig/ifgate/batchrd.c100644 1751 50 2431 6352307265 15170 0ustar mdsrc#include #include #include "lutil.h" static long counter = 0L; static int batchmode = -1; extern int usetmp; char *bgets(buf,count,fp) char *buf; int count; FILE *fp; { if (usetmp) { return fgets(buf,count,fp); } if ((batchmode == 1) && (counter > 0L) && (counter < (long)(count-1))) count=(int)(counter+1L); if (fgets(buf,count,fp) == NULL) return NULL; switch (batchmode) { case -1: if (!strncmp(buf,"#! rnews ",9) || !strncmp(buf,"#!rnews ",8)) { batchmode=1; sscanf(buf+8,"%ld",&counter); debug(18,"first chunk of input batch: %ld",counter); if (counter < (long)(count-1)) count=(int)(counter+1L); if (fgets(buf,count,fp) == NULL) return NULL; else { counter -= strlen(buf); return(buf); } } else { batchmode=0; return buf; } case 0: return buf; case 1: if (counter <= 0L) { while (strncmp(buf,"#! rnews ",9) && strncmp(buf,"#!rnews ",8)) { loginf("batch out of sync: %s",buf); if (fgets(buf,count,fp) == NULL) return NULL; } sscanf(buf+8,"%ld",&counter); debug(18,"next chunk of input batch: %ld",counter); return NULL; } else { counter -= (long)strlen(buf); debug(19,"bread \"%s\", %ld left of this chunk", buf,counter); return buf; } } return buf; } ifmail-2.14tx8.10.orig/ifgate/areas.c100644 1751 50 20356 6540753002 14673 0ustar mdsrc/* ### Modified on Thu 4 Jan 1996 by P.Saratxaga ### * - added JE functions, for compatibility with JE-version config files * - added AREAS_HACKING */ #include #include #include #include #include "lutil.h" #include "xutil.h" #include "areas.h" #include "config.h" #include "lhash.h" #include "needed.h" #ifdef JE #include "charset.h" #endif typedef struct _areang { char *area; char *ng; char *dist; #ifdef JE int incode; int outcode; #endif char *moder; } areang; extern area_list *badgroups; #ifdef GATEBAU_MSGID extern area_list *gatebaugroups; #endif static LHASH *nglist_byarea=(LHASH*)0; static LHASH *nglist_byng=(LHASH*)0; char *defgroup=NULL,*defdist=NULL,*defarea=NULL; int group_count; static char *expand(p,q) char *p,*q; { char *r,*tmp,*ret; debug(9,"expanding \"%s\" + \"%s\"",S(p),S(q)); tmp=xstrcpy(p); if ((r=strchr(tmp,'*'))) *r++='\0'; ret=xstrcpy(tmp); if (r) { ret=xstrcat(ret,q); ret=xstrcat(ret,r); } free(tmp); debug(9,"expand result \"%s\"",S(ret)); return ret; } static unsigned long hash_byarea(hash_entry) areang *hash_entry; { return lh_strhash(hash_entry->area); } static unsigned long hash_byng(hash_entry) areang *hash_entry; { return lh_strhash(hash_entry->ng); } static int cmp_byarea(e1,e2) areang *e1,*e2; { return strcmp(e1->area,e2->area); } static int cmp_byng(e1,e2) areang *e1,*e2; { return strcmp(e1->ng,e2->ng); } void tidy_arealist(al) area_list *al; { area_list *tmp; for (;al;al=tmp) { tmp=al->next; if (al->name) free(al->name); free(al); } } area_list *areas(ngroups,allowexpand) char *ngroups; int allowexpand; { char *ng,*p,*q,*r=NULL; area_list *start=NULL,**cur,*bg; areang *ngl; areang dummy_entry; int forbid=0; if (ngroups == NULL) return NULL; ng=xstrcpy(ngroups); cur=&start; group_count=0; for (p=strtok(ng," ,\t\n");p;p=strtok(NULL," ,\t\n")) { group_count++; q=NULL; for (bg=badgroups;bg;bg=bg->next) if (!strncmp(bg->name,p,strlen(bg->name))) { loginf("Message not gated due to forbidden group %s", S(p)); forbid=1; break; } dummy_entry.ng=p; if ((ngl=(areang*)lh_retrieve(nglist_byng,(char*)&dummy_entry))) { q=ngl->area; } else q=NULL; if (q || (defarea && allowexpand)) { if (q == NULL) { for (r=p;*r;r++) *r=toupper(*r); q=expand(defarea,p); } debug(9,"newsgroup \"%s\" -> area \"%s\"",S(p),S(q)); (*cur)=(area_list *)xmalloc(sizeof(area_list)); (*cur)->next=NULL; (*cur)->name=xstrcpy(q); cur=&((*cur)->next); } } free(ng); if (forbid) { tidy_arealist(start); return NULL; } else return start; } #ifdef JE void areacharset(area,incode,outcode) char *area; int *incode, *outcode; { areang *ang; areang dummy_entry; char *p,*q; p=xstrcpy(area); if ((*p) && ((*(q=p+strlen(p)-1) == '\r') || (*q == '\n'))) *q='\0'; dummy_entry.area=p; if ((ang=(areang*)lh_retrieve(nglist_byarea,(char*)&dummy_entry))) { if (*incode==CHRS_NOTSET) *incode = ang->incode; if (*outcode==CHRS_NOTSET) *outcode = ang->outcode; debug(9,"area \"%s\", incode %d, outcode %d", S(p), *incode, *outcode); } else { *incode = CHRS_NOTSET; *outcode = CHRS_NOTSET; } free(p); } #endif /* JE */ void ngdist(area,newsgroup,distribution,moderator,modtype) char *area,**newsgroup,**distribution,**moderator; int *modtype; { areang *ang; areang dummy_entry; char *p,*q; *newsgroup=NULL; *distribution=NULL; *moderator=NULL; *modtype=0; p=xstrcpy(area); if ((*p) && ((*(q=p+strlen(p)-1) == '\r') || (*q == '\n'))) *q='\0'; dummy_entry.area=p; if ((ang=(areang*)lh_retrieve(nglist_byarea,(char*)&dummy_entry))) { *newsgroup=ang->ng; *distribution=ang->dist; *moderator=ang->moder; if ((*moderator) && (q=strchr(*moderator,':'))) { *q++='\0'; if (strncasecmp(*moderator,"umod",4) == 0) *modtype=1; /* Usenet (Moderated) group */ else if (strncasecmp(*moderator,"fro",3) == 0) *modtype=2; /* FTN read-only echoarea */ else if (strncasecmp(*moderator,"fstd",4) == 0) *modtype=3; /* Fidonet moderated echoarea */ else { loginf("Unknow moderation type %s for group %s", *moderator,*newsgroup); *modtype=0; } *moderator=q; } else if (*moderator) *modtype=2; debug(9,"area \"%s\" -> newsgroup \"%s\", dist \"%s\"", S(p),S(*newsgroup),S(*distribution)); if(*moderator) debug(9,"modtype %d, moderator \"%s\"", *modtype,S(*moderator)); } else { *newsgroup=NULL; *distribution=NULL; *moderator=NULL; *modtype=0; } if ((*newsgroup == NULL) && defgroup) { for (q=p;*q;q++) *q=tolower(*q); *newsgroup=expand(defgroup,p); *distribution=defdist; debug(9,"area \"%s\" -> default newsgroup \"%s\", dist \"%s\"", S(p),S(*newsgroup),S(*distribution)); } if (*newsgroup == NULL) { loginf("No newsgroup for area tag %s",S(p)); } free(p); } #ifdef AREAS_HACKING void readareas(fn,site) char *fn; char *site; #else void readareas(fn) char *fn; #endif { areang *cur; FILE *fp=NULL; #ifdef JE char buf[128],*p,*q,*r,*s,*t; int incode, outcode; #else char buf[128],*p,*q,*r; #endif /* JE */ char *u; #ifdef AREAS_HACKING #define MAXFILELEN 1024 char namebuffer[MAXFILELEN]; #endif if (defgroup) free(defgroup); defgroup=NULL; if (defdist) free(defdist); defdist=NULL; if (defarea) free(defarea); defarea=NULL; if (!nglist_byarea) nglist_byarea=lh_new(hash_byarea,cmp_byarea); if (!nglist_byng) nglist_byng=lh_new(hash_byng,cmp_byng); #ifdef AREAS_HACKING /* Tries to open "Areas.fidosite". Then defaults to the * usual Areas. */ if (site) { sprintf(namebuffer, "%s.%s", fn, site); fp = fopen(namebuffer, "r"); while ((!fp) && (site)) { debug(5,"$unable to open area file %s", S(namebuffer)); if ((p=strrchr(site,'.'))) { *p='\0'; sprintf(namebuffer, "%s.%s", fn, site); fp = fopen(namebuffer, "r"); } else site='\0'; } } if (!fp) { #endif if ((fp=fopen(fn,"r")) == NULL) { logerr("$unable to open area file %s",S(fn)); return; } #ifdef AREAS_HACKING } #endif while (fgets(buf,sizeof(buf)-1,fp)) { if (isspace(buf[0])) continue; #if defined(AREAS_NUMERAL_COMMENTS) || defined(AREAS_NUMERAL_COMPATIBILITY) for (p=buf;(p=strchr(p, '#'));) if (p>buf && *(p-1)=='\\') { strcpy(p-1,p); /* discard the '\\' */ /* this is illegal, p-1 and p overlap */ } else { /* comment */ *p='\0'; #ifdef AREAS_NUMERAL_COMPATIBILITY loginf("Warning! format of Areas files has changed;"); loginf("usage of '#' as comment char will be dropped;"); loginf("now comments are lines beginning whith a blank"); #endif } #endif p=strtok(buf," \t\n"); q=strtok(NULL," \t\n"); r=strtok(NULL," \t\n"); #ifdef JE s=strtok(NULL," \t\n"); /* character conversion rule (in=inside=internal code) */ t=strtok(NULL," \t\n"); /* character conversion rule (out=outside) */ incode = CHRS_NOTSET; if(s) incode = getcode(s); outcode = CHRS_NOTSET; if(t) outcode = readchrs(t); #endif /* JE */ u=strtok(NULL," \t\n"); /* for Approved: line of read-only echos */ if (p && q) { if (strcmp(q,"*") == 0) { debug(9,"adding default areatag \"%s\"",S(p)); defarea=xstrcpy(p); } if (strcmp(p,"*") == 0) { debug(9,"adding default group \"%s\" (dist %s)", S(q),S(r)); defgroup=xstrcpy(q); defdist=xstrcpy(r); } if ((strcmp(p,"*") != 0) && (strcmp(q,"*") != 0)) { debug(9,"adding area \"%s\" for ng \"%s\" (dist %s)", S(p),S(q),S(r)); cur=(areang*)malloc(sizeof(areang)); cur->area=xstrcpy(p); cur->ng=xstrcpy(q); if ((r) && (strcasecmp(r,"world"))) cur->dist=xstrcpy(r); else cur->dist=NULL; #ifdef JE cur->incode = incode; cur->outcode = outcode; #endif if (u) cur->moder=xstrcpy(u); else cur->moder=NULL; lh_insert(nglist_byarea,(char*)cur); lh_insert(nglist_byng,(char*)cur); } } } fclose(fp); } #ifdef GATEBAU_MSGID int areagatebau(area) char *area; { area_list *gg; areang *ang; areang dummy_entry; char *p,*q; if (!area) return 0; p=xstrcpy(area); if ((*p) && ((*(q=p+strlen(p)-1) == '\r') || (*q == '\n'))) *q='\0'; dummy_entry.area=p; if ((ang=(areang*)lh_retrieve(nglist_byarea,(char*)&dummy_entry))) { for (gg=gatebaugroups;gg;gg=gg->next) if (!strncmp(gg->name,ang->ng,strlen(gg->name))) { free(p); return 1; } } free(p); return 0; } #endif ifmail-2.14tx8.10.orig/ifgate/msgflags.c100644 1751 50 4044 6014367372 15366 0ustar mdsrc#include #include #include #include #include "xutil.h" #include "lutil.h" #include "ftnmsg.h" static char *flnm[] = { "PVT","CRS","RCV","SNT","ATT","TRN","ORP","K/S", "LOC","HLD","RSV","FRQ","RRQ","RRC","ARQ","FUP" }; int flag_on(char *,char *); int flagset(s) char *s; { char *buf,*p; int i; int fl=0; debug(5,"setting flags from string \"%s\"",S(s)); buf=xstrcpy(s); for (p=strtok(buf," ,\t\n");p;p=strtok(NULL," ,\t\n")) { for (i=0;i<16;i++) if (!strcasecmp(p,flnm[i])) { debug(5,"setting flag bit %d for \"%s\"", i,S(p)); fl |= (1 << i); } } free(buf); debug(5,"set flags 0x%04x",fl); return fl; } char *compose_flags(flags,fkludge) int flags; char *fkludge; { int i; char *buf=NULL,*p; debug(5,"composing flag string from binary 0x%04x and string \"%s\"", flags,S(fkludge)); if (fkludge) { if (!isspace(fkludge[0])) buf=xstrcpy(" "); buf=xstrcat(buf,fkludge); p=buf+strlen(buf)-1; while (isspace(*p)) *p--='\0'; } for (i=0;i<16;i++) if ((flags & (1 << i)) && (!flag_on(flnm[i],buf))) { buf=xstrcat(buf," "); buf=xstrcat(buf,flnm[i]); debug(5,"adding \"%s\"",flnm[i]); } debug(5,"resulting string is \"%s\"",buf); return buf; } char *strip_flags(flags) char *flags; { char *p,*q=NULL,*tok; int canonic,i; debug(5,"stripping official flags from \"%s\"",S(flags)); if (flags == NULL) return NULL; p=xstrcpy(flags); for (tok=strtok(flags,", \t\n");tok;tok=strtok(NULL,", \t\n")) { canonic=0; for (i=0;i<16;i++) if (strcasecmp(tok,flnm[i]) == 0) canonic=1; if (!canonic) { q=xstrcat(q," "); q=xstrcat(q,tok); } } free(p); debug(5,"stripped string is \"%s\"",q); return q; } int flag_on(flag,flags) char *flag,*flags; { char *p,*tok; int up=0; debug(5,"checking flag \"%s\" in string \"%s\"",S(flag),S(flags)); if (flags == NULL) return 0; p=xstrcpy(flags); for (tok=strtok(p,", \t\n");tok;tok=strtok(NULL,", \t\n")) { if (strcasecmp(flag,tok) == 0) up=1; } free(p); debug(5,"flag%s present",up?"":" not"); return up; } ifmail-2.14tx8.10.orig/ifgate/iftoss.c100644 0 0 6417 6573551267 15544 0ustar rootroot/* ### Modified on 15 Jun 96 by P.Saratxaga * - added REFERENCES_MSC96 from Marc Schaeffer * - added AREAS_HACKING from Marc Schaeffer */ #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "config.h" #include "version.h" #include "ftn.h" #include "getheader.h" #include "trap.h" #ifdef DIRTY_CHRS #include "charset.h" int dirtyoutcode; #endif #ifdef REFERENCES_MSC96 #include "ref_interface.h" ref_private_t *ref_dbase; #endif #ifndef FAKEDIR #define FAKEDIR "/tmp/ifmail/" #endif extern int getmessage(FILE *,faddr *,faddr *); #ifdef AREAS_HACKING extern void readareas(char *, char *); #else extern void readareas(char *); #endif extern void readalias(char *); extern int exclose(FILE *); extern int num_echo,num_mail; int usetmp=1; /* to tell bgets that we do not use batch mode */ int notransports=0; void usage(name) char *name; { #ifdef RELAXED confusage("-N"); fprintf(stderr,_("-N\t\tput messages to %s directory\n"),FAKEDIR); #else confusage("-N -f"); fprintf(stderr,_("-N\t\tput messages to %s directory\n"),FAKEDIR); fprintf(stderr,_("-f\t\tforce tossing of packets addressed to other nodes\n")); #endif } FILE *nb = NULL; int main(argc,argv) int argc; char *argv[]; { int c; int rc,maxrc; #ifdef RELAXED int relaxed=1; #else int relaxed=0; #endif faddr from,to; #ifdef DIRTY_CHRS fa_list *pa; #endif #if defined(HAS_SYSLOG) && defined(MAILLOG) logfacility=MAILLOG; #endif setmyname(argv[0]); catch(myname); #ifdef RELAXED while ((c=getopt(argc,argv,"Nhx:I:")) != -1) #else while ((c=getopt(argc,argv,"Nfhx:I:")) != -1) #endif if (confopt(c,optarg)) switch (c) { case 'N': notransports=1; break; #ifndef RELAXED case 'f': relaxed=1; break; #endif default: usage(argv[0]); exit(1); } if (readconfig()) { logerr("Error getting configuration, aborting"); exit(1); } #ifdef REFERENCES_MSC96 /* even if not newsmode */ if (refdbm) ref_dbase = ref_init(refdbm); #endif #ifndef AREAS_HACKING readareas(areafile); #endif if (aliasfile) readalias(aliasfile); if (notransports) { mkdir(FAKEDIR,0777); loginf("messages/newsbatches will go to %s",FAKEDIR); } #ifdef PARANOID if (((rc=getheader(&from,&to,stdin)) != 0) && ((rc != 3) || (!relaxed))) #else if (((rc=getheader(&from,&to,stdin)) != 0) && ((rc != 3) || (!relaxed)) && (rc != 4)) #endif { logerr("%s, aborting",(rc==3)?"packet not to this node": (rc==4)?"bad password":"bad packet"); exit(rc); } #ifdef AREAS_HACKING readareas(areafile, ascinode(&from, 0x3f)); #endif #ifdef DIRTY_CHRS dirtyoutcode=CHRS_NOTSET; for (pa=dirtychrslist;pa;pa=pa->next) { if (metric(pa->addr,&from) == 0) { dirtyoutcode=readchrs(pa->addr->name); if (dirtyoutcode == CHRS_NOTSET) dirtyoutcode=getcode(pa->addr->name); } } #endif while ((rc=getmessage(stdin,&from,&to)) == 1); maxrc=rc; if (nb) { if (notransports) rc=fclose(nb); else rc=exclose(nb); if (rc < 0) rc=10-rc; if (rc > maxrc) maxrc=rc; } loginf("end %d echomail, %d netmail messages processed, rc=%d", num_echo,num_mail,maxrc); #ifdef REFERENCES_MSC96 /* even if not newsmode */ if (refdbm) ref_deinit(ref_dbase); #endif return maxrc; } ifmail-2.14tx8.10.orig/ifgate/getmessage.c100644 0 0 17676 6701151723 16374 0ustar rootroot/* ### Modified by P.Saratxaga on 12 Aug 1995 ### * - little hack to allox \t and \n in kludge lines * - added #include "crc.h" * - added bNeedToGetAddressFromMsgid code from T.Tanaka * - No badkludge if ^aRFC- */ #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "bread.h" #include "ftn.h" #include "rfcmsg.h" #include "mkrfcmsg.h" #include "config.h" #include "crc.h" #include "charset.h" #define KWDCHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ "abcdefghijklmnopqrstuvwxyz" \ "0123456789-_" extern time_t parsedate(char *,void *); extern char *rfcdate(time_t); int pgpsigned; static time_t parsefdate(char *,void *); static time_t parsefdate(str,now) char *str; void *now; { if (str == NULL) return (time_t)0; if ((strncasecmp(str,"Sun ",4) == 0) || (strncasecmp(str,"Mon ",4) == 0) || (strncasecmp(str,"Tue ",4) == 0) || (strncasecmp(str,"Wed ",4) == 0) || (strncasecmp(str,"Thu ",4) == 0) || (strncasecmp(str,"Fri ",4) == 0) || (strncasecmp(str,"Sat ",4) == 0)) str+=4; return parsedate(str,now); } /* 0-no more messages, 1-more messages, 2-bad file */ int getmessage(pkt,p_from,p_to) FILE *pkt; faddr *p_from,*p_to; { char buf[BUFSIZ]; char *subj=NULL,*orig=NULL; char *p,*l,*r; rfcmsg *kmsg=NULL,**tmsg; int tmp,rc,maxrc=0; faddr f,t,*o; int flags; int waskluge,badkludge; time_t mdate=0L; off_t endmsg_off,tear_off,orig_off,via_off; FILE *fp; int bNeedToGetAddressFromMsgid = (int)NULL; tmsg=&kmsg; switch(tmp=iread(pkt)) { case 0: debug(5,"zero message type - end of packet?"); tmp=iread(pkt); if (feof(pkt)) return maxrc; else { loginf("Junk after the logical end of packet at %lu skipped", (unsigned long)ftell(pkt)); return maxrc; } case 2: break; default:logerr("bad message type: 0x%04x",tmp); return 2; } pgpsigned=0; f.zone=0; t.zone=0; f.point=0; t.point=0; f.name=NULL; t.name=NULL; f.domain=NULL; t.domain=NULL; f.node=iread(pkt); t.node=iread(pkt); f.net=iread(pkt); t.net=iread(pkt); flags=iread(pkt); tmp=iread(pkt); if (aread(buf,sizeof(buf)-1,pkt)) { mdate=parsefdate(buf,NULL); while (aread(buf,sizeof(buf)-1,pkt)) { loginf("date not null-terminated: \"%s\"",buf); } } if (aread(buf,sizeof(buf)-1,pkt)) { t.name=xstrcpy(buf); while (aread(buf,sizeof(buf)-1,pkt)) { if (*(p=t.name+strlen(t.name)-1) == '\n') *p='\0'; loginf("to name not null-terminated: \"%s\"",buf); } } if (aread(buf,sizeof(buf)-1,pkt)) { f.name=xstrcpy(buf); while (aread(buf,sizeof(buf)-1,pkt)) { if (*(p=f.name+strlen(f.name)-1) == '\n') *p='\0'; loginf("from name not null-terminated: \"%s\"",buf); } } if (aread(buf,sizeof(buf)-1,pkt)) { subj=xstrcpy(buf); while (aread(buf,sizeof(buf)-1,pkt)) { if (*(p=subj+strlen(subj)-1) == '\n') *p='\0'; subj=xstrcat(subj,"\\n"); subj=xstrcat(subj,buf); loginf("subj not null-terminated: \"%s\"",buf); } } if (feof(pkt) || ferror(pkt)) { loginf("Could not read message header, aborting"); return 3; } f.zone=p_from->zone; t.zone=p_to->zone; debug(5,"message from %s",ascfnode(&f,0x7f)); debug(5,"message to %s",ascfnode(&t,0x7f)); debug(5,"message subj \"%s\"",S(subj)); debug(5,"message date \"%s\"",rfcdate(mdate)); tear_off=0L; orig_off=0L; via_off=0L; waskluge=0; if ((fp=tmpfile()) == NULL) { logerr("$unable to open temporary file"); return 4; } while (aread(buf,sizeof(buf)-1,pkt)) if ((buf[0] == '\1') || !strncmp(buf,"AREA:",5) || !strncmp(buf,"SEEN-BY",7)) /* This is a kluge line */ { waskluge=1; badkludge=0; if (buf[0] == '\1') { l=buf+1; if (!strncmp(l,"AREA:",5) || !strncmp(l,"SEEN-BY",7)) badkludge=1; } else l=buf; if (*l == '\n') badkludge=1; else while (isspace(*l)) l++; if (strncmp(l,"RFC-",4)) for (p=l;*p;p++) if ((*p != '\n') && (((*p)&0x7f) < ' ')) badkludge=1; p=strchr(l,':'); r=strchr(l,' '); if (p && (!r || (r > p))) r=p; else p=r; if (r == NULL) badkludge=1; else if (!*(p+1) || (*(p+1)=='\n')) badkludge=1; else { char c=*r; *r='\0'; if (strspn(l,KWDCHARS) != strlen(l)) badkludge=1; *r=c; } *tmsg=(rfcmsg *)xmalloc(sizeof(rfcmsg)); (*tmsg)->next=NULL; if (badkludge) { (*tmsg)->key=xstrcpy("KLUDGE"); p=printable(l,0); r=p+strlen(p)-2; if (strcmp(r,"\\n") == 0) { *r++='\n'; *r='\0'; } (*tmsg)->val=xstrcpy(p); } else { *r++='\0'; while (isspace(*r)) r++; (*tmsg)->key=xstrcpy(l); (*tmsg)->val=xstrcpy(r); } tmsg=&((*tmsg)->next); if (!strcmp(l,"Via") && (via_off == 0L)) { via_off=ftell(fp); debug(5,"^AVia \"%s\" at offset %ld", buf,(long)via_off); } } else /* this is not a kludge line */ { if (waskluge && (isspace(buf[0]))) fputs("\n",fp); /* first body line is not RFC hdr */ waskluge=0; if (!strncmp(buf,PGP_SIGNED_BEGIN,strlen(PGP_SIGNED_BEGIN))) pgpsigned=1; else if ((!strncmp(buf,"---",3)) && ((buf[3] == '\r') || (buf[3] == ' ') || (buf[3] == '\n'))) { tear_off=ftell(fp); if ((hdr("Tearline",kmsg) == NULL)) { *tmsg=(rfcmsg *)xmalloc(sizeof(rfcmsg)); (*tmsg)->next=NULL; (*tmsg)->key=xstrcpy("Tearline"); if (strlen(buf+3) == strspn(buf+3," \t\r\n")) (*tmsg)->val=xstrcpy("(none)\n"); else (*tmsg)->val=xstrcpy(buf+4); tmsg=&((*tmsg)->next); } debug(5,"tearline \"%s\" at offset %ld", buf,(long)tear_off); } else if (!strncmp(buf," * Origin:",10)) { orig_off=ftell(fp); *tmsg=(rfcmsg *)xmalloc(sizeof(rfcmsg)); (*tmsg)->next=NULL; (*tmsg)->key=xstrcpy("Origin"); (*tmsg)->val=xstrcpy(buf+11); tmsg=&((*tmsg)->next); debug(5,"origin \"%s\" at offset %ld", buf,(long)orig_off); p=buf+10; while (*p == ' ') p++; if ((l=strrchr(p,'(')) && (r=strrchr(p,')')) && (l < r)) { *l='\0'; *r='\0'; l++; if ((o=parsefnode(l))) { f.point=o->point; f.node=o->node; f.net=o->net; f.zone=o->zone; if (o->domain) f.domain=o->domain; o->domain=NULL; tidy_faddr(o); debug(5,"Origin from: %s", ascfnode(&f,0x7f)); } } else { bNeedToGetAddressFromMsgid = !NULL; loginf("Couldn't find address in origin line (%s of %s, [%s])", f.name, ascfnode(&f, 0x1f), hdr("Origin", kmsg)); if (*(l=p+strlen(p)-1) == '\n') *l='\0'; } for (l=p+strlen(p)-1;*l == ' ';l--) *l='\0'; orig=xstrcpy(p); } else if (!strncmp(buf," * Message split",16)) { *tmsg=(rfcmsg *)xmalloc(sizeof(rfcmsg)); (*tmsg)->next=NULL; (*tmsg)->key=xstrcpy("Split"); (*tmsg)->val=xstrcpy("already\n"); tmsg=&((*tmsg)->next); debug(5,"Split indicator found"); } fputs(buf,fp); } if(bNeedToGetAddressFromMsgid && (p = hdr("MSGID", kmsg))) { l = p; while(isspace(*l) && *l) l++; r = strchr(l, ' '); if(r) { *r-- = '\0'; while(isspace(*r) && *r) r--; } if (l && r && l > r) { if ((o = parsefnode(l))) { f.point = o->point; f.node = o->node; f.net = o->net; f.zone = o->zone; if (o->domain) f.domain = o->domain; o->domain = NULL; tidy_faddr(o); /*debug(5,"Origin from: %s (src MSGID)", ascfnode(&f,0x7f));*/ loginf("Origin from: %s (src MSGID)", ascfnode(&f,0x7f)); } } } endmsg_off=ftell(fp); if ((tear_off) && (tear_off < endmsg_off)) endmsg_off=tear_off; if ((orig_off) && (orig_off < endmsg_off)) endmsg_off=orig_off; if ((via_off) && (via_off < endmsg_off)) endmsg_off=via_off; debug(5,"end message offset %ld",(long)endmsg_off); rewind(fp); rc=mkrfcmsg(&f,&t,subj,orig,mdate,flags,fp,endmsg_off,kmsg); if (rc) rc+=10; if (rc > maxrc) maxrc=rc; fclose(fp); tidyrfc(kmsg); if(f.name) free(f.name); f.name=NULL; if(t.name) free(t.name); t.name=NULL; if(f.domain) free(f.domain); f.domain=NULL; if(t.domain) free(t.domain); t.domain=NULL; if (feof(pkt) || ferror(pkt)) { logerr("Unexpected end of packet"); return 5; } return 1; } ifmail-2.14tx8.10.orig/ifgate/mkrfcmsg.c100644 0 0 103673 6701151723 16072 0ustar rootroot/* ### Modified by P.Saratxaga on 12 Sep 1995 ### * - some hacking to handle non standard MSGID's * - PUDDLE_GATE repairs the Newsgroups lines from the gate used at * puddle.fidonet.org, which puts spaces in Newsgroups header * - Added PCBOARD_GATE * - added ALLOW_CONTROL and charset handling * - added FORCE_REPYLTO_LOCAL * - added charset support (see Changelog for details) * - corrected a bug about ^aRFCID * - added recognition for "^aMSGID 0124587" created * by fidogate. * - No "X-Comment-To: " is generated if the value is "All" * - added #ifdef RNEWSB; when compiled with it, the result of ifnews -N is an * rnews readable file. * - REFERENCES_MSC96 to compile whith Marc Schaeffer's ref_interface.h */ #include #include #include #include #include #include #include #include "lutil.h" #include "xutil.h" #include "mkrfcmsg.h" #include "ftnmsg.h" #include "rfcmsg.h" #include "areas.h" #include "falists.h" #include "config.h" #include "needed.h" #include "charset.h" #include "charconv.h" #include "mime.h" #ifdef REFERENCES_MSC96 #include "ref_interface.h" extern ref_private_t *ref_dbase; #endif #define BOUNDARY 79 #define MAXPATH 73 #ifndef LEVEL #define LEVEL 1 #endif int num_echo=0,num_mail=0; extern char *version; extern FILE *nb; extern faddr pktfrom; extern int notransports; extern char *rfcdate(time_t); extern unsigned INT32 sequencer(void); extern unsigned INT16 crc(char*); extern char *lookup(char *); extern char *backalias(faddr *); #ifdef GATEBAU_MSGID extern unsigned long crcgatebau(char*); char *gatebaudate(time_t); #endif extern FILE *expipe(char*,char*,char*); extern int exclose(FILE*); extern char *compose_flags(int,char *); extern int pgpsigned; #ifdef DIRTY_CHRS extern int dirtyoutcode; #endif #ifdef GATEBAU_MSGID char *rfcmsgid(msgid,bestaka,mode) char *msgid; faddr *bestaka; int mode; /* 0=ifmail-style, 1=gatebau-style */ #else char *rfcmsgid(msgid,bestaka) char *msgid; faddr *bestaka; #endif { static char *buf,*p,*q,*r; #ifdef REFERENCES_MSC96 char buf2[1024]; #endif unsigned long id=0L; faddr *ta=NULL; /* +40 for the additionnal stuff we need to write, should be enough */ buf=xmalloc(strlen(msgid)+40); if ((r=strrchr(msgid,'\n'))) *r='\0'; /* sometimes there is "^aMSGID: 1:23/45@@domain 152ad589" */ if ((p = strstr(msgid, "@@"))) { #ifdef GATEBAU_MSGID if (mode==1) { sprintf(buf,"", qp_encode(msgid,1)); if (r) *r='\n'; return buf; } else { #endif *p='\0'; strcat(msgid, p+1); #ifdef GATEBAU_MSGID } #endif } /* other times there is "^aMSGID: 1:23/45@ 152ad589" */ else if ((p = strstr(msgid,"@ "))) { #ifdef GATEBAU_MSGID if (mode==1) { sprintf(buf,"", qp_encode(msgid,1)); if (r) *r='\n'; return buf; } else { #endif *p='\0'; strcat(msgid,p+1); #ifdef GATEBAU_MSGID } #endif } /* here we have a parseable address */ if ((p=strrchr(msgid,' '))) { *p='\0'; sscanf(p+1,"%lx",&id); ta=parsefnode(msgid); *p=' '; } if (id != 0L) { #ifdef GATEBAU_MSGID /* if we only check for (ta) a Message-ID like * <123456.7890@internet.domain> will be recognized as * a fidonet one (ta->node=123456, ta->point=7890, * ta->domain="internet", but ta->net=0) which obviously * isn't the case. By cheking also (ta->net) we avoid that */ if ((ta) && (ta->net) && (mode==1)) { if (((ta->zone) > 0) && ((ta->zone) < 7)) sprintf(buf,"", qp_encode(msgid,1)); else sprintf(buf,"", qp_encode(msgid,1), (bestaka->domain)?bestaka->domain:"nodomain"); } else #endif /* if we only check for (ta) a Message-ID like * <123456.7890@internet.domain> will be recognized as * a fidonet one (ta->node=123456, ta->point=7890, * ta->domain="internet", but ta->net=0) which obviously * isn't the case. By cheking also (ta->net) we avoid that */ if ((ta) && (ta->net)) { sprintf(buf,"<%lu@%s.ftn>",id,ascinode(ta,0x1f)); #ifdef REFERENCES_MSC96 if (refdbm) { sprintf(buf2,"%s",buf); ref_get(ref_dbase,buf2,buf,1024); } #endif } else { p=xstrcpy(msgid); if ((q=strchr(p,' '))) *q='\0'; /* ### Modified by P.Saratxaga on 18 Aug 1995 */ if (strstr(p,"@")) { /* "mid__" are generated by gigo */ if (!strncmp(p,"mid__<",6)) { sprintf(buf,"%s",p+6); while ((q=strstr(buf,">_<"))) *(q+1)=' '; } /* "mid__local@domain" are also generated by gigo */ else if (!strncmp(p,"mid__",5)) sprintf(buf,"<%s>",p+5); /* "wgmid$" */ else if (!strncmp(p,"wgmid$<",7)) sprintf(buf,"%s",p+6); /* in case we have "" */ else if (!strncmp(p,"<",1)) sprintf(buf,"%s",p); /* or "local@domain" */ else sprintf(buf,"<%s>",p); while ((q = strchr(buf, '@')) != strrchr(buf, '@')) { /* we (still) have more than one @ */ *q = '%'; } } else { sprintf(buf,"<%lu@%s>",id,p); #ifdef REFERENCES_MSC96 if (refdbm) { sprintf(buf2,"%s",buf); ref_get(ref_dbase,buf2,buf,1024); } #endif } free(p); } } #ifdef GATEBAU_MSGID else if (mode==1) { sprintf(buf,"", qp_encode(msgid,1)); } #endif else { sprintf(buf,"<%lu@%s.ftn>",(unsigned long)sequencer(), ascinode(bestaka,0x1f)); } tidy_faddr(ta); if (r) *r='\n'; return buf; } /* check address for localness, substitute alises and replace it *in place* */ void substitute(buf) char *buf; { faddr *fa; char *l,*r,*p=NULL; int inquotes,inbrackets; debug(6,"to address before subst: \"%s\"",buf); if ((l=strchr(buf,'<')) && (r=strchr(buf,'>')) && (l < r)) { l++; *r='\0'; } else l=buf; while (*l == ' ') l++; for (r=l,inquotes=0,inbrackets=0;*r;r++) switch (*r) { case '"': inquotes=(!inquotes); break; case ',': case ' ': if (!inquotes && !inbrackets) *r='\0'; break; case '(': if (!inquotes) inbrackets++; break; case ')': if (!inquotes && inbrackets) inbrackets--; break; default: break; } if ((fa=parsefaddr(l))) { debug(6,"it is an ftn address: %s",ascfnode(fa,0x7f)); if (is_local(fa)) { debug(6,"it is local"); sprintf(buf,"%s",fa->name); if (!strchr(buf,'@') && (p=strrchr(buf,'%'))) *p='@'; if (!strchr(buf,'@')) { if ((p=lookup(buf))) strcpy(buf,p); else if (!strcasecmp(buf,"sysop")) strcpy(buf,"postmaster"); else sprintf(buf,"%s",ascinode(fa,0x7f)); } } else { debug(6,"it is not local"); sprintf(buf,"%s",ascinode(fa,0x7f)); } tidy_faddr(fa); } else { debug(6,"it is not ftn address"); for (r=buf;*l;l++,r++) *r=*l; *r='\0'; } if (buf[0] == '\0') strcpy(buf,"postmaster"); debug(6,"to address after subst: \"%s\"",buf); return; } /* from, to, subj, orig, mdate, flags, file, offset, kluges */ int mkrfcmsg(f,t,subj,orig,mdate,flags,fp,endoff,kmsg) faddr *f,*t; char *subj,*orig; time_t mdate; int flags; FILE *fp; off_t endoff; rfcmsg *kmsg; { char buf[BUFSIZ]; char *p,*q,*l,*r,*b; char *newsgroup=NULL,*distribution=NULL; int incode, outcode; char *moderator=NULL; int modtype=0; char c; int count,rrq; rfcmsg *msg=NULL,*tmsg; FILE *pip; struct stat stbuf; int newsmode,pass,rc; faddr *ta,*bestaka; fa_list *ftnpath=NULL,*tfa,*rlist; time_t now; int lines; char lineshdr[16]; moderator_list *tmpml; #ifdef GATEBAU_MSGID int gatebaumode=0; #endif incode = outcode = CHRS_NOTSET; /* if ((magicname == NULL) || ((t->name) && (strcasecmp(magicname,t->name) == 0))) */ msg=parsrfc(fp); bestaka=bestaka_s(f); p=hdr("CHRS",kmsg); if (p == NULL) p=hdr("CHARSET",kmsg); if (p == NULL) p=hdr("CODEPAGE",kmsg); if (p) outcode=readchrs(p); else { p=hdr("Content-Type",msg); if (p == NULL) p=hdr("RFC-Content-Type",kmsg); if (p == NULL) p=hdr("Content-Type",kmsg); if (p) outcode=readcharset(p); #ifndef JE else if ((hdr("Message-ID",msg)) || (hdr("RFC-Message-ID",kmsg)) || (hdr("Message-ID",kmsg)) || (hdr("RFCID",kmsg)) || (hdr("ORIGID",kmsg)) || ((hdr("MSGID",kmsg)) && #ifdef GATEBAU_MSGID (!chkftnmsgid(rfcmsgid(hdr("MSGID",kmsg),bestaka,gatebaumode))))) #else (!chkftnmsgid(rfcmsgid(hdr("MSGID",kmsg),bestaka))))) #endif outcode=defaultrfcchar; else outcode=defaultftnchar; #endif } #ifdef TERMAIL_HACK p=hdr("PID",kmsg); if ((p) && (!strncmp(p,"TerMail",7)) && (outcode==defaultrfcchar)) outcode=defaultftnchar; #endif #ifdef DIRTY_CHRS if (dirtyoutcode != CHRS_NOTSET) outcode=dirtyoutcode; #endif if (pgpsigned) incode=outcode; /* else incode=getincode(outcode); */ if (kmsg && !strcmp(kmsg->key,"AREA")) { ngdist(kmsg->val,&newsgroup,&distribution,&moderator,&modtype); #ifdef JE if (!pgpsigned) areacharset(kmsg->val, &incode, &outcode); #endif #ifdef GATEBAU_MSGID gatebaumode=areagatebau(kmsg->val); #endif if (!newsgroup) { tidyrfc(msg); return 0; } newsmode=1; if ((modtype==1) && (!hdr("Approved",msg)) && (!hdr("RFC-Approved",kmsg)) && (!hdr("Approved",kmsg))) newsmode=0; } else newsmode=0; debug(5,"Got %s message",newsmode?"echo":"netmail"); if (outcode==CHRS_NOTSET) { if ((hdr("Message-ID",msg)) || (hdr("RFC-Message-ID",kmsg)) || (hdr("Message-ID",kmsg)) || (hdr("RFCID",kmsg)) || (hdr("ORIGID",kmsg)) || ((hdr("MSGID",kmsg)) && #ifdef GATEBAU_MSGID (!chkftnmsgid(rfcmsgid(hdr("MSGID",kmsg),bestaka,gatebaumode))))) #else (!chkftnmsgid(rfcmsgid(hdr("MSGID",kmsg),bestaka))))) #endif outcode=defaultrfcchar; else outcode=defaultftnchar; } if (pgpsigned) incode=outcode; else if (incode==CHRS_NOTSET) incode=getincode(outcode); /* fsc-0038 defines "^aDOMAIN: othernet 99:12/34 fidonet 2:293/2219" */ if ((p=hdr("DOMAIN",kmsg)) && (!strchr(p,'@'))) { strncpy(buf,p,sizeof(buf)-1); buf[sizeof(buf)-1]='\0'; l=strtok(buf," \n"); p=strtok(NULL," \n"); r=strtok(NULL," \n"); q=strtok(NULL," \n"); if ((ta=parsefnode(p))) { t->point=ta->point; t->node=ta->node; t->net=ta->net; t->zone=ta->zone; tidy_faddr(ta); } t->domain=xstrcpy(l); if ((ta=parsefnode(q))) { f->point=ta->point; f->node=ta->node; f->net=ta->net; f->zone=ta->zone; tidy_faddr(ta); } f->domain=xstrcpy(r); } else if ((p=hdr("INTL",kmsg))) { strncpy(buf,p,sizeof(buf)-1); buf[sizeof(buf)-1]='\0'; l=strtok(buf," \n"); r=strtok(NULL," \n"); if ((ta=parsefnode(l))) { t->point=ta->point; t->node=ta->node; t->net=ta->net; t->zone=ta->zone; if (ta->domain) { if (t->domain) free(t->domain); t->domain=ta->domain; ta->domain=NULL; } tidy_faddr(ta); } if ((ta=parsefnode(r))) { f->point=ta->point; f->node=ta->node; f->net=ta->net; f->zone=ta->zone; if (ta->domain) { if (f->domain) free(f->domain); f->domain=ta->domain; ta->domain=NULL; } tidy_faddr(ta); } } /* fidogate generates "^aDOMAIN: Z2@fidonet" */ if ((f->domain==NULL) && ((p=hdr("DOMAIN",kmsg)) && (q=strchr(p,'@')))) { *q='\0'; /* f->zone=atoi(p+1); */ f->domain=xstrcpy(q+1); *q='@'; } if ((p=hdr("FMPT",kmsg))) f->point=atoi(p); if ((p=hdr("TOPT",kmsg))) t->point=atoi(p); debug(5,"final from: %s",ascfnode(f,0x1f)); debug(5,"final to: %s",ascfnode(t,0x1f)); if (!newsmode) { p=hdr("Resent-To",msg); if (p == NULL) p=hdr("To",msg); if (p == NULL) p=hdr("RFC-Resent-To",kmsg); if (p == NULL) p=hdr("RFC-To",kmsg); /* if (p && is_local(t)) */ if ((p) && (is_local(t)) && ((magicname == NULL) || ((t->name) && (strcasecmp(magicname,t->name) == 0)))) { while (*p == ' ') p++; strncpy(buf,p,sizeof(buf)-1); if (*(p=buf+strlen(buf)-1) == '\n') *p='\0'; } else if (modtype==1) sprintf(buf,"%s",moderator); else sprintf(buf,"%s",ascinode(t,0x7f)); substitute(buf); loginf("mail from %s to %s",ascfnode(f,0x7f),buf); } if ((newsmode) && (nb == NULL)) { if (notransports) { nb=fopen(tempnam("/tmp/ifmail","N."),"w"); #ifndef RNEWSB fprintf(nb,"#!/bin/sh\n%s <<__EOF__\n",S(rnews)); #endif } else nb=expipe(rnews,NULL,NULL); if (nb == NULL) { logerr("$Could non open (pipe) output for news"); tidyrfc(msg); return 2; } } if (newsmode) { if ((pip=tmpfile()) == NULL) { logerr("$Cannot open second temporary file"); tidyrfc(msg); return 3; } } else { #ifdef ALLOW_RETURNPATH p=hdr("Return-Path",msg); if (p == NULL) p=hdr("RFC-Return-Path",kmsg); if (p == NULL) p=hdr("Return-Path",kmsg); if (p) debug(2,"expipe(\"%s\",\"%s\",\"%s\")", S(sendmail),p,buf); else #endif debug(2,"expipe(\"%s\",\"%s\",\"%s\")", S(sendmail),ascinode(f,0x7f),buf); if (notransports) { pip=fopen(tempnam("/tmp/ifmail","M."),"w"); #ifdef ALLOW_RETURNPATH if (p) fprintf(pip,"#!/bin/sh\nF=%s\nT=%s\n%s <<__EOF__\n", p,buf,S(sendmail)); else #endif fprintf(pip,"#!/bin/sh\nF=%s\nT=%s\n%s <<__EOF__\n", ascinode(f,0x7f),buf,S(sendmail)); } #ifdef ALLOW_RETURNPATH else if (p) pip=expipe(sendmail,p,buf); #endif else pip=expipe(sendmail,ascinode(f,0x7f),buf); if (pip == NULL) { logerr("$Could non open (pipe) output for mail"); tidyrfc(msg); return 2; } if (modtype==1) newsmode=1; } if (newsmode) { num_echo++; if ((p=hdr("Path",msg)) == NULL) p=hdr("RFC-Path",kmsg); rlist=NULL; fill_rlist(&rlist,p); for (tmsg=kmsg;tmsg;tmsg=tmsg->next) if (strcasecmp(tmsg->key,"SPTH") == 0) fill_list(&ftnpath,tmsg->val,&rlist); for (tmsg=kmsg;tmsg;tmsg=tmsg->next) if (strcasecmp(tmsg->key,"PATH") == 0) fill_list(&ftnpath,tmsg->val,&rlist); tidy_falist(&rlist); fprintf(pip,"Path: "); /* ### Modified by P.Saratxaga on 7 Aug 1995 */ /* I comment out this line, to avoid the repetition of my machine name (is the news server that has to add it) */ /* fprintf(pip,"%s!",ascinode(bestaka,0x07)); */ /* ### */ fprintf(pip,"%s!",ascinode(&pktfrom,0x07)); if (ftnpath) for (tfa=ftnpath->next;tfa;tfa=tfa->next) fprintf(pip,"%s!",ascinode(tfa->addr,0x1f)); tidy_falist(&ftnpath); if (p) { while (isspace(*p)) p++; fprintf(pip,"%s",p); } else fprintf(pip,"not-for-mail\n"); #ifdef PUDDLE_GATE if ((p=hdr("Newsgroups",msg))) /* The gate at puddle.fidonet.org put spaces in Newsgroups header */ { if ((strstr(p,", "))) { while ((r = strchr(p, ' '))) { *r = '\0'; strcat(p,r+1); } } } #else p=hdr("Newsgroups",msg); #endif if (p == NULL) p=hdr("RFC-Newsgroups",kmsg); if (p == NULL) p=hdr("Newsgroups",kmsg); if (p) { while (*p && isspace(*p)) p++; if ((areas(p,0))) { fprintf(pip,"Newsgroups: %s",p); } else { fprintf(pip,"Newsgroups: %s\n",newsgroup); fprintf(pip,"X-Origin-Newsgroups: %s",p); } } else fprintf(pip,"Newsgroups: %s\n",newsgroup); if ((p=hdr("Distribution",msg))) fprintf(pip,"Distribution:%s",p); else if ((p=hdr("RFC-Distribution",kmsg))) fprintf(pip,"Distribution: %s",p); else if ((p=hdr("Distribution",kmsg))) fprintf(pip,"Distribution: %s",p); else if (distribution) fprintf(pip,"Distribution: %s\n",distribution); p=hdr("Comment-To",msg); if (p == NULL) p=hdr("X-Comment-To",msg); if (p == NULL) p=hdr("To",msg); if ((p) && (strcasecmp(p,"All\n"))) fprintf(pip,"X-Comment-To:%s",hdrconv(p,outcode,incode)); else { if (p == NULL) p=hdr("RFC-X-Comment-To",kmsg); if (p == NULL) p=hdr("RFC-Comment-To",kmsg); if (p == NULL) p=hdr("RFC-To",kmsg); if ((p) && (strcasecmp(p,"All\n"))) fprintf(pip,"X-Comment-To: %s",hdrconv(p,outcode,incode)); else if ((t->name) && (strcasecmp(t->name,"All"))) fprintf(pip,"X-Comment-To: %s\n",hdrconv(t->name,outcode,incode)); } for (tmpml=approve;tmpml;tmpml=tmpml->next) { if ((strncmp(newsgroup,tmpml->prefix, strlen(tmpml->prefix)) == 0)) { modtype=2; moderator=xstrcpy(tmpml->address); break; } } if ((p=hdr("Approved",msg))) fprintf(pip,"Approved:%s",p); else if ((p=hdr("RFC-Approved",kmsg))) fprintf(pip,"Approved: %s",p); else if ((p=hdr("Approved",kmsg))) fprintf(pip,"Approved: %s",p); else if (modtype==2) fprintf(pip,"Approved: %s\n",moderator); } else { num_mail++; time(&now); #ifdef NEED_UUCPFROM fprintf(pip,"From %s!",ascinode(f,0x3f)); fprintf(pip,"%s %s",ascinode(f,0x40),ctime(&mdate)); #endif #if (LEVEL > 1) fprintf(pip,"Received: from %s ",ascinode(f,0x3f)); fprintf(pip,"by %s\n",ascinode(bestaka,0x3f)); fprintf(pip,"\twith FTN (ifmail v.%s) id AA%u; %s\n", version,getpid(),rfcdate(now)); #endif for (tmsg=kmsg;tmsg;tmsg=tmsg->next) if (!strcasecmp(tmsg->key,"RFC-Received")) fprintf(pip,"%s: %s",tmsg->key+4,tmsg->val); for (tmsg=msg;tmsg;tmsg=tmsg->next) if (!strcasecmp(tmsg->key,"Received")) fprintf(pip,"%s:%s",tmsg->key,tmsg->val); if ((p=hdr("Apparently-To",msg))) fprintf(pip,"Apparently-To:%s",p); else if ((p=hdr("RFC-Apparently-To",kmsg))) fprintf(pip,"Apparently-To: %s",p); else if ((p=hdr("Apparently-To",kmsg))) fprintf(pip,"Apparently-To: %s",p); else if ((is_local(t))) fprintf(pip,"Apparently-To: %s\n",buf); if (flags & FLG_RRQ) rrq=1; else rrq=0; if (rrq && !hdr("RFC-Return-Receipt-To",kmsg) && !hdr("Return-Receipt-To",msg) && !hdr("RFC-Notice-Requested-Upon-Delivery-To",kmsg) && !hdr("Notice-Requested-Upon-Delivery-To",msg)) { fprintf(pip,"Notice-Requested-Upon-Delivery-To: %s\n",buf); } if (t->name == NULL) t->name=xstrcpy("Postmaster"); p=hdr("Resent-To",msg); if (p == NULL) p=hdr("To",msg); if (p) fprintf(pip,"To:%s",p); else { if (p == NULL) p=hdr("RFC-Resent-To",kmsg); if (p == NULL) p=hdr("RFC-To",kmsg); if (p) fprintf(pip,"To: %s",p); else if (modtype==1) fprintf(pip,"To: %s\n",moderator); else fprintf(pip,"To: %s\n",ascinode(t,0xff)); } } if ((p=hdr("From",msg))) fprintf(pip,"From:%s",hdrconv(p,outcode,incode)); else if ((p=hdr("RFC-From",kmsg))) fprintf(pip,"From: %s",hdrconv(p,outcode,incode)); else if ((p=hdr("From",kmsg))) fprintf(pip,"From: %s",hdrconv(p,outcode,incode)); #ifdef PCBOARD_GATE else if ((p=hdr("X-PcBoard-FROM",msg))) if (f->name) { while (isspace(*p)) p++; p[strlen(p)-1]='\0'; fprintf(pip,"From: %s <%s>\n", hdrconv(f->name,outcode,incode), p); } else fprintf(pip,"From:%s",p); #endif else if ((hdr("REPLYADDR",kmsg)) && (p=xstrcpy(hdr("REPLYADDR",kmsg)))) { if (*(r=p+strlen(p)-1) == '\n') *(r--)='\0'; while (isspace(*r)) *(r--)='\0'; q=xstrcpy(hdr("X-RealName",msg)); if (q == NULL) q=xstrcpy(hdr("RealName",msg)); if (q == NULL) q=xstrcpy(hdr("X-RealName",kmsg)); if (q == NULL) q=xstrcpy(hdr("RealName",kmsg)); if (q) { if (*(r=q+strlen(q)-1) == '\n') *(r--)='\0'; while (isspace(*r)) *(r--)='\0'; for (l=q;isspace(*l);) l++; if ((*l == '\"') && (*r == '\"')) { l++; *r--='\0'; } fprintf(pip,"From: \"%s\" <%s>\n",hdrconv(l,outcode,incode),p); free(q); } else if (f->name) fprintf(pip,"From: \"%s\" <%s>\n",hdrconv(f->name,outcode,incode),p); else fprintf(pip,"From: %s\n",p); free(p); } if (p) fprintf(pip,"X-FTN-Sender: %s\n",hdrconv(ascinode(f,0xff),outcode,incode)); else fprintf(pip,"From: %s\n",hdrconv(ascinode(f,0xff),outcode,incode)); if ((p=hdr("Reply-To",msg))) fprintf(pip,"Reply-To:%s",p); else if ((p=hdr("RFC-Reply-To",kmsg))) fprintf(pip,"Reply-To: %s",p); else if ((p=hdr("Reply-To",kmsg))) fprintf(pip,"Reply-To: %s",p); else if (((p=backalias(f))) && myfqdn) fprintf(pip,"Reply-To: %s@%s\n",p,myfqdn); else if ((p=hdr("REPLYADDR",kmsg))) fprintf(pip,"Reply-To: %s",p); else if ((p=hdr("REPLYTO",kmsg))) fprintf(pip,"Reply-To: %s\n",ascinode(parsefaddr(p),0xff)); if ((p=hdr("Date",msg))) fprintf(pip,"Date:%s",p); else if ((p=hdr("RFC-Date",kmsg))) fprintf(pip,"Date: %s",p); else if ((p=hdr("Date",kmsg))) fprintf(pip,"Date: %s",p); else if (newsmode) { #ifdef RESTAMP_FUTURE_POSTINGS if(mdate > time(&now)) { loginf("Future posting: %s", rfcdate(mdate)); fprintf(pip,"Date: %s\n", rfcdate(now)); fprintf(pip,"X-Origin-Date: %s\n", rfcdate(mdate)); } else #endif #ifdef RESTAMP_OLD_POSTINGS if((mdate < time(&now)-14*24*60*60) && (mdate > time(&now)-RESTAMP_OLD_POSTINGS*24*60*60)) { loginf("Article too old, restamped: %s", rfcdate(mdate)); fprintf(pip,"Date: %s\n", rfcdate(now)); fprintf(pip,"X-Origin-Date: %s\n", rfcdate(mdate)); } else #endif fprintf(pip,"Date: %s\n",rfcdate(mdate)); } else fprintf(pip,"Date: %s\n",rfcdate(mdate)); if ((p=hdr("Subject",msg))) fprintf(pip,"Subject:%s",hdrconv(p,outcode,incode)); else if ((p=hdr("RFC-Subject",kmsg))) fprintf(pip,"Subject: %s",hdrconv(p,outcode,incode)); else if ((p=hdr("Subject",kmsg))) fprintf(pip,"Subject: %s",hdrconv(p,outcode,incode)); #ifdef PCBOARD_GATE else if ((p=hdr("X-PcBoard-SUBJECT",msg))) fprintf(pip,"Subject:%s",hdrconv(p,outcode,incode)); #endif /* PCBOARD_GATE */ else if (subj && (strspn(subj," \t\n\r") != strlen(subj))) fprintf(pip,"Subject: %s\n",hdrconv(subj,outcode,incode)); else fprintf(pip,"Subject: \n"); if ((p=hdr("Message-ID",msg))) fprintf(pip,"Message-ID:%s",p); else if ((p=hdr("RFC-Message-ID",kmsg))) fprintf(pip,"Message-ID: %s",p); else if ((p=hdr("Message-ID",kmsg))) fprintf(pip,"Message-ID: %s",p); else if ((p=hdr("RFCID",kmsg))) if ((p[0]=='<')) { /* "^aRFCID: " */ if ((p[strlen(p)-2]=='>')) fprintf(pip,"Message-ID: %s",p); /* "^aRFCID: \n",p); } } /* "^aRFCID: local@machine" */ else { p[strlen(p)-1]='\0'; fprintf(pip,"Message-ID: <%s>\n",p); } else if ((p=hdr("ORIGID",kmsg))) fprintf(pip,"Message-ID: %s",p); else if ((p=hdr("MSGID",kmsg))) #ifndef GATEBAU_MSGID fprintf(pip,"Message-ID: %s\n",rfcmsgid(p,bestaka)); #else fprintf(pip,"Message-ID: %s\n",rfcmsgid(p,bestaka,gatebaumode)); else if (gatebaumode==1) { strcpy(buf,f->name); if ((p=strrchr(buf,'\n'))) *p='\0'; strcat(buf,t->name); if ((p=strrchr(buf,'\n'))) *p='\0'; strcat(buf,subj); if ((p=strrchr(buf,'\n'))) *p='\0'; if (((f->zone) > 0) && ((f->zone) < 7)) fprintf(pip,"Message-ID: \n", f->zone,f->net,f->node,f->point, gatebaudate(mdate), crcgatebau(buf)); else fprintf(pip,"Message-ID: \n", f->zone,f->net,f->node,f->point, gatebaudate(mdate), crcgatebau(buf), (f->domain)?f->domain:"nodomain"); } #endif else fprintf(pip,"Message-ID: <%lu@%s.ftn>\n", mdate^(subj?crc(subj):0L), ascinode(f,0x1f)); if (newsmode) { if ((p=hdr("References",msg))) fprintf(pip,"References:%s",p); else if ((p=hdr("RFC-References",kmsg))) fprintf(pip,"References: %s",p); else if ((p=hdr("References",kmsg))) fprintf(pip,"References: %s",p); else if ((p=hdr("ORIGREF",kmsg))) fprintf(pip,"References: %s",p); else if ((p=hdr("REPLY",kmsg))) #ifndef GATEBAU_MSGID fprintf(pip,"References: %s\n",rfcmsgid(p,bestaka)); #else fprintf(pip,"References: %s\n",rfcmsgid(p,bestaka,gatebaumode)); #endif } else { if ((p=hdr("In-Reply-To",msg))) fprintf(pip,"In-Reply-To:%s",p); else if ((p=hdr("RFC-In-Reply-To",kmsg))) fprintf(pip,"In-Reply-To: %s",p); else { if ((p=hdr("REPLY",kmsg))) fprintf(pip,"In-Reply-To: %s\n", #ifndef GATEBAU_MSGID rfcmsgid(p,bestaka)); #else rfcmsgid(p,bestaka,gatebaumode)); #endif } } if ((p=hdr("Organization",msg))) fprintf(pip,"Organization:%s",hdrconv(p,outcode,incode)); else if ((p=hdr("RFC-Organization",kmsg))) fprintf(pip,"Organization: %s",hdrconv(p,outcode,incode)); else if ((p=hdr("Organization",kmsg))) fprintf(pip,"Organization: %s",hdrconv(p,outcode,incode)); else if (orig) fprintf(pip,"Organization: %s\n",hdrconv(orig,outcode,incode)); if ((p=hdr("Supersedes",msg))) fprintf(pip,"Supersedes:%s",p); else if ((p=hdr("RFC-Supersedes",kmsg))) fprintf(pip,"Supersedes: %s",p); else if ((p=hdr("Supersedes",kmsg))) fprintf(pip,"Supersedes: %s",p); else if ((p=hdr("ACUPDATE",kmsg)) && (strstr(p,"MODIFY"))) #ifndef GATEBAU_MSGID fprintf(pip,"Supersedes: %s\n",rfcmsgid(p+8,bestaka)); #else fprintf(pip,"Supersedes: %s\n",rfcmsgid(p+8,bestaka,gatebaumode)); #endif #ifdef ALLOW_CONTROL if ((p=hdr("Control",msg))) fprintf(pip,"Control:%s",p); else if ((p=hdr("RFC-Control",kmsg))) fprintf(pip,"Control: %s",p); else if ((p=hdr("Control",kmsg))) fprintf(pip,"Control: %s",p); else if ((p=hdr("ACUPDATE",kmsg)) && (strstr(p,"DELETE"))) #ifndef GATEBAU_MSGID fprintf(pip,"Control: cancel %s\n",rfcmsgid(p+8,bestaka)); #else fprintf(pip,"Control: cancel %s\n",rfcmsgid(p+8,bestaka,gatebaumode)); #endif #endif writechrs(incode,pip,0); if (incode != outcode) writechrs(outcode,pip,2); writecharset(incode,pip,msg,kmsg); if (newsmode) { if ((p=hdr("X-Newsreader",msg))) fprintf(pip,"X-Newsreader: %s",p); else if ((p=hdr("RFC-X-Newsreader",kmsg))) fprintf(pip,"X-Newsreader: %s",p); else if ((p=hdr("X-Newsreader",kmsg))) fprintf(pip,"X-Newsreader: %s",p); else if ((p=hdr("PID",kmsg))) fprintf(pip,"X-Newsreader: %s",p); } else { if ((p=hdr("X-Mailer",msg))) fprintf(pip,"X-Mailer:%s",p); else if ((p=hdr("RFC-X-Mailer",kmsg))) fprintf(pip,"X-Mailer: %s",p); else if ((p=hdr("X-Mailer",kmsg))) fprintf(pip,"X-Mailer: %s",p); else if ((p=hdr("PID",kmsg))) fprintf(pip,"X-Mailer: %s",p); } #ifdef GATEBAU_MSGID if (gatebaumode==1) #ifdef XGATEWAY_STRICT if ((p=hdr("X-GATEWAY",kmsg))) { if ((q=strchr(p,'\n'))) *q='\0'; fprintf(pip,"X-Gateway: %s, FIDO .. %s [ifmail %s]\n", p,myfqdn,version); if (q) *q='\n'; } #else fprintf(pip,"X-Gateway: FIDO .. %s [ifmail %s]\n",myfqdn,version); #endif #endif for (tmsg=msg;tmsg;tmsg=tmsg->next) { if (strcasecmp(tmsg->key,"X-Body-Start") && #ifdef PCBOARD_GATE strcasecmp(tmsg->key,"X-PcBoard-FROM") && strcasecmp(tmsg->key,"X-PcBoard-SUBJECT") && strcasecmp(tmsg->key,"X-PcBoard-PACKOUT") && #endif #ifdef ALLOW_CONTROL strcasecmp(tmsg->key,"Control") && #endif strcasecmp(tmsg->key,"Supersedes") && strcasecmp(tmsg->key,"Mime-Version") && strcasecmp(tmsg->key,"Content-Type") && strcasecmp(tmsg->key,"Content-Lenght") && strcasecmp(tmsg->key,"Content-Transfer-Encoding") && strcasecmp(tmsg->key,"Lines") && strcasecmp(tmsg->key,"Path") && strcasecmp(tmsg->key,"Received") && strcasecmp(tmsg->key,"From") && strcasecmp(tmsg->key,"To") && strcasecmp(tmsg->key,"Comment-To") && strcasecmp(tmsg->key,"X-Comment-To") && strcasecmp(tmsg->key,"Date") && strcasecmp(tmsg->key,"Subject") && strcasecmp(tmsg->key,"Reply-To") && strcasecmp(tmsg->key,"In-Reply-To") && strcasecmp(tmsg->key,"References") && strcasecmp(tmsg->key,"Organization") && strcasecmp(tmsg->key,"X-Mailer") && strcasecmp(tmsg->key,"X-Newsreader") && (strcasecmp(tmsg->key,"Newsgroups") || !newsmode) && strcasecmp(tmsg->key,"Apparently-To") && strcasecmp(tmsg->key,"Distribution") && strcasecmp(tmsg->key,"Approved") && strcasecmp(tmsg->key,"Message-ID")) fprintf(pip,"%s:%s",tmsg->key,hdrconv(tmsg->val,outcode,incode)); } if ((p=compose_flags(flags,hdr("FLAGS",kmsg)))) { fprintf(pip,"X-FTN-FLAGS:%s\n",p); free(p); } for (tmsg=kmsg;tmsg;tmsg=tmsg->next) { if (strcasecmp(tmsg->key,"INTL") && strcasecmp(tmsg->key,"FMPT") && strcasecmp(tmsg->key,"TOPT") && strcasecmp(tmsg->key,"FLAGS") && strcasecmp(tmsg->key,"CHARSET") && strcasecmp(tmsg->key,"CHRS") && strcasecmp(tmsg->key,"CODEPAGE") && strcasecmp(tmsg->key,"ORIGCHRS") && #ifdef FORCE_REPLYTO_LOCAL strcasecmp(tmsg->key,"REPLYTO") && strcasecmp(tmsg->key,"REPLYADDR") && #endif /* RFC: is used by fidogate to tell how completly RFC headers were gated (0=no headers at all; 1=some headers; 2=all headers) */ strcasecmp(tmsg->key,"RFC") && strcasecmp(tmsg->key,"RFCID") && strcasecmp(tmsg->key,"ORIGID") && strcasecmp(tmsg->key,"ORIGREF") && strcasecmp(tmsg->key,"X-GATEWAY") && strcasecmp(tmsg->key,"Lines") && /* strcmp(tmsg->key,"Path") && */ strcasecmp(tmsg->key,"PATH") && strcasecmp(tmsg->key,"Received") && strcasecmp(tmsg->key,"From") && strcasecmp(tmsg->key,"To") && strcasecmp(tmsg->key,"Comment-To") && strcasecmp(tmsg->key,"X-Comment-To") && strcasecmp(tmsg->key,"Date") && strcasecmp(tmsg->key,"Subject") && strcasecmp(tmsg->key,"Reply-To") && strcasecmp(tmsg->key,"In-Reply-To") && strcasecmp(tmsg->key,"References") && strcasecmp(tmsg->key,"Organization") && strcasecmp(tmsg->key,"X-Mailer") && strcasecmp(tmsg->key,"X-Newsreader") && (strcasecmp(tmsg->key,"Newsgroups") || !newsmode) && strcasecmp(tmsg->key,"Apparently-To") && strcasecmp(tmsg->key,"Message-ID") && strcasecmp(tmsg->key,"Mime-Version") && strcasecmp(tmsg->key,"Content-Type") && strcasecmp(tmsg->key,"Content-Lenght") && strcasecmp(tmsg->key,"Content-Transfer-Encoding") && #ifdef ALLOW_CONTROL strcasecmp(tmsg->key,"RFC-Control") && #endif strcasecmp(tmsg->key,"RFC-Supersedes") && strcasecmp(tmsg->key,"RFC-Mime-Version") && strcasecmp(tmsg->key,"RFC-Content-Type") && strcasecmp(tmsg->key,"RFC-Content-Lenght") && strcasecmp(tmsg->key,"RFC-Content-Transfer-Encoding") && strcasecmp(tmsg->key,"RFC-Lines") && strcasecmp(tmsg->key,"RFC-Path") && strcasecmp(tmsg->key,"RFC-Received") && strcasecmp(tmsg->key,"RFC-From") && strcasecmp(tmsg->key,"RFC-To") && strcasecmp(tmsg->key,"RFC-Comment-To") && strcasecmp(tmsg->key,"RFC-X-Comment-To") && strcasecmp(tmsg->key,"RFC-Date") && strcasecmp(tmsg->key,"RFC-Subject") && strcasecmp(tmsg->key,"RFC-Reply-To") && strcasecmp(tmsg->key,"RFC-In-Reply-To") && strcasecmp(tmsg->key,"RFC-References") && strcasecmp(tmsg->key,"RFC-Organization") && strcasecmp(tmsg->key,"RFC-X-Mailer") && strcasecmp(tmsg->key,"RFC-X-Newsreader") && (strcasecmp(tmsg->key,"RFC-Newsgroups") || !newsmode) && strcasecmp(tmsg->key,"RFC-Apparently-To") && strcasecmp(tmsg->key,"RFC-Distribution") && strcasecmp(tmsg->key,"RFC-Approved") && strcasecmp(tmsg->key,"RFC-Message-ID")) if (!strncmp(tmsg->key,"RFC-",4)) fprintf(pip,"%s: %s",tmsg->key+4,hdrconv(tmsg->val,outcode,incode)); else if ((!strncasecmp(tmsg->key,"X-",2)) || (!strncasecmp(tmsg->key,"NNTP-",5))) fprintf(pip,"%s: %s",tmsg->key,hdrconv(tmsg->val,outcode,incode)); else if ((!strncasecmp(tmsg->key,"ZC-",3))) fprintf(pip,"X-%s: %s",tmsg->key,tmsg->val); else if ((!strcasecmp(tmsg->key,"Origin")) || (!strcasecmp(tmsg->key,"MOOD"))) fprintf(pip,"X-FTN-%s: %s",tmsg->key,hdrconv(tmsg->val,outcode,incode)); else fprintf(pip,"X-FTN-%s: %s",tmsg->key,tmsg->val); } if (newsmode) { fa_list *tmpl,*ptl=NULL; char sbe[16]; int seenlen=0,oldnet; for (tmsg=kmsg;tmsg;tmsg=tmsg->next) if (!strcmp(tmsg->key,"PATH")) { fill_path(&ptl,tmsg->val); } sprintf(sbe,"%s",ascfnode(bestaka,0x06)); fill_path(&ptl,sbe); uniq_list(&ptl); /* ensure it will not match for the first entry */ oldnet=ptl->addr->net-1; fprintf(pip,"X-FTN-PATH:"); for (tmpl=ptl;tmpl;tmpl=tmpl->next) { if (tmpl->addr->net == oldnet) sprintf(sbe," %u",tmpl->addr->node); else sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); oldnet=tmpl->addr->net; seenlen+=strlen(sbe); if (seenlen > MAXPATH) { seenlen=0; fprintf(pip,"\nX-FTN-PATH:"); sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node); seenlen=strlen(sbe); } fprintf(pip,"%s",sbe); } fprintf(pip,"\n"); /* fprintf(pip,"X-FTN-PATH: %s\n",ascfnode(bestaka,0x06)); */ if ((hdr("X-FTN-SPTH",msg))) fprintf(pip,"X-FTN-SPTH: %s\n",ascfnode(bestaka,0x1f)); } fprintf(pip,"\n"); lines=0; if ((p=hdr("X-Body-Start",msg))) { lines++; fputs(strkconv(p, outcode, incode), pip); } pass=1; count=0; while(fgets(buf,sizeof(buf)-1,fp) && pass) { if (ftell(fp) > endoff) { debug(5,"line \"%s\" past message end %ld", buf,(long)endoff); pass=0; } if (pass) { p=buf; b=NULL; while ((c=*p++)) { switch (c) { case ' ': b=p-1; break; case '\n': b=NULL; count=0; lines++; break; } if ((count++ > BOUNDARY) && (!pgpsigned)) { if (b) { *b='\n'; p=b+1; b=NULL; lines++; count=0; } } } fputs(strkconv(buf, outcode, incode), pip); } } if ((modtype==1) && (!hdr("Approved",msg)) && (!hdr("RFC-Approved",kmsg)) && (!hdr("Approved",kmsg))) newsmode=0; if (newsmode) { sprintf(lineshdr,"Lines: %d\n",lines); rewind(pip); fstat(fileno(pip),&stbuf); fprintf(nb,"#! rnews %lu\n", (unsigned long)stbuf.st_size+strlen(lineshdr)); while (fgets(buf,sizeof(buf)-1,pip) && (buf[0] != '\n')) fputs(buf,nb); fputs(lineshdr,nb); fputs(buf,nb); while (fgets(buf,sizeof(buf)-1,pip)) fputs(buf,nb); } if (( (notransports || newsmode)?(rc=fclose(pip)):(rc=exclose(pip)) )) { logerr("$close of transport pipe or tmp file returned %d",rc); } tidyrfc(msg); if (rc < 0) rc=-rc; return rc; } #ifdef GATEBAU_MSGID /* converts the date to a string "YYMMDD_HHMMSS" */ char *gatebaudate(now) time_t now; { static char buf[40]; struct tm ptm; if (!now) time(&now); ptm=*localtime(&now); sprintf(buf,"%02d%02d%02d_%02d%02d%02d", ptm.tm_year%100,(ptm.tm_mon)+1,ptm.tm_mday, ptm.tm_hour,ptm.tm_min,ptm.tm_sec); return(buf); } #endif ifmail-2.14tx8.10.orig/ifgate/nlindex.c100644 1751 50 6135 6420407564 15226 0ustar mdsrc#include #include #include #include #include #include #include "directory.h" #include #ifdef HAS_NDBM_H #include #else #include #endif #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "nodecheck.h" #include "nlindex.h" #ifndef IF_DBM_SUFFIX #ifdef HAS_BSD_DB #define IF_DBM_SUFFIX ".db" #else #define IF_DBM_SUFFIX ".dir" #endif #endif #ifdef HAS_NDBM_H DBM *nldb=NULL; #endif int openstatus = 0; int n; DIR *dp; struct dirent *de; struct _nodelist *nodevector; int initnl(void) { int i,rc; fa_list *tmp; time_t lastmtime; struct stat stbuf; char *indexnm,*nlnm=NULL,*p; if (openstatus > 1) return openstatus; if (openstatus == 1) return 0; n=0; for (tmp=nllist;tmp;tmp=tmp->next) n++; debug(20,"Initialize %d nodelists",n); nodevector=(struct _nodelist *)xmalloc(n * sizeof(struct _nodelist)); lastmtime=configtime; i=0; for (tmp=nllist;tmp;tmp=tmp->next) { if (tmp->addr->domain) nodevector[i].domain=tmp->addr->domain; else if (whoami->addr->domain) nodevector[i].domain=whoami->addr->domain; else nodevector[i].domain="fidonet"; nlnm=xstrcpy(tmp->addr->name); if ((rc=stat(tmp->addr->name,&stbuf)) != 0) { int next,mext=0; if (nlnm) free(nlnm); if ((nlnm=strrchr(tmp->addr->name,'/'))) nlnm++; else nlnm=tmp->addr->name; if (dp == NULL) dp=opendir(nlbase); if (dp != NULL) { rewinddir(dp); while ((de=readdir(dp))) if (strncmp(de->d_name,nlnm,strlen(nlnm)) == 0) { p=(de->d_name)+strlen(nlnm); if ((*p == '.') && (strlen(p) == 4) && (strspn(p+1,"0123456789") == 3)) { next=atoi(p+1); if (next > mext) mext=next; } } } else logerr("$cannot open \"%s\" directory",S(nlbase)); nlnm=xstrcpy(tmp->addr->name); nlnm=xstrcat(nlnm,".999"); sprintf(nlnm+strlen(nlnm)-3,"%03d",mext); debug(20,"try \"%s\" nodelist",S(nlnm)); rc=stat(nlnm,&stbuf); } if (rc == 0) { if (stbuf.st_mtime > lastmtime) lastmtime=stbuf.st_mtime; nodevector[i].fp=fopen(nlnm,"r"); if (nodevector[i].fp == NULL) logerr("$cannot open nodelist \"%s\"",S(nlnm)); else debug(20,"opened nodelist \"%s\"",S(nlnm)); } else { logerr("$cannot stat nodelist \"%s\"", S(tmp->addr->name)); nodevector[i].fp=NULL; } i++; if (nlnm) free(nlnm); } if (dp != NULL) closedir(dp); dp=NULL; for (i=0;i 1) { openstatus=2; logerr("$cannot open nodelist index (%d)",rc); } else openstatus=1; return rc; } ifmail-2.14tx8.10.orig/ifgate/nodecheck.c100644 1751 50 2113 6152014134 15465 0ustar mdsrc#include #include #include #include #include #include #include #ifdef HAS_NDBM_H #include #include #else #include #endif #include "directory.h" #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "nodecheck.h" #include "nlindex.h" #include "needed.h" int chknlent(addr) faddr *addr; { struct _ixentry xaddr; datum key; datum dat; int n; debug(20,"chknlent for %s",ascfnode(addr,0x1f)); key.dptr=(char*)&xaddr; key.dsize=sizeof(struct _ixentry); if (addr == NULL) return(0); xaddr.zone=addr->zone; xaddr.net=addr->net; xaddr.node=addr->node; xaddr.point=0; /* We only check if the node/boss exist */ switch (initnl()) { case 0: break; case 1: loginf("WARNING: nodelist index needs to be rebuilt with \"ifindex\""); break; default: return(0); } #ifdef HAS_NDBM_H dat=dbm_fetch(nldb,key); #else dat=fetch(key); #endif if (dat.dptr == NULL) return(0); n=dat.dsize/sizeof(struct _loc); debug(20,"found %d entries",n); return(1); } ifmail-2.14tx8.10.orig/ifgate/ifunpack.c100644 1751 50 14654 6352307527 15414 0ustar mdsrc#include #include #include #include #include #include #include #include #include #if defined(HAS_STATFS) #if defined(STATFS_IN_VFS_H) #include #elif defined(STATFS_IN_STATFS_H) #include #elif defined(STATFS_IN_STATVFS_H) #include #elif defined(STATFS_IN_MOUNT_H) #include #include #else #error No include for statfs() call defined #endif #elif defined(HAS_STATVFS) #include #endif #include "directory.h" #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "xutil.h" #include "lutil.h" #include "config.h" #include "version.h" #include "trap.h" #define UNPACK_FACTOR 300 #define TOSS_FACTOR 120 #ifndef NEWSSPOOL #define NEWSSPOOL "/var/spool/news" #endif #define TMPNAME "TMP." #define LCKNAME "LOCKFILE" extern char* logname; static int lockunpack(void); static void ulockunpack(void); static int unpack(char *); static int toss(char *); #if defined(HAS_STATFS) || defined(HAS_STATVFS) static int checkspace(char *,char *,int); static char *newsspool=NEWSSPOOL; #endif extern int f_lock(char *); extern void funlock(int); extern int execute(char *,char *,char *,char *,char *,char *); extern char *unpacker(char *); void usage(void) { confusage(""); } int main(argc,argv) int argc; char *argv[]; { int c; int rc=0,maxrc=0; int files=0,files_ok=0,packets=0,packets_ok=0; DIR *dp; struct dirent *de; #if defined(HAS_SYSLOG) && defined(MAILLOG) logfacility=MAILLOG; #endif setmyname(argv[0]); catch(myname); while ((c=getopt(argc,argv,"hx:I:")) != -1) if (confopt(c,optarg)) switch (c) { default: usage(); exit(1); } if (readconfig()) { fprintf(stderr,"Error getting configuration, aborting\n"); exit(1); } if (chdir(protinbound) == -1) { logerr("$Error changing to directory %s",S(protinbound)); exit(1); } if ((dp=opendir(protinbound)) == NULL) { logerr("$Error opening directory %s",S(protinbound)); exit(1); } if (lockunpack()) exit(0); umask(066); while((de=readdir(dp))) if ((strlen(de->d_name) == 12) && ((strncasecmp(de->d_name+8,".su",3) == 0) || (strncasecmp(de->d_name+8,".mo",3) == 0) || (strncasecmp(de->d_name+8,".tu",3) == 0) || (strncasecmp(de->d_name+8,".we",3) == 0) || (strncasecmp(de->d_name+8,".th",3) == 0) || (strncasecmp(de->d_name+8,".fr",3) == 0) || (strncasecmp(de->d_name+8,".sa",3) == 0))) { files++; #if defined(HAS_STATFS) | defined(HAS_STATVFS) if (checkspace(protinbound,de->d_name,UNPACK_FACTOR)) #endif if ((rc=unpack(de->d_name)) == 0) files_ok++; else logerr("Error unpacking file %s",de->d_name); #if defined(HAS_STATFS) | defined(HAS_STATVFS) else loginf("Insufficient space to unpack file %s",de->d_name); #endif if (rc > maxrc) maxrc=rc; } rewinddir(dp); while((de=readdir(dp))) if ((strlen(de->d_name) == 12) && (strncasecmp(de->d_name+8,".pkt",4) == 0)) { packets++; #if defined(HAS_STATFS) | defined(HAS_STATVFS) if (checkspace(newsspool,de->d_name,TOSS_FACTOR)) #endif if ((rc=toss(de->d_name)) == 0) packets_ok++; else logerr("Error tossing packet %s",de->d_name); #if defined(HAS_STATFS) | defined(HAS_STATVFS) else loginf("Insufficient space to toss packet %s",de->d_name); #endif if (rc > maxrc) maxrc=rc; } closedir(dp); if (files || packets) loginf("processed %d of %d files, %d of %d packets, rc=%d", files_ok,files,packets_ok,packets,maxrc); ulockunpack(); return maxrc; } int unpack(fn) char *fn; { char newname[16]; char *cmd; int rc,ld; if ((cmd=unpacker(fn)) == NULL) return 1; if ((ld=f_lock(fn)) == -1) return 1; rc=execute(cmd,fn,(char *)NULL,"/dev/null",logname,logname); if (rc == 0) unlink(fn); else { strncpy(newname,fn,sizeof(newname)-1); strcpy(newname+8,".bad"); rename(fn,newname); } funlock(ld); return rc; } int toss(fn) char *fn; { int rc,ld; char newname[16]; char *cmd,tmpb[32],*p; int i; if ((ld=f_lock(fn)) == -1) return 1; p=tmpb; *p='\0'; for (i=0;i<26;i++) if (verbose & (1< sfs.f_bfree) { loginf("Only %lu %lu-byte blocks left on device where %s is located", sfs.f_bfree,sfs.f_bsize,S(dir)); return 0; } return 1; } #endif ifmail-2.14tx8.10.orig/ifgate/unpacker.c100644 1751 50 3744 6275002453 15374 0ustar mdsrc/* ### Modified by P.Saratxaga on 5 Sep 1995 ### * - I change the way ifmail recognizes archivers format, and added unrar */ #include #include #include "lutil.h" #include "config.h" char *unpacker(fn) char *fn; { FILE *fp; unsigned char buf[24],dbuf[240]; int i; if ((fp=fopen(fn,"r")) == NULL) { logerr("$Could not open file %s",S(fn)); return NULL; } if (fread(buf,1,sizeof(buf),fp) != sizeof(buf)) { logerr("$Could not read head of the file %s",S(fn)); return NULL; } fclose(fp); dbuf[0]='\0'; for (i=0;i= ' ') && (buf[i] <= 127)) sprintf((char*)dbuf+strlen(dbuf)," %c",buf[i]); else sprintf((char*)dbuf+strlen(dbuf)," %02x",buf[i]); debug(2,"file head: %s",dbuf); /* Changed checking according to data from GUS (from the docs) written by Johan Zwiekhorst , for a more accurate recognition and to add some other unpackers (I wanted rar, as I have unrar, but added all the others; who knows, maybe it can be usefull for somebody else */ if (memcmp(buf,"Rar!\32\007\000",7) == 0) return unrar; /* RAR */ if (memcmp(buf,"HLSQZ",5) == 0) return unsqz; /* SQZ */ if (memcmp(buf,"PK",2) == 0) return unzip; /* ZIP */ if (memcmp(buf,"HPAK",4) == 0) return unhpk; /* HPK */ if (memcmp(buf,"UC2\032",4) == 0) return unuc2; /* UC2 */ if (memcmp(buf,"\2213HF",4) == 0) return unhap; /* HAP */ if (memcmp(buf+20,"\334\247\304\375",4) == 0) return unzoo; /* ZOO */ if ((memcmp(buf+2,"-l",2) == 0) && (memcmp(buf+6,"-",1) == 0)) return unlzh; /* LHarc */ if (memcmp(buf,"HA",2) == 0) return unha; /* HA */ if (memcmp(buf,"`\352",2) == 0) return unarj; /* ARJ */ if (memcmp(buf,"\032Jar\033",5)==0) return unjar; /* JAR */ if (*buf == 0x1a) return unarc; /* arc */ logerr("Unknown compress scheme in file %s",S(fn)); return NULL; } ifmail-2.14tx8.10.orig/ifgate/ifpack.c100644 1751 50 21775 6374442063 15052 0ustar mdsrc#include #include #include #include #include "directory.h" #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "config.h" #include "scanout.h" #include "version.h" #include "trap.h" #include "needed.h" #define CURRENT "current.tmp" #define MAXPACK 12 #define PACKFACTOR 0.4 #ifndef FAKEDIR #define FAKEDIR "/tmp/ifmail/" #endif extern int f_lock(char *); extern void funlock(int); extern int nodelock(faddr *); extern int nodeulock(faddr *); extern int execute(char *,char *,char *,char *,char *,char *); extern INT32 sequencer(void); extern char *arcname(faddr *,char); extern char *floname(faddr *,char); extern char *splname(faddr *,char); extern char *pkdname(faddr *,char); extern char *logname; extern int fakeoutbound; static int each1(faddr*,char,int,char*); static int each2(faddr*,char,int,char*); static int packets=0,files=0,directions=0; static int forced=0; static char *dow[] = {"su","mo","tu","we","th","fr","sa"}; static char *ext; void usage(name) char *name; { confusage("-N -f"); fprintf(stderr,_("-N\t\tprocess %s directory\n"),FAKEDIR); fprintf(stderr,_("-f\t\tpack *.?ut files too\n")); } int main(argc,argv) int argc; char *argv[]; { int c,rc; time_t tt; struct tm *ptm; #if defined(HAS_SYSLOG) && defined(MAILLOG) logfacility=MAILLOG; #endif setmyname(argv[0]); catch(myname); while ((c=getopt(argc,argv,"x:I:hNf")) != -1) if (confopt(c,optarg)) switch (c) { case 'N': fakeoutbound=1; break; case 'f': forced=1; break; default: usage(); exit(1); } umask(066); if ((rc=readconfig())) { logerr("Error getting configuration, aborting\n"); return rc; } (void)time(&tt); ptm=localtime(&tt); ext=dow[ptm->tm_wday]; debug(3,"today's arcmail extention \"%s\"",ext); if ((rc=scanout(each1))) { logerr("Error scanning outbound (pass 1), aborting\n"); return rc; } if ((rc=scanout(each2))) { logerr("Error scanning outbound (pass 2), aborting\n"); return rc; } if (packets) loginf("packed %d packet%s into %d file%s for %d feed%s, rc=%d", packets,(packets==1)?"":"s", files,(files==1)?"":"s", directions,(directions==1)?"":"s", rc); return rc; } /* pass 1: move all pending packets into .?pk direcrories (with locking) */ static int each1(addr,flavor,isflo,pktfn) faddr *addr; char flavor; int isflo; char *pktfn; { char buf[25],*p; int pl; struct stat stbuf; switch (isflo) { case OUT_FLO: case OUT_REQ: return 0; case OUT_ARC: if (strncasecmp(pktfn+strlen(pktfn)-3,ext,2) == 0) return 0; if ((stat(pktfn,&stbuf) == 0) && (stbuf.st_size == 0)) { debug(3,"unlink non-todays empty arcmail \"%s\"", pktfn); unlink(pktfn); } return 0; case OUT_PKT: if (!forced) return 0; debug(3,"pass 1: packet \"%s\" to node %s", S(pktfn),ascfnode(addr,0x1f)); if ((p=strrchr(pktfn,'/'))) { *p='\0'; if (chdir(pktfn)) { logerr("$cannot chdir(\"%s\")",S(pktfn)); return 1; } p++; } else { logerr("cannot be: packet name \"%s\" without slash", S(pktfn)); return 1; } if (nodelock(addr)) { debug(3,"system %s locked, skipping", ascfnode(addr,0x1f)); return 0; } if ((pl=f_lock(p)) == -1) { debug(3,"cannot lock packet \"%s\", skipping", S(p)); nodeulock(addr); return 0; } strcpy(buf,pkdname(addr,flavor)); mkdir(buf,0777); sprintf(buf+strlen(buf),"/%08lx.pkt", (unsigned long)sequencer()); if (rename(p,buf) < 0) { logerr("$cannot rename \"%s\" to \"%s\"", S(p),buf); } else { debug(3,"renamed \"%s\" to \"%s\"", S(p),buf); } funlock(pl); nodeulock(addr); return 0; case OUT_DIR: debug(3,"pass 1: directory \"%s\" to node %s", S(pktfn),ascfnode(addr,0x1f)); if (chdir(pktfn)) { logerr("$cannot chdir(\"%s\")",S(pktfn)); return 1; } if (stat(CURRENT,&stbuf)) { return 0; } if (nodelock(addr)) { debug(3,"system %s locked, skipping", ascfnode(addr,0x1f)); return 0; } if ((pl=f_lock(CURRENT)) == -1) { debug(3,"cannot lock \"%s\", ignore",S(pktfn)); nodeulock(addr); return 0; } sprintf(buf,"%08lx.pkt",(unsigned long)sequencer()); if (rename(CURRENT,buf) < 0) { logerr("$cannot rename \"%s\" to \"%s\"", CURRENT,buf); } else { debug(3,"renamed \"%s\" to \"%s\"", CURRENT,buf); } funlock(pl); nodeulock(addr); return 0; default: /* this cannot be, abort */ logerr("Cannot be: isflo=%d",isflo); return 1; } } /* pass 2: pack prepared packets (no locking needed) */ static int each2(addr,flavor,isflo,pktfn) faddr *addr; char flavor; int isflo; char *pktfn; { int rc=0; int absent,needadd,numpkts; int didpack=0; char c,*p,*q,*pkt; char *flofn,*arcfn,*splfn,*pktlist=NULL; char buf[512]; FILE *fp=NULL; DIR *dp=NULL; struct dirent *de; struct flock fl; struct stat stbuf; off_t arcsize,sumsize; if (isflo != OUT_DIR) return 0; if (chdir(pktfn)) { logerr("$cannot chdir to \"%s\"",S(pktfn)); return 1; } if (nodelock(addr)) { debug(3,"system %s locked, skipping", ascfnode(addr,0x1f)); return 0; } debug(3,"pass 2: %s \"%s\" to node %s", (isflo == OUT_PKT)?"packet":"directory", S(pktfn),ascfnode(addr,0x1f)); arcfn=xstrcpy(arcname(addr,flavor)); flofn=xstrcpy(floname(addr,flavor)); splfn=xstrcpy(splname(addr,flavor)); fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if ((fp=fopen(flofn,"r+"))) { if (fcntl(fileno(fp),F_SETLK,&fl) < 0) { if (errno != EAGAIN) logerr("$Unable to lock flo file \"%s\"",S(flofn)); else debug(3,"skipping locked flo file \"%s\"",S(flofn)); goto leave; } if (stat(flofn,&stbuf) != 0) { debug(3,"$Unable to access flo file \"%s\"",S(flofn)); goto leave; } } p=arcfn+strlen(arcfn)-1; absent=1; if (fp) while (fgets(buf,sizeof(buf)-1,fp)) { if ((buf[0] != '~') && (strncmp(buf+1,arcfn,strlen(arcfn)-1) == 0)) { absent=0; c=buf[strlen(arcfn)]; if (*p < c) *p=c; debug(3,"old arcmail file \"%s\"", S(arcfn)); } } needadd=0; if (absent || (stat(splfn,&stbuf) == 0)) { debug(3,"new arcmail file needed"); needadd=1; unlink(splfn); while (stat(arcfn,&stbuf) == 0) if (*p == '9') *p='a'; else if (*p < 'z') (*p)++; else break; } if ((dp=opendir(pktfn)) == NULL) { logerr("$cannot open directory \"%s\"",S(pktfn)); rc=1; goto leave; } while (1) { if (stat(arcfn,&stbuf) || (*p == 'z')) arcsize=0L; else arcsize=stbuf.st_size; if ((maxfsize > 0) && (arcsize > maxfsize)) { debug(3,"arc file \"%s\" too big, make new", arcfn); while (stat(arcfn,&stbuf) == 0) if (*p == '9') *p='a'; else if (*p < 'z') (*p)++; else break; needadd=1; continue; } debug(3,"using .flo file \"%s\", arc file \"%s\" (%lu)%s", S(flofn),S(arcfn),(unsigned long)arcsize, needadd?", needadd":""); if (pktlist) free(pktlist); pktlist=NULL; sumsize=0L; numpkts=0; do { de=readdir(dp); if (de == NULL) break; if ((strspn(de->d_name,"0123456789abcdefABCDEF") != 8) || (strcasecmp(de->d_name+8,".pkt") != 0)) continue; if (stat(de->d_name,&stbuf)) { logerr("$cannot stat \"%s\"",de->d_name); rc=1; goto leave; } sumsize += stbuf.st_size; if (pktlist) pktlist=xstrcat(pktlist," "); pktlist=xstrcat(pktlist,de->d_name); numpkts++; } while ((numpkts < MAXPACK) && ((sumsize * PACKFACTOR) < (maxfsize-arcsize))); /* At least one packet is added */ debug(3,"pktlist: \"%s\"",S(pktlist)); if (pktlist == NULL) goto leave; rc=execute(packer,arcfn,pktlist,"/dev/null",logname,logname); if (rc == 0) { packets+=numpkts; files++; didpack=1; for (pkt=strtok(pktlist," ");pkt;pkt=strtok(NULL," ")) { debug(3,"unlink \"%s\"",pkt); unlink(pkt); } if (needadd) { if (stat(arcfn,&stbuf) == 0) debug(3,"adding \"%s\" (%lu) to flo", S(arcfn), (unsigned long)stbuf.st_size); if (fp == NULL) { fp=fopen(flofn,"w"); if (fp == NULL) { logerr("$could not open flo file \"%s\"", S(flofn)); rc=1; goto leave; } if (fcntl(fileno(fp),F_SETLK,&fl) < 0) { if (errno != EAGAIN) logerr("$Unable to lock flo file \"%s\"",S(flofn)); else debug(3,"skipping locked flo file \"%s\"",S(flofn)); goto leave; } } if (dosoutbound) { fprintf(fp,"#%s",dosoutbound); if (*(dosoutbound+ strlen(dosoutbound)-1) != '\\') fputc('\\',fp); if (*(q=arcfn+strlen(outbound)) == '/') q++; for (;*q;q++) fputc((*q == '/')?'\\':*q,fp); fputc('\r',fp); fputc('\n',fp); } else fprintf(fp,"#%s\n",arcfn); needadd=0; } } else goto leave; } leave: directions+=didpack; debug(3,"leaving each2 with rc=%d",rc); nodeulock(addr); if (pktlist) free(pktlist); if (fp) fclose(fp); if (dp) closedir(dp); free(arcfn); free(flofn); free(splfn); return rc; } ifmail-2.14tx8.10.orig/ifgate/flock.c100644 1751 50 1634 6014367364 14664 0ustar mdsrc#include #include #include #include #include #include #include "lutil.h" int f_lock(fn) char *fn; { int lfd=-1; struct flock fl; struct stat st; if (fn) { if ((lfd=open(fn,O_RDWR | O_CREAT)) < 0) { logerr("$Error opening file %s",fn); return -1; } fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; fl.l_pid=getpid(); if (fcntl(lfd,F_SETLK,&fl) != 0) { if (errno != EAGAIN) loginf("$Error locking file %s",fn); close(lfd); return -1; } if (stat(fn,&st) != 0) { logerr("$Error accessing file %s",fn); close(lfd); return -1; } } return lfd; } void funlock(fd) int fd; { /* struct flock fl; fl.l_type=F_UNLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; fl.l_pid=getpid(); if (fcntl(fd,F_SETLK,&fl) != 0) { logerr("$Error ulocking fd %d",fd); } */ close(fd); return; } ifmail-2.14tx8.10.orig/ifgate/backalias.c100644 1751 50 2744 6050161225 15467 0ustar mdsrc#include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "needed.h" char *backalias(faddr *); void readalias(char *); static struct aliaslist { struct aliaslist *next; faddr *addr; char *alias; } *alist = NULL; char *backalias(fa) faddr *fa; { struct aliaslist *tmp; for (tmp=alist;tmp;tmp=tmp->next) if ((!fa->domain || !tmp->addr->domain || !strcasecmp(fa->domain,tmp->addr->domain)) && (!fa->zone || (fa->zone == tmp->addr->zone)) && (fa->net == tmp->addr->net) && (fa->node == tmp->addr->node) && (fa->point == tmp->addr->point) && (fa->name) && (tmp->addr->name) && (strcasecmp(fa->name,tmp->addr->name) == 0)) { debug(6,"Address \"%s\" has local alias \"%s\"", ascinode(fa,0x7f),S(tmp->alias)); return tmp->alias; } return NULL; } void readalias(fn) char *fn; { FILE *fp; char buf[256],*k,*v; struct aliaslist *tmp=NULL; faddr *ta = NULL; if ((fp=fopen(fn,"r")) == NULL) { logerr("$cannot open system alias file %s",S(fn)); return; } while (fgets(buf,sizeof(buf)-1,fp)) { k=strtok(buf," \t:"); v=strtok(NULL," \t:"); if (k && v) if ((ta=parsefaddr(v))) { if (alist) { tmp->next=(struct aliaslist *) xmalloc(sizeof(struct aliaslist)); tmp=tmp->next; } else { alist=(struct aliaslist *) xmalloc(sizeof(struct aliaslist)); tmp=alist; } tmp->next=NULL; tmp->addr=ta; ta=NULL; tmp->alias=xstrcpy(k); } } fclose(fp); } ifmail-2.14tx8.10.orig/ifgate/msgidbm.c100644 1751 50 6750 6420407564 15212 0ustar mdsrc#ifdef HAS_NDBM_H #include #include #include #include #include #include #include #include #include "lutil.h" #include "xutil.h" #include "config.h" #include "ftn.h" #include "rfcaddr.h" #ifndef IF_DBM_SUFFIX #ifdef HAS_BSD_DB #define IF_DBM_SUFFIX ".db" #else #define IF_DBM_SUFFIX ".dir" #endif #endif static DBM *id_db = NULL; static int opened = 0; static int fillidb(void); static int init(void) { int needbuild; struct stat stbuf1; char buf[128]; struct stat stbuf2; #ifndef HAS_BSD_DB FILE *fp; #endif if ((msgidbm == NULL) || (newslog == NULL)) return -1; if (opened == -1) return -1; if (stat(newslog,&stbuf1) != 0) return -1; if (opened) return 0; needbuild=0; sprintf(buf,"%s" IF_DBM_SUFFIX,msgidbm); if ((stat(buf,&stbuf2) != 0) || (stbuf1.st_mtime > stbuf2.st_mtime)) { loginf("SEEN-BY database rebuild requested"); needbuild=1; sprintf(buf,"%s" IF_DBM_SUFFIX,msgidbm); #ifdef HAS_BSD_DB unlink(buf); #else if ((fp=fopen(buf,"w"))) fclose(fp); sprintf(buf,"%s.pag",msgidbm); if ((fp=fopen(buf,"w"))) fclose(fp); #endif } if ((id_db=dbm_open(msgidbm,O_RDWR | O_CREAT,0600)) == NULL) { opened = -1; return -1; } opened = 1; if (needbuild) return fillidb(); return 0; } static int fillidb(void) { datum key,val; char buf[128],*line=NULL,se[16],*seen=NULL,*p,*q,*pe,*id; faddr *fa = NULL; FILE *fp; int n=0; if ((fp=fopen(newslog,"r")) == NULL) return -1; while (!feof(fp)) { while (((line == NULL) || (line[strlen(line)-1] != '\n')) && (fgets(buf,sizeof(buf)-1,fp))) line=xstrcat(line,buf); if (line == NULL) goto nextline; pe=line+strlen(line); strtok(line," \t\n"); /* Month */ strtok(NULL," \t\n"); /* Date */ strtok(NULL," \t\n"); /* Time */ if ((p=strtok(NULL," \t\n")) != NULL) { if (*p == '+') /* INN style log */ { p=strtok(NULL," \t\n"); /* skip source host */ } else /* maybe cnews style log? */ { if (((p=strtok(NULL," \t\n")) == NULL) || (*p != '+')) goto nextline; } } debug(8,"good log entry for %s",p); if ((id=strtok(NULL," \t\n")) == NULL) goto nextline; /* some witchkraft with char *q,*pe is needed because */ /* otherwise strtok called from within parsefaddr will */ /* interfere with strtok in the while cycle */ q=NULL; while ((p=strtok(q," \t\n"))) { if ((q=p+strlen(p)+1) >= pe) q=NULL; debug(8,"try parse %s",p); if ((fa=parsefaddr(p))) { sprintf(se,"%s ", ascfnode(fa,0x06)); seen=xstrcat(seen,se); debug(8,"new seen: \"%s\"",seen); tidy_faddr(fa); } else debug(8,"unparsable: %s",addrerrstr(addrerror)); } if (seen) { key.dptr=id; key.dsize=strlen(id); val.dptr=seen; val.dsize=strlen(seen); *(seen+strlen(seen)-1) = '\0'; if (dbm_store(id_db,key,val,0) < 0) logerr("$cannot store: \"%s\" \"%s\"",id,seen); else debug(8,"seen-by for \"%s\" is \"%s\"",id,seen); n++; } nextline: if (seen) free(seen); seen=NULL; if (line) free(line); line=NULL; } loginf("SEEN-BY database now contains %d records",n); return 0; } char *idlookup(msgid) char *msgid; { datum key,val; if (init()) return ""; debug(8,"idlookup \"%s\"",S(msgid)); key.dptr=msgid; key.dsize=strlen(msgid); val=dbm_fetch(id_db,key); if (val.dptr) return val.dptr; else return ""; } #endif void close_id_db(void) { if (opened != 1) return; #ifndef DONT_HAVE_CLOSEDBM #ifdef HAS_NDBM_H dbm_close(id_db); #endif #endif opened=0; } ifmail-2.14tx8.10.orig/ifgate/attach.c100644 1751 50 4776 6222275145 15040 0ustar mdsrc/* ### Modified by P.Saratxaga on We 10 Jan 1996 ### * - added all inbound's abel to file attachs if -DRELAXED */ #include #include #include #include #include #include #include #include "ftn.h" #include "lutil.h" #include "config.h" #ifndef PATH_MAX #define PATH_MAX 512 #endif /* increase this if you want to forward files from list/norm inbound */ #ifndef RELAXED #define NUMDIRS 2 #else #define NUMDIRS 5 #endif extern FILE *openflo(faddr *,char); void try_attach(fn,mode,addr,flavor) char *fn; int mode; faddr *addr; char flavor; { FILE *flo; char pn[PATH_MAX],*p,*f; char *dirs[NUMDIRS]; int i,j; debug(3,"Trying fileattach \"%s\" (mode %d) to %s (flavor %c)", S(fn),mode,ascfnode(addr,0x1f),flavor); if (fn == NULL) return; if (strstr(fn,"/../") || strstr(fn,"/..\\") || strstr(fn,"\\../") || strstr(fn,"\\..\\")) { loginf("attempt to attach file from outside restricted area \"%s\"", fn); return; } /* NOTE: you cannot attach a file from any point of the filesystem because that would be a security hole: anyone would be able to get any file from your system (readable for ifmail) sending a message to himself with an ATT flag. */ dirs[0]=pubdir; dirs[1]=protinbound; #ifdef RELAXED dirs[2]=inbound; dirs[3]=norminbound; dirs[4]=listinbound; #endif /* add more... */ for (i=0;i 0) /* only received files can be killed */ switch (mode) { case 0: break; case 1: fprintf(flo,"#"); break; case 2: fprintf(flo,"^"); break; } fprintf(flo,"%s\n",pn); fclose(flo); loginf("Attached \"%s\" to %s", fn,ascfnode(addr,0x1f)); return; } } loginf("fileattach \"%s\" to %s failed: no file", S(fn),ascfnode(addr,0x1f)); return; } ifmail-2.14tx8.10.orig/ifgate/ifstat.c100644 1751 50 11326 6463053353 15075 0ustar mdsrc#include #include #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "config.h" #include "scanout.h" #include "version.h" #include "trap.h" void usage(name) char *name; { confusage(""); } static struct _alist { struct _alist *next; faddr addr; int flavors; time_t time; off_t size; } *alist=NULL; #define F_NORMAL 1 #define F_CRASH 2 #define F_HOLD 4 #define F_FREQ 8 static int each(faddr*,char,int,char*); int main(argc,argv) int argc; char *argv[]; { int c,rc; struct _alist *tmp; char flstr[5]; time_t age; char *unit; #if defined(HAS_SYSLOG) && defined(MAILLOG) logfacility=MAILLOG; #endif setmyname(argv[0]); catch(myname); while ((c=getopt(argc,argv,"x:l:h")) != -1) if (confopt(c,optarg)) switch (c) { default: usage(); exit(1); } if ((rc=readconfig())) { fprintf(stderr,"Error getting configuration, aborting\n"); return rc; } if ((rc=scanout(each))) { fprintf(stderr,"Error scanning outbound, aborting\n"); return rc; } printf("flavor size age\t\taddress\n"); for (tmp=alist;tmp;tmp=tmp->next) if ((tmp->flavors & F_FREQ) || (tmp->size)) { strcpy(flstr,"...."); if ((tmp->flavors) & F_CRASH ) flstr[0]='C'; if ((tmp->flavors) & F_NORMAL) flstr[1]='N'; if ((tmp->flavors) & F_HOLD ) flstr[2]='H'; if ((tmp->flavors) & F_FREQ ) flstr[3]='R'; (void)time(&age); age-=tmp->time; if (age > (30L*24L*60L*60L)) { age /= (30L*24L*60L*60L); unit="month"; } else if (age > (7L*24L*60L*60L)) { age /= (7L*24L*60L*60L); unit="week"; } else if (age > (24L*60L*60L)) { age /= (24L*60L*60L); unit="day"; } else if (age > (60L*60L)) { age /= (60L*60L); unit="hour"; } else if (age > 60L) { age /= 60L; unit="minute"; } else { unit="second"; } printf("%s %8lu %3d %s%s \t%s\n", flstr,(long)tmp->size,(int)age,unit,(age==1)?" ":"s", ascfnode(&(tmp->addr),0x1f)); } return 0; } static int each(addr,flavor,isflo,fname) faddr *addr; char flavor; int isflo; char *fname; { struct _alist **tmp; struct stat st; FILE *fp; char buf[256],buf2[256],*p,*q; if ((isflo != OUT_PKT) && (isflo != OUT_FLO) && (isflo != OUT_REQ)) return 0; for (tmp=&alist;*tmp;tmp=&((*tmp)->next)) if (((*tmp)->addr.zone == addr->zone) && ((*tmp)->addr.net == addr->net) && ((*tmp)->addr.node == addr->node) && ((*tmp)->addr.point == addr->point) && (((*tmp)->addr.domain == NULL) || (addr->domain == NULL) || (strcasecmp((*tmp)->addr.domain,addr->domain) == 0))) break; if (*tmp == NULL) { *tmp=(struct _alist *)xmalloc(sizeof(struct _alist)); (*tmp)->next=NULL; (*tmp)->addr.name=NULL; (*tmp)->addr.zone=addr->zone; (*tmp)->addr.net=addr->net; (*tmp)->addr.node=addr->node; (*tmp)->addr.point=addr->point; (*tmp)->addr.domain=addr->domain; (*tmp)->flavors=0; time(&((*tmp)->time)); (*tmp)->size=0L; } if ((isflo == OUT_FLO) || (isflo == OUT_PKT)) switch (flavor) { case '?': break; case 'o': (*tmp)->flavors |= F_NORMAL; break; case 'c': (*tmp)->flavors |= F_CRASH; break; case 'h': (*tmp)->flavors |= F_HOLD; break; default: fprintf(stderr,"Unknown flavor: '%c'\n",flavor); break; } if (stat(fname,&st) != 0) { perror("cannot stat"); st.st_size=0L; (void)time(&st.st_mtime); } if (st.st_mtime < (*tmp)->time) (*tmp)->time = st.st_mtime; if (isflo == OUT_FLO) { if ((fp=fopen(fname,"r"))) { while (fgets(buf,sizeof(buf)-1,fp)) { if (*(p=buf+strlen(buf)-1) == '\n') *p--='\0'; while (isspace(*p)) *p--='\0'; for (p=buf;*p;p++) if (*p == '\\') *p='/'; for (p=buf;*p && isspace(*p);p++); if (*p == '~') continue; if ((*p == '#') || (*p == '-') || (*p == '^') || (*p == '@')) p++; if (dosoutbound && (strncasecmp(p,dosoutbound, strlen(dosoutbound)) == 0)) { strcpy(buf2,outbound); for (p+=strlen(dosoutbound), q=buf2+strlen(buf2); *p;p++,q++) *q=((*p) == '\\')?'/' :tolower(*p); *q='\0'; p=buf2; } if (stat(p,&st) != 0) { perror("cannot stat"); st.st_size=0L; (void)time(&st.st_mtime); } if ((p=strrchr(fname,'/'))) p++; else p=fname; if ((strlen(p) == 12) && (strspn(p,"0123456789abcdefABCDEF") == 8) && (p[8] == '.')) { if (st.st_mtime < (*tmp)->time) (*tmp)->time = st.st_mtime; } (*tmp)->size += st.st_size; } fclose(fp); } else perror("cannot open flo"); } else if (isflo == OUT_PKT) { (*tmp)->size += st.st_size; } else if (isflo == OUT_REQ) { (*tmp)->flavors |= F_FREQ; } return 0; } ifmail-2.14tx8.10.orig/ifgate/lastmtime.c100644 1751 50 472 6014367372 15543 0ustar mdsrc#include #include #include int main(argc,argv) int argc; char *argv[]; { struct stat st; time_t t=0L; int i=1; while (argv[i]) { if (stat(argv[i],&st) == 0) if (st.st_mtime > t) t=st.st_mtime; i++; } if (t == 0L) time(&t); printf("%s",ctime(&t)); return 0; } ifmail-2.14tx8.10.orig/ifgate/body.c100644 1751 50 4664 6375047150 14527 0ustar mdsrc/* Changed to add charset support -- P.Saratxaga */ #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "rfcmsg.h" #include "config.h" #include "bwrite.h" #include "mime.h" #include "charset.h" #include "charconv.h" #include "version.h" #include "hash.h" #define TEXTBODY 0 #define NONTEXTBODY 1 #define MESSAGEBODY 2 #define MULTIPARTBODY 3 extern char *bgets(char *,int,FILE *); void putbody(level,msg,fp,pkt,forbidsplit,hdrsize,incode,outcode,qp_or_base64) int level; rfcmsg *msg; FILE *fp; FILE *pkt; int forbidsplit; int hdrsize; int incode; int outcode; int qp_or_base64; { int splitpart=0; int needsplit=0; int datasize=0; char buf[BUFSIZ]; char *p,*q; int bodytype=TEXTBODY; if (level == 0) { splitpart=0; needsplit=0; } if (needsplit) { #ifndef FSC_0047 fprintf(pkt," * Continuation %d of a split message *\r\r", splitpart); #endif needsplit=0; } switch (bodytype) { case TEXTBODY: if ((p=hdr("X-Body-Start",msg)) && !needsplit) { datasize += strlen(p); if (qp_or_base64==1) cwrite(strkconv(qp_decode(p), incode, outcode), pkt); else if (qp_or_base64==2) cwrite(strkconv(b64_decode(p), incode, outcode), pkt); else cwrite(strkconv(p, incode, outcode), pkt); } while (!(needsplit=(!forbidsplit) && (((splitpart && (datasize > maxmsize)) || (!splitpart && ((datasize+hdrsize) > maxmsize)))) ) && (bgets(buf,sizeof(buf)-1,fp))) { debug(19,"putmessage body %s",buf); datasize += strlen(buf); if (qp_or_base64==1) cwrite(strkconv(qp_decode(buf), incode, outcode), pkt); else if (qp_or_base64==2) cwrite(strkconv(b64_decode(buf), incode, outcode), pkt); else cwrite(strkconv(buf, incode, outcode), pkt); } break; } if (needsplit) { #ifndef FSC_0047 fprintf(pkt,"\r * Message split, to be continued *\r"); #endif splitpart++; } else if ((p=hdr("X-PGP-Signed",msg))) { fprintf(pkt,PGP_SIG_BEGIN"\r"); if ((q=hdr("X-PGP-Version",msg))) { fprintf(pkt,"Version:"); cwrite(q,pkt); } if ((q=hdr("X-PGP-Charset",msg))) { fprintf(pkt,"Charset:"); cwrite(q,pkt); } if ((q=hdr("X-PGP-Comment",msg))) { fprintf(pkt,"Comment:"); cwrite(q,pkt); } fprintf(pkt,"\r"); p=xstrcpy(p); q=strtok(p," \t\n"); fprintf(pkt,"%s\r",q); while ((q=(strtok(NULL," \t\n")))) fprintf(pkt,"%s\r",q); fprintf(pkt,PGP_SIG_END"\r"); } } ifmail-2.14tx8.10.orig/ifgate/charconv.c100644 0 0 44614 6573551267 16061 0ustar rootroot#include #include #include #include #include "config.h" #include "xutil.h" #include "lutil.h" #include "charset.h" #include "mime.h" #include "charconv.h" #ifndef BUFSIZ #define BUFSIZ 512 #endif static int ctoi(s) char *s; { int i; if (!strncmp(s,"0x",2)) sscanf(s+2,"%x",&i); else if (*s == '0') sscanf(s,"%o",&i); else if (strspn(s,"0123456789") == strlen(s)) sscanf(s,"%d",&i); else i=0; return i; } static int getmaptab(maptab_table,maptab_name) char **maptab_table; char *maptab_name; { FILE *fp; char buf[BUFSIZ],*p,*q; int in,on; debug(16,"getmaptab: %s\n",maptab_name); if ((fp=fopen(maptab_name,"r")) == NULL) { fprintf(stderr," cannot open mapchan file \"%s\" ",maptab_name); perror(""); return 0; } while (fgets(buf,sizeof(buf)-1,fp)) { p=strtok(buf," \t\n#"); q=strtok(NULL," \t\n#"); if (p && q) { in=ctoi(p); on=ctoi(q); if (in && on) ((char*)maptab_table)[in]=on; } } fclose(fp); return 0; } char *strnkconv(const char *src, int incode, int outcode, int n) { char ki[10],ko[10]; int kolen; static char *dest; int destlen; int i; outcode = getkcode(outcode, ki, ko); kolen = strlen(ko); dest = strkconv(src, incode, outcode); destlen = strlen(dest); if(destlen >= kolen && destlen > strlen(src)) { for(i = 0; i < kolen; i++) *(dest + n - 1 + i) = ko[i]; *(dest + n) = '\0'; } return dest; } char *strkconv(const char *src, int incode, int outcode) { static char *dest; if ((incode==outcode) && (incode!=CHRS_NOTSET) && (incode!=CHRS_AUTODETECT)) return (char *)src; if (!src) return NULL; if((incode == CHRS_AUTODETECT) || (incode == CHRS_NOTSET)) { if (LANG_BITS == 16) { incode = iso2022_detectcode((char *)src,incode); } } /* if(dest) free(dest); */ /* FIXME: should be * dest = (char *)malloc((strlen(src) + 1) + (6 * "number of \n + 1")); */ dest = (char *)malloc(((strlen(src) + 1) * 2) + 6 ); kconv((char *)src, &dest, incode, outcode); return dest; } void kconv(char *in, char **out, int incode, int outcode) { char ki[10],ko[10]; outcode = getkcode(outcode, ki, ko); if (incode == outcode) noconv(in,out); else { switch (incode) { case CHRS_NOTSET : noconv(in,out); break; case CHRS_ASCII : noconv(in,out); break; case CHRS_BIG5 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_CP424 : switch (outcode) { case CHRS_CP862 : eight2eight(in,out,CP424__CP862); break; case CHRS_ISO_8859_8 : eight2eight(in,out,CP424__ISO_8859_8); break; default : noconv(in,out); break; } break; case CHRS_CP437 : switch (outcode) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,CP437__ISO_8859_1); break; case CHRS_MACINTOSH : eight2eight(in,out,CP437__MACINTOSH); break; default : noconv(in,out); break; } break; case CHRS_CP850 : switch (outcode) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,CP850__ISO_8859_1); break; case CHRS_MACINTOSH : eight2eight(in,out,CP850__MACINTOSH); break; default : noconv(in,out); break; } break; case CHRS_CP852 : switch (outcode) { case CHRS_FIDOMAZOVIA : eight2eight(in,out,CP852__FIDOMAZOVIA); break; case CHRS_ISO_8859_2 : eight2eight(in,out,CP852__ISO_8859_2); break; default : noconv(in,out); break; } break; case CHRS_CP862 : switch (outcode) { case CHRS_CP424 : eight2eight(in,out,CP862__CP424); break; case CHRS_ISO_8859_8 : eight2eight(in,out,CP862__ISO_8859_8); break; default : noconv(in,out); break; } break; case CHRS_CP866 : switch (outcode) { case CHRS_ISO_8859_5 : eight2eight(in,out,CP866__ISO_8859_5); break; case CHRS_KOI8_R : case CHRS_KOI8_U : eight2eight(in,out,CP866__KOI8); break; default : noconv(in,out); break; } break; case CHRS_CP895 : switch (outcode) { case CHRS_ISO_8859_2 : eight2eight(in,out,CP895__ISO_8859_2); break; case CHRS_CP437 : eight2eight(in,out,CP895__CP437); break; default : noconv(in,out); break; } break; case CHRS_EUC_JP : switch (outcode) { case CHRS_EUC_JP : euc2euc(in,out,incode,0); break; case CHRS_ISO_2022_JP : euc2seven(in,out,incode,ki,ko); break; case CHRS_NEC : euc2seven(in,out,incode,ki,ko); break; case CHRS_SJIS : euc2shift(in,out,incode,0); break; default : noconv(in,out); break; } break; case CHRS_EUC_KR : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_FIDOMAZOVIA : switch (outcode) { case CHRS_CP852 : eight2eight(in,out,FIDOMAZOVIA__CP852); break; case CHRS_ISO_8859_2 : eight2eight(in,out,FIDOMAZOVIA__ISO_8859_2); break; default : noconv(in,out); break; } break; case CHRS_GB : switch (outcode) { case CHRS_HZ : gb2hz(in,out); break; default : noconv(in,out); break; } case CHRS_HZ : switch (outcode) { case CHRS_GB : hz2gb(in,out); break; default : noconv(in,out); break; } case CHRS_ISO_11 : switch (outcode) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,ISO_11__ISO_8859_1); break; default : noconv(in,out); break; } break; case CHRS_ISO_4 : switch (outcode) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,ISO_4__ISO_8859_1); break; default : noconv(in,out); break; } break; case CHRS_ISO_60 : switch (outcode) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,ISO_60__ISO_8859_1); break; default : noconv(in,out); break; } break; case CHRS_ISO_2022_CN : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_2022_JP : switch (outcode) { case CHRS_EUC_JP : seven2euc(in,out); break; case CHRS_ISO_2022_JP : seven2seven(in,out,ki,ko); break; case CHRS_NEC : seven2seven(in,out,ki,ko); break; case CHRS_SJIS : seven2shift(in,out); break; default : noconv(in,out); break; } break; case CHRS_ISO_2022_KR : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_2022_TW : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: switch (outcode) { case CHRS_CP437 : eight2eight(in,out,ISO_8859_1__CP437); break; case CHRS_CP850 : eight2eight(in,out,ISO_8859_1__CP850); break; case CHRS_MACINTOSH : eight2eight(in,out,ISO_8859_1__MACINTOSH); break; case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: noconv(in,out); break; default : noconv(in,out); break; } break; case CHRS_ISO_8859_2 : switch (outcode) { case CHRS_CP852 : eight2eight(in,out,ISO_8859_2__CP852); break; case CHRS_CP895 : eight2eight(in,out,ISO_8859_2__CP895); break; case CHRS_FIDOMAZOVIA : eight2eight(in,out,ISO_8859_2__FIDOMAZOVIA); break; default : noconv(in,out); break; } break; case CHRS_ISO_8859_3 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_4 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_5 : switch (outcode) { case CHRS_CP866 : eight2eight(in,out,ISO_8859_5__CP866); break; case CHRS_KOI8_R : case CHRS_KOI8_U : eight2eight(in,out,ISO_8859_5__KOI8); break; case CHRS_MIK_CYR : eight2eight(in,out,ISO_8859_5__MIK_CYR); break; default : noconv(in,out); break; } break; case CHRS_ISO_8859_6 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_7 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_8 : switch (outcode) { case CHRS_CP424 : eight2eight(in,out,ISO_8859_8__CP424); break; case CHRS_CP862 : eight2eight(in,out,ISO_8859_8__CP862); break; default : noconv(in,out); break; } break; case CHRS_ISO_8859_9 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_10 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_ISO_8859_11 : switch (outcode) { default : noconv(in,out); break; } break; case CHRS_KOI8_R : case CHRS_KOI8_U : switch (outcode) { case CHRS_CP866 : eight2eight(in,out,KOI8__CP866); break; case CHRS_ISO_8859_5 : eight2eight(in,out,KOI8__ISO_8859_5); break; case CHRS_MIK_CYR : eight2eight(in,out,KOI8__MIK_CYR); break; default : noconv(in,out); break; } break; case CHRS_MACINTOSH : switch (outcode) { case CHRS_CP437 : eight2eight(in,out,MACINTOSH__CP437); break; case CHRS_CP850 : eight2eight(in,out,MACINTOSH__CP850); break; case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: eight2eight(in,out,MACINTOSH__ISO_8859_1); break; default : noconv(in,out); break; } break; case CHRS_MIK_CYR : switch (outcode) { case CHRS_ISO_8859_5 : eight2eight(in,out,MIK_CYR__ISO_8859_5); break; case CHRS_KOI8_R : case CHRS_KOI8_U : eight2eight(in,out,MIK_CYR__KOI8); break; default : noconv(in,out); break; } break; case CHRS_NEC : switch (outcode) { case CHRS_EUC_JP : seven2euc(in,out); break; case CHRS_ISO_2022_JP : seven2seven(in,out,ki,ko); break; case CHRS_NEC : seven2seven(in,out,ki,ko); break; case CHRS_SJIS : seven2shift(in,out); break; default : noconv(in,out); break; } break; case CHRS_SJIS : switch (outcode) { case CHRS_EUC_JP : shift2euc(in,out,incode,0); break; case CHRS_ISO_2022_JP : shift2seven(in,out,incode,ki,ko); break; case CHRS_NEC : shift2seven(in,out,incode,ki,ko); break; case CHRS_SJIS : shift2shift(in,out,incode,0); break; default : noconv(in,out); break; } break; case CHRS_UTF_7 : utf7_to_eight(in,out,&outcode); break; case CHRS_UTF_8 : utf8_to_eight(in,out,&outcode); break; case CHRS_ZW : switch (outcode) { case CHRS_HZ : zw2hz(in,out); break; case CHRS_GB : zw2gb(in,out); break; default : noconv(in,out); break; } break; default : noconv(in,out); break; } } } int getkcode(int code,char ki[],char ko[]) { if (code == CHRS_ISO_2022_CN) { strcpy(ki,"$A"); strcpy(ko,"(T"); } else if (code == CHRS_ISO_2022_JP) { strcpy(ki,"$B"); strcpy(ko,"(B"); } else if (code == CHRS_ISO_2022_KR) { strcpy(ki,"$(C"); strcpy(ko,"(B"); } else if (code == CHRS_ISO_2022_TW) { strcpy(ki,"$(G"); strcpy(ko,"(B"); } return code; } int SkipESCSeq(FILE *in,int temp,int *intwobyte) { int tempdata; tempdata = *intwobyte; if (temp == '$' || temp == '(') fgetc(in); if (temp == 'K' || temp == '$') *intwobyte = TRUE; else *intwobyte = FALSE; if (tempdata == *intwobyte) return FALSE; else return TRUE; } void noconv(char *in, char **out) { char *p; p=*out; while (*in) *p++=*in++; *p='\0'; } void eight2eight(char *in,char **out, char *filemap) { char *p; int i; if (oldfilemap != filemap) { oldfilemap=filemap; filemap=xstrcpy(maptabdir); if (maptabdir[strlen(maptabdir)-1] != '/') filemap=xstrcat(filemap,"/"); filemap=xstrcat(filemap,oldfilemap); for (i=0;i<256;i++) maptab[i] = (unsigned char)i; /* "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057" "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077" "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117" "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137" "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157" "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177" "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217" "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237" "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" }; */ getmaptab(maptab,filemap); } p=*out; while (*in) { *p=maptab[*in & 0xff]; in++; p++; } *p='\0'; } int iso2022_detectcode(char *in,int whatcode) { int c=0; while (((whatcode == CHRS_NOTSET) || (whatcode==CHRS_AUTODETECT)) && (*in)) { if ((c = (unsigned int)(*in++))) { if (c == ESC) { c = (unsigned int)(*in++); if (c == '$') { c = (unsigned int)(*in++); switch (c) { case 'A' : whatcode = CHRS_ISO_2022_CN; break; case 'B' : case '@' : whatcode = CHRS_ISO_2022_JP; break; case '(' : case ')' : { c = (unsigned int)(*in++); switch (c) { case 'A' : whatcode = CHRS_ISO_2022_CN; break; case 'C' : whatcode = CHRS_ISO_2022_KR; break; case 'D' : whatcode = CHRS_ISO_2022_JP; break; case 'E' : whatcode = CHRS_ISO_2022_CN; break; case 'G' : case 'H' : case 'I' : case 'J' : case 'K' : case 'L' : case 'M' : whatcode = CHRS_ISO_2022_TW; break; case 'X' : whatcode = CHRS_ISO_2022_CN; break; default: break; } } break; case '*' : { c = (unsigned int)(*in++); switch (c) { case 'H' : case 'X' : whatcode = CHRS_ISO_2022_CN; break; default: break; } } break; case '+' : { c = (unsigned int)(*in++); switch (c) { case 'H' : case 'I' : case 'J' : case 'K' : case 'L' : case 'M' : case 'X' : whatcode = CHRS_ISO_2022_CN; break; default: break; } } break; default: break; } } } else if (whatcode == CHRS_NOTSET) return whatcode; #if (LANG_DEFAULT == LANG_JAPAN) else if ((c >= 129 && c <= 141) || (c >= 143 && c <= 159)) whatcode = CHRS_SJIS; else if (c == 142) { c = (unsigned int)(*in++); if ((c >= 64 && c <= 126) || (c >= 128 && c <= 160) || (c >= 224 && c <= 252)) whatcode = CHRS_SJIS; else if (c >= 161 && c <= 223) whatcode = CHRS_AUTODETECT; } else if (c >= 161 && c <= 223) { c = (unsigned int)(*in++); if (c >= 240 && c <= 254) whatcode = CHRS_EUC_JP; else if (c >= 161 && c <= 223) whatcode = CHRS_AUTODETECT; else if (c >= 224 && c <= 239) { whatcode = CHRS_AUTODETECT; while (c >= 64 && c != EOF && whatcode == CHRS_AUTODETECT) { if (c >= 129) { if (c <= 141 || (c >= 143 && c <= 159)) whatcode = CHRS_SJIS; else if (c >= 253 && c <= 254) whatcode = CHRS_EUC_JP; } c = (unsigned int)(*in++); } } else if (c <= 159) whatcode = CHRS_SJIS; } else if (c >= 240 && c <= 254) whatcode = CHRS_EUC_JP; else if (c >= 224 && c <= 239) { c = (unsigned int)(*in++); if ((c >= 64 && c <= 126) || (c >= 128 && c <= 160)) whatcode = CHRS_SJIS; else if (c >= 253 && c <= 254) whatcode = CHRS_EUC_JP; else if (c >= 161 && c <= 252) whatcode = CHRS_AUTODETECT; } #endif /* (LANG_DEFAULT == LANG_JAPAN) */ } } return whatcode; } char *hdrnconv(s, incode, outcode, n) char *s; int incode, outcode, n; { char ki[10],ko[10]; int kolen; static char *dest; int destlen; int i; getkcode(outcode, ki, ko); kolen = strlen(ko); dest = hdrconv(s, incode, outcode); destlen = strlen(dest); if(destlen >= kolen && destlen > n) { for(i = 0; i < kolen; i++) *(dest + n - 1 - kolen + i) = ko[i]; *(dest + n) = '\0'; } return dest; } char *hdrconv(s, incode, outcode) char *s; int incode, outcode; { #define BCODAGE 1 #define QCODAGE 2 char tbuf[1024]; char *iptr, *tptr; char *xbuf=NULL, *buf=NULL, *q; int codage; iptr = s; while (*iptr) { if (!strncmp(iptr,"=?",2)) { q=strchr(iptr+2,'?'); if (q) { incode=getcode(iptr+2); if (incode==CHRS_NOTSET) return s; iptr=q; } else { return s; } if (!strncasecmp(iptr,"?Q?",3)) { codage = QCODAGE; iptr+=3; } else if (!strncasecmp(iptr,"?B?",3)) { codage = BCODAGE; iptr+=3; } else { iptr=xstrcpy(iptr); *(iptr+3)='\0'; loginf("mimehdr_decode: unknown codage %s",iptr); return s; } tptr = tbuf; while ((*iptr) && (strncmp(iptr,"?=",2))) *tptr++ = *iptr++; *tptr = '\0'; if (!strncmp(iptr,"?=",2)) { iptr++; iptr++; } if (codage==QCODAGE) { while ((q = strchr(tbuf, '_'))) *q=' '; xbuf=xstrcat(xbuf,qp_decode(tbuf)); } else if (codage==BCODAGE) { xbuf=xstrcat(xbuf,b64_decode(tbuf)); } } else /* not coded */ { *tbuf=*iptr; *(tbuf+1)='\0'; xbuf=xstrcat(xbuf,tbuf); iptr++; } } buf=strkconv(xbuf, incode, outcode); return buf; } ifmail-2.14tx8.10.orig/ifgate/charconv_jp.c100644 1751 50 35312 6463053353 16100 0ustar mdsrc/* ### Modified by P. Saratxaga on 26 Oct 95 ### * This is the kcon.c taken from JE version (code from T. Tanaka) * I've modified it to support 8bit -> 8bit transcoding in addition of * japanese (16 bits) ones. * Also the codings are not readen from a config file but taken from the * charset values in Header lines. */ #include #include #include #include #include "config.h" #include "xutil.h" #include "lutil.h" #include "charset.h" #include "charconv.h" #include "charconv_jp.h" /* ######## */ void OPENINOUTFILES(FILE **in, FILE **out,char *src) { *in=tmpfile(); *out=tmpfile(); fwrite(src, sizeof(char), strlen(src), *in); rewind(*in); } void CLOSEINOUTFILES(FILE **in, FILE **out,char **dest) { int destlen, c; char *p; rewind(*out); for(destlen = 0; (c = fgetc(*out)) != EOF; destlen++) ; rewind(*out); if(*dest) free(*dest); *dest = (char *)malloc((destlen + 1) * sizeof(char)); for(p = *dest; (c = fgetc(*out)) != EOF; p++) *p = (char)(c & 0xff); *p = '\0'; fclose(*in); fclose(*out); } /* ######## */ void sjis2jis(int *p1,int *p2) { register unsigned char c1 = *p1; register unsigned char c2 = *p2; register int adjust = c2 < 159; register int rowOffset = c1 < 160 ? 112 : 176; register int cellOffset = adjust ? (31 + (c2 > 127)) : 126; *p1 = ((c1 - rowOffset) << 1) - adjust; *p2 -= cellOffset; } void jis2sjis(int *p1,int *p2) { register unsigned char c1 = *p1; register unsigned char c2 = *p2; register int rowOffset = c1 < 95 ? 112 : 176; register int cellOffset = c1 % 2 ? 31 + (c2 > 95) : 126; *p1 = ((c1 + 1) >> 1) + rowOffset; *p2 = c2 + cellOffset; } void shift2seven(char *src,char **dest,int incode,char ki[],char ko[]) { int p1,p2,intwobyte = FALSE; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case NUL : case FF : break; case CR : case NL : if (intwobyte) { intwobyte = FALSE; fprintf(out,"%c%s",ESC,ko); } fprintf(out,"%c",NL); break; default : if SJIS1(p1) { p2 = fgetc(in); if SJIS2(p2) { sjis2jis(&p1,&p2); if (!intwobyte) { intwobyte = TRUE; fprintf(out,"%c%s",ESC,ki); } } fprintf(out,"%c%c",p1,p2); } else if HANKATA(p1) { han2zen(in,&p1,&p2,incode); sjis2jis(&p1,&p2); if (!intwobyte) { intwobyte = TRUE; fprintf(out,"%c%s",ESC,ki); } fprintf(out,"%c%c",p1,p2); } else { if (intwobyte) { intwobyte = FALSE; fprintf(out,"%c%s",ESC,ko); } fprintf(out,"%c",p1); } break; } } if (intwobyte) fprintf(out,"%c%s",ESC,ko); CLOSEINOUTFILES(&in,&out,dest); } void shift2euc(char *src,char **dest,int incode,int tofullsize) { int p1,p2; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case CR : case NL : fprintf(out,"%c",NL); break; case NUL : case FF : break; default : if SJIS1(p1) { p2 = fgetc(in); if SJIS2(p2) { sjis2jis(&p1,&p2); p1 += 128; p2 += 128; } fprintf(out,"%c%c",p1,p2); } else if HANKATA(p1) { if (tofullsize) { han2zen(in,&p1,&p2,incode); sjis2jis(&p1,&p2); p1 += 128; p2 += 128; } else { p2 = p1; p1 = 142; } fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void euc2seven(char *src,char **dest,int incode,char ki[],char ko[]) { int p1,p2,intwobyte = FALSE; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case NL : if (intwobyte) { intwobyte = FALSE; fprintf(out,"%c%s",ESC,ko); } fprintf(out,"%c",p1); break; case FF : break; default : if ISEUC(p1) { p2 = fgetc(in); if ISEUC(p2) { p1 -= 128; p2 -= 128; if (!intwobyte) { intwobyte = TRUE; fprintf(out,"%c%s",ESC,ki); } } fprintf(out,"%c%c",p1,p2); } else if (p1 == 142) { p2 = fgetc(in); if HANKATA(p2) { p1 = p2; han2zen(in,&p1,&p2,incode); sjis2jis(&p1,&p2); if (!intwobyte) { intwobyte = TRUE; fprintf(out,"%c%s",ESC,ki); } } fprintf(out,"%c%c",p1,p2); } else { if (intwobyte) { intwobyte = FALSE; fprintf(out,"%c%s",ESC,ko); } fprintf(out,"%c",p1); } break; } } if (intwobyte) fprintf(out,"%c%s",ESC,ko); CLOSEINOUTFILES(&in,&out,dest); } void euc2shift(char *src,char **dest,int incode,int tofullsize) { int p1,p2; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case FF : break; default : if ISEUC(p1) { p2 = fgetc(in); if ISEUC(p2) { p1 -= 128; p2 -= 128; jis2sjis(&p1,&p2); } fprintf(out,"%c%c",p1,p2); } else if (p1 == 142) { p2 = fgetc(in); if HANKATA(p2) { if (tofullsize) { p1 = p2; han2zen(in,&p1,&p2,incode); fprintf(out,"%c%c",p1,p2); } else { p1 = p2; fprintf(out,"%c",p1); } } else fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void euc2euc(char *src,char **dest,int incode,int tofullsize) { int p1,p2; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case FF : break; default : if ISEUC(p1) { p2 = fgetc(in); if ISEUC(p2) fprintf(out,"%c%c",p1,p2); } else if (p1 == 142) { p2 = fgetc(in); if (HANKATA(p2) && tofullsize) { p1 = p2; han2zen(in,&p1,&p2,incode); sjis2jis(&p1,&p2); p1 += 128; p2 += 128; } fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void shift2shift(char *src,char **dest,int incode,int tofullsize) { int p1,p2; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case CR : case NL : fprintf(out,"%c",NL); break; case NUL : case FF : break; default : if SJIS1(p1) { p2 = fgetc(in); if SJIS2(p2) fprintf(out,"%c%c",p1,p2); } else if (HANKATA(p1) && tofullsize) { han2zen(in,&p1,&p2,incode); fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void seven2shift(char *src,char **dest) { int temp,p1,p2,intwobyte = FALSE; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case ESC : temp = fgetc(in); SkipESCSeq(in,temp,&intwobyte); break; case NL : if (intwobyte) intwobyte = FALSE; fprintf(out,"%c",p1); break; case FF : break; default : if (intwobyte) { p2 = fgetc(in); jis2sjis(&p1,&p2); fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void seven2euc(char *src, char **dest) { int temp,p1,p2,intwobyte = FALSE; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case ESC : temp = fgetc(in); SkipESCSeq(in,temp,&intwobyte); break; case NL : if (intwobyte) intwobyte = FALSE; fprintf(out,"%c",p1); break; case FF : break; default : if (intwobyte) { p2 = fgetc(in); p1 += 128; p2 += 128; fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } CLOSEINOUTFILES(&in,&out,dest); } void seven2seven(char *src,char **dest,char ki[],char ko[]) { int temp,p1,p2,change,intwobyte = FALSE; FILE *in, *out; OPENINOUTFILES(&in,&out,src); while ((p1 = fgetc(in)) != EOF) { switch (p1) { case ESC : temp = fgetc(in); change = SkipESCSeq(in,temp,&intwobyte); if ((intwobyte) && (change)) fprintf(out,"%c%s",ESC,ki); else if (change) fprintf(out,"%c%s",ESC,ko); break; case NL : if (intwobyte) { intwobyte = FALSE; fprintf(out,"%c%s",ESC,ko); } fprintf(out,"%c",p1); break; case FF : break; default : if (intwobyte) { p2 = fgetc(in); fprintf(out,"%c%c",p1,p2); } else fprintf(out,"%c",p1); break; } } if (intwobyte) fprintf(out,"%c%s",ESC,ko); CLOSEINOUTFILES(&in,&out,dest); } void han2zen(FILE *in,int *p1,int *p2,int incode) { int junk,maru,nigori; maru = nigori = FALSE; if (incode == CHRS_SJIS) { *p2 = fgetc(in); if (*p2 == 222) { if (ISNIGORI(*p1) || *p1 == 179) nigori = TRUE; else ungetc(*p2,in); } else if (*p2 == 223) { if ISMARU(*p1) maru = TRUE; else ungetc(*p2,in); } else ungetc(*p2,in); } else if (incode == CHRS_EUC_JP) { junk = fgetc(in); if (junk == 142) { *p2 = fgetc(in); if (*p2 == 222) { if (ISNIGORI(*p1) || *p1 == 179) nigori = TRUE; else { ungetc(*p2,in); ungetc(junk,in); } } else if (*p2 == 223) { if ISMARU(*p1) maru = TRUE; else { ungetc(*p2,in); ungetc(junk,in); } } else { ungetc(*p2,in); ungetc(junk,in); } } else ungetc(junk,in); } switch (*p1) { case 161 : *p1 = 129; *p2 = 66; break; case 162 : *p1 = 129; *p2 = 117; break; case 163 : *p1 = 129; *p2 = 118; break; case 164 : *p1 = 129; *p2 = 65; break; case 165 : *p1 = 129; *p2 = 69; break; case 166 : *p1 = 131; *p2 = 146; break; case 167 : *p1 = 131; *p2 = 64; break; case 168 : *p1 = 131; *p2 = 66; break; case 169 : *p1 = 131; *p2 = 68; break; case 170 : *p1 = 131; *p2 = 70; break; case 171 : *p1 = 131; *p2 = 72; break; case 172 : *p1 = 131; *p2 = 131; break; case 173 : *p1 = 131; *p2 = 133; break; case 174 : *p1 = 131; *p2 = 135; break; case 175 : *p1 = 131; *p2 = 98; break; case 176 : *p1 = 129; *p2 = 91; break; case 177 : *p1 = 131; *p2 = 65; break; case 178 : *p1 = 131; *p2 = 67; break; case 179 : *p1 = 131; *p2 = 69; break; case 180 : *p1 = 131; *p2 = 71; break; case 181 : *p1 = 131; *p2 = 73; break; case 182 : *p1 = 131; *p2 = 74; break; case 183 : *p1 = 131; *p2 = 76; break; case 184 : *p1 = 131; *p2 = 78; break; case 185 : *p1 = 131; *p2 = 80; break; case 186 : *p1 = 131; *p2 = 82; break; case 187 : *p1 = 131; *p2 = 84; break; case 188 : *p1 = 131; *p2 = 86; break; case 189 : *p1 = 131; *p2 = 88; break; case 190 : *p1 = 131; *p2 = 90; break; case 191 : *p1 = 131; *p2 = 92; break; case 192 : *p1 = 131; *p2 = 94; break; case 193 : *p1 = 131; *p2 = 96; break; case 194 : *p1 = 131; *p2 = 99; break; case 195 : *p1 = 131; *p2 = 101; break; case 196 : *p1 = 131; *p2 = 103; break; case 197 : *p1 = 131; *p2 = 105; break; case 198 : *p1 = 131; *p2 = 106; break; case 199 : *p1 = 131; *p2 = 107; break; case 200 : *p1 = 131; *p2 = 108; break; case 201 : *p1 = 131; *p2 = 109; break; case 202 : *p1 = 131; *p2 = 110; break; case 203 : *p1 = 131; *p2 = 113; break; case 204 : *p1 = 131; *p2 = 116; break; case 205 : *p1 = 131; *p2 = 119; break; case 206 : *p1 = 131; *p2 = 122; break; case 207 : *p1 = 131; *p2 = 125; break; case 208 : *p1 = 131; *p2 = 126; break; case 209 : *p1 = 131; *p2 = 128; break; case 210 : *p1 = 131; *p2 = 129; break; case 211 : *p1 = 131; *p2 = 130; break; case 212 : *p1 = 131; *p2 = 132; break; case 213 : *p1 = 131; *p2 = 134; break; case 214 : *p1 = 131; *p2 = 136; break; case 215 : *p1 = 131; *p2 = 137; break; case 216 : *p1 = 131; *p2 = 138; break; case 217 : *p1 = 131; *p2 = 139; break; case 218 : *p1 = 131; *p2 = 140; break; case 219 : *p1 = 131; *p2 = 141; break; case 220 : *p1 = 131; *p2 = 143; break; case 221 : *p1 = 131; *p2 = 147; break; case 222 : *p1 = 129; *p2 = 74; break; case 223 : *p1 = 129; *p2 = 75; break; } if (nigori) { if ((*p2 >= 74 && *p2 <= 103) || (*p2 >= 110 && *p2 <= 122)) (*p2)++; else if (*p1 == 131 && *p2 == 69) *p2 = 148; } else if (maru && *p2 >= 110 && *p2 <= 122) *p2 += 2; } ifmail-2.14tx8.10.orig/ifgate/charconv_hz.c100644 1751 50 24473 6463053353 16116 0ustar mdsrc#include #include #include #include #include "config.h" #include "xutil.h" #include "lutil.h" #include "charset.h" #include "charconv.h" #include "charconv_hz.h" /* ######## */ void OPENINOUTFILES(FILE **in, FILE **out,char *src); void CLOSEINOUTFILES(FILE **in, FILE **out,char **dest); /* ######## */ void zw2gb(char *src,char **dest) { char *buf; buf=(char*)malloc(strlen(*dest) * sizeof(char)); zw2hz(src,&buf); hz2gb(buf,dest); free(buf); } void zw2hz(char *src,char **dest) { /* Copyright (C) 1989, 1992 Fung F. Lee zw2hz 2.0: do a straightforward conversion from a zW file into a HZ file This version was an update of version 1.1, because the specification of zW had been changed by the original authors. Since the set of all zW files is a proper subset of the set of all HZ (HGB) files, it is always possible to do perfect translation from zW to HZ (HGB); but not vice versa. * HGB - High-bit-set GB, as used in CCDOS, Macintosh System 6.0.x and later. As for error handling, I took the lazy approach. For example, if the original zW file contains invalid GB codes, they will also show up in the output HZ file, and can be detected by "hz2gb -v". This program is free for general distribution. */ /* As we do not want to impose any limit of line length (such as 80 characters per line), we parse the input stream on a character by character basis, because in the worst case, a line can be as long as a file. Although in practice the line length (with or without soft CR marker at its end) is likely to be about 80 characters or so, I am not sure what the maximum line length is enforced by the zW standard, nor do I think it is a necessary assumption for proper decoding. */ int c1, c2; int ASCIImode = TRUE; int lineStart = TRUE; FILE *fin, *fout; OPENINOUTFILES(&fin,&fout,src); while ((c1 = fgetc(fin)) != EOF) { if (ASCIImode) { if (c1 == '\n') { fputc('\n', fout); lineStart = TRUE; } else if (lineStart && c1 == 'z') { c2 = fgetc(fin); if (c2 == EOF) {fputc(c1, fout); break;} if (c2 == 'W') { fprintf(fout, "~{"); ASCIImode = FALSE; } else { fputc(c1, fout); fputc(c2, fout); } lineStart = FALSE; } else { fputc(c1, fout); lineStart = FALSE; } } else /* GBmode */ { c2 = fgetc(fin); if (c1 == '\n') { ungetc(c2, fin); fprintf(fout, "~}~\n"); /* soft CR - with line continuation */ lineStart = TRUE; ASCIImode = TRUE; } else if (c2 == EOF) { fputc(c1, fout); break; } else if (c1 == '#' && c2 == '\n') { fprintf(fout, "~}\n"); /* hard CR */ lineStart = TRUE; ASCIImode = TRUE; } else if (c2 == '\n') /* This may be an invalid zW sequence, ... */ { /* anyway, for robustness, I choose ... */ /* eat c1 */ /* c1 may be ' ' or something else */ fprintf(fout, "~}\n"); /* hard CR */ lineStart = TRUE; ASCIImode = TRUE; } else if (c1 == '#' && c2 == ' ') { fprintf(fout, "~} ~{"); /* temporary escape and back */ } else if (c1 == ' ') /* 0x20?? is now for ASCII characters */ { fprintf(fout, "~}%c~{", c2); /* temporary escape and back */ } else /* ASSUME they are GB codes, and fix them in program hz2gb */ { fputc(c1, fout); fputc(c2, fout); } } } CLOSEINOUTFILES(&fin,&fout,dest); } void hz2gb(char *src,char **dest) { /* Copyright (C) 1989, 1992 Fung F. Lee hz2gb 2.0: convert a HZ file into a Macintosh* / CCDOS SGB file. *For Macintosh pre-6.0.x Simplified Chinese Operating System. Later versions use the same internal code (High-bit-set GB) as CCDOS does. The HZ specification does not dictate how to convert invalid HZ files, just as the definition of a programming language usually does not specify how a compiler should handle illegal programming constructs. The error recovery procedure of this HZ decoder was designed after examination of the conversion errors reported by hz2gb 1.1 of some of the "HZ" files posted on the news group alt.chinese.text. I suspected that most of the errors occured due to improper manual insertion of escape sequences, and/or using invalid GB codes, such as those for "space" ($2121). Such errors should not have occured if the files were first properly edited as GB codes, and then converted by an HZ encoder, such as gb2hz (preferably with the -t option.) To prevent some hanzi displayers from ill behaviour, the output stream should be or should be corrected to be valid mixed ASCII and GB sequences. The error recovery procedure is by no means unique, and may change in the future. Users should NOT regard the error recovery features as part of the HZ specification. This program is free for general distribution. */ FILE *fin, *fout; int c1, c2, c3, c4; int ASCIImode = TRUE; OPENINOUTFILES(&fin,&fout,src); while ((c1=fgetc(fin)) != EOF) { if (!pass8) c1 = CLEAN7(c1); if (ASCIImode) { if (c1 == '~') { if ((c2 = fgetc(fin)) == EOF) {EOFerror(); break;} if (!pass8) c2 = CLEAN7(c2); switch (c2) { case '~' : fputc('~', fout); break; case '{' : ASCIImode = FALSE; break; case '\n': /* line-continuation marker: eat it unless ... */ if (termStyle) fputc('\n', fout); break; default : ESCerror(c2); fputc('~', fout); fputc(c2, fout); break; } } else { if (LF2CR && c1=='\n') c1 = '\r'; fputc(c1, fout); } } else /* GBmode */ { if (isprint(c1)) { if ((c2 = fgetc(fin)) == EOF) {EOFerror(); break;} if (!pass8) c2 = CLEAN7(c2); if (isGB1(c1) && isGB2(c2)) { GBtoSGB(c1, c2, &c3, &c4); fputc(c3, fout); fputc(c4, fout); } else if (c1 == '~' && c2 == '}') /* 0x7E7D */ { ASCIImode = TRUE; } else if (isGB1U(c1) && isGB2(c2)) /* 0x78?? - 0x7D?? */ { GBerror(c1, c2); /* non-standard extended code? */ fputc(HI(BOX), fout); fputc(LO(BOX), fout); } else if (c1 == '~') /* 0x7E */ { GBerror(c1, c2); /* undefined shift-out code? */ ASCIImode = TRUE; /* safer assumption? */ fputc(c1, fout); fputc(c2, fout); } else if (c1 == ' ') /* 0x20 */ { GBerror(c1, c2); /* looks like artifacts of zwdos? */ fputc(c2, fout); } else if (c2 == ' ') /* 0x20 */ { GBerror(c1, c2); /* null image looks like "sp"? */ fputc(HI(SPACE), fout); fputc(LO(SPACE), fout); } else /* isprint(c1) && !isprint(c2)) */ { GBerror(c1, c2); /* premature shift-out? */ ASCIImode = TRUE; /* safer assumption? */ fputc(c1, fout); fputc(c2, fout); } } else /* !isprint(c1) */ { GBerror1(c1); /* premature shift-out? */ ASCIImode = TRUE; /* safer assumption? */ fputc(c1, fout); } } } CLOSEINOUTFILES(&fin,&fout,dest); } void GBtoSGB(hi, lo, hi1, lo1) int hi, lo, *hi1, *lo1; { #ifdef DOS *hi1 = 0x80 | hi; *lo1 = 0x80 | lo; #endif #ifdef MAC *hi1 = 0x81 + (hi - 0x21)/2; if (hi%2 != 0) { *lo1 = 0x40 + (lo - 0x21); if (*lo1 >= 0x7F) *lo1 += 1; } else *lo1 = 0x9F + (lo - 0x21); #endif } void EOFerror() { errorCount++; debug(22,"hz2gb: Unexpected EOF"); } void ESCerror(c) int c; { errorCount++; debug(22,"hz2gb: Invalid ASCII escape sequence:\"~%c\"", c); } void GBerror(c1, c2) int c1, c2; { errorCount++; debug(22,"hz2gb: Invalid GB code:\"%c%c\"(0x%4x)", c1,c2, DB(c1,c2)); } void GBerror1(c) int c; { errorCount++; debug(22,"hz2gb: Invalid GB code first byte:'%c'(0x%2x)", c, c); } void gb2hz(char *src,char **dest) { /* Copyright (C) 1989 Fung F. Lee sgb2hz: convert a Macintosh/CCDOS SGB file into a HZ file. This program is free for general distribution. */ FILE *fin, *fout; int c1, c2, c3, c4; #ifdef MAC int hi; #endif int GBmode = FALSE; int len = 0; OPENINOUTFILES(&fin,&fout,src); while ((c1=fgetc(fin)) != EOF) { if (notAscii(c1)) #ifdef MAC { hi = c1 & 0xF0; switch (hi) { case 0x80: case 0x90: case 0xA0: if (termStyle) { if (GBmode && len>MAXLEN-5) { fprintf(fout, "~}~\n"); GBmode = FALSE; len = 0; } else if (!GBmode && len>MAXLEN-7) { fprintf(fout, "~\n"); GBmode = FALSE; len = 0; } } if (!GBmode) /* switch to GB mode */ { fprintf(fout, "~{"); len += 2; } GBmode = TRUE; c2 = fgetc(fin); mac2gb(c1, c2, &c3, &c4); fputc(c3, fout); fputc(c4, fout); len += 2; break; case 0xB0: case 0xC0: case 0xD0: case 0xE0: fprintf(stderr, "ignored non-Ascii character: %2x\n", c1); break; case 0xF0: switch (c1) { case 0xFD: case 0xFE: case 0xFF: fprintf(stderr, "ignored non-Ascii character: %2x\n", c1); break; default: c2 = fgetc(fin); fprintf(stderr, "ignored user defined SGB code: %2x%2x\n", c1, c2); break; } } } #endif #ifdef DOS { if (termStyle) { if (GBmode && len>MAXLEN-5) { fprintf(fout, "~}~\n"); GBmode = FALSE; len = 0; } else if (!GBmode && len>MAXLEN-7) { fprintf(fout, "~\n"); GBmode = FALSE; len = 0; } } if (!GBmode) /* switch to GB mode */ { fprintf(fout, "~{"); len += 2; } GBmode = TRUE; c2 = fgetc(fin); dos2gb(c1, c2, &c3, &c4); fputc(c3, fout); fputc(c4, fout); len += 2; } #endif /* c1 is ASCII */ else { if (GBmode) {fprintf(fout, "~}"); len += 2;} /* assert(len<=MAXLEN-1) */ if (termStyle && (len>MAXLEN-2 || (len>MAXLEN-3 && c1=='~'))) { fprintf(fout, "~\n"); len = 0; } GBmode = FALSE; if (CR2LF && c1=='\r') c1 = '\n'; fputc(c1, fout); len++; if (c1=='\n') len=0; else if (c1== '~') {fputc('~', fout); len++;} } } if (GBmode) fprintf(fout, "~}"); CLOSEINOUTFILES(&fin,&fout,dest); } #ifdef MAC void mac2gb(hi, lo, hi1, lo1) int hi, lo, *hi1, *lo1; { if (lo >= 0x9F) { *hi1 = 0x21 + (hi - 0x81) * 2 + 1; *lo1 = 0x21 + (lo - 0x9F); } else { *hi1 = 0x21 + (hi - 0x81) * 2; if (lo > 0x7F) lo--; *lo1 = 0x21 + (lo - 0x40); } } #endif #ifdef DOS void dos2gb(hi, lo, hi1, lo1) int hi, lo, *hi1, *lo1; { *hi1 = hi - 0x80; *lo1 = lo - 0x80; } #endif ifmail-2.14tx8.10.orig/ifgate/areas.h100644 1751 50 1130 6540753002 14645 0ustar mdsrc/* ### Modified on Thu 4 Jan 1996 by P.Saratxaga ### * - added JE functions, for compatibility with JE-version config files */ #ifndef AREA_LIST_TYPE #define AREA_LIST_TYPE typedef struct _area_list { struct _area_list *next; char *name; } area_list; #endif extern int group_count; /* if int=1 return expanded areas from default, if int=0 does not */ extern area_list *areas(char *,int); extern void ngdist(char*,char**,char**,char**,int*); #ifdef JE extern void areacharset(char*,int*,int*); #endif extern void tidy_arealist(area_list *); #ifdef GATEBAU_MSGID int areagatebau(char *); #endif ifmail-2.14tx8.10.orig/ifgate/mkrfcmsg.h100644 1751 50 356 6014367372 15363 0ustar mdsrc#include #include #include #include "ftn.h" #include "rfcmsg.h" /* from, to, subj, orig, mdate, flags, file, offset */ extern int mkrfcmsg(faddr *,faddr *,char *,char *,time_t,int,FILE *,off_t,rfcmsg *); ifmail-2.14tx8.10.orig/ifgate/mkftnhdr.h100644 1751 50 65 6336353676 15355 0ustar mdsrcint ftnmsgid(char *,char **,unsigned long *,char *); ifmail-2.14tx8.10.orig/ifgate/nlindex.h100644 1751 50 1072 6152013713 15215 0ustar mdsrc#ifndef NLINDEX_H #define NLINDEX_H #include "nodecheck.h" #define INDEX "index" #ifdef HAS_NDBM_H #include extern DBM *nldb; #endif extern int openstatus; extern struct _nodelist { char *domain; FILE *fp; } *nodevector; struct _ixentry { unsigned short zone; unsigned short net; unsigned short node; unsigned short point; }; struct _loc { off_t off; unsigned short nlnum; unsigned short hub; }; extern struct _pkey { char *key; unsigned char type; unsigned char pflag; } pkey[]; extern struct _fkey fkey[]; extern int initnl(void); #endif ifmail-2.14tx8.10.orig/ifgate/nodecheck.h100644 1751 50 132 6152014153 15452 0ustar mdsrc#ifndef NODECHECK_H #define NODECHECK_H #include "ftn.h" extern int chknlent(); #endif ifmail-2.14tx8.10.orig/ifgate/charconv.h100644 1751 50 6702 6540753002 15367 0ustar mdsrc#ifndef IFMAIL_CHARCONV_H #define IFMAIL_CHARCONV_H /* some special chars values */ #define NUL 0 #define NL 10 #define FF 12 #define CR 13 #define ESC 27 #define TRUE 1 #define FALSE 0 #ifndef SEEK_CUR #define SEEK_CUR 1 #endif /* ************ general functions ************* */ char *hdrconv(char *, int, int); char *hdrnconv(char *, int, int, int); char *strnkconv(const char *src, int incode, int outcode, int maxlen); char *strkconv(const char *src, int incode, int outcode); void kconv(char *src, char **dest, int incode, int outcode); /* ************ 8 bit charsets **************** */ void noconv(char *in, char **out); void eight2eight(char *in, char **out, char *filemap); void utf7_to_eight(char *in, char **out,int *outcode); void utf8_to_eight(char *in, char **out,int *outcode); /* maptabs names */ #define CP424__CP862 "cp424__cp862" #define CP424__ISO_8859_8 "cp424__iso-8859-8" #define CP437__ISO_8859_1 "cp437__iso-8859-1" #define CP437__MACINTOSH "cp437__mac" #define CP850__ISO_8859_1 "cp437__iso-8859-1" #define CP850__MACINTOSH "cp437__mac" #define CP852__FIDOMAZOVIA "cp852__fidomazovia" #define CP852__ISO_8859_2 "cp852__iso-8859-2" #define CP862__CP424 "cp862__cp424" #define CP862__ISO_8859_8 "cp862__iso-8859-8" #define CP866__ISO_8859_5 "mik__iso-8859-5" #define CP866__KOI8 "cp866__koi8" #define CP895__CP437 "cp895__cp437" #define CP895__ISO_8859_2 "cp895__iso-8859-2" #define FIDOMAZOVIA__CP852 "fidomazovia__cp852" #define FIDOMAZOVIA__ISO_8859_2 "fidomazovia__iso-8859-2" #define ISO_11__ISO_8859_1 "iso-11__iso-8859-1" #define ISO_4__ISO_8859_1 "iso-4__iso-8859-1" #define ISO_60__ISO_8859_1 "iso-60__iso-8859-1" #define ISO_8859_1__CP437 "iso-8859-1__cp437" #define ISO_8859_1__MACINTOSH "iso-8859-1__mac" #define ISO_8859_1__CP850 "iso-8859-1__cp437" #define ISO_8859_2__CP852 "iso-8859-2__cp852" #define ISO_8859_2__CP895 "iso-8859-2__cp895" #define ISO_8859_2__FIDOMAZOVIA "iso-8859-2__fidomazovia" #define ISO_8859_5__CP866 "iso-8859-5__mik" #define ISO_8859_5__KOI8 "iso-8859-5__koi8" #define ISO_8859_5__MIK_CYR "iso-8859-5__mik" #define ISO_8859_8__CP424 "iso-8859-8__cp424" #define ISO_8859_8__CP862 "iso-8859-8__cp862" #define KOI8__CP866 "koi8__cp866" #define KOI8__ISO_8859_5 "koi8__iso-8859-5" #define KOI8__MIK_CYR "koi8__mik" #define MACINTOSH__CP437 "mac__cp437" #define MACINTOSH__CP850 "mac__cp437" #define MACINTOSH__ISO_8859_1 "mac__iso-8859-1" #define MIK_CYR__ISO_8859_5 "mik__iso-8859-5" #define MIK_CYR__KOI8 "mik__koi8" /* ************ 16 bits charsets ************* */ /* japanese charsets */ void shift2seven(char *in,char **out,int incode,char ki[],char ko[]); void shift2euc(char *in,char **out,int incode,int tofullsize); void euc2seven(char *in,char **out,int incode,char ki[],char ko[]); void euc2euc(char *in,char **out,int incode,int tofullsize); void shift2shift(char *in,char **out,int incode,int tofullsize); void euc2shift(char *in,char **out,int incode,int tofullsize); void seven2shift(char *in,char **out); void seven2euc(char *in,char **out); void seven2seven(char *in,char **out,char ki[],char ko[]); /* Chinese charsets */ void gb2hz(char *in,char **out); void hz2gb(char *in,char **out); void zw2hz(char *in,char **out); void zw2gb(char *in,char **out); /* ??? */ int toup(int data); int SkipESCSeq(FILE *in,int temp,int *intwobyte); int getkcode(int code,char ki[],char ko[]); int iso2022_detectcode(char *in,int); #endif /* IFMAIL_CHARCONV_H */ ifmail-2.14tx8.10.orig/ifgate/charconv_jp.h100644 1751 50 1013 6463053353 16054 0ustar mdsrc#ifndef IFMAIL_CHARCONV_JP_H #define IFMAIL_CHARCONV_JP_H #define SJIS1(A) ((A >= 129 && A <= 159) || (A >= 224 && A <= 239)) #define SJIS2(A) (A >= 64 && A <= 252) #define HANKATA(A) (A >= 161 && A <= 223) #define ISEUC(A) (A >= 161 && A <= 254) #define ISMARU(A) (A >= 202 && A <= 206) #define ISNIGORI(A) ((A >= 182 && A <= 196) || (A >= 202 && A <= 206)) void han2zen(FILE *in,int *p1,int *p2,int incode); void sjis2jis(int *p1,int *p2); void jis2sjis(int *p1,int *p2); #endif /* IFMAIL_CHARCONV_JP_H */ ifmail-2.14tx8.10.orig/ifgate/charconv_hz.h100644 1751 50 2715 6463053353 16076 0ustar mdsrc#ifndef IFMAIL_CHARCONV_HZ_H #define IFMAIL_CHARCONV_HZ_H #define DOS #define SPACE 0xA1A1 /* GB "space" symbol */ #define BOX 0xA1F5 /* GB "blank box" symbol */ #define isGB1(c) ((c)>=0x21 && (c)<=0x77) /* GB 1st byte */ #define isGB1U(c) ((c)>=0x78 && (c)<=0x7D) /* GB 1st byte unused*/ #define isGB2(c) ((c)>=0x21 && (c)<=0x7E) /* GB 2nd byte */ #define HI(code) (((code) & 0xFF00)>>8) #define LO(code) ((code) & 0x00FF) #define DB(hi,lo) ((((hi)&0xFF) << 8) | ((lo)&0xFF)) #define CLEAN7(c) ((c) & 0x7F) /* strip MSB */ #define notAscii(c) ((c)&0x80) int LF2CR = FALSE; /* flag for converting ASCII to */ int CR2LF=FALSE; /* flag for converting ASCII to */ int pass8 = FALSE; /* flat for parsing all 8 bits of a character */ int termStyle = FALSE; /* flag for ignoring line-continuation markers */ int MAXLEN = 77; /* default maximum line length in the above style */ int MINLEN = 7; /* minimum line length in the above style */ int errorCount = 0; /* number of parsing errors detected */ /* internal functions */ void EOFerror(void); void ESCerror(int c); void GBerror(int c1,int c2); void GBerror1(int c); void GBtoSGB(int hi, int lo, int *hi1, int *lo1); void mac2gb(int hi, int lo, int *hi1, int *lo1); void dos2gb(int hi, int lo, int *hi1, int *lo1); #endif /* IFMAIL_CHARCONV_HZ_H */ ifmail-2.14tx8.10.orig/ifgate/README100644 1751 50 15665 6266041157 14331 0ustar mdsrcCopyright (c) 1993-1997 by Eugene G. Crosser This is a README file for ifgate - Internet/FidoNet gateway You may do virtually what you wish with this software, as long as the explicit reference to its original author is retained: Eugene G. Crosser , 2:5020/230@FidoNet THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE. This is a "production" version, it is more or less thoroughly tested. But that does not mean that it is error-free. If you think that you found a bug, contact the author at crosser@average.org All programs show version information and a short help message when run with "-h" key. This piece of software was tested with the following MTAs: Smail3, sendmail and Zmailer, and following netnews packages: cnews and INN. Ifmail program converts RFC-822 compliant mail and RFC-1036 compliant news to FTN packets. It must run setuid owner of fidonet related stuff. The current packet naming is BinkleyTerm, with file/directory names in lowcase. Naming conventions are implemented in a separate source file, pktname.c, to make modifications easier. The opposite way program is called iftoss. It expects a non-arcmail packet on stdin and passes converted mail messages and/or generated newsbatch to sendmail and/or rnews. ATTENTION: if you specify non-zero debugging level for iftoss, resultant messages/newsbatches will go to the directory "/tmp/ifmail" instead of being fed to sendmail/rnews. Sure, you must have /tmp directory writable for ifgate programs (not only for debugging). There are also two frontends: ifpack and ifunpack. Ifpack scans the outbound directory and packs *.?ut packets into arcmail file attaches, and ifunpack scans the inbound directory, unpacks and removes arcmail files, and feeds packets to iftoss (and then removes them, or renames if tossing was unsuccessful). If you have a stat[v]fs() system call on your system, ifunpack checks available space before unpacking/tossing. ifstat program shows the status of the outbound directory. For ifmail, default is mail mode operation. In mail mode, you must specify recipient(s) address(es) in the command line, in the form: "Eugene.Crosser@p14.f6.n5020.z2.fidonet.org". When the news mode is in effect, i.e. "-n" key is specified or the program is called by alias "ifnews", a news article (or batch) is expected on stdin. "-r" key is used to specify the destination of the packet, in the form "[pNN.]fNN.nNN[.zNN[.domain]]". In news mode, if -r key is omitted, the first recipient address is used as routing address, and if it is absent too, $NEWSSITE environment variable is used as a routing address. Ifmail and iftoss programs try to preserve as much information as possible in "X-FTN-..." headers and "^ARFC-..." kludges, and restore messages more or less accurately to their original form when double- gatewaying. The function that makes desicion wheter to convert an RFC header to an ^aRFC- kludge or put it into the body of the message is in the file "message.c". A dbm-based alias database is supported, so if a message passes from a newsgroup to echo, the author's free form name and domain address are stored, and when a netmail reply comes from fidonet to that free form name, it is passed as a mail message to the remembered domain address. ATTENTION: this mechanism won't work for you if you specify fidonet-style address as the "visible name" in your MTA. Do not do it! Even if you don't have an official Internet domain, use something.uucp as your primary machine name, NOT fN.nM.zL.fidonet.org. Several addresses may be specified in the config file, netmail from fidonet addressed to any of those addresses is assumed local and resolved through the aforementioned database, otherwise the mail will be routed through the normal MTA (and presumably packed to some other fidonet node). If there is a "To:" line at the beginning of the fido message, destination address is taken from it (ONLY THE FIRST ONE!). On the other hand, if you make a system mail alias file accessible to the iftoss program, it makes attempt to "backward resolve" the "from" addresses, that is, if the originating address of the FidoNet message matches the right side of some mail alias, the "Reply-To:" header of the generated mail/news message will contain "alias@your.domain.name" address. Message IDs are converted as follows: "^AMSGID:
" is converted to "@
". If there was no MSGID in the fidonet message, messageid of the form @ is generated, so that when a single message is gatewayed in several distinct places, it will have the same messageid anyway (for some (little) risk of having two different messages with the same messageid). RFC822 Message-IDs are converted back when they can be, otherwise the messageid "@" is converted to "^AMSGID crc32()". When an RFC message is split, unique MSGIDs are generated for all parts after the first one. In any case, the original "Message-ID:" header is preserved in the "^ARFC-Message-ID:" kludge and used if the message comes back to usenet on some (other) gateway. On the way from news to echo, if the node to which the packet is being created is present in the "X-FTN-SEEN-BY:" header(s), the message is not included into the packet. SEEN-BY lines in the messages included into the packet consist of (1) your node primary address, (2) copy of "X-FTN-SEEN-BY:" header(s), (3) ftn addresses that could be parsed from the CNews/INN file "$NEWSCTL/log" in the line with the corresponding Message-ID. For the latter to work, you should have a Cnews compatible log file available for reading and have an "ndbm" package. ATTENTION: your feed name in the cnews "sys" file should be fNNN.nMMM or pNNN.fMMM.nLLL, without zone and domain, see example. In some cases, though, you will need to specify zone and/or domain of the feed, e.g. if you are exporting echomail to several networks. In such case, specify the "cutdown" fNNN.nMMM notation after slash, to prevent exporting back. This trick may also be useful if your hub presents non-primary AKA in the echomail that it gives to you. Ifmail does some attempt to process file attaches, but only locally. No pass to Internet and back, but if a fileattach netmail message is routed from one fidonet node to another, it probably will take the attached file with it. There is also a feature to define "forbidden" groups. If a usenet message is crossposted to some of the gated groups _and_ to some of the forbidden groups it will not be passed to any fidonet echoes. Messages containing the "Control:" header are not passed to FidoNet too. Acknowledgements: Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. Some modules taken from INN package. Thanks to Michael Bravo (who was the first) and many others for testing. ifmail-2.14tx8.10.orig/ifgate/Makefile100644 0 0 17551 6573551267 15552 0ustar rootroot# Makefile for ifmail Internet/FidoNet gateway # Copyright (c) 1993-1997 by Eugene G. Crosser INCDIR = ../iflib include ../CONFIG DEFINES = -DNEWSLOG=${NEWSLOG} \ -DMAILLOG=${MAILLOG} \ -DNEWSSPOOL=\"${NEWSSPOOL}\" \ -DFAKEDIR=\"${FAKEDIR}\" \ ${OPTS} OBJMAIL = version.o ifmail.o rfcmsg.o message.o mkftnhdr.o \ ifdbm.o batchrd.o areas.o msgflags.o\ nlindex.o nodecheck.o \ msgidbm.o attach.o \ charconv.o charconv_jp.o charconv_hz.o charconv_utf.o OBJTOSS = version.o iftoss.o areas.o \ getmessage.o mkrfcmsg.o rfcmsg.o batchrd.o \ ifdbm.o backalias.o msgflags.o \ charconv.o charconv_jp.o charconv_hz.o charconv_utf.o OBJUNPACK = version.o ifunpack.o unpacker.o flock.o OBJPACK = version.o ifpack.o flock.o OBJSTAT = version.o ifstat.o SRCS = ifmail.c rfcmsg.c message.c mkftnhdr.c \ ifdbm.c batchrd.c areas.c msgflags.c \ iftoss.c getmessage.c mkrfcmsg.c \ nlindex.c nodecheck.c \ ifunpack.c unpacker.c ifpack.c flock.c \ backalias.c msgidbm.c attach.c ifstat.c lastmtime.c \ body.c charconv.c charconv_jp.c charconv_hz.c charconv_utf.c HDRS = areas.h mkrfcmsg.h mkftnhdr.h nlindex.h nodecheck.h \ charconv.h charconv_jp.h charconv_hz.h OTHER = README Makefile testmail newsin pkt ifmail.8 iftoss.8 ALL = ifmail ifnews iftoss ifunpack ifpack ifstat ifeq (yes,${SHARED}) UTLIB = OBJMAIL += ../iflib/libifmail.so.${SHVER} OBJTOSS += ../iflib/libifmail.so.${SHVER} OBJUNPACK += ../iflib/libifmail.so.${SHVER} OBJPACK += ../iflib/libifmail.so.${SHVER} OBJSTAT += ../iflib/libifmail.so.${SHVER} LIBS += -L ../iflib -lifmail else UTLIB = ../iflib/utlib.a endif .c.o: ${CC} -c ${CFLAGS} ${INCLUDES} ${DEFINES} $< all: ${ALL} install: all ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${SMODE} ifstat ${BINDIR}/ifstat ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifpack ${BINDIR}/ifpack ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifunpack ${BINDIR}/ifunpack ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} iftoss ${BINDIR}/iftoss ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${SMODE} ifmail ${BINDIR}/ifmail rm -f ${BINDIR}/ifnews ln ${BINDIR}/ifmail ${BINDIR}/ifnews tryt: iftoss ./iftoss -I../misc/config -N -xch $@ filelist: Makefile BASE=`pwd`; \ BASE=`basename $${BASE}`; \ (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ifmail/$${BASE}/$$f; done) \ >filelist man: ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifmail.8 ${MANDIR}/man8/ifmail.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} iftoss.8 ${MANDIR}/man8/iftoss.8 echo ".so man8/ifmail.8" > ${MANDIR}/man8/ifnews.8 config: test -f config version.c: ${SRCS} ${HDRS} lastmtime ../CONFIG echo 'char *version=${VERSION};' >version.c echo 'char *copyright=${COPYRIGHT};' >>version.c echo "char *reldate=\"`./lastmtime ${SRCS} ${HDRS}`\";" >>version.c depend: version.c @rm -f Makefile.bak; \ mv Makefile Makefile.bak; \ sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ >>Makefile; \ ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ for f in ${SRCS} version.c; \ do \ ${ECHO} "Dependencies for $$f:\c"; \ ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ for h in `sed -n -e \ 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ do \ ${ECHO} " $$h\c"; \ if [ -r $$h ]; \ then \ ${ECHO} " $$h\c" >>Makefile; \ else \ ${ECHO} " ${INCDIR}/$$h\c" >>Makefile; \ fi; \ done; \ ${ECHO} " done."; \ ${ECHO} "" >>Makefile; \ done; \ ${ECHO} '# End of generated dependencies' >>Makefile # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend ifmail.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h ../iflib/rfcaddr.h ../iflib/falists.h ../iflib/rfcmsg.h ../iflib/ftnmsg.h areas.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h ../iflib/hash.h ../iflib/needed.h nodecheck.h ../iflib/charset.h ../iflib/ref_interface.h rfcmsg.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/rfcmsg.h message.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/rfcaddr.h ../iflib/ftnmsg.h ../iflib/rfcmsg.h ../iflib/config.h ../iflib/bwrite.h ../iflib/falists.h ../iflib/version.h ../iflib/hash.h ../iflib/needed.h mkftnhdr.h areas.h ../iflib/charset.h charconv.h ../iflib/mime.h ../iflib/ref_interface.h mkftnhdr.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/ftnmsg.h ../iflib/rfcmsg.h ../iflib/rfcaddr.h ../iflib/mime.h ../iflib/charset.h charconv.h ../iflib/config.h ../iflib/version.h ../iflib/hash.h areas.h ifdbm.o: ../iflib/lutil.h ../iflib/config.h batchrd.o: ../iflib/lutil.h areas.o: ../iflib/lutil.h ../iflib/xutil.h areas.h ../iflib/config.h ../iflib/lhash.h ../iflib/needed.h ../iflib/charset.h msgflags.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftnmsg.h iftoss.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/config.h ../iflib/version.h ../iflib/ftn.h ../iflib/getheader.h ../iflib/trap.h ../iflib/charset.h ../iflib/ref_interface.h getmessage.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/bread.h ../iflib/ftn.h ../iflib/rfcmsg.h mkrfcmsg.h ../iflib/config.h ../iflib/crc.h ../iflib/charset.h mkrfcmsg.o: ../iflib/lutil.h ../iflib/xutil.h mkrfcmsg.h ../iflib/ftnmsg.h ../iflib/rfcmsg.h areas.h ../iflib/falists.h ../iflib/config.h ../iflib/needed.h ../iflib/charset.h charconv.h ../iflib/mime.h ../iflib/ref_interface.h nlindex.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodecheck.h nlindex.h nodecheck.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodecheck.h nlindex.h ../iflib/needed.h ifunpack.o: ../iflib/directory.h ../iflib/getopt.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h unpacker.o: ../iflib/lutil.h ../iflib/config.h ifpack.o: ../iflib/directory.h ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h ../iflib/config.h ../iflib/scanout.h ../iflib/version.h ../iflib/trap.h ../iflib/needed.h flock.o: ../iflib/lutil.h backalias.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/needed.h msgidbm.o: ../iflib/lutil.h ../iflib/xutil.h ../iflib/config.h ../iflib/ftn.h ../iflib/rfcaddr.h attach.o: ../iflib/ftn.h ../iflib/lutil.h ../iflib/config.h ifstat.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h ../iflib/config.h ../iflib/scanout.h ../iflib/version.h ../iflib/trap.h ../iflib/needed.h lastmtime.o: body.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/rfcmsg.h ../iflib/config.h ../iflib/bwrite.h ../iflib/mime.h ../iflib/charset.h charconv.h ../iflib/version.h ../iflib/hash.h charconv.o: ../iflib/config.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/charset.h ../iflib/mime.h charconv.h charconv_jp.o: ../iflib/config.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/charset.h charconv.h charconv_jp.h charconv_hz.o: ../iflib/config.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/charset.h charconv.h charconv_hz.h version.o: # End of generated dependencies ifmail-2.14tx8.10.orig/ifgate/testmail100644 0 0 3245 6573551267 15632 0ustar rootrootFrom crosser Sat May 15 18:33:19 1993 remote from pccross Received: by pccross.msk.su (Smail3.1.28.1 #5) id m0nuNIZ-0001frC; Sat, 15 May 93 18:33 MSD Received: by nowhere.msk.su (Smail3.1.28.1 #5) id m0nuNIZ-0001frC; Sat, 14 May 93 18:33 MSD X-Message-Id: Message-Id: <123456%May-17-1993.02.32.45.123324@pccross.msk.su> Return-Receipt-To: crosser@pccross.msk.su X-From: crosser@pccross.msk.su (Eugene Crosser) From: (UberWhacker) <\(UberWhacker\)@p666.f666.n666.z6.fidonet.org> Subject: üÔÏ ÔÅÓÔ: ÎÁÓÞÅÔ ÐÅÒ×ÙÈ ÒÕÓÓËÉÈ ÂÕËÏ×ÏË × subject... X-Subject: UNIX-SOURCE/IFMAIL24.TAR.Z X-FTN-FLAGS: ATT CRS DIR Priority: low X-To: Pete.Kvitek@f6.fido.pccross.msk.su To: Pete.Kvitek@f6.n5020.z2.fidonet.org Date: Mon, 17 May 1993 02:33:14 +0400 (MSD) X-Mailer: ELM [version 2.4 PL17] Organization: == Eugene Crosser's == MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Content-Length: 23 Hello Pete, please could you examine this message thoroughly and send me the results. I am testing another new piece of fidonet/internet gateway software --- ifmail-2.8f/iflib/bwrite.c Sun Oct 9 00:33:09 1994 +++ ifmail2-current/iflib/bwrite.c Mon Oct 28 13:06:01 1996 @@ -32,11 +32,16 @@ return 0; } -/* write an arbitrary line to message body: change \n to \r\n */ +/* write an arbitrary line to message body: change \n to \r, + if a line starts with three dashes, insert a dash and a blank */ int cwrite(s,fp) char *s; FILE *fp; { + if ((strlen(s) >= 3) && (strncmp(s,"---",3) == 0) && (s[3] != '-')) { + putc('-',fp); + putc(' ',fp); + } while (*s) { if (*s == '\n') putc('\r',fp); Thanx, Eugene ifmail-2.14tx8.10.orig/ifgate/newsin100644 1751 50 176322 6014367372 14716 0ustar mdsrc#! rnews 771 Path: pccross!demos1!evgeny From: evgeny@demos.su (Evgeny Didenko) Newsgroups: fido7.miem-talk Subject: Re: 1-Å ÓÅÎÔÑÂÒÑ Date: 12 Sep 1994 15:29:27 GMT Organization: Demos Plus Co. Lines: 14 Distribution: fido7 Message-ID: <351s55$i7i@news.demos.su> References: <778485840@p21.f279.n5020.z2.ftn> <778563172@p23.f279.n5020.z2.ftn> NNTP-Posting-Host: sun-fox.demos.su X-Newsreader: TIN [version 1.2 PL2] Alex Pavlov (Alex.Pavlov@p23.f279.n5020.z2.fidonet.org) wrote: : óÔÁpÉË, ÂÅÄÁ ÂÙÌÁ, ÐÏÜÔÏÍÕ ÎÅ ÂÙÌ. åÓÔØ ÉÄÅÑ (ÞÉÔÁÊ ÎÅÔÍÁÊÌ, ÚÁÏÄÎÏ ÚÏ×É ôÉÔÏ×Á : É àÄÖÉÎÁ)! õÖÅ ÐÏÚ×ÁÌÓÑ :-) á 1 ÓÅÎÔÑÂÒÑ ÂÙÌÏ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ËÌÁÓÓÎÏ. öÁÌØ ÔÏÌØËÏ ÞÔÏ ÉÄÅÑ ×ÙÔÁÝÉÔØ ÓÔÏÌ ÎÁ ÕÌÉÃÕ ÐÅÒÅÄ ÉÎÓÔÉÔÕÔÏÍ ÐÒÉÛÌÁ ÓÌÉÛËÏÍ ÐÏÚÄÎÏ. ó ÄÒÕÇÏÊ ÓÔÏÒÏÎÙ, ÈÏÒÏÛÏ ×ÓÅ-ÖÅ ÞÔÏ ×ÏÄËÉ ÍÙ ÎÅ ËÕÐÉÌÉ :) #! rnews 572 Path: pccross!demos1!evgeny From: evgeny@demos.su (Evgeny Didenko) Newsgroups: fido7.miem-talk Subject: Re: Hi! Date: 12 Sep 1994 15:34:40 GMT Organization: Demos Plus Co. Lines: 5 Distribution: fido7 Message-ID: <351seu$i7i@news.demos.su> References: <778549797@p29.f252.n5020.z2.ftn> <778969730@p1.f278.n5020.z2.ftn> NNTP-Posting-Host: sun-fox.demos.su X-Newsreader: TIN [version 1.2 PL2] Serg Maslihin (Serg.Maslihin@p1.f278.n5020.z2.fidonet.org) wrote: : ÔÙ ÌÕÞÛÅ Ó ÔÒÁÎÓÐÏÒÁÎÔÏÍ ÈÏÄÉ, Á ÔÏ ÅÓÌÉ Ë ËÁÖÄÏÍÕ ÎÁ ÇÒÕÄØ ÌÅÚÔØ -ÁÄÒÅÓ á ÅÓÌÉ Ë ëáöäïê ÎÁ ÇÒÕÄØ ÌÅÚÔØ .... #! rnews 617 Path: pccross!demos1!evgeny From: evgeny@demos.su (Evgeny Didenko) Newsgroups: fido7.miem-talk Subject: Re: ôÏÓËÁ... Date: 12 Sep 1994 15:39:21 GMT Organization: Demos Plus Co. Lines: 6 Distribution: fido7 Message-ID: <351snn$i7i@news.demos.su> References: <774266745@p30.f159.n5020.z2.ftn> <778949486@p23.f279.n5020.z2.ftn> NNTP-Posting-Host: sun-fox.demos.su X-Newsreader: TIN [version 1.2 PL2] Alex Pavlov (Alex.Pavlov@p23.f279.n5020.z2.fidonet.org) wrote: : ÷ÏÏÂÝÅ Ó ÔÏÞËÉ ÚpÅÎÉÑ ÔÕÓÏ×ËÉ, á÷Ô ÌÅÞÛÅ ÎÅ ÎÁÊÔÉ. ó ÔÏÞËÉ ÚpÅÎÉÑ ÏÂpÁÚÏ×ÁÎÉÑ É : ÐÏÌÕÞÅÎÉÑ ÐpÏÆÅÓÉÉ, ÄÕÍÁÀ, ÌÕÞÛÅ ×ÓÅÇÏ ÇpÕÐÐÁ ó-è3 ûÏ×ÉÎÉÓÔ, ÏÄÎÁËÏ. #! rnews 646 Path: pccross!demos1!evgeny From: evgeny@demos.su (Evgeny Didenko) Newsgroups: fido7.miem-talk Subject: Re: How do your do !!! íéüí !!?? Date: 12 Sep 1994 15:43:39 GMT Organization: Demos Plus Co. Lines: 6 Distribution: fido7 Message-ID: <351svp$i7i@news.demos.su> References: <778948828@p23.f279.n5020.z2.ftn> <778997199@p1.f279.n5020.z2.ftn> NNTP-Posting-Host: sun-fox.demos.su X-Newsreader: TIN [version 1.2 PL2] Andrey Titov (Andrey.Titov@p1.f279.n5020.z2.fidonet.org) wrote: : á ×ÏÔ Õ ÍÅÎÑ, ÍÏÖÅÔ É ÅÓÔØ, ÎÁÄÏ ÐÏÓÍÏÔpÅÔØ ÐÏÄpÏÂÎÅÅ. ìÅÈÁ, ÔÏÌØËÏ ÎÅ ÐÕÇÁÊÓÑ, : ÑÓÎÏ ÞÔÏ ÎÅ ÍÏÉ. :) ñ ËÒÕÞÅ. õ ÍÅÎÑ ËÓÅÒÏËÏÐÉÉ :-). îÅ Ó×ÏÉÈ ÅÓÔÅÓÔ×ÅÎÎÏ :-). #! rnews 693 Path: pccross!srcc!newsserver Posted-Date: Sun, 11 Sep 1994 15:08:05 +0400 Newsgroups: fido7.clipper Message-ID: Organization: Institute of Microelectronics, Chernogolovka, Russia From: GUPTA@micro.chg.free.net (Gupta Users Association) Date: Sun, 11 Sep 94 15:01:16 +0400 (MSD) X-Mailer: dMail (Demos Mail v1.09a) Subject: ëÌÉÐÐÅÒÉÓÔÙ ×ÓÅÈÚ ÓÔÒÁÎ, ÐÒÉÈÏÄÉÔÅ ÎÁ ÎÁÛ ÓÔÅÎÄ 2101 ÎÁ ×ÙÓÔÁ×ËÅ õÉÎÄÏÕÚ/üëóðï. ÷ÁÓ ÏÖÉÄÁÅÔ ÐÒÉÑÔÎÙÊ ÓÀÒÐÒÉÚ - ÂÅÓÐÌÁÔÎÙÊ ÒÏÚÙÇÒÙÛ ÐÒÏÄÕËÔÏ× ÆÉÒÍÙ Gupta. îÁÛÁ ÆÉÒÍÁ éÎÔÅÒÆÅÊÓ ÐÏÍÏÖÅÔ ÷ÁÍ ÐÅÒÅÊÔÉ ÎÁ çÕÐÔÕ. Distribution: su Sender: news-service@srcc.msu.su X-Return-Path: gamma!npimsu!micro.chg.free.net!GUPTA%micro.chg.free.net Lines: 0 #! rnews 722 Path: pccross!srcc!newsserver Posted-Date: Sun, 11 Sep 1994 15:08:06 +0400 Newsgroups: fido7.dbms Message-ID: Organization: Institute of Microelectronics, Chernogolovka, Russia From: GUPTA@micro.chg.free.net (Gupta Users Association) Date: Sun, 11 Sep 94 15:03:51 +0400 (MSD) X-Mailer: dMail (Demos Mail v1.09a) Subject: õ×ÁÖÁÅÍÙÅ ÄÅ×ÅÌÏÐÅÒÙ, ÉÍÅÅÍ ÞÅÓÔØ ÄÏ×ÅÓÔÉ ÄÏ ÷ÁÛÅÇÏ Ó×ÅÄÅÎÉÑ ÉÎÆÏÒÍÁÃÉÀ Ï ÂÅÓÐÌÁÔÎÏÍ ÒÏÚÙÇÒÙÛÅ ÐÒÏÇÒÁÍÍÎÙÈ ÐÒÏÄÕËÔÏ× ÆÉÒÍÙ Gupta ÎÁ ÓÔÅÎÄÅ 2101 ÎÁ ×ÙÓÁÔ×ËÅ Windows/EXPO, ÏÒÇÁÎÉÚÏ×ÁÎÎÏÍ áÓÓÏÃÉÁÃÉÅÊ ÐÏÌØÚÏ×ÁÔÅÌÅÊ Gupta É ÆÉÒÍÏÊ éÎÔÅÒÆÅÊÓ. Distribution: su Sender: news-service@srcc.msu.su X-Return-Path: gamma!npimsu!micro.chg.free.net!GUPTA%micro.chg.free.net Lines: 0 #! rnews 717 Path: pccross!srcc!newsserver Posted-Date: Sun, 11 Sep 1994 15:08:04 +0400 Newsgroups: fido7.bank_support Message-ID: Organization: Institute of Microelectronics, Chernogolovka, Russia From: GUPTA@micro.chg.free.net (Gupta Users Association) Date: Sun, 11 Sep 94 14:59:04 +0400 (MSD) X-Mailer: dMail (Demos Mail v1.09a) Subject: Gupta!!! îÁ ÓÔÅÎÄÅ 2101, ÏÒÇÁÎÉÚÏ×ÁÎÎÏÍ ÆÉÒÍÏÊ éÎÔÅÒÆÅÊÓ ÷Ù ÓÍÏÖÅÔÅ ÕÚÎÁÔØ ×ÓÅ Ï ÐÒÏÄÕËÔÁÈ Gupta - ÍÉÒÏ×ÏÇÏ ÌÉÄÅÒÁ × ÔÅÈÎÏÌÏÇÉÉ ËÌÉÅÎÔ-ÓÅÒ×ÅÒ ÄÌÑ ÐÅÒÓÏÎÁÌØÎÙÈ ×ÙÞÉÓÌÉÔÅÌØÎÙÈ ÓÅÔÅÊ. âÅÓÐÌÁÔÎÙÊ ÒÏÚÙÇÒÙÛ ÐÒÏÄÕËÔÏ× ÆÉÒÍÙ Gupta. Distribution: su Sender: news-service@srcc.msu.su X-Return-Path: gamma!npimsu!micro.chg.free.net!GUPTA%micro.chg.free.net Lines: 0 #! rnews 771 Path: pccross!srcc!newsserver Posted-Date: Sun, 11 Sep 1994 15:08:03 +0400 Newsgroups: fido7.bank-technology Message-ID: Organization: Institute of Microelectronics, Chernogolovka, Russia From: GUPTA@micro.chg.free.net (Gupta Users Association) Date: Sun, 11 Sep 94 14:56:46 +0400 (MSD) X-Mailer: dMail (Demos Mail v1.09a) Subject: ðÏÓÌÅÄÎÉÅ Ó×ÅÄÅÎÉÑ Ï ÎÏ×ÉÎËÁÈ ËÏÍÐÁÎÉÉ Gupta - ÍÉÒÏ×ÏÇÏ ÌÉÄÅÒÁ ÔÅÈÎÏÌÏÇÉÉ ËÌÉÅÎÔ--ÓÅÒ×ÅÒ ÄÌÑ ÐÅÒÓÏÎÁÌØÎÙÈ ×ÙÞÉÓÌÉÔÅÌØÎÙÈ ÓÅÔÅÊ ÷Ù ÓÍÏÖÅÔÅ ÐÏÌÕÞÉÔØ ÎÁ ÓÔÅÎÄÅ ÆÉÒÍÙ éÎÔÅÒÆÅÊÓ 2101 ÎÁ ×ÙÓÔÁ×ËÅ Windows/EXPO. ÷ÁÓ ÔÁËÖÅ ÏÖÉÄÁÅÔ ÓÀÒÐÒÉÚ - ÂÅÓÐÌÁÔÎÙÊ ÒÏÚÙÇÒÙÛ ÐÒÏÄÕËÔÏ× ÆÉÒÍÙ Gupta. Distribution: su Sender: news-service@srcc.msu.su X-Return-Path: gamma!npimsu!micro.chg.free.net!GUPTA%micro.chg.free.net Lines: 0 #! rnews 1293 Path: pccross!srcc!newsserver Message-ID: From: heep@icph.sherna.msk.su (Yuri D. KOBYZEV) Organization: SHERNA tel. +7 (095) 524 5040 -- login: guest Date: Mon, 12 Sep 94 13:50:33 +0400 (MSK) Newsgroups: fido7.net.wanted Distribution: su Subject: NE2000.com for NetWare+PCNFS+DML for Windows 1.0b vega WANTED Sender: news-service@srcc.msu.su X-Return-Path: gamma!icph!heep%icph.sherna.msk.su Lines: 21 ðÏÍÏÇÉÔÅ ÇOSÐÏÄÁ!! éÝÕ ÈÏÒÏÛÉÊ ÄÒÁÊ×ÅÒ NE2000. óÅÊÞÁÓ ÉÍÅÀ 2 ÄÒÁÊ×ÅÒÁ NE2000, ÎÏ ÏÎÉ ÎÅ ÏÞÅÎØ É ×ÏÔ ÐÏÞÅÍÕ. èÏÞÕ ÏÓÅÔÉÔØ ÒÏÄÎÏÊ ÉÎÓÔÉÔÕÔ. óÅÊÞÁÓ ÒÁÂÏÔÁÀ Ó Novell É Sparc (PC NFS). ôÁË ÞÔÏ ÂÕË×Ù ÄÒÁÊ×Ï× Sparca É Novell ×ÉÄÎÙ. òÁÂÏÔÁÀ ÞÅÒÅÚ lsl, ne2000..., ipxodi, netx. îÏ ×ÏÔ ÍÎÅ ÅÝÅ ÚÁÈÏÔÅÌÏÓØ DML for Windows ÚÁÐÕÓÔÉÔØ. á ÔÁÍ ÅÓÔØ ÄÒÁÊ×ÅÒ winpkt ôÁË ÏÎ ÏÔËÁÚÙ×ÁÅÔÓÑ ÒÁÂÏÔÁÔØ Ó NE2000, ËÏÔÏÒÙÊ ÉÓÐÌØÚÕÀ Ó Novell-NFS. äÒÕÇÏÊ NE2000 ÎÅ ÒÁÂÏÔÁÅÔ Ó Novell ÎÏ ÒÁÂÏÔÁÅÔ c NCSA É Ó DML for Windows. ÷ÏÔ É ÈÏÞÕ Ñ ÐÏÉÍÅÔØ NE2000 ÎÁ ×ÓÅ ÓÌÕÞÁÉ ÓÅÔÅ×ÏÊ ÖÉÚÎÉ. åÓÌÉ ËÔÏ ÍÎÅ ÔÁËÏÊ ÆÏÒ×ÁÒÄÎÅÔ ÂÕÄÕ ÏÞÅÎØ ÐÒÉÚÎÁÔÅÌÅÎ. àÒÁ. -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { phone 2774 | Ph.D. Yurii Dm. Kobyzev | Quantum Mathematics: x*D - q*D*x = 1} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #! rnews 1652 Newsgroups: alt.law-enforcement,ont.general,alt.fan.karla-homolka,alt.privacy,alt.conspiracy,can.general,can.legal,can.politics,alt.pub-ban.homolka,alt.security,fido7.security Path: pccross!srcc!unisun!dscomsa.desy.de!news.dkrz.de!news.dfn.de!Germany.EU.net!EU.net!uunet!utcsri!cdf.toronto.edu!g3glover From: g3glover@cdf.toronto.edu (Adam Glover) Subject: Re: Homolka pub-ban: Police investigations info. follows...... Message-ID: Sender: news@cdf.toronto.edu (Usenet News) Nntp-Posting-Host: eddie Organization: Kingdom #19. References: Date: Mon, 12 Sep 1994 00:18:13 GMT Lines: 17 Robert Riley wrote: >The efforts of Mr. Baillie to have this material >placed on the billboard may be seen as an attempt to publish if publish >is given its plain meaning of making known to the public. This is still incredibly vague. What about e-mailing on request? What about posting to mailing lists? What about making the material available at a gopher site? Never mind that posting anonymously or e-mailing the material to a user at a site outside Ontario who subsequently posts it are unenforceable. *************************************************************************** * "Support the power of women. Use the power of man. Support the flower * * of woman. Use the word 'fuck'. The word is love." -- Kim Gordon * * * * Adam Glover, U of T Comp. Sci. 9T5, g3glover@cdf.utoronto.ca * *************************************************************************** #! rnews 607 Path: pccross!srcc!unisun!ham.mics.msu.su!andrew From: andrew@ham.mics.msu.su (Andrew Shuvalov) Newsgroups: fido7.modem Subject: Modem, money, me ... Date: 12 Sep 1994 09:20:26 GMT Organization: Radio-MSU NOC, Moscow State University Lines: 12 Message-ID: <3516gq$2u3@unisun.radio-msu.net> NNTP-Posting-Host: ham.mics.msu.su X-Newsreader: TIN [version 1.2 PL2] Hello All! îÅ ÐÏÄÓËÁÖÅÔÅ ÌÉ ËÁËÏÊ ÓÁÍÙÊ ÌÕÞÛÉÊ ÆÁËÓ-ÍÏÄÅÍ 9600+ ÍÏÖÎÏ ËÕÐÉÔØ ÚÁ $200? íÏÂÉÌÅ Õ ÍÅÎÑ ÅÓÔØ - ÉÎÆÏÒÍÁÃÉÉ ÎÅÔ. íÅÎÑ ÉÎÔÅÒÅÓÕÅÔ ÎÅ ËÏÍÍÅÒÞÅÓËÉÅ ÐÒÅÄÌÏÖÅÎÉÑ, Á ÄÏÂÒÏÅ ÓÌÏ×Ï :-))) úÁÒÁÎÅÅ ÂÌÁÇÏÄÁÒÅÎ, áÎÄÒÅÊ ûÕ×ÁÌÏ×. /68.26 #! rnews 1228 Path: pccross!f230.n5020!f49.n5020!f196.n5020!Denis.Kuhtenkov Newsgroups: fido7.mo.talk Distribution: fido7 X-Comment-To: All From: Denis Kuhtenkov Date: Sun, 11 Sep 94 15:40:00 +0400 Subject: E-Mail ? Message-ID: <779301718@p3.f196.n5020.z2.ftn> Organization: ” KDV ” FidoNet X-FTN-AREA: MO.TALK X-FTN-PID: GED G0614 7765 X-FTN-TID: FastEcho 1.41/g 878 X-FTN-Tearline: ”””””””””””””””””””””””””””””””””” --- X-FTN-Tearline: ”””””””””””””””””””””””””””””””””” --- X-FTN-SEEN-BY: 5020/28 33 49 50 54 68 196 230 X-FTN-PATH: 5020/196 49 Lines: 20 úÄpÁ×ÓÔ×ÕÊ -×ÓÅÚÎÁÀÝÉÊ- All! çÄÅ ÍÏÖÎÏ ÐÏÌÕÞÉÔØ subj. ÁÄpÅÓ ? èÏÔÅÌÏÓØ ÂÙ ÚÎÁÔØ ÎÅ ÔÏÌØËÏ çäå , ÎÏ É ÎÁ ËÁËÉÈ ÕÓÌÏ×ÉÑÈ , Á ÔÁËÖÅ ËpÁÔËÉÅ Ó×ÅÅÎÉÑ . óÐÁÓÉÂÏ ÚÁ ×ÎÉÍÁÎÉÅ. + úÁpÁÎÅÅ ÂÌÁÇÏÄÁpÅÎ. ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ P.S. ïÔ×ÅÔ ÌÕÞÛÅ ÍÙÌÏÍ. DeNiS. --- ”””””””””””””””””””””””””””””””””” --- * Origin: ” KDV ” FidoNet DeNiS. #! rnews 1107 Path: pccross!f230.n5020!f49.n5020!f146.n5020!f301.n5020!Alexander.Gamora Newsgroups: fido7.cars Distribution: fido7 X-Comment-To: Valentin Uholkin From: Alexander Gamora Date: Sat, 10 Sep 94 08:57:30 +0400 Subject: Re: ÏÈÒÁÎÁ Message-ID: <779205619@p13.f301.n5020.z2.ftn> References: <779143975@f2.n5020.z2.ftn> Organization: ðÉÌÉÔÅ, ûÕÒÁ, ÐÉÌÉÔÅ - ÏÎÉ ÚÏÌÏÔÙÅ... X-FTN-AREA: SU.CARS X-FTN-PID: GED 2.41+ 3819 X-FTN-Tearline: É ÅÇÏ ÄÅÄÕÛËÁ X-FTN-SEEN-BY: 5020/28 33 49 50 54 57 68 103 146 150 230 254 301 X-FTN-PATH: 5020/301 146 49 Lines: 14 Hello Valentin! ðÑÔ óÅÎ 09 1994 20:43, Valentin Uholkin wrote to Pavel Senatorov: VU> ÈpÁÎÅÎÉÅ/ÜËÓÐÌÕÁÔÁÃÉÀ ×ÓÅÇÏ ÜÔÏÇÏ ÎÅ ÎÕÖÎÏ. ÷ÓÅ ÞÔÏ × ÍÁÛÉÎÅ - ÍÏÑ VU> ÓÏÂÓÔ×ÅÎÎÏÓÔØ. ÷ÐpÏÞÅÍ ÜÔÏ ×ÓÅ ÓÏÏÂpÁÖÅÎÉÑ. á ÎÅÔ ÌÉ Õ ËÏÇÏ ÎÁ ÓÅÊ ÓÌÕÞÁÊ VU> ÂÕË×Ù ÚÁËÏÎÁ ÉÌÉ ÐpÅÃÅÄÅÎÔÏ×. ðpÅ×ÙÛÅÎÉÅ ÐpÅÄÅÌÏ× ÎÅÏÂÈÏÄÉÍÏÊ ÓÁÍÏÏÂÏpÏÎÙ, ÎÏ ÅÓÌÉ ÔÏÔ, ËÔÏ × ÍÁÛÉÎy ÚÁÌÅÚ ÖÉ× ÏÓÔÁÌÓÑ, É ÏÓÏÂÏ ÓÉÌØÎÏ ÎÅ ÐÏËÁÌÅÞÉÌÓÑ (pyËÉ-ÎÏÇÉ-ÇÏÌÏ×Á ÎÁ ÍÅÓÔÅ), ÔÏ ÐpÁËÔÉÞÅÓËÉ ÎÉÞÅÍ ÜÔÏ ÎÅ Ó×ÅÔÉÔ. Alexander #! rnews 2516 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f213.n5020!Igor.Slusarev Newsgroups: fido7.hardw.pc.motherboard Distribution: fido7 X-Comment-To: Sergey Fedosenkov From: Igor Slusarev Date: Fri, 09 Sep 94 21:19:24 +0400 Subject: fake clone of i486 Message-ID: <779149332@p18.f213.n5020.z2.ftn> References: <778874914@p43.f151.n5020.z2.ftn> Organization: Hungry Scorpion Station, Moscow, Russia X-FTN-AREA: SU.HARDW.PC.MOTHERBOARD X-FTN-Tearline: GoldED/2 2.50.A0531+ X-FTN-SEEN-BY: 5020/35 41 49 50 54 64 68 75 103 134 146 168 178 188 196 203 213 X-FTN-SEEN-BY: 5020/215 226 230 249 286 290 5055/6 5063/1 5080/22 X-FTN-PATH: 5020/213 68 49 Lines: 49 úÄÒÁ×ÓÔ×ÕÊ, Sergey! Tuesday September 06 1994 18:06, Sergey Fedosenkov wrote to All: SF> Machine A is identified as SF> PC Bench 8.0 cpu id = 80486 /66.6 SF> PC Bench 8.0 cpu performance almost identical to machine B SF> Award Bios boot sequence cpu type 80486DX2 SF> Machine B is identified as SF> PC Bench 8.0 cpu id = CX486SLC/58.7 SF> PC Bench 8.0 cpu performance almost identical to machine A SF> Award Bios boot sequence cpu type 80486DX2-S þÔÏ ÓËÁÚÁÌ ÂÙ ðã âÜÎÞØ ÐpÏ ÍÏÊ ÐpÏÃÅÓÓÏp Ñ ÎÅ ÚÎÁÀ, Ô.Ë. Õ ÍÅÎÑ ÅÇÏ ÎÅÔ. á ×ÏÔ á×ÁpÄ ÇÏ×ÏpÉÔ ÞÔÏ DX2-S. ëÓÔÁÔÉ, Ë ÚÁÑ×ÌÅÎÉÑÍ ÔÅÓÔÏ× Ñ ÏÔÎÏÛÕÓØ ÔÁË ÖÅ ËÁË Ë pÅËÌÁÍÅ - ÓÌÕÛÁÀ, ÎÏ ÚÎÁÀ ÞÔÏ ÏÐÑÔØ ÏÂÍÁÎÕÔ. á ËÏÇÄÁ Ñ ÅÇÏ ËÕÐÉÌ É ÂÙÌÉ ÎÅËÏÔÏpÙÅ ÓÏÍÎÅÎÉÑ, ÔÏ ×ËÌÀÞÉÌ ÅÇÏ ËÁË Cyrix. HÁ ÍÏÅÊ ÍÁÍÅ, ÓpÅÄÉ ÐpÏÞÉÈ, ÅÓÔØ ÐÏÄÄÅpÖËÁ Cyrix c WB É c WT ÏÔÄÅÌØÎÏ. õÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ÐÅpÅÍÙËÁÍÉ. ôÁË ÏÎ ÄÁÖÅ ÎÅ ÚÁÐÕÓÔÉÌÓÑ. SF> After I open both machine and compare the CPU directly I wrote all the SF> marking on each CPU þÔÏ ÎÁÐÉÓÁÎÏ ÎÁ ËÏpÐÕÓÅ ÎÅ ÐÏÍÎÀ, Á ×ÓÅ pÁÚÂÉpÁÔØ ×ÌÏÍ. ôÅÍ ÂÏÌÅÅ, ÞÔÏ ÜÔÏÔ ÐpÏÃÅÓÓÏp Õ ÍÅÎÑ ÐpÅËpÁÓÎÏ pÁÂÏÔÁÅÔ ÎÁ 80íÇÃ, ÎÉÞÅÇÏ ÎÅ ÇÌÀÞÉÔ, É ÐpÉ 0WS ÎÁ ÐÁÍÑÔØ É 1WS ÎÁ ËÜÛ SI v6.0 ËÁÖÅÔ 176.8. SF> ÐpÏÄÏÌÖÅÎÉÅ ÔÅÍÁÔÉËÉ ÂÕÄÕ ËÉÄÁÔØ ÐÏ ÍÅpÅ SF> ÐÏÓÔÕÐÌÅÎÉÑ, ÅÓÌÉ ×ÓÅÍ ÉÎÔÅpÅÓÎÏ, ËÏÎÅÞÎÏ.... éÎÔÅpÅÓÎÏ. SF> p.s. ÅÎÔÏÔ PC Bench (PC Magazine Labs) - Ñ ÓÏÄpÁÌ, ÔÁË ÞÔÏ ÅÓÌÉ ËÔÏ SF> ÈÏÞÅÔ ÕÚÎÁÔØ ÎÁÓÔÏÑÝÉÊ Õ ÎÅÇÏ éÎÔÅÌ ÉÌÉ ÎÅÔ - ÍÏÇÕ ÐÏÌÏÖÉÔØ ÎÁ SF> pÁÚÄÁÞÕ... äÁÊ ÍÎÅ, ÎÁ 14400, ÉÎÔÅpÅÓÎÏ ×ÓÅ ÖÅ ... SF> ;-( - ÐÏËÁ Ñ ÓÅÂÅ éÎÔÅÌ, pÁÚÇÏÎÑÅÍÙÊ ÄÏ 80 íçà ÔÁË É ÎÅ ÎÁÛÅÌ. á ÍÁÍÕ ÄpÕÇÕÀ ÎÅ ÐpÏÂÏ×ÁÌ? á ÔÏ ÇÏ×ÏpÑÔ, ÞÔÏ ÎÅ ×ÓÅ ÍÁÍÙ ÄÏÚ×ÏÌÑÀÔ ÉÚÄÅ×ÁÔØÓÑ ÎÁÄ ÐpÏÃÅÓÓÏpÏÍ. ;-) õÄÁÞÉ, Igor. #! rnews 988 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f213.n5020!Igor.Slusarev Newsgroups: fido7.os2.comm Distribution: fido7 X-Comment-To: All From: Igor Slusarev Date: Fri, 09 Sep 94 22:48:41 +0400 Subject: Warp II É COMM.DRV Message-ID: <779154914@p18.f213.n5020.z2.ftn> Organization: Hungry Scorpion Station, Moscow, Russia X-FTN-AREA: SU.OS2.COMM X-FTN-Tearline: GoldED/2 2.50.A0531+ X-FTN-SEEN-BY: 5020/24 35 41 49 50 68 103 134 146 168 188 196 213 230 290 5063/1 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5020/213 68 49 Lines: 11 úÄÒÁ×ÓÔ×ÕÊ, All! ðÏÓÔÁ×ÉÌ Win Fax Lite ÐÏÄ W4WG ÐÏÄ Warp II. á ÏÎ, ÍÅÌËÁÑ ÓÏÂÁËÁ, ÎÅ pÁÂÏÔÁÅÔ - ÇÏ×ÏpÉÔ COM ÕÖÅ ÏÔËpÙÔ. éÚÍÅÎÅÎÉÅ ÎÁÓÔpÏÅË ÓÅÓÓÉÉ ÎÅ ÐÏÍÏÇÌÏ. ôÏÇÄÁ Ñ ×ÚÑÌ COMM.DRV ÏÔ OS/2 2.1 É ×ÓÅ ÚÁpÁÂÏÔÁÌÏ. ôÁË ÞÔÏ, ÅÓÌÉ Õ ËÏÇÏ ÂÕÄÕÔ ÐÏÄÏÂÎÙÅ ÐpÏÂÌÅÍÙ - ÓÄÅÌÁÊÔÅ ÔÁË ÖÅ. õÄÁÞÉ, Igor. #! rnews 2173 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f213.n5020!f122.n5020!Ivan.Frolcow Newsgroups: fido7.c_cpp Distribution: fido7 X-Comment-To: Boris Tobotras From: Ivan Frolcow Date: Fri, 09 Sep 94 07:42:24 +0400 Subject: ôÅÏÒÅÔÉËÉ, Ë ×ÁÍ ×ÏÐÒÏÓ! Message-ID: <779100747@p52.f122.n5020.z2.ftn> References: <3873234294@p7.f20.n5020.z2.ftn> Organization: ëÁËÏÊ Ñ ÕÍÎÙÊ? üÔÏ ÞÔÏ-ÔÏ... X-FTN-AREA: SU.C_CPP X-FTN-Tearline: GoldED 2.42.G1219+ X-FTN-SEEN-BY: 5020/24 33 35 41 49 50 54 57 64 68 75 103 122 134 136 146 168 188 X-FTN-SEEN-BY: 5020/203 213 215 224 226 230 290 5055/6 5063/1 X-FTN-PATH: 5020/122 213 68 49 Lines: 48 Hello Boris! 07 Sep 94 18:58, Boris Tobotras wrote to Ivan Frolcow: BT> óÏ×ÅpÛÅÎÎÏ ÎÅ ÔÏ × ÐÌÀÓÅ. úÄÅÓØ ×ÁÖÎÏ ôïþHïå ÓÏÏÔ×ÅÔÓÔ×ÉÅ BT> ÔÉÐÏ×, ÎÁÐpÉÍÅp, ÐpÉ pÁÚpÅÛÅÎÉÉ ×ÙÚÏ×Ï× overloaded ÆÕÎËÃÉÊ. éÌÉ BT> ×ÏÔ ÂÏÌÅÅ ÍpÁÞÎÙÊ ÐpÉÍÅp: BT> void inc( char &c ) { BT> ++c; BT> } BT> void main( void ) { BT> char c; BT> signed char sc; BT> unsigned char uc; BT> inc( c ); BT> inc( sc ); BT> inc( uc ); BT> } BT> ôÏÌØËÏ × ÐÅp×ÏÍ ÓÌÕÞÁÅ ÚÎÁÞÅÎÉÅ ÐÅpÅÍÅÎÎÏÊ ÉÚÍÅÎÉÔÓÑ. BT> ïÂßÑÓÎÑÔØ, ÐÏÞÅÍÕ? HÁ ÏÓÎÏ×Å ÍÉËÒÏÓËÏÐÉÞÅÓËÉÈ ÏÓÔÁÎËÏ× ÚÎÁÎÉÑ ++, ÏÓÔÁ×ÛÉÈÓÑ Õ ÍÅÎÑ Ó ÔÏÊ ÐÏÒÙ, ËÏÇÄÁ Ñ ÉÍ ÉÎÔÅÒÅÓÏ×ÁÌÓÑ, Ñ ÈÏÞÕ ÔÅÂÑ ÓÐÒÏÓÉÔØ - Á ËÁË ÔÙ ÅÅ ÌÉÎËÏ×ÁÔØ ÂÕÄÅÛØ? ( á ÐÒÁ×ÄÁ, ÞÔÏ × ïÄÅÓÓÅ ÏÔ×ÅÞÁÀÔ ×ÏÐÒÏÓÏÍ ÎÁ ×ÏÐÒÏÓ - á ËÔÏ ×ÁÍ ÜÔÏ ÓËÁÚÁÌ? :-)))) HÕ Á ×ÏÏÂÝÅ-ÔÏ ÔÙ ÐÒÁ×. ôÏÌØËÏ ÒÅÞØ ÛÌÁ ÎÅ Ï ÐÌÀÓÅ, ÐÏ ËÒÁÊÎÅÊ ÍÅÒÅ Ñ Ï ÎÅÍ ÎÅ ÒÁÚÇÏ×ÁÒÉ×ÁÌ :-))) é ÄÁ×ÁÊ Ï ÜÔÏÍ ÄÕÒÁÃËÏÍ char'e ÇÏ×ÏÒÉÔØ ÂÏÌØÛÅ ÎÅ ÂÕÄÅÍ? ëÓÔÁÔÉ, ÏÂÒÁÔÉ ×ÎÉÍÁÎÉÅ, ÎÁÓËÏÌØËÏ ÜÔÏ ×ÓÅ × ++ ÐÏ-ÌÅ×ÏÍÕ ÏÒÇÁÎÉÚÏ×ÁÎÏ (_IMHO_) BTW, ÚÁ ÔÏ, ÞÔÏ char ÐÒÉ ÐÅÒÅÄÁÞÅ ÐÁÒÁÍÅÔÒÏ× ×ÓÅÇÄÁ ÐÒÅÏÂÒÁÚÕÅÔÓÑ × int Ñ ÎÅ ÍÏÇÕ ÐÏÒÕÞÉÔÓÑ - ÓÍÏÔÒÉ ËÎÉÖËÕ ÍÎÏÇÏÓÔÒÁÄÁÌØÎÏÇÏ òÅËÓÁ BT> þÔÏ, Ë ÞÅpÔÑÍ, ÔÙ ÐÏÄpÁÚÕÍÅ×ÁÌ ÐÏÄ 'are'? "÷ÅÄÅÔ ÓÅÂÑ, ËÁË" BT> ÉÌÉ "Ñ×ÌÑÅÔÓÑ"?! ä÷ïåþHéë ñ âùì ÷ ûëïìå!!!! :~-(( BT> õÇÕ, ÓÉÅ ÅÓÔØ ÂÅÓÓÐÏpÎÏÅ ÄÏËÁÚÁÔÅÌØÓÔ×Ï Ô×ÏÅÊ ÐpÁ×ÏÔÙ ÐÏ BT> ÌÀÂÏÍÕ ×ÏÐpÏÓÕ ;-) HÅÔ, ÎÁÍÅË ÎÅËÏÔÏÒÙÍ ÔÏ×ÁÒÉÝÁÍ ( ÎÁÄÅÀÓØ, ÎÅ ÔÅÂÅ :-)) ÷ÓÅÇÏ ÔÅÂÅ ÈÏÒÏÛÅÇÏ! Ivan #! rnews 1363 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f213.n5020!f122.n5020!Ivan.Frolcow Newsgroups: fido7.c_cpp Distribution: fido7 X-Comment-To: "Alexander V. Naumochkin" From: Ivan Frolcow Date: Fri, 09 Sep 94 13:19:30 +0400 Subject: ôÅÏÒÅÔÉËÉ, Ë ×ÁÍ ×ÏÐÒÏÓ! Message-ID: <779120547@p52.f122.n5020.z2.ftn> References: <778936637@f59.n5020.z2.ftn> Organization: ëÁËÏÊ Ñ ÕÍÎÙÊ? üÔÏ ÞÔÏ-ÔÏ... X-FTN-AREA: SU.C_CPP X-FTN-Tearline: GoldED 2.42.G1219+ X-FTN-SEEN-BY: 5020/24 33 35 41 49 50 54 57 64 68 75 103 122 134 136 146 168 188 X-FTN-SEEN-BY: 5020/203 213 215 224 226 230 290 5055/6 5063/1 X-FTN-PATH: 5020/122 213 68 49 Lines: 15 Hello Alexander! 07 Sep 94 11:10, Alexander V. Naumochkin wrote to Pavel Burdanov: AVN> ÷ ó++ ÐpÏÓÔÏ char ×ÓÅ-pÁ×ÎÏ ÂÕÄÅÔ ×ÅÓÔÉ ÓÅÂÑ ÔÏÞÎÏ ÔÁËÉÍ ÖÅ AVN> ÏÂpÁÚÏÍ, ËÁË É ËÁËÏÊ-ÔÏ ÉÚ ÐÁpÏÞËÉ signed/unsigned (ËÁË É × ó), AVN> ÎÏ ÕÚÎÁÔØ - ËÁË ËÏÔÏpÙÊ ÉÍÅÎÎÏ, ÎÅ ÉÍÅÑ ÉÎÆÏpÍÁÃÉÉ Ï AVN> ËÏÍÐÕÔÅpÅ/ËÏÍÐÉÌÑÔÏpÅ, ÎÅ ÐÏÌÕÞÉÔÓÑ (ÏÐÑÔØ-ÔÁËÉ ËÁË É × ó). á ÎÉËÔÏ ÎÅ ÐÒÏÂÏ×ÁÌ CHAR_MIN ÎÁ ÏÔÎÏÛÅÎÉÅ Ó ÎÕÌÅÍ ÓÒÁ×ÎÉ×ÁÔØ? á ÔÏ ÅÓÌÉ ÏÎ ÐÏÌÏÖÉÔÅÌØÎÙÊ, ÔÏ char unsigned ÉÎÁÞÅ signed? CHAR_MIN ÞÉÓÌÅÎÎÁÑ ËÏÎÓÔÁÎÔÁ, É, ÓÌÅÄÏ×ÁÔÅÌØÎÏ, int, É ÐÏÜÔÏÍÕ ÐÒÉ ÓÒÁ×ÎÅÎÉÉ Ó 0 ÎÉËÁËÉÈ ÂÑË ×ÒÏÄÅ ÎÅ ÄÏÌÖÎÏ ÂÙÔØ. åÓÌÉ ÎÅ ÜÔÏ ÉÍÅÌÏÓØ × ×ÉÄÕ, ÐÒÏÓÔÉÔÅ ÚÁ ÎÅÐÏÎÉÍÁÎÉÅ. Ivan #! rnews 1313 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f52.n5020!Yuri.Bibikov Newsgroups: fido7.exch.computer Distribution: fido7 X-Comment-To: All From: Yuri Bibikov Date: Thu, 08 Sep 94 00:50:00 +0400 Subject: Something for sale & buy Message-ID: <779003436@p72.f52.n5020.z2.ftn> Organization: Unrecoverable Application Error - Detonation follows. X-FTN-AREA: PVT.EXCH.COMPUTER X-FTN-Tearline: GoldED 2.41+ X-FTN-SEEN-BY: 5020/1 23 35 41 46 49 50 52 54 55 62 64 68 75 100 103 109 111 124 X-FTN-SEEN-BY: 5020/126 134 139 146 151 168 178 180 188 196 200 203 213 215 216 X-FTN-SEEN-BY: 5020/226 230 233 241 249 259 261 268 286 290 327 340 371 400 5055/6 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5020/52 35 68 49 Lines: 16 äÅÎØ ÄÏÂpÙÊ, All! ðpÏÄÁÅÔÓÑ ×ÓÅ ×ÍÅÓÔÅ ÉÌÉ ×pÁÚÂÉ×ËÕ: 1. ÷ÉÄÅÏËÁpÔÁ Trident 8900 SVGA 1M - 60$ 2. æÌÏÐÏ×ÏÄ TEAC 360 K - 15$ 3. ÷ÉÄÅÏÁËÓÅÌÅpÁÔÏp Kelvin ÆÉpÍÙ Orchid - ÛÉÎÁ PCI, 64 pÁÚpÑÄÁ, 1 ÍÅÇ VRAM, upgradable ÄÏ Ä×ÕÈ - 300$ ëÕÐÌÀ: 2 ÛÔÕËÉ áp×ÉÄ 1010 (1020 ÎÅ ÐpÅÄÌÁÇÁÔØ - ÎÅ ÐÁÛÅÔ). ú×ÏÎÉÔØ 457-8085, ÌÕÞÛÅ ÐÏÓÌÅ 19 ÞÁÓÏ×. Best regards to all, Yuri #! rnews 1358 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f261.n5020!Boris.Djatlov Newsgroups: fido7.aon Distribution: fido7 X-Comment-To: Markov & Pasha From: Boris Djatlov Date: Wed, 07 Sep 94 02:25:31 +0400 Subject: rules Message-ID: <2097358438@f261.n5020.z2.fidonet> Organization: THE NIGHT COURIER BBS 095-290-0692 HST DS 0-9MSK X-FTN-AREA: RU.AON X-FTN-PID: FM 2.2.mL AS3B79D9 X-FTN-Tearline: FM2.20 GEcho 1.02+ X-FTN-SEEN-BY: 5020/23 35 41 49 50 52 54 62 68 103 146 168 178 188 200 203 213 226 X-FTN-SEEN-BY: 5020/230 235 241 249 261 268 290 5025/10 5055/6 X-FTN-PATH: 5020/261 35 68 49 Lines: 22 * Forwarded from "RU.AON.ROM" * Originally by Boris Djatlov, 2:5020/261@fidonet * Originally to Moderator * Originally dated 7 Sep 1994, 3:24 > ª””””””””””””””””””””””””””””””””””””” > ƒ ôÅÍÁÔÉËÁ ÜÈÏ-ËÏÎÆÅpÅÎÃÉÊ RU.AON.ROM ƒ > ”””””””””””””””””””””””””””””””””””””© > äÁÎÎÁÑ ÜÈÏ-ËÏÎÆÅpÅÎÃÉÑ ÐpÅÄÎÁÚÎÁÞÅÎÁ ÄÌÑ pÁÓÓÙÌËÉ × ÆÏpÍÁÔÅ UUENCODE > pÁÚ- > ÌÉÞÎÙÈ ×ÅpÓÉÊ ÐpÏÇpÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ ÄÌÑ áïH ×ÓÅÈ ÍÏÄÅÌÅÊ, Á ÔÁËÖÅ > ÆpÁÇ- > ÍÅÎÔÏ× ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× ÜÔÏÇÏ ÐpÏÇpÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ. ðÕÓÔÏÔÁ ÔÕÔ Ú×ÅÎÉÔ, É ÎÉËÁËÉÈ pÁÓÓÙÌÏË, ÐÏÎÉÍÁÔÅÌÉ. ëÏÇÄÁÖ RUS 17 ÓÏÓÐÅÅÔ ? ;) Sincerely, Boris Djatlov #! rnews 1305 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f261.n5020!Boris.Djatlov Newsgroups: fido7.mo.talk Distribution: fido7 X-Comment-To: Sergey Ogurtsov From: Boris Djatlov Date: Wed, 07 Sep 94 12:48:05 +0400 Subject: ðÒÏ ÎÁÓÔÏÑÝÉÈ... Message-ID: <2098030054@f261.n5020.z2.fidonet> References: <778903170@p3.f204.n5020.z2.ftn> Organization: THE NIGHT COURIER BBS 095-290-0692 HST DS 0-9MSK X-FTN-AREA: MO.TALK X-FTN-PID: FM 2.2.mL AS3B79D9 X-FTN-Tearline: FM2.20 GEcho 1.02+ X-FTN-SEEN-BY: 5020/1 23 28 33 35 41 49 50 52 54 62 68 111 134 146 168 173 188 196 X-FTN-SEEN-BY: 5020/200 203 215 224 230 241 249 261 268 286 290 5025/10 X-FTN-PATH: 5020/261 35 68 49 Lines: 19 Hi Sergey Ogurtsov! 06 Sep 94 21:58:00 from 2:5020/204.3 you speak to Boris Djatlov: about ðÒÏ ÎÁÓÔÏÑÝÉÈ... > BD> ôÁÍ Õ ÔÅÂÑ × ÌÀÂÏÍ ÍÁÇÁÚÉÎÅ, ÇÄÅ ÕÇÏÄÎÏ, ÓÐpÏÓÑÔ: > BD> "á ÏÔËÕÄÁ Õ ÷ÁÓ ÎÁÌÉÞÎÙÅ ÂÏÌØÛÅ $10000? á ÄÏËÕÍÅÎÔ ÅÓÔØ?" > ôÕÔ, ÄÕÍÁÀ, ÔÙ ÎÁÐÕÔÁÌ... èÍ. þÅÌÏ×ÅË Ó ÎÁÌÉÞÎÙÍÉ ÂÏÌØÛÅ $10000-$20000 × pÕËÁÈ ÎÁ ÚÁÐÁÄÅ ?! õ ×ÓÅÈ ÞÅËÉ É ËÁpÔÏÞËÉ. ïÂÑÚÁÔÅÌØÎÏÇÏ c ÔÁËÏÊ ÓÕÍÍÏÊ ÐpÏ×ÅpÑÔ, ÏÔËÕÄÁ, × ËÁËÏÍ ÂÁÎËÅ ×ÙÄÁÎÙ, ÎÁ ÚÁÍÅÔËÕ ÕÖ ÔÏÞÎÏ ×ÏÚØÍÕÔ. P.S. ó ÐpÉÅÚÄÏÍ! HÁÄÅÀÓØ ÔÙ Ó ÔÁËÉÍÉ ÓÕÍÍÁÍÉ ÔÁÍ ÎÅ ÈÏÄÉÌ? ;) Sincerely, Boris Djatlov #! rnews 1320 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f42.n5020!Serge.Khmelnov Newsgroups: fido7.net Distribution: fido7 X-Comment-To: Michail Havin From: Serge Khmelnov Date: Tue, 06 Sep 94 00:08:44 +0400 Subject: COMPAQÏ×ÓËÉÊ ÔÒÁÎÓÉ×ÅÒ Message-ID: <778828264@f42.n5020.z2.ftn> References: <778468529@p19.f279.n5020.z2.ftn> Organization: CHiP-N-DALE ¾PqhC¾ [down!] X-FTN-AREA: SU.NET X-FTN-PID: GED 2.41+ 1898 X-FTN-Tearline: Oblivion/2 v2.20Ó17 X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 33 35 41 42 44 49 50 52 54 56 62 64 X-FTN-SEEN-BY: 5020/68 75 134 146 168 173 188 200 203 213 215 226 230 241 268 290 X-FTN-SEEN-BY: 5026/3 5027/3 5030/6 5055/6 5063/1 5080/22 X-FTN-PATH: 5020/42 23 35 68 49 Lines: 13 Hello Michail! MH> åÓÔØ ÓÕÂÖ ×ÎÅÛÎÉÊ ÎÁÚÙ×ÁÅÔÓÑ MiLAN. ÷ÓÅ Ó ÎÉÍ ÈÏÒÏÛÏ ËÒÏÍÅ ÏÄÎÏÇÏ: MH> ÅÓÔØ ÔÁÍ ÓÂÏËÕ ÐÅÒÅÍÙÞËÁ ÎÁÚÙ×ÁÅÔÓÑ SQE on/off Õ ËÏÇÏ ÎÅ ÓÐÒÁÛÉ×ÁÀ ÎÉËÔÏ MH> ÎÅ ÚÎÁÅÔ ÞÔÏ ÔÁËÏÅ ÜÔÏÔ SQE :( íÏÖÅÔ ALL ÚÎÁÅÔ? ôÒÁÎÓÉ×ÅÒ ÒÁÂÏÔÁÅÔ ËÁË ÐÒÉ MH> ÏÎÅ ÔÁË É ÐÒÉ ÏÆÆÅ. Signal Quality ÎÅ ÔÏ Error ÎÅ ÔÏ Enable.. âÙÌ ÔÁËÏÊ subj, Ó ÂÅÓÔÏÌËÏ×ÏÊ ÂÕÍÁÖËÏÊ, ÇÄÅ ÎÁÐÉÓÁÎÏ ÞÔÏ ×ÔÙËÁÔØ Ó ÚÁ×ÏÄÓËÏÊ ÕÓÔÁÎÏ×ËÏÊ (on), É ×ÓÅ.. ËÁË Ñ ÐÏÎÑÌ ÜÔÏ ÓÉÇÎÁÌ ÎÁ AUI-ÓÔÙËÅ, ËÏÔÏpÙÊ ÎÉËÔÏ pÅÁÌØÎÏ ÎÅ ÉÓÐÏÌØÚÕÅÔ. ðpÉ×ÅÔÙ, Serge #! rnews 3816 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f71.n5030!f133.n5030!Serge.Bryxin Newsgroups: fido7.sex Distribution: fido7 X-Comment-To: Kirill Shestopalov From: Serge Bryxin Date: Mon, 05 Sep 94 23:41:00 +0400 Subject: About Lisa Message-ID: <778815396@p26.f133.n5030.z2.ftn> References: <778660629@p21.f19.n5030.z2.ftn> Organization: Old Greaser's X-FTN-AREA: RU.SEX X-FTN-TID: FastEcho 1.40 11 X-FTN-Tearline: GoldEd 2.41 for OS/2 X-FTN-SEEN-BY: 5015/4 5020/1 23 24 35 41 44 49 50 52 54 62 64 68 75 103 124 134 X-FTN-SEEN-BY: 5020/146 168 188 200 203 213 230 249 268 290 327 5026/3 5030/6 7 10 X-FTN-SEEN-BY: 5030/11 16 32 44 48 69 71 86 96 100 106 108 119 133 195 5055/6 X-FTN-SEEN-BY: 5063/1 5080/22 X-FTN-PATH: 5030/133 71 6 5020/23 35 68 49 Lines: 74 Hello Kirill! 04 Sep 94 06:16, Kirill Shestopalov wrote to Serge Bryxin: KS> ðÏÓÞÉÔÁÊ, ÓËÏÌØËÏ ÂÙÌÏ ÐÉÓÅÍ ÄÌÑ ÎÅÅ É ÏËÏÌÏ ÎÅÅ. ÷ ÏÓÎÏ×ÎÏÍ - _ÐÏÓÌÅ_ ÎÅÅ. þÔÏ, ÓÏÂÓÔ×ÅÎÎÏ É ÄÏËÁÚÙ×ÁÅÔ ÎÁÌÉÞÉÅ ÉÎÔÅpÅÓÁ Ë ÚÁÎÑÔÉÑÍ, Á ÎÅ Ë ÌÉÞÎÏÓÔÉ SUBJ. KS> äÁ É ÐÉÓØÍÁ ÜÔÉ × ÏÓÎÏ×ÎÏÍ ÂÙÌÉ ÓÔpÏÇÏ ÐÏ ÔÅÍÅ KS> ËÏÎÆÅpÅÎÃÉÉ, Á ÎÅ pÁÓÔÅËÁÔÅÌØÓÔ×Á ÍÙÓÌØÀ ÐÏ ÄpÅ×y. HÕ ÜÔÏ ËÏÍÕ ÞÔÏ ÎpÁ×ÉÔÓÑ. ñ ÎÁÐpÉÍÅp, ÐpÅÄÐÏÞÉÔÁÀ "pÁÓÔÅËÁÔØ", ÎÅÖÅÌÉ ÏÂÓÕÖÄÁÔØ ÃÅÎÕ ÖÅÎÓËÏÇÏ ÔÅÌÁ × ÄpÕÇÏÍ ÇÏpÏÄÅ ( ÄÁ ÅÝÅ ËÏÇÄÁ ÃÅÎÁ ÓÏÓÔÁ×ÌÑÅÔ 1.5 ÍÏÅÊ ÚÁpÐÌÁÔÙ :) . åÓÌÉ ÓÀÄÁ ÎÁÞÎÕÔ ÐÉÓÁÔØ ÓÔpÏÇÏ "ÐÏ ÔÅÍÅ" - Ô.Å. ÉÓËÌÀÞÉÔÅÌØÎÏ Ï ÐÏÌÏ×ÏÍ ÁËÔÅ - 3/4 ÎÁpÏÄÁ ÏÔÓÀÄÁ ÓÇÉÎÅÔ, É ÐpÁ×ÉÌØÎÏ ÓÄÅÌÁÅÔ. HÁ ÓÁÍÏÍ ÄÅÌÅ, ÅÓÌÉ ÉÍÅÔØ × ×ÉÄÕ ÏpÉÇÉÎÁÌØÎÕÀ (ÁÎÇÌÉÊÓËÕÀ) ÔpÁËÔÏ×ËÕ ÓÌÏ×Á "sex" - ÔÏ ÐÉÓØÍÁ ìÉÚÙ, IMHO, ËÁË pÁÚ _ÎÅ_ ÓÏÏÔ×ÅÔÓÔ×Ï×ÁÌÉ ÔÅÍÅ ËÏÎÆÅpÅÎÃÉÉ. KS>>> ðpÉÛÅÌ × ÜÈy ÞÅÌÏ×ÅË ÐÏÏÂÝÁÔØÓÑ, Á ÅÅ ÎÁÏÔÍÁÛØ, ÄÁ ÐÏ ÍÏpÄÁÓÁÍ. SB>> äÁ ÎÅ ÔÁË ÞÔÏÂÙ ÕÖ ÏÞÅÎØ. KS> á NetMail ÔÙ ÞÉÔÁÌ? ôÁÍ ÎÁ×ÅpÎÑËÁ ÍÎÏÏÏÇÏ ÞÅÇÏ ÎÁÐÉÓÁÌÉ. HÅ ÞÉÔÁÌ, ÓÌÁ×Á âÏÇÕ. üÈÁ ÎÅ ÍÏÖÅÔ ÎÅÓÔÉ ÏÔ×ÅÔÓÔ×ÅÎÎÏÓÔØ ÚÁ ÔÏ, ÞÔÏ ÐÉÛÅÔÓÑ ×ÎÅ ÅÅ. åÓÌÉ ËÔÏ-ÔÏ ÜÔÏÇÏ ÎÅ ÐÏÎÉÍÁÅÔ - ÍÏÖÎÏ ÐÏÐÙÔÁÔØÓÑ ÏÂßÑÓÎÉÔØ. HÏ ÉÚÍÅÎÉÔØ ×ÓÅ pÁ×ÎÏ ÎÅ×ÏÚÍÏÖÎÏ. SB>> åÓÌÉ Ñ ÎÁÞÎÕ ÐÉÓÁÔØ, ÞÔÏ Ñ - áÌÅÎ äÅÌÏÎ, SB>> . . . . . SB>> ÍÅÎÑ ÖÅ ÎÁ pÕËÁÈ ÎÏÓÉÔØ ÎÅ ÓÔÁÎÕÔ? KS> ðÏÞÅÍy, ×ÎÅÓÅÛØ ÏÖÉ×ÌÅÎÉÅ × ÜÈy, Ñ ÂÙ ÏÄÏÂpÉÌ, ôÙ, ÍÏÖÅÔ ÂÙÔØ, É ÏÄÏÂpÉÌ ÂÙ... KS> ðÏËÁÚÁÌÉ "pÅÁËÃÉÀ ÎÁ ÞyÖÁËÁ". ÷Ï-×Ï - ÞÕÖÁËÁ! á ÐÏÞÅÍÕ? ðÏÞÅÍÕ ÏÎÁ - É ×ÄpÕÇ ÞÕÖÁË, ÅÓÌÉ ÐÏ ÚÁ×ÅpÅÎÉÑÍ ÍÎÏÇÉÈ ÓÏÞÕ×ÓÔ×ÕÀÝÉÈ ÏÎÁ × ÃÅÌÏÍ ÎÅ ÏÔÌÉÞÁÅÔÓÑ ÏÔ ÌÀÂÏÇÏ ÉÚ ÎÁÓ? HÅ ÐÏÔÏÍÕ ÞÔÏ ÐpÏÓÔÉÔÕÔËÁ. ðÏÔÏÍÕ ÞÔÏ ÏÔÇÏpÏÄÉÌÁÓØ ÓpÁÚÕ. óËÁÚÁÌÁ: Õ ×ÁÓ ÔÕÔ, ÌÑÇÕÈÉ, Ó×ÏÅ ÂÏÌÏÔÃÅ, ÄÁÊÔÅ-ÔËÏ Ñ ×ÁÍ ×ÏÄÉÃÕ ÐÏÂÁÌÁÍÕÞÕ. HÁÐpÁÛÉ×ÁÅÔÓÑ ÓpÁ×ÎÅÎÉÅ, ÎÅ ÓÌÉÛËÏÍ ÌÅÓÔÎÏÅ ÄÌÑ ÏÂÅÉÈ ÓÔÏpÏÎ: éÄÅÔ ÍÕÖÉË ÐÏ ÚÏÏÐÁpËÕ, ÇÌÑÄØ - ËÌÅÔËÁ Ó ÇÏpÉÌÌÁÍÉ. HÕ É ÄÁ×ÁÊ ÉÍ ÍÏpÄÙ ËÏpÞÉÔØ, ÐÏËÁÚÙ×ÁÔØ: Ñ-ÔÏ ÚÄÅÓØ, Á ×Ù-ÔÏ × ËÌÅÔËÅ. ûÏËÏÌÁÄ ÄÅÍÏÎÓÔpÁÔÉ×ÎÏ ÖpÁÔØ. ïÂÅÚØÑÎÙ ÐÅpÅÐÏÌÏÛÉÌÉÓØ, ÎÕ É ÚÁÛ×ÙpÑÌÉ ÂÅÄÎÑÇÕ ÂÁÎÁÎÏ×ÙÍÉ ËÏpËÁÍÉ (ÅÓÌÉ ÎÅ ÞÅÍ ÐÏÈÕÖÅ). á ÍÕÖÉË pÁÚÏÂÉÄÅÌÓÑ... KS> ðpÏÓÔÏ ÔÅÐÅpØ ÌÀÄÉ Ó ÐpÏÂÌÅÍÁÍÉ ÐÏ ÔÅÍÅ ËÏÎÆÅpÅÎÃÉÉ ÂyÄyÔ ÂÏÌØÛÅ KS> ÚÁÄyÍÙ×ÁÔØÓÑ, Á ÓÔÏÉÔ ÌÉ Ó×ÏÉ ÐpÏÂÌÅÍÙ ÏÂÎÁpÏÄÏ×ÁÔØ? CÌÉÛËÏÍ KS> pÉÓËÏ×ÁÎÎÏ, ÍÏÇyÔ ËÁÍÎÑÍÉ ÚÁËÉÄÁÔØ. á ÔÙ ×ÉÄÅÌ ÔÁËÏÅ ÚÄÅÓØ? þÔÏÂÙ ÞÅÌÏ×ÅË Ó ÐpÏÂÌÅÍÁÍÉ, Á ÅÇÏ ËÁÍÎÑÍÉ. õ ìÉÚÙ ËÁË pÁÚ _ÎÅ_ÂÙÌÏ_ ÐpÏÂÌÅÍ (ÔÏÞÎÅÅ, ÏÎÁ Ï ÎÉÈ ÎÅ ÐÉÓÁÌÁ). SB>> åÓÌÉ ÔÙ ËpÁÊÎÅ ÏÂÅÓÐÏËÏÅÎ ÍÎÅÎÉÅÍ SUBJ Ï ÔÅÂÅ - ÔÏÇÄÁ ÉÚ×ÉÎÉ. KS> íÎÅÎÉÅ ËÏÇÏ-ÂÙ ÔÏ ÎÉ ÂÙÌÏ ÏÂÏ ÍÎÅ ÎÅ ÔpÏÇÁÅÔ ÍÅÎÑ ÌÅÔ 15. òÁÄ ÚÁ ÔÅÂÑ :) á ÍÅÎÑ ×ÏÔ ÉÎÏÇÄÁ ÂÅÓÐÏËÏÉÔ ÍÎÅÎÉÅ ÖÅÎÝÉÎ ÏÂÏ ÍÎÅ. HÏ ÔÏÌØËÏ ÔÅÈ, ÞØÅ ÍÎÅÎÉÅ Ñ ÓÐÏÓÏÂÅÎ Õ×ÁÖÁÔØ. KS> HÏ ÎÁÄÏ ÏÔÄÁÔØ ÄÏÌÖÎÏÅ, ÞÔÏ ÏÎÁ ÞÅÌÏ×ÅË pÅÛÉÔÅÌØÎÙÊ É ÃÅÌØÎÙÊ, ïÔÄÁÀ. KS> Á ÚÄÅÓØ ÜÔÉ ÞÅpÔÙ ÈÁpÁËÔÅpÁ ÍÎÏÇÉÅ ÎÅ ÚÁÍÅÔÉÌÉ ÚÁ ÑpÌÙËÏÍ ÐpÏÓÔÉÔyÔËÉ. úÁÍÅÔÉÌ. é ÏÃÅÎÉÌ. ðpÉÚÎÁÀÓØ ÄÁÖÅ, Ñ Ó ÕÄÏ×ÏÌØÓÔ×ÉÅÍ ÐÏÏÂÝÁÌÓÑ ÂÙ Ó ÎÅÊ. HÏ ÔÏÌØËÏ ÎÁ ÎÅ Ó×ÑÚÁÎÎÙÅ Ó ÐpÏÓÔÉÔÕÃÉÅÊ ÔÅÍÙ. èÏÔÑ ÐpÏÓÔÉÔÕÔËÁ - ×Ï×ÓÅ ÎÅ ÑpÌÙË (ÐpÉÍÅÎÉÔÅÌØÎÏ Ë ìÉÚÅ). Good luck! Old Greaser. #! rnews 1414 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f61.n5030!Hostas.Red Newsgroups: fido7.hardw.pc_sound Distribution: fido7 X-Comment-To: "Alexey B. Shamarokov" From: Hostas Red Date: Tue, 06 Sep 94 01:26:00 +0400 Subject: IRQ for SBPro Message-ID: <778818426@f61.n5030.z2.fidonet> References: <778212534@p8.f205.n5020.z2.ftn> Organization: * KONGware/2 * X-FTN-AREA: SU.HARDW.PC.SOUND X-FTN-Tearline: FastEcho 1.41/B7+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 26 35 41 49 50 52 54 56 62 64 68 75 X-FTN-SEEN-BY: 5020/103 134 146 168 188 196 200 203 213 215 226 230 241 249 259 X-FTN-SEEN-BY: 5020/268 290 327 5025/10 5026/3 5030/6 11 16 44 48 61 69 71 83 84 X-FTN-SEEN-BY: 5030/86 93 96 106 108 134 5055/6 5063/1 5080/22 X-FTN-PATH: 5030/61 6 5020/23 35 68 49 Lines: 17 Hi! ¾ August 30/94, 02:08, Alexey B. Shamarokov (2:5020/205.8)  Andrew Naiden: AN>> äÁ ËÔÏ ×ÁÍ ×ÏÏÂÝÅ ÔÁËÕÀ ÈÅÒÎÀ ÓËÁÚÁÌ, ÞÔÏ ÏÎÁ ÎÁ IRQ5 ÎÅ AN>> ÒÁÂÏÔÁÅÔ? õ ÍÅÎÑ ×ÓÅÇÄÁ ÒÁÂÏÔÁÌÁ ÎÁ IRQ5 É ÎÁ SB 2.0, É ÎÁ AN>> SB16ASP! ðÒÉÞÅÍ ÎÁ ÎÅÓËÏÌØËÉÈ ÍÁÛÉÎÁÈ ÐÒÏÂÏ×ÁÌ! HÅ ×ÉÖÕ AN>> ÐÒÏÂÌÅÍÙ. ABS> ñ - ÓÁÍ ×ÉÄÅÌ, ÞÔÏ ÐÏËÁ ÎÁ IRQ7 ÎÅ ÐÅpÅÓÔÁ×ÉÌÉ - ËÁË pÙÂÁ Ï ÌÅÄ. á ÔÙ ÐÅpÅÍÅÎÎÕÀ BLASTER ÕÓÔÁÎÏ×ÉÌ? ôÉÐÁ ÔÁÍ set blaster = a220 i5 d1 etc... á? ôÕÔÁ ÐÁÛÅÔ, ËÁË ÉÚ ÐÕÛËÉ. é ÇÏ×ÏpÉÔ. HÏ ÎÅ ÇÏ×ÏpÉÔ, ÅÓÌÉ EMS'Á ÎÅÔÕ. Adios, /KONG #! rnews 4017 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f84.n5030!Mike.Malakhov Newsgroups: fido7.demo_design Distribution: fido7 X-Comment-To: Peter Sobolev From: Mike Malakhov Date: Mon, 05 Sep 94 12:41:00 +0400 Subject: Plasma Message-ID: <778773244@p4.f84.n5030.z2.ftn> References: <778558201@f84.n5030.z2.ftn> Organization: Flex BBS, St.Petersburg, (812)157-2511, 22-08 MSK X-FTN-AREA: DEMO.DESIGN X-FTN-RealName: Mike Malakhov X-FTN-TID: FastEcho 1.41/g 0 X-FTN-Tearline: GoldED 2.50.B0822+ X-FTN-SEEN-BY: 5015/4 5020/1 23 26 35 41 49 50 52 62 68 102 103 146 168 188 200 X-FTN-SEEN-BY: 5020/203 215 230 268 286 290 5026/3 5030/6 11 16 32 44 48 55 61 68 X-FTN-SEEN-BY: 5030/69 71 83 84 86 96 103 106 108 110 125 136 5055/6 5061/2 5085/4 X-FTN-PATH: 5030/84 6 5020/23 35 68 49 Lines: 77 Hello Peter! Saturday September 03 1994 02:02, Peter Sobolev wrote to Alex Starkov: äÁ-Á-Á... ðÏpÁ × ÔÏpÍÏÚù ÐÏÄÁ×ÁÔØÓÑ. ðpÏÛÌÏÅ ÐÉÓØÍÏ ÐÉÓÁÌ ÔÏÖÅ Ñ, ÎÏ ÎÁ StarGuest'Ï×ÓËÏÊ ÍÁÛÉÎÅ É × ÚÁÐÁpËÅ ÚÁÂÙÌ ÉÓÐpÁ×ÉÔØ ÅÇÏ pÅÇÁÌÉÉ. PS>>> 1) íÅÎÑÔØ ËÁË ÔÙ ÓËÁÚÁÌ ÐÁÌÉÔpÕ ÐÏ scan line'am. HÏ ÜÔÏ ÏÔÐÁÄÁÅÔ PS>>> Ô.Ë. ÔÁËÉÍ PS>>> ÏÂpÁÚÏÍ ÎÅÌØÚÑ ÐÏÌÕÞÉÔØ ÐpÏÉÚ×ÏÌØÎÏÅ ÉÚÏÂpÁÖÅÎÉÅ ÞÔÏ PS>>> ÎÅÏÂÈÏÄÉÍÏ ÄÌÑ ÐÌÁÚÍÙ AS>> ðÏÞÅÍÕ ? åÄÉÎÓÔ×ÅÎÎÕÀ ÓÌÏÖÎÏÓÔØ ËÏÔÏÒÕÀ Ñ ÚÄÅÓØ ×ÉÖÕ - ÜÔÏ ÕÓÐÅÔØ AS>> ËÁË ÍÏÖÎÏ ÂÏÌØÛÅ ÒÅÇÉÓÔÒÏ× ÐÁÌÉÔÒÙ ÐÅÒÅÓÔÁ×ÉÔØ. PS> ÷ÏÚÍÏÖÎÏ ÍÙ ÇÏ×ÏpÉÍ Ï pÁÚÎÙÈ ×ÅÝÁÈ. ôÏÔ ÓÐÏÓÏ ËÏÔÏpÙÊ ÉÍÅÀ ××ÉÄÕ Ñ PS> ÐÏÚ×ÏÌÑÅÔ ÐÏÌÕÞÁÔØ ÔÏÌØËÏ ÇÏpÉÚÏÎÔÁÌØÎÙÅ ÐÏÌÏÓËÉ. ÷×ÉÄÕ ÔÏÇÏ ÞÔÏ ÉÈ ÛÉpÉÎÁ PS> ÏÞÅÎØ ÍÁÌÁ, ÓÏÚÄÁÅÔÓÑ ÏÝÕÝÅÎÉÅ ÂÏÌØÛÅÇÏ ËÏÌ-×Á Ã×ÅÔÏ× ÞÅÍ ÅÓÔØ ÎÁ ÓÁÍÏÍ PS> ÄÅÌÅ. HÕ, ÄÙË, É Ñ ÐpÏ ÔÏ ÖÅ - × ËÁÖÄÏÊ ÏÔÄÅÌØÎÏ ×ÚÑÔÏÊ scanline ÂÕÄÅÔ Ó×ÏÑ ÐÁÌÉÔpÁ. ôÏÌØËÏ ÏÔ ÂÙÓÔpÏÄÅÊÓÔ×ÉÑ ×ÉÄÅÏ-ÁÄÁÐÔÅpÁ ÍÎÏÇÏÅ ÂÕÄÅÔ ÚÁ×ÉÓÅÔØ: × ÐÅp×ÕÀ ÏÞÅpÅÄØ ËÏÌ-×Ï pÅÇÉÓÔpÏ× ÐÁÌÉÔpÙ, ËÏÔÏpÕÀ ÍÙ ÕÓÐÅÅÍ ÉÚÍÅÎÉÔØ ÚÁ ÏÂpÁÔÎÙÊ ÈÏÄ ÌÕÞÁ (ÇÏpÉÚÏÎÔÁÌØÎÙÊ). IMHO ÎÁ ËÁËÏÊ-ÎÉÂÕÄØ OAK VGA ×ÏÏÂÝÅ ÎÉ ÏÄÎÏÇÏ ÎÅ ÕÓÐÅÅÍ - ËÁË ÂÙÔØ ? ðÏÅÔÏÍÕ, ÜÔÏÔ ÓÐÏÓÏ ÎÅ ÓÉÌØÎÏ ËÁÔÉÔ × ÄÁÎÎÏÍ ÓÌÕÞÁÅ :( PS>>> Pachkovsky É IMHO × PS>>> UNREAL'e - × ÔÏÍ ÍÅÓÔÅ ÇÄÅ 'REAL COLORS - UNREAL COLORS' AS>> ÷ÒÑÔÌÉ, ÄÏÌÖÎÏ ÍÉÇÁÔØ É ÐÏÄÅÒÇÉ×ÁÔØÓÑ, ÞÅÇÏ ÎÅ ÚÁÍÅÔÎÏ × ÄÅÍÁÈ É AS>> ÚÁÍÅÔÎÏ × trueview. PS> × UNREAL'e × ÔÏÍ ÍÅÓÔÅ ÇÄÅ "UNREAL COLORS" ÍÅpÃÁÎÉÅ ÏÞÅÎØ ÄÁÖÅ ÚÁÍÅÔÎÏ ;)á PS> × trueview ÏÎÏ ÚÁÍÅÔÎÏ ÓÉÌØÎÅÅ ÐÏÔÏÍÕ ÞÔÏ ÔÙ ÔÁÍ ÓÍÏÔpÉÛØ ÎÅ ÐpÏÓÔÏ PS> ÐÌÁ×ÎÙÊ ÇpÁÄÉÅÎÔ Á ËÁpÔÉÎËÕ. ìÏ×É × DEMO.DESIGN.UUE ÍÏÀ ÐÏÐÙÔËÕ ÐÏÍÉÇÁÔØ ÓÔpÁÎÉÃÁÍÉ. ëÁË ÇÏ×ÏpÉÔÓÑ - ÜÆÆÅËÔ ÎÁ ÌÉÃÅ - ÄÁÖÅ ÎÁ ÐÌÁ×ÎÙÈ ÐÅpÅÈÏÄÁÈ ÏÆÉÇÅÎÎÏÅ ÍÏpÇÁÎÉÅ. PS>>> 3) äÅÌÁÔØ ÎÅÞÔÏ ÔÉÐÁ dithering'a × ËÁËÏÍ ÎÉÂÕÄØ xmode ×ÙÓÏËÏÇÏ PS>>> pÁÚpÅÛÅÎÉÑ. ôÉÐÁ PS>>> 360x480x256. ôÁË (imho) ÓÄÅÌÁÎÏ × Second Reality. AS>> ñ ÞÅÓÔÎÏ ÇÏ×ÏÒÑ ÎÅ ÐÒÏÂÏ×ÁÌ, ÎÏ ÄÕÍÁÀ ×ÙÇÌÑÄÅÔØ ÂÕÄÅÔ ÐÏÇÁÎÏ, ÅÓÌÉ AS>> ÒÁÚÒÅÛÅÎÉÅ ÂÕÄÅÔ ÍÅÎØÛÅ 800x600. PS> ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï Ã×ÅÔÏ× ËÏÍÐÅÎÓÉpÕÅÔ pÁÚpÅÛÅÎÉÅ. ïÓÏÂÅÎÎÏ ÅÓÌÉ Ä×Å PS> ÓÔÏÑÝÉÅ pÑÄÏÍ ÔÏÞËÉ ÉÍÅÀÔ ÎÅÂÏÌØÛÕÀ pÁÚÎÉÃÕ × ÑpËÏÓÔÉ ÷ÏÔ ÅÓÌÉ ÂÙ ÐÉËÓÅÌÙ ÎÁ ÜËpÁÎÅ ÂÙÌÉ ËÁË ÓÏÔÙ, Á ÎÅ ËÁË ËÕÂÉËÉ, ÔÁÄÙ ÄÁ, Á ÔÏ ËÁË ÓÏÏÂpÁÚÉÔØ ÎÏpÍÁÌØÎÙÊ ÐÉËÓÅÌ, ÄÁ ÔÁË, ÞÔÏÂÙ pÁÚpÅÛÅÎÉÅ ÎÅ ÐÁÄÁÌÏ ÓpÁÚÕ × 2 pÁÚÁ... AS>> ÷ÏÔ ÉÍÅÎÎÏ - × ÛÁÈÍÁÔÎÏÍ - ËÁË × ÐÌÁÎÁÒÎÏÍ ÔÅÌÅ×ÉÚÏÒÅ ÐÏÌÏÖÅÎÎÏÍ ÎÁ AS>> ÂÏË. ÷ÒÏÄÅ × ÏÂÙÞÎÙÈ ×ÉÄÅÏÒÅÖÉÍÁÈ ÔÁË ÎÅ ÓÄÅÌÁÔØ. PS> Ñ ÐÏÐÙÔÁÌÓÑ ÐpÅÄÓÔÁ×ÉÔØ ÓÅÂÅ ÐÏÌÏÖÅÎÎÙÊ ÎÁ ÂÏË ÐÌÁÎÁpÎÙÊ ÔÅÌÅ×ÉÚÏp É ÎÅ PS> ÓÍÏÇ ;) HÁ×ÅpÎÏ Õ ÍÅÎÑ ÂÅÄÎÏÅ ×ÏÏÂpÁÖÅÎÉÅ :( ;) ñ ÉÍÅÌ × ×ÉÄÕ ÔÅÌÅË Ó ÐÌÁÎÁpÎÏÊ ÔpÕÂÏÊ. HÕ ÔÁ Õ ËÏÔÏpÏÊ ×ÍÅÓÔÏ RGB ÔÏÞÅÞÅË ÔÁËÉÅ ×ÅpÔÉËÁÌØÎÙÅ ÐÏÌÏÓÏÞËÉ. AS>> ÷Ï-×Ï... åÓÌÉ ÓÍÏÔÒÅÔØ ÔÒÕËÏÌÏÒÎÙÅ ËÁÒÔÉÎËÉ ÐÏÄ QPEG × 256-ÔÉ AS>> Ã×ÅÔÁÈ, ÐÏÌÕÞÁÅÔØÓÑ ÂÙÓÔÒÏ, ÎÏ ÎÅËÁÞÅÓÔ×ÅÎÎÏ - ×ÓÅ × ËÌÅÔÏÞËÕ. á ËÁË AS>> ÔÏÇÄÁ Ó ÐÌÁÚÍÏÊ × ÒÅÁÌÔÁÊÍÅ ? PS> ÔÁË ×ÅÄØ ÔÁÍ ÎÅ ÎÁÄÏ ÏÂpÁÂÁÔÙ×ÁÔØ ÚÁpÁÎÅÅ ÎÅÉÚ×ÅÓÔÎÕÀ ËÁpÔÉÎËÕ! ÷ ÜÔÏÍ ×ÓÑ PS> pÁÚÎÉÃÁ. åÓÌÉ ÔÙ ÚÎÁÅÛØ ÞÔÏ ÄÏÌÖÎÏ ÐÏÑ×ÉÔØÓÑ ÎÁ ÜËpÁÎÅ ÔÏ ÔÙ ÍÏÖÅÛØ PS> ÎÁÐÉÓÁÔØ ÜÆÆÅËÔÉ×ÎÙÊ ÁÌÇÏpÉÔÍ ÄÌÑ ÜÔÏÇÏ. ðÏ ÉÄÅÅ.. ÷Ï-×Ï ÉÄÅÑ ÍÅÎÑ ÔÏ É ÍÕÞÁÅÔ - "ëáë óäåìáôø ?" Bye, WindWalker ... HÁÓÔÕÐÁÅÔ ÜÐÏÈÁ ÉÎÔÅpÎÁÃÉÏÎÁÌØÎÏÇÏ ÄÖÁÚÁ ... #! rnews 8143 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f84.n5030!Mike.Malakhov Newsgroups: fido7.demo_design.uue Distribution: fido7 X-Comment-To: All From: Mike Malakhov Date: Mon, 05 Sep 94 13:08:00 +0400 Subject: ðÏÞÔÉ ÐÌÁÚÍÁ :) Message-ID: <778774219@p4.f84.n5030.z2.ftn> Organization: Flex BBS, St.Petersburg, (812)157-2511, 22-08 MSK X-FTN-AREA: DEMO.DESIGN.UUE X-FTN-RealName: Mike Malakhov X-FTN-TID: FastEcho 1.41/g 0 X-FTN-Tearline: GoldED 2.50.B0822+ X-FTN-SEEN-BY: 463/18 5015/4 5020/1 23 26 35 41 49 50 52 62 68 102 103 146 168 188 X-FTN-SEEN-BY: 5020/200 203 213 215 230 268 290 5026/3 5030/6 11 16 32 44 48 55 61 X-FTN-SEEN-BY: 5030/68 69 71 83 84 86 93 96 103 106 108 110 125 136 5055/6 5061/2 X-FTN-SEEN-BY: 5085/4 X-FTN-PATH: 5030/84 6 5020/23 35 68 49 Lines: 143 Hello All! ÷ÏÔ Ë ×ÏÐpÏÓÕ ÏÔÏÍ, ËÁË ÄÅÌÁÅÔØÓÑ real-time plasma Ó Ã×ÅÔÁÍÉ ÂÏÌÅÅ 256. üÔÉÍ ÐÕÔÅÍ Õ ÍÅÎÑ ÎÅ ×ÙÛÌÏ. ëÔÏ-ÎÔØ ÞÅÇÏ-ÎÔØ ÄpÕÇÏÅ ÍÏÖÅÔ ÐpÅÄÌÏÖÉÔØ ? Bye, WindWalker section 1 of uuencode 5.02 of file blink.zip by R.E.M. begin 644 blink.zip M4$L#!!0``@`(`.QL)1U4/?:5;!```-`=```)````0DQ)3DLN15A%S5D-5!/G MFGYG)IF$28C9:JE5";%@MFVJ%TS+K161VUZBI^L/BU41C]A>"VI_H`<14#XM]'VA7.`N7A4:9G$?_RD\Q/&H7[-6BP#GHX?N=+10D,%CBA5<2_H MJ8H25-4N`ZCH5<92+]`5.]&KIGK0;=X%S`M0P43$4@DN>QV,RH)L'536@9", M\/>Q/H>5'%8&R"U@:*'[+52;2T$$PG06@L)O8TI MX!][*RVHTY`R-K1\5O4>IE.6#V=RKO]>SH1;.+%]"H,MTI!@FEB>`C.Y/PES MGY""5Z'`4"M=EMGH7YJX;S]@;&/L)QNY@W*2A86_R49F3L41@ MYICL!,6_;&A-/"JS)6)_UL$86A^U)=9CMH'1!1KUX#A!E;N:G$P;VB=\1R9C ML#9%$:H=P-KZ4*U4<=+)3!B\B@'&X%U%GZ`FR>6P@B77PX1<;=(M]<>N4H\; M_4/2A*@=LKHYEY^\>#3%(G<`C#(8B,Z;IMEH>CI^I&>PLV(0-XCF07J&44&, M^UJ[+UI'*)F>4=N93EP`.$)&,[O9F@BBRG4$L67@^:)J75^R_&? M1_F+Q6SFSZ,YD#Q@FFYUXE<7':HTA\T!TAXF_^$*7%3WYU3`J4F M*\%_WN:=,2]"CDNSXP>FQMVU]M^A5?TCM7YSI]9K_PNMUV[5>@VUVK)0\80Q M*U#\4(F;:1Z5Y`[$C]@^K7U\D&<,^^2KAKZA^H/KQBT7)>W3LP$W2KRDWZ`$ MQLR5](+-VSRD9J(>A/*64C.+_3I.L:11:)4II1U-*6V?W"UV81T7]DG2>N6V M]C*T-U^@J=,_V.G%8F7FCVXL78']WN9>-$.E8P_KC`:[!FQ16G`D4*1P#Q;F M@.,@=&D[.F^V_-W,E@6WM&1((0H+<\%Q548*\["P`!QKI((."W@;_1]Q*5XV&O<5Q[V&Z[6PXYSGWM8/[?8 MPU[GP,-^RYWWL!,.>"$CC@X31]^6'*T( MH"8BJ)P(JB,>/4CDUA&YC;<[?'>]_\]FE.LGSJB?UYV[+]D?Z]/TTB9N_3MQ MJY*XM5-R:WJ0B&>5H6&[,3^'N7^[T[F[[J$383DB47)'.-OO$JO,N](1+WT_ MS\A]RPT2UR[,T&!-9@#X^_'NX:!G70E4/0ART):[$H*-8$UP^6HDC>(?KHK) M/KR3'!:NX\TK^,[#.`/PE8=&7.FKEF&RT[?:SF&Z"U,U6)/QW,RK-6*2#X\J M=B6,*C1BO`\S2)$488G!FWA"K]`N##BF@DX**HK96&HQ!24#8)?#:*0C&$SH M]2BD1+[ MQZ2#3SH(4<^`?1\&M13$EC%K,@U@T5:5@XH]`+S*FHP.660:T17TL)E`=72^ M38YJ9ZS)6.#GBP?&V'+V+6AC-X$!?<6#IAJD\^`94J5+.^TF9D,KRX%]$Y2Q M&2"5O5A^5H.)&@]N[H34]/3UZ4_H?\7SV2^_PNOY//WS^<\5[<[=J<_+U1?L MR,_.SM7OSM7SV7_#ZU_.>SY[2<)3S[WTDGY#-K\J_[E7=JW%*OUOLG/R\K/U M17GY+Y*.1;OY7?J=Q+I[1\&2)4O0V1N^7)MJ>D"-+PC^3AY+2;FF]S6:S?CZ MXEZ,^(S:+[ZO5LHY@B"=O3O<9!Y4!\,/$N+A8/A!Z87[F^:II'<0T535/@QR M*=C3,S+0S\:[+3S8"TU;( M!MZ>\.6^@\]ELMO._QN%BZ5FKN&QKH5EKM9B-G"PYF#--B)/N*AKV\02VZ*N MA3&D2OK%CW1%Q8]T-E!=4;P<#]BC=(*+3(V&1[L6VG0Z51FK5\V0!TXW%HS*MHL/\M M>-G7X8]0IODM-#T0^>$RNG$V'`@LJ25Z;=%EJ72)5S9T1:>)<:HI!Z!0YVS* M$4O2L^"((ZF,4.G2=&F.';0F32/Z*(WX,NW``;I9]SG69=&=)M?; M6ZWG9VUXY^TMUB^^MG[W-:])L9[^.ESFJ93J=\%M*9KH7#1NBZ*RMBZ)3-K^[88Q6E'-V!3?!_1#ENVCBIP-I@Z M3&>ER$S:RT!H5KGY%54O@,K%_P)'LDI+C!0)Z=?3*_JADVMH\6&H*@-Q*9S< M2HLZJ#H`8@K4/2%N!&PE/@8GGZ5%!6G2L*9KX9)2!>?B6?%Q>&K4YS[^/%J. M6CHR/R>+3D"&CM-6=5MHJ4I"1=ES6*XH,9,3-DL4G/9%/RQ2EW0UL MUT(WT/,7QL8]^ECB+Q]?]L3RI!7)*RWIEEQ^]\O9^NS\_+Q\/>B?X_6P))*# MM+Q\?G=>;H'^J;Q77LW?O7,7KW]PQT/ZA&6/FQY9ME3_9%[^2\_E/N\T]0J? MZ1);]R@3VXID`9.KQE'77^.P0@UF:VKVI_(U95BW25'CB*6PKE$#OIK&]:#J MM434/M%>*"MM'U;6HG/,L:'K2UW'8DXI0?@,^;A$897,8$N58=XL!YO']4Z:SO'V6<[_?CZL+%9A!2Z17'^_E[5M3W\Y$KZOIYK9<] M!#DP&I?.;M:(BR"34&RDIVE.:D%<`SQK\*;2=?W;<#'C.SZZC@K3[7V-1K:Y M)$5")>':":-STT[.`?%>R$#IZI,+0,1]]T9_=C.[V1"\'^<;@S-EN\(="I', MT+91;1#6R@Q"=,/*KH7Y6G)Y%.--50+$8$?,X3EZ]/*,]J8.PYMKE:1'"O90 M&)MYQI$M-;YK(]KD"MDELQ!=,BDK9!N20Q8TE"0?PCWX,/>B998E!*%(: MEA=QO%'';D@WM&U&C=LY!3/`7`T$NXU7RUJV*F(,MB*ERF51NHG_N\"=]M?I MF]D-HHG:JMB>N25CFL/R>W>(/86PU_=;EAF$]:AAC])XVMA3(&-.F7I90VN1 MFIFJTP=\QXQ3"H-M#W;=([-$I"/A$&Q59.+D:),=.TF M%XHN'S"T;E.D)#9,&9F6O@E)]R-I5F8&ZG=-TY+!S6(=S\I-O>+E M*0MG*-DS#WA&?`7(`-8F1?+JI'G\7RSW67S8R+W_[!P1O#ZSPGMF1E,']/3&>K\EW=VYK-R M_BG'_VV.<$KBP'^=VLZ-IDNJWE>5J?XS^+K"/Z`ZRR>_JDI-]7]:T@?^L[QI MHS`F3)K."J>$;I/K#UKH&>SI[>GIZ4LQ?CS_\P+Y:N;CV9^OM5S8-AJU#;?Z M"_=,#/L/ON4?.^@?PRY]IK,]EPJ48;+4M19%^#+;PBK96?_1W?=59\FY&)[M M^:KGS-#$#<._MO0-A@UX2320!=6V1V;JL$4Z8$5HW4?6T4$Y9M_OY^F&).MK M\4Z^I`^GH)[L6+K:2 MY\\"F3E$/74F_8P\KNW[)'L;L8?;OE5V/?=>U[-.N%>3I9/U@L.HP M"+H*$-J7^`W=RIYSY(^^P/0P?4@US/31ON/ROF':)\=GZEZP'\8GL`IPRU]O M>`2?/32A(@Y$V0#>3CC^(X'R`=SYI=U-B58V ML725#+<2O'$TU8).T9@;:3S=<\'D"OAJW#S5[P%^ MQ:F,QZ^7F8@11"%^H4S%KY%S\4OC/^+7Q'9,>?R*Z$;M*08TFM5U9%;%VH2M="^+!+,<2 ME,:5XZ)TB/^.[:0DT_8`@CPDN>_NOOO\V?[QD%&FL^EL>=F2[0BGN*-I+LLPAOZ>V[1T? M='E'EXSRG+9?4I+V?VMZS.2M^`Y1@6>34=QRAE?=TT&))QGP%*.BC!3ERL1O MRO!;]@"FUG9T_ZC#-G2?3.W%38@7^'KB7<0E14`P',Z%^DA2E$@A M)/`8N=%]S%12Q%Z]T/2\,.0MYVT668_&=)]DMF+!LTALDX?2.PW9UUO:+G>47W5;]S++I,TO0BYA+:1_L1;C3)]==V%7<0/.NVJ=;Z@L&Y M!TL!_3.85+(!:AGUCGX*/I\L*-+`X!P"_YGL5!)E)NL]EQVG>X+'V7+5M9!^ MSRKIN7\GQOL',<%3,=KHU714%4\227=*VSD\'NS::RUZ4[DW)37CQ::AVF37 MC[+K1M:HV:LP*2C5W.4]6H/>5;WZYN[\-_YVQ>">=EP]2T]QH;VI)G;J19GC M4(Z_C9.48"X4O*-#*"G/M=_-"8_V!>I+'73\&M5\IRQH`,>3;HXX\4AS^U6@ M]C);BB45RK<7XN074$L!`A0`%``"``@`[&PE'50]]I5L$```T!T```D````` M```````@`````````$),24Y++D5815!+`0(4`!0``@`(`.9L)1V'/^&W(0(` M`-`$```)``````````$`(````),0``!"3$E.2RY005-02P4&``````(``@!N )````VQ(````` ` end sum -r/size 13412/6860 section (from "begin" to "end") sum -r/size 31521/4959 entire input file ... I'm a loser babe, so why you just don't kill me ... #! rnews 1352 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f1.n5030!Dmitry.Klimenkov Newsgroups: fido7.windows Distribution: fido7 X-Comment-To: "bpv@angel.energy.msk.su" From: Dmitry Klimenkov Date: Tue, 06 Sep 94 01:28:00 +0400 Subject: Corel 5 + LJ 4 + groups 3.11 Message-ID: <778818572@f1.n5030.z2.ftn> References: <2576782108@f128.n50.z2.fidonet> Organization: ----> /2 Board (2:5030/1.0) <--- X-FTN-AREA: SU.WINDOWS X-FTN-Tearline: GoldED/2 2.42.G0615+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 35 41 42 44 49 50 52 54 56 62 64 68 X-FTN-SEEN-BY: 5020/75 103 111 134 146 168 173 188 196 200 203 213 215 224 230 241 X-FTN-SEEN-BY: 5020/249 268 290 5026/3 5027/3 5030/1 6 7 16 21 44 48 55 61 69 71 X-FTN-SEEN-BY: 5030/83 86 93 96 106 108 119 134 5055/6 5063/1 X-FTN-PATH: 5030/1 6 5020/23 35 68 49 Lines: 14 Hello bpv@angel.energy.msk.su! 01 Sep 94 09:13, bpv@angel.energy.msk.su wrote to All: bems> õ ÍÅÎÑ HP LJ 4. ðpÏÓÔÏ 4. ñ ÐÏÓÔÁ×ÉÌ CDraw ×ÅpÓÉÉ 5.00.D1. bems> é ×ÏÔ ÞÔÏ ÐÏÌÕÞÉÌÏÓØ: 5.00.D2 ÓÔÁ×ÉÔØ ÎÁÄÏ - D1 ËÏÓÁÑ.... ”” Baudy.”” Das ist aber eine hure sie will nicht mit mir schlafen ! P W A Dist. Site -->> 'A Group that Gives Slightly Less Than A Fuck ! '<<--- #! rnews 1193 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f96.n5030!f167.n5030!Dmitry.Penzin Newsgroups: fido7.flirt Distribution: fido7 X-Comment-To: Max Skibinsky From: Dmitry Penzin Date: Mon, 05 Sep 94 09:30:29 +0400 Subject: Re: á ×ÏÔ É Ñ Message-ID: <3870473280@p6.f167.n5030.z2.ftn> References: <778279213@f296.n5020.z2.ftn> Organization: dmitry@fish.spb.su X-FTN-AREA: PVT.FLIRT X-FTN-Tearline: timEd-g1+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 33 35 41 44 49 50 52 54 62 68 124 134 X-FTN-SEEN-BY: 5020/146 168 188 200 203 213 215 226 230 268 290 5026/3 5030/3 6 7 X-FTN-SEEN-BY: 5030/10 11 16 44 48 69 71 86 96 106 108 119 167 201 5055/6 X-FTN-PATH: 5030/167 96 6 5020/23 35 68 49 Lines: 12 Max Skibinsky wrote in a message to Jannet: J> ÷Ù ÍÅÎÑ ÌÕÞÛÅ ÖÅÎÏÊ ÍÏÌÏÄÏÇÏ ÓÉÍÐÁÔÉÞÎÏÇÏ ÇÅÎÅÒÁÌÁ ÓÄÅÌÁÊÔÅ :) MS> çÙ-ÇÙ-ÇÙ!!!!! ;) ôÙ ÂÙ ÅÝÅ ÓËÁÚÁÌÁ - "yÍÎÏÇÏ ÇÅÎÅpÁÌÁ" - Ñ MS> ÂÙ ÓÏ×ÓÅÍ ÏÔ ÈÏÈÏÔy MS> ÄÅÍÁÔÅpÉÁÌÉÚÏ×ÁÌÓÑ.......íÏÌÏÄÏÊ....óÉÍÐÁÔÉÞÎÙÊ.....- É MS> ÇÅÎÅpÁÌ!!!! èÁ-ÈÁ-ÈÁ-ÈÁ-ÈÁ-ÈÁ......;)))) HÕ ìÅÂÅÄØ, ÎÁÐÒÉÍÅÒ, ÐÅÒ×ÙÅ Ä×Á ËÁÞÅÓÔ×Á ×ÒÏÄÅ ÅÓÔØ ;-). Dmitry #! rnews 953 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f48.n5030!f211.n5030!Ingvar.Kovalev Newsgroups: fido7.pvt-crack Distribution: fido7 X-Comment-To: All From: Ingvar Kovalev Date: Fri, 02 Sep 94 10:20:34 +0400 Subject: winlite Message-ID: <778519263@f211.n5030.z2.ftn> Organization: é ÌÉÃÏ, ÐÒÏÛÕ ÚÁÍÅÔÉÔØ, ÇÌÕÍÌÉ×ÏÅ ... X-FTN-AREA: PVT.CRACK X-FTN-PID: GED 2.41+ 7824 X-FTN-Tearline: &-& Always drunk point &-& X-FTN-SEEN-BY: 51/2 463/18 4651/10 5015/4 5020/1 23 24 26 35 41 44 49 50 52 54 62 X-FTN-SEEN-BY: 5020/64 68 75 78 103 111 124 134 146 168 188 196 200 203 213 215 X-FTN-SEEN-BY: 5020/230 241 249 268 286 290 327 5026/3 5027/3 5030/1 6 7 11 16 32 X-FTN-SEEN-BY: 5030/44 48 55 61 69 71 83 84 86 93 96 106 108 211 5055/6 5063/1 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5030/211 48 6 5020/23 35 68 49 Lines: 6 Hello All! HÅ ËÔÏ ÎÅ ÌÏÍÁÌ subj.? Ingvar #! rnews 1421 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f48.n5030!f211.n5030!Ingvar.Kovalev Newsgroups: fido7.fileecho Distribution: fido7 X-Comment-To: Alexander Pohvalit From: Ingvar Kovalev Date: Fri, 02 Sep 94 10:13:48 +0400 Subject: Driver for HP LJ 4L Message-ID: <778518907@f211.n5030.z2.ftn> References: <775842807@f38.n464.z2.fidonet> Organization: é ÌÉÃÏ, ÐÒÏÛÕ ÚÁÍÅÔÉÔØ, ÇÌÕÍÌÉ×ÏÅ ... X-FTN-AREA: SU.FILEECHO X-FTN-PID: GED 2.41+ 7824 X-FTN-Tearline: &-& Always drunk point &-& X-FTN-SEEN-BY: 51/2 446/4 463/18 5015/4 5020/1 23 24 26 35 41 42 44 49 50 52 54 56 X-FTN-SEEN-BY: 5020/62 64 68 103 111 134 146 168 188 200 203 213 215 230 241 268 X-FTN-SEEN-BY: 5020/290 327 5026/3 5027/3 5030/1 3 6 7 11 16 32 44 48 55 69 71 83 X-FTN-SEEN-BY: 5030/84 86 93 96 106 108 134 211 5055/6 5063/1 X-FTN-PATH: 5030/211 48 6 5020/23 35 68 49 Lines: 16 Hello Alexander! 02 Aug 94 11:51, Alexander Pohvalit wrote to All: AP> ðÏÄÏÚÒÅ×ÁÀ, ÔÅÍÁ ÓÔÁÒÁÑ, ÎÏ... AP> HÁÒÏÄ, Õ ËÏÇÏ ÅÓÔØ subj Ó ÉÓÐÒÁ×ÌÅÎÎÙÍ ÂÁÇÏÍ ÐÏ ÐÏ×ÏÄÕ ÒÕÓÓËÏÊ "p"? AP> õÔÑÎÕ ÏÔËÕÄÁ ÕÇÏÄÎÏ ÎÁ 14400. HÅ ÉÓÐÏÌØÚÕÊ ÒÏÄÎÙÅ ÅÇÏ ÄÒÁÊ×ÅÒÁ, ÎÅ ÎÁÄÏ! ðÏÄ ×ÉÎÄÁÍÉ - HP LaserJet & compatible. ðÏÄ ÄÏÓÏÍ - ÞÔÏ ÕÇÏÄÎÏ ÄÌÑ HP LaserJet üÔÏÔ ÓÏ×ÅÔ - ÒÅÚÕÌØÔÁÔ ÍÙÔÁÒÓÔ× ÎÅ ÔÏÌØËÏ ÍÏÉÈ, ÎÏ ÅÝÅ ÇÒÕÐÐÙ ÞÅÌÏ×ÅË, ÎÁÍÎÏÇÏ ÂÏÌØÛÅ ÍÅÎÑ × ÜÔÏÍ ÒÁÚÂÅÒÁÀÝÉÈÓÑ. Ingvar #! rnews 1220 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!Nick.Soveiko Newsgroups: fido7.hardw.hsmodem Distribution: fido7 X-Comment-To: "Vladislav A. Mitin" From: Nick Soveiko Date: Fri, 02 Sep 94 23:11:22 +0400 Subject: Re: åÓÔØ GVC v32bis/v42bis Message-ID: <3866422368@p1.f86.n5030.z2.ftn> References: <778188565@p2.f205.n5020.z2.fidonet> Organization: <-<-<- Houses Of The Hairy || SPb || Russia ->->-> X-FTN-AREA: SU.HARDW.HSMODEM X-FTN-Tearline: Continued over X-FTN-SEEN-BY: 51/2 5015/4 5020/1 23 35 41 49 50 52 54 62 64 68 103 134 146 168 X-FTN-SEEN-BY: 5020/173 188 196 200 203 213 215 230 241 261 268 290 327 5025/10 X-FTN-SEEN-BY: 5026/3 5027/3 5030/6 7 11 16 33 36 44 48 55 61 69 71 83 84 86 93 96 X-FTN-SEEN-BY: 5030/99 103 106 108 119 134 153 163 173 5055/6 5063/1 5080/22 X-FTN-PATH: 5030/86 6 5020/23 35 68 49 Lines: 14 Hi, Vladislav! [19:27 on Mon, Aug 29, 1994] Vladislav A. Mitin (2:5020/205.2) ==> All Re: 'Re: åÓÔØ GVC v32bis/v42bis': VAM> á ÍÏÖÅÔ ÐÏÄÓËÁÖÅÛØ, ÞÔÏ ÓÅÊÞÁÓ ÅÓÔØ ÓÁÍÏÇÏ ÌÕÞÛÅÇÏ ÎÁ ÔÅÍÕ VAM> 28800 É V.Fast? US Robotics Courier V.Everything Sincerely, < Nick > #! rnews 2836 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!Nick.Soveiko Newsgroups: fido7.modem Distribution: fido7 X-Comment-To: Sergey Ganin From: Nick Soveiko Date: Sat, 03 Sep 94 00:46:10 +0400 Subject: FallBack Õ óÐÏpÔÓÅpÁ Message-ID: <3866516400@p1.f86.n5030.z2.ftn> References: <778292279@p2.f241.n5020.z2.ftn> Organization: <-<-<- Houses Of The Hairy || SPb || Russia ->->-> X-FTN-AREA: RU.MODEM X-FTN-Tearline: Continued over X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 33 35 41 44 49 50 52 54 62 64 68 X-FTN-SEEN-BY: 5020/103 111 124 134 146 168 173 188 196 200 203 213 215 224 230 X-FTN-SEEN-BY: 5020/241 249 261 268 290 5026/3 5027/3 5030/1 6 7 11 16 32 33 36 44 X-FTN-SEEN-BY: 5030/48 55 69 71 75 84 86 96 99 103 106 108 119 153 163 173 5055/6 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5030/86 6 5020/23 35 68 49 Lines: 71 Hi, Sergey! [00:14 on Wed, Aug 31, 1994] Sergey Ganin (2:5020/241.2) ==> All Re: 'FallBack Õ óÐÏpÔÓÅpÁ': SG> ÐÏÄÎÉÍÁÔØ ÓËÏpÏÓÔØ ÐpÉ ÕÍÅÎØÛÅÎÉÉ ÐÏÍÅÈ ÏÂpÁÔÎÏ. ðÏ ati6 SG> ÐÏÓÌÅ ÏËÏÎÞÁÎÉÑ ÓÅÓÓÉÉ ×ÓÅÇÄÁ Fallback - disabled. á ËÁË SG> ÕÓÔÁÎÏ×ÉÔØ ÞÔÏ ÂÙ ÂÙÌÏ Enabled × ÄÏËÅ Ñ ÎÉÇÄÅ ÕËÁÚÁÎÉÊ ÎÅ SG> ÎÁÛÅÌ :( òÁÚßÑÎÉÔÅ ËÔÏ ÚÎÁÅÔ. á ÏÎÏ Õ ÔÅÂÑ ÕÖÅ ×ËÌÀÞÅÎÏ... ôÏÌØËÏ ÜÔÏ ×ÉÄÎÏ ÉÓËÌÀÞÉÔÅÌØÎÏ × ÏÎÌÁÊÎÅ: atz OK ati6 USRobotics Sportster 14400 Fax Link Diagnostics... Chars sent 0 Chars Received 0 Chars lost 0 Octets sent 0 Octets Received 0 Blocks sent 0 Blocks Received 0 Blocks resent 0 Retrains Requested 0 Retrains Granted 0 Line Reversals 0 Blers 0 Link Timeouts 0 Link Naks 0 Data Compression NONE Equalization Long Fallback Disabled Last Call 00:00:00 No Connection OK at&t1 CONNECT 14400/ARQ/V32/LAPM/V42BIS +++ OK ati6 USRobotics Sportster 14400 Fax Link Diagnostics... Chars sent 0 Chars Received 0 Chars lost 0 Octets sent 3 Octets Received 3 Blocks sent 3 Blocks Received 3 Blocks resent 0 Retrains Requested 0 Retrains Granted 0 Line Reversals 0 Blers 0 Link Timeouts 0 Link Naks 0 Data Compression V42BIS 2048/32 Equalization Long Fallback Enabled Protocol LAPM Speed 14400 Current Call 00:00:07 Online OK Sincerely, < Nick > #! rnews 1549 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!Nick.Soveiko Newsgroups: fido7.modem Distribution: fido7 X-Comment-To: Mikle Likhachev From: Nick Soveiko Date: Sun, 04 Sep 94 21:14:50 +0400 Subject: Re: Sportster'94: unable to retrain, upgrade... - ÅÓÔØ ÌÉ ÏÔ×ÅÔÙ? Message-ID: <3869076192@p1.f86.n5030.z2.ftn> References: <778430085@p131.f131.n5030.z2.ftn> Organization: <-<-<- Houses Of The Hairy || SPb || Russia ->->-> X-FTN-AREA: RU.MODEM X-FTN-Tearline: Continued over X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 33 35 41 44 49 50 52 54 62 64 68 X-FTN-SEEN-BY: 5020/103 111 124 134 146 168 173 188 196 200 203 213 215 224 230 X-FTN-SEEN-BY: 5020/241 249 261 268 290 5026/3 5027/3 5030/1 6 7 11 16 32 33 36 44 X-FTN-SEEN-BY: 5030/48 55 69 71 75 84 86 96 99 103 106 108 119 153 163 173 5055/6 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5030/86 6 5020/23 35 68 49 Lines: 17 Hi, Mikle! [14:32 on Thu, Sep 01, 1994] Mikle Likhachev (2:5030/131.131) ==> Igor Sibirjov Re: 'Re: Sportster'94: unable to retrain, upgrade... - ÅÓÔØ ÌÉ ÏÔ×ÅÔÙ?': ML> ÷ÏÏÂÝÅ ÅÓÔØ ÎÅËÏÔÏÒÙÅ ÓÏÍÎÅÎÉÑ ÎÁ ÜÔÏÔ ÓÞÅÔ. HÏ×ÙÅ ÍÏÄÅÍÙ ÏÔ ML> USR, ÔÅ ÞÔÏ V-34 ready, Ó ÆÌÜÛ-ÐÁÍÑÔØÀ, ×ÓÅ 16-ÒÁÚÒÑÄÎÙÅ. ML> åÓÔØ ÂÏÌØÛÉÅ ÓÏÍÎÅÎÉÑ × ÔÏÍ, ÞÔÏ V34 ÍÏÖÎÏ ÓÄÅÌÁÔØ ÎÁ ML> 8-ÒÁÚÒÑÄÎÙÈ ÍÏÄÅÌÑÈ. þÔÏ ÐÏÎÉÍÁÅÔÓÑ ÐÏ ÒÁÚÏÑÄÎÏÓÔØÀ? IMNHO, ÎÁ ÒÁÂÏÔÕ ÐÒÏÔÏËÏÌÁ ÍÏÖÅÔ ×ÌÉÑÔØ ÐÒÁËÔÉÞÅÓËÉ ÔÏÌØËÏ ÒÁÚÒÑÄÎÏÓÔØ DSP, Á ÏÎ ËÁË ÂÙÌ ÔÁË É ÅÓÔØ 16-ÒÁÚÒÑÄÎÙÊ.... Sincerely, < Nick > #! rnews 1138 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!Nick.Soveiko Newsgroups: fido7.kitchen Distribution: fido7 X-Comment-To: Michel Ivanov From: Nick Soveiko Date: Mon, 05 Sep 94 00:01:24 +0400 Subject: óÏÅ×ÙÊ ÓÏÕÓ Message-ID: <3869200194@p1.f86.n5030.z2.ftn> References: <777064521@p10.f163.n5030.z2.ftn> Organization: <-<-<- Houses Of The Hairy || SPb || Russia ->->-> X-FTN-AREA: SU.KITCHEN X-FTN-Tearline: Continued over X-FTN-SEEN-BY: 51/2 5020/1 23 24 26 33 35 41 44 49 50 52 62 64 68 75 78 124 146 X-FTN-SEEN-BY: 5020/168 173 188 200 203 213 215 230 249 268 290 5026/3 5027/3 X-FTN-SEEN-BY: 5030/6 7 10 11 16 33 36 44 48 55 61 69 71 86 96 97 99 106 108 119 X-FTN-SEEN-BY: 5030/134 163 173 206 5055/6 X-FTN-PATH: 5030/86 6 5020/23 35 68 49 Lines: 14 Hi, Michel! [15:14 on Tue, Aug 16, 1994] Michel Ivanov (2:5030/163.10) ==> All Re: 'óÏÅ×ÙÊ ÓÏÕÓ': MI> á ðÉÔÅpÅ ? íÏÖÅÔ ×ÉÄÅÌ ËÔÏ ? Stockmann, ÐÏÚÁÄÉ ÇÏÓÔ. ó-ðÅÔÅÒÂÕÒÇ, ÐÏÌÌÉÔÒÏ×ÁÑ ÂÕÔÙÌØ ËÉÔÁÊÓËÏÇÏ ÓÏÕÓÁ - $2.50 Sincerely, < Nick > #! rnews 1261 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f153.n5030!Sergei.Petrowski Newsgroups: fido7.hardw.pc_sound Distribution: fido7 X-Comment-To: All From: Sergei Petrowski Date: Mon, 05 Sep 94 19:43:37 +0400 Subject: Sound Vision 16 GOLD Message-ID: <778814649@f153.n5030.z2.ftn> Organization: ABC BBS. St.Petersburg. Russia. X-FTN-AREA: SU.HARDW.PC.SOUND X-FTN-Tearline: Blue Wave/Max v2.12 X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 26 35 41 49 50 52 54 56 62 64 68 75 X-FTN-SEEN-BY: 5020/103 134 146 168 188 196 200 203 213 215 226 230 241 249 259 X-FTN-SEEN-BY: 5020/268 290 327 5025/10 5026/3 5030/6 11 16 33 36 44 48 61 69 71 X-FTN-SEEN-BY: 5030/75 83 84 86 93 96 99 103 106 108 134 153 163 173 5055/6 5063/1 X-FTN-SEEN-BY: 5080/22 X-FTN-PATH: 5030/153 86 6 5020/23 35 68 49 Lines: 14 Hello All ! HÅ ÎÁÊÄÅÔcÑ ÌÉ y ×cÅÍoÇyÝÅÇo É ×cÅÚÎÁÀÝÅÇo All ËÁ- ËoÊ-ÎÉÂyÄØ ÄoËÉ Ðo Subj. éÎÔÅpyÅÔ ËÁË ÅÇo ÇÁÄÁ ÐpoÇpÁÍÍÉpo- ×ÁÔØ ÞÅpÅÚ ÐopÔÙ. A Ôo Soft Ë ÎÅÍy ÔoÌØËo ÐoÄ Windows. é ÐoÜÔoÍy, ÞÔoÂÙ ÎÁcÔpoÉÔØ ÇpoÍËocÔØ É Ô.Ð. ÐpÉÈoÄÉÔcÑ ÚÁÐycËÁÔØ Windows :-(( With best regards CÅpÇÅÊ. #! rnews 1757 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f206.n5030!Michael.Vartanyan Newsgroups: fido7.exch.black.log Distribution: fido7 X-Comment-To: Igor Buchanov From: Michael Vartanyan Date: Mon, 05 Sep 94 21:08:00 +0400 Subject: ÉÅÎÛÁÎz Message-ID: <778817637@f206.n5030.z2.ftn> References: <778789396@f53.n5030.z2.ftn> Organization: We call it - Master and Servant X-FTN-AREA: PVT.EXCH.BLACK.LOG X-FTN-TID: FastEcho 1.40 197061 X-FTN-Tearline: üÈÏ×ÅpÔ 1.40 X-FTN-SEEN-BY: 51/2 5015/4 5020/1 23 26 35 41 49 50 52 54 62 64 68 75 103 109 124 X-FTN-SEEN-BY: 5020/134 146 168 188 196 200 203 213 215 226 230 241 249 259 261 X-FTN-SEEN-BY: 5020/268 286 290 5026/3 5030/3 6 11 16 33 36 44 48 61 69 71 84 86 X-FTN-SEEN-BY: 5030/96 99 106 108 173 206 5055/6 5080/22 X-FTN-PATH: 5030/206 86 6 5020/23 35 68 49 Lines: 20 ðÒÉ×ÅÔ ÔÅÂÅ ÇÏÒÑÞÉÊ, ÄÏÒÏÇ[ÏÊ/ÁÑ] Igor! Monday September 05 1994 15:22, Igor Buchanov wrote to Nazarenko Sergey: MI>>> ìÅÎÉÎÇpÁÄÅ. ÷ Ó×ÏÅ ×pÅÍÑ, ËÏÇÄÁ ÔÁÞËÁ 386 × HÉÉÎÛÁÛÎÃÅ ×ÅÓÉÌÁ $1010, MI>>> × "òÕÂÉËÏÎÅ" ÅÅ Ä×ÉÇÁÌÉ ÐÏ $1400. NS>> á ÞÅÇÏ × ðÉÔÅÒÅ ÚÎÁÀÔ Ï ÜÔÏÊ "HÉÉÎÛÁÛÎÃÅ"? IB> ìÉÞÎÏ Õ ÍÅÎÑ ÏÄÎÉ ÍÁÔÀÇÉ... ðpÉÍÅpÎÏ ÁÎÁÌÏÇÉÞÎÏ... äÏ×ÅÌÏÓØ ÍÎÅ ÍÅÎÑÔØ ×ÉÄÅÏËÁpÔÏÞËÕ × ÉÈ ÍÁÛÉÎÅ... ó ×ÉÄÕ ×pÏÄÅ ÎÉÞÅÇÏ, Á pÁÂÏÔÁÅÔ ÓÏ ÓÔpÁÎÎÙÍÉ É ÎÅÐÏÎÑÔÎÙÍÉ ÇÌÀËÁÍÉ. õ ÍÅÎÑ ÞÅÓÔÎÏ ÇÏ×ÏpÑ ×ÏÚÎÉËÌÏ ÐÏÄÏÚpÅÎÉÅ ÞÔÏ ÂÏÌØÛÉÎÓÔ×Ï ËÏÍÐÌÅËÔÁÛËÉ ×ÙËÏ×ÙpÑÎÏ ÉÚ ËÁËÏÊ-ÔÏ ÀÇÏ-×ÏÓÔÏÞÎÏ-ÁÚÉÑÔÓËÏÊ ÐÏÍÏÊËÉ ÎÅÐÏÄÁÌÅËÕ ÏÔ ËÏÍÐÕÔÅpÎÏÇÏ ÚÁ×ÏÄÁ. åÓÔØ Õ ÎÅÇÏ É ÐpÉÌÉÞÎÙÅ ÓÔÏpÏÎÙ: ËÏpÐÕÓÁ MTÛÎÉËÉ ÚÁ×ÏÚÑÔ ÐÏÞÔÉ ×ÓÅ... ëÁË ×ÓÅÇÄÁ - Ó ÐpÅ×ÅÌÉËÉÍ ÐÏÞÔÅÎÉÅÍ, Õ×ÁÖÅÎÉÅÍ, ÏÓ×ÅÝÅÎÉÅÍ É ÏÔÏÐÌÅÎÉÅÍ Michael Vartanyan #! rnews 1340 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f103.n5030!Konstantin.Andreev Newsgroups: fido7.net Distribution: fido7 X-Comment-To: Victor Metelitsa From: Konstantin Andreev Date: Mon, 05 Sep 94 11:17:00 +0400 Subject: åÝÅ ÏÄÉÎ ÇÌÕÐÙÊ ×ÏÐpÏÓ Message-ID: <778767710@p28.f103.n5030.z2.ftn> References: <778109240@f13.n5077.z2.ftn> Organization: White Night, Spb, Russia, 24 every day X-FTN-AREA: SU.NET X-FTN-Tearline: GEcho 1.02+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 33 35 41 42 44 49 50 52 54 56 62 64 X-FTN-SEEN-BY: 5020/68 75 134 146 168 173 188 200 203 213 215 226 230 241 268 290 X-FTN-SEEN-BY: 5026/3 5027/3 5030/6 7 16 33 36 44 48 55 69 71 83 86 93 96 99 103 X-FTN-SEEN-BY: 5030/106 108 119 134 163 173 5055/6 5063/1 5080/22 X-FTN-PATH: 5030/103 86 6 5020/23 35 68 49 Lines: 17 Hello Victor! Sunday August 28 1994, Victor Metelitsa writes to All: VM> é ×ÏÔ, NetWare ÎÅ ÈÏÞÅÔ ÕÓÔÁÎÁ×ÌÉ×ÁÔØÓÑ. ëÁË ÜÔÏ ÐÏ ÉÎÓÔÕËÃÉÉ: [ skeep ] VM> úÁÇpÕÚÉÔØ INSTALL É ÐÅpÅpÁÚÍÅÔÉÔØ ÄÉÓË. VM> (÷ÏÔ ÔÕÔ É ÏÓÅÞËÁ - "HÅÔ ÄÏÓÔÕÐÎÙÈ ÄÉÓËÏ×ÙÈ ÄpÁÊ×Ï×"). VM> ðÏÞÅÍÕ? ñ ÞÔÏ-ÔÏ ÎÅÄÏÞÉÔÁÌ? éÌÉ ÎÁÄÏ ÉÓËÁÔØ ÞÔÏ-ÔÏ ×pÏÄÅ MAXTOR.DSK? ðÏÐpÏÂyÊ ×ÍÅÓÔÏ ISADISK.DSK IDE.DSK, y ÎÁÓ ÂÙÌÏ ÔÏÖÅ ÓÁÍÏÅ. Konstantin #! rnews 1839 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f103.n5030!f142.n5030!Alexey.Markov Newsgroups: fido7.chainik Distribution: fido7 X-Comment-To: Roman Zolotarew From: Alexey Markov Date: Mon, 05 Sep 94 20:52:00 +0400 Subject: gecho+golded Message-ID: <3871131776@p11.f142.n5030.z2.ftn> References: <778353753@p99.f24.n5020.z2.ftn> Organization: Why don't we do IT in the road?! X-FTN-AREA: SU.CHAINIK X-FTN-Tearline: FMail 0.96Ô Unrg.+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 28 33 35 41 44 49 50 52 54 62 64 68 X-FTN-SEEN-BY: 5020/75 103 146 168 188 200 203 215 224 226 230 241 249 261 268 286 X-FTN-SEEN-BY: 5020/290 5026/3 5027/3 5030/6 7 11 16 33 36 44 48 55 69 71 75 86 96 X-FTN-SEEN-BY: 5030/103 106 108 119 153 163 173 206 5055/6 5063/1 5080/22 X-FTN-PATH: 5030/142 103 86 6 5020/23 35 68 49 Lines: 21 Roman Zolotarew wrote in a message to All: RZ> ðÏÄÓËÁÖÉÔÅ ÌÀÄÉ ÇÄÅ ÍÎÅ ËÏÐÁÔØ × ÇÅÈÅ ÉÌÉ ÄÅÄÅ ? ^^^^ ÚÄÅÓØ ËÏÐÁÊ ;) mbutil link (ÉÌÉ mbu386 link, × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÔÏÇÏ, ÓÅÍ ÔÙ ÐÏÌØÚÕÅÛÓÑ). ðÏÓÌÅ ÓÅÊ ÐpÏÃÅÄÕpÙ Õ ÔÅÂÑ ÂÕÄÕÔ ÓÏÚÄÁÎÙ ÃÅÐÏÞËÉ ×ÏÐpÏÓÏ×-ÏÔ×ÅÔÏ×, ÐÏ ËÏÔÏpÙÍ ÔÙ Ó ÕÓÐÅÈÏÍ ÓÍÏÖÅÛØ ÐÅpÅÍÅÝÁÔÓÑ × ÄÅÄÅ, ÔÏÐÞÁ Ctrl-RighArrrow, Ctrl-LeftArrow RZ> é ÅÝÅ ÏÞÅÎØ ÈÏÞÅÔÓÑ ÞÔÏ ÂÙ ÓÏÏÂÝÅÎÉÑ × ÂÁÚÅ RZ> (hudson) ÂÙÌÉ ÏÔÓÏp- ÔÉpÏ×ÁÎÙ ÐÏ ÄÁÔÅ,Á ÔÏ MBUTIL SORT RZ> -ALL ÓÏpÔÉpÕÅÔ ÎÏ ÐpÉ ÜÔÏÍ ÐÏpÔÑÔÓÑ ÌÁÓÔpÉÄÙ ÓÏÏÂÝÅÎÉÊ,Á RZ> ÄpÕÇÉÅ ÏÐÃÉÉ ÇÏ×ÏpÑÔ NOTHING SORT,ÍÏÖÎÏ ÜÔÏ ËÁË ÎÉÂÕÄØ RZ> ÓÄÅÌÁÔØ ? á ×ÏÔ ÜÔÏÇÏ ÎÅ ÐÏÍÎÀ, ÐÏÔÏÍÕ ËÁË FMail ÄÅÌÁÅÔ ÓÏpÔ ÐpÉ ÔÏÓÓÉÎÇÅ, É ÌÁÓÔpÉÄÙ ÎÅ ÐÏpÔÉÔ ;) RZ> Regard,Roman Dixi! Alexey Markov (Real name: áÌÅËÓÅÊ ÷ÁpÆÏÌÏÍÅÅ×) --- #! rnews 1987 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f103.n5030!f142.n5030!Vlad.Yakovenko Newsgroups: fido7.hardw.pc.video Distribution: fido7 X-Comment-To: Ivan Rouzanov From: Vlad Yakovenko Date: Mon, 05 Sep 94 18:12:00 +0400 Subject: á ÅÓÌÉ ÐÏÓÔÁ×ÉÔØ ËÁpÔÕ SuperVGA ÎÁ VGA ÍÏÎÉÔÏp ? Message-ID: <778793109@p2.f142.n5030.z2.ftn> References: <778175471@p7.f64.n5020.z2.fidonet> Organization: ‚€ Silver Spirit €‚ St.Petersburg X-FTN-AREA: SU.HARDW.PC.VIDEO X-FTN-TID: FastEcho 1.40 5061440 X-FTN-Tearline: GoldED 2.42.G0214+ X-FTN-SEEN-BY: 51/2 5015/4 5020/1 23 35 41 44 49 50 52 54 62 64 68 75 103 134 146 X-FTN-SEEN-BY: 5020/168 178 188 196 200 203 213 215 226 230 241 249 268 286 290 X-FTN-SEEN-BY: 5020/327 5026/3 5030/1 6 7 11 16 32 33 36 44 48 55 61 69 71 75 83 X-FTN-SEEN-BY: 5030/84 86 93 96 99 103 106 108 119 134 153 163 173 5055/6 5080/22 X-FTN-PATH: 5030/142 103 86 6 5020/23 35 68 49 Lines: 25 Hello, Õ×ÁÖÁÅÍÙÊ Ivan! Mon Aug 29 1994 15:44, Ivan Rouzanov wrote to Sergey Arsentiev: SA>> á ÅÓÌÉ ÐÏÓÔÁ×ÉÔØ SuperVGA Card ÎÁ VGA'ÛÎÙÊ ÍÏÎÉÔÏp, ÐpÏÂÌÅÍÙ SA>> ÂÕÄÕÔ Ó ÎÅËÏÔÏpÙÍÉ pÅÖÉÍÁÍÉ (ÉÌÉ ÍÏÖÅÔ ÓÏ ×ÓÅÍÉ) ? íÏÎÉÔÏp SA>> ÎÅ ÌÅ×ÙÊ... IMHO ÎÅ ÄÏÌÖÎÏ ÂÙÔØ, ÄÁ ? IR> IR> õ ÍÅÎÑ ÓÔÏÉÔ Tseng ET-4000 ÎÁ VGA'ÛÎÏÍ ÍÏÎÉÔÏpÅ. ðpÏÂÌÅÍÙ ôïìøëï Trident 8900D ;) 6105 Þ/ ÐÅpÅÄÅÌÁÎÎÙÊ ÐÏÄ VGA :(( IR> Ó ×ÉÄÅÏpÅÖÉÍÁÍÉ Ó pÁÚpÅÛÅÎÉÅÍ ÂÏÌØÛÅ ÞÅÍ 640x480 ( ËÏÌÉÞÅÓÔ×Ï òÁÂÏÔÁÅÔ ×ÓÅ ×ÐÌÏÔØ ÄÏ 1024*768*256 ;))) IR> Ã×ÅÔÏ× pÏÌÉ ÎÅ ÉÇpÁÅÔ ). ôÁË ÞÔÏ ÓÁÍÏÅ ËpÕÔÏÅ ÞÔÏ ÕÄÁÌÏÓØ IR> ÐÏÌÕÞÉÔØ - 640x480 256 Ã×ÅÔÏ×. ðpÁ×ÄÁ ÐpÉ 1024*768 ËÁpÔÉÎËÁ ÎÅÓËÏÌØËÏ ÏÂpÅÚÁÅÔÓÑ, ÎÏ ×ÓÅ pÁ×ÎÏ ËpÕÔÏ... Trident ÏÎ ×ÅÄØ ÎÁÓÔpÁÉ×ÁÅÔÓÑ...;)) IR> ðÏËÁ. IR> Ivan F. Rouzanov. öÅÌÁÀ ×ÓÅÇÏ ÎÁÉÌÕÞÛÅÇÏ... Sincerly yours Vlad Yakovenko ... HÁ ÐÏÌÕ ÌÅÖÁÌ É ÅÌÅ ÄÙÛÁÌ ÔÒÕÐ, ÒÑÄÏÍ ÓÉÄÅÌÁ ÖÅÎÁ ÔÒÕÐÁ,Á ÂÒÁÔ ÔÒÕÐÁ ÌÅÖÁÌ × ÄÒÕÇÏÊ ËÏÍÎÁÔÅ ÂÅÚ ÓÏÚÎÁÎÉÑ. #! rnews 1139 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f103.n5030!f142.n5030!Vlad.Yakovenko Newsgroups: fido7.chainik Distribution: fido7 X-Comment-To: All From: Vlad Yakovenko Date: Mon, 05 Sep 94 22:23:00 +0400 Subject: *.IMG ÆÁÊÌÙ? :( Message-ID: <778807476@p2.f142.n5030.z2.ftn> Organization: ‚€ Silver Spirit €‚ St.Petersburg X-FTN-AREA: SU.CHAINIK X-FTN-TID: FastEcho 1.40 5061440 X-FTN-Tearline: GoldED 2.42.G0214+ X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 24 28 33 35 41 44 49 50 52 54 62 64 68 X-FTN-SEEN-BY: 5020/75 103 146 168 188 200 203 215 224 226 230 241 249 261 268 286 X-FTN-SEEN-BY: 5020/290 5026/3 5027/3 5030/6 7 11 16 33 36 44 48 55 69 71 75 86 96 X-FTN-SEEN-BY: 5030/103 106 108 119 153 163 173 206 5055/6 5063/1 5080/22 X-FTN-PATH: 5030/142 103 86 6 5020/23 35 68 49 Lines: 10 Hello, Õ×ÁÖÁÅÍÙÊ All! þÅÍ ÉÈ pÁÓËpÕÔÉÔØ? äÁÊÔÅ, please in 5030... öÅÌÁÀ ×ÓÅÇÏ ÎÁÉÌÕÞÛÅÇÏ... Sincerly yours Vlad Yakovenko ... Press any key ÐÅÒÅ×ÏÄÉÍ: ÖÍÉ ÎÁ Ó×ÏÀ ÌÀÂÉÍÕÀ ËÎÏÐËÕ (×ÁÒÉÁÎÔ - ÎÁ ÇÁÛÅÔËÕ) #! rnews 2066 Path: pccross!f230.n5020!f49.n5020!f68.n5020!f35.n5020!f23.n5020!f6.n5030!f86.n5030!f153.n5030!ALLFIX+.2:5030/153 Newsgroups: fido7.allfix.mail Distribution: fido7 X-Comment-To: Vadim Shibanov From: ALLFIX+ 2:5030/153 Date: Mon, 05 Sep 94 20:19:54 +0400 Subject: "IMS Multiuser" "Multiuser" "IMS" Message-ID: <489007739@f153.n5030.z2.FidoNet> References: <778698744@f144.n5030.z2.ftn> Organization: ABC BBS. St.Petersburg. Russia. X-FTN-AREA: RU.ALLFIX.MAIL X-FTN-VIA: ALLFIX+ v4.21/gamma-3 X-FTN-Tearline: ALLFIX+ v4.21/gamma-3 X-FTN-SEEN-BY: 51/2 463/18 5015/4 5020/1 23 35 41 44 49 50 52 62 64 68 75 111 124 X-FTN-SEEN-BY: 5020/146 168 188 196 200 230 241 249 268 290 5026/3 5030/6 7 11 16 X-FTN-SEEN-BY: 5030/33 36 44 48 69 71 86 96 99 103 108 119 153 173 5055/6 5063/1 X-FTN-PATH: 5030/153 86 6 5020/23 35 68 49 Lines: 32 Found at : ABC BBS SysOp : Andrew Smetankin Location : St.Petersburg Telephone : (812)296-7067 Max Speed : 16800 Flags : XA,CM,ZYX Address : 2:5030/153 Comment : Freq FILES for all files list... Area : Texts ----------------------------------------------------------------------------- KCRIMS.ARJ 17,012 IN THE COURT OF THE CRIMSON KING an observation by KING CRIMSON LARKS.ARJ 2,289 King Crimson "Larks' Tongues in Aspic" LIZARD.ARJ 4,188 King Crimson "Lizard" POSEIDON.ARJ 3,195 King Crimson "In The Wake Of Poseidon" STARLESS.ARJ 2,604 King Crimson "Starless and Bible Black" THREE.ARJ 2,325 King Crimson "Three of a Perfect Pair" KC_TEXT.ARJ 16,081 King Crimson texts ----------------------------------------------------------------------------- 47,694 bytes in 7 file(s) Total of 47,694 in 7 file(s) File requests are welcome 23 hrs per day, from 07:30-06:30. We now support ZyXEL U-1496E callers at 16k8 bps! FREQ FILES for an allfiles listing. This list was created with the new macro language in ALLFIX ABC BBS ifmail-2.14tx8.10.orig/ifgate/pkt100644 1751 50 1250 6014367372 14134 0ustar mdsrc1æÊ46œœ¯)Õ61朜26 Sep 94 00:52:00AllIgor GrischenkoNew FIDO Net-files at O'Hacker's siteAREA:ROBOTS.49 MSGID: 2:5020/49 2e861b51 TID: FastEcho 1.41/g 14037 Hi! ® ä ©«-íå ¬ ¢®â ¯p¨¢ «¨«®, ¯®¡¥p¥£¨áì... ;-) Now we have received some file(s): N5020MAP.264, 17455 bytes long, CRC=40209CF1, Description: Net 5020 map Magic name: N5020MAP FileEcho: HUBROUTE "Hub-routing in Moscow" EchoGroup: F "FIDO Net-files" - - - - - Mon, 26 Sep 94, daynumber 269 --- FileMgr 3103G * Origin: O'Hacker's site (WT 14:00-9:00, FREQ 16:00-22:00) (2:5020/49) SEEN-BY: 5020/49 50 54 103 146 196 230 PATH: 5020/49 ifmail-2.14tx8.10.orig/ifgate/ifmail.8100644 1751 50 16100 6343130540 14753 0ustar mdsrc.\" Set up \*(lq, \*(rq if -man hasn't already set it up. .if @@\*(lq@ \{\ . ds lq " . if t .ds lq `` . if !@@\(lq@ .ds lq "\(lq .\} .if @@\*(rq@ \{\ . ds rq " . if t .ds rq '' . if !@@\(rq@ .ds rq "\(rq .\} .de Id .ds Rv \\$3 .ds Dt \\$4 .. .de Sp .if n .sp .if t .sp 0.4 .. .TH IFMAIL 8 "\*(Dt" "Internet-Fidonet Gateway" .UC 4 .SH NAME .B ifmail \- Convert RFC-822 and RFC-1036 mail/news to FTN Fidonet packets. .PP .B ifnews \- Convert RFC-1036 Usenet news to FTN Fidonet packets. .PP .br .SH Synopsis .B ifmail [-h] [-x verbosity] [-I file] [-n] [-r Address] [-g grade] receipent ... .PP .B ifnews [-h] [-x verbosity] [-I file] [-r Address] [-g grade] [receipent] .PP .SH Description .B Ifmail converts RFC-822 compliant mail and RFC-1036 compliant news to FTN packets. It must run setuid owner of fidonet related stuff. The current packet naming is BinkleyTerm, with file/directory names in lowcase. Naming conventions are implemented in a separate source file, pktname.c, to make modifications easier. .PP The default mode is the mail mode of operation. In mail mode, you must specify recepient address(es) on the command line, in the form: .br "Eugene.Crosser@p14.f6.n5020.z2.fidonet.org". .PP The first recepient address is used as the routing address, if no routing address is specified. In news mode then the $NEWSSITE environment variable is used as the routing address. .PP When the news mode is in effect, (i.e. "-n" key is specified or the program is called by alias "ifnews") a news article (or batch) is expected on stdin. .PP .B Ifmail will try to preserve as much information as possible in "X-FTN-..." headers and "^ARFC-..." kludges, and restore messages more or less accurately to their original form when double-gatewaying. .PP A dbm-based alias database is supported, so if a message passes from a newsgroup to an echo, the author's free form name and domain address are stored, and when a netmail reply comes from fidonet to that free form name, it is passed as a mail message to the remembered domain address. .PP .B ATTENTION: This mechanism will not work if you specify fidonet-style address as the "visible name" in your MTA. However you can edit /etc/aliases to add lines of the pattern: .B John.Smith: jsmith Or you can set GECOS matching in sendmail.cf (OGTrue) .PP Several addresses may be specified in the config file, netmail from fidonet addressed to any of those addresses is assumed local and resolved through the aforementioned database, otherwise the mail will be routed through the normal MTA (and presumably packed to some other fidonet node). If there is a "To:" line at the beginning of the fido message, the address is taken from it .B (ONLY THE FIRST ADDRESS!). .PP When an RFC message is split, unique MSGIDs are generated for all parts after the first one. In any case, the original "Message-ID:" header is preserved in the "^ARFC-Message-ID:" kludge and used if the message comes back to usenet on some (other) gateway. .PP On the way from news to echo, if the node to which the packet is being created is present in an "X-FTN-SEEN-BY:" header, the message is not included in the packet. SEEN-BY lines in the messages included into the packet consist of (1) your node primary address, (2) copy of "X-FTN-SEEN-BY:" header(s), (3) ftn addresses that could be parsed from the CNews file "$NEWSCTL/log" in the line with the corresponding Message-ID. For the latter to work, you should have a Cnews compatible log file available for reading and have an "ndbm" package. This works with INN too. .PP .B ATTENTION: your feed name in the cnews "sys" file should be fNNN.nMMM or pNNN.fMMM.nLLL, without zone and domain, see the examples included with the source distribution. .PP In some cases, though, you will need to specify zone and/or domain of the feed, e.g. if you are exporting echomail to several networks. In such case, specify the "cutdown" fNNN.nMMM notation after the slash, to prevent exporting back (Refer the your news systems manual). This trick may also be useful if your hub presents non-primary AKA in the echomail it gives you. .PP .B Ifmail does make some attempt to process file attaches, but only locally. Not passing to the Internet and back, but if a fileattach netmail message is routed from one fidonet node to another, it probably will take the attached file with it. .PP There is also a feature to define "forbidden" groups. If a usenet message is crossposted to some of the gated groups _and_ to some of the forbidden groups it will not be passed to any fidonet echoes. Messages with "Control:" headers are also not passed to FidoNet. .PP .SH OPTIONS .B \-h Display a short help message. .PP .B \-x verbosity Set the debug verbosity .B verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .PP .B \-N Put resultant packets to /tmp/ifmail. .PP .B \-I File Use the alternate configuration file .B File. .PP .B \-n Set news mode for processing RFC-1036 Usenet news rather than RFC-822 electronic mail. .PP .B \-s Set secure mode: this enables ifmail to check the nodelist before gating the message from RFC-822 electronic mail to FTN-style netmail. .PP .B \-r Address Route packets to the Fidonet address .B Address. .B Address should be in the format "[pNN.]fNN.nNN[.zNN[.domain]]". .PP .B \-g Grade Set the type of Fidonet packet to create. Where .B Grade is one of: .br N = Normal (Default) .br C = Crash .br H = Hold .PP .B \-c Charset Forces the use of the given .B Charset, it is useful when you know that a given link can only handle one charset for its incoming mail. This switch override all the charset handling done internally. It needs .B -DDIRTY_CHRS at compile time to be active. .PP .B \-l Level Sets the .B Level for ^aRFC- kludges. If not set 1 is the default. it determines the amount of info from rfc headers that is kept when gating. .br -1: really nothing is gated, not recommended at all ! .br 0: only intended for points or end-leaf nodes that have only an FTN link .br 1: normal level inteded for normal gateways and nodes (points) .br 2: keeps almost everything, including lots of non relevant headers. .br 3: hey! same as 2 but in plain text, no ^aRFC- kludge is used. .PP I recommend you to leave the default value of 1 if you don't .B really know what you are doing. .PP .B \-b Don't split the messages when writting to PKT. Use this option only if you know your partner uses a tosser that can handle messages of arbitrary size (or at least 64KB big). Note that strict compliance to .B fidonet standards imply handling messages of arbitrary size. .PP .SH FILES .B $IFLIBDIR/config Runtime configuration file. .PP .SH SEE ALSO ifcico(8), ifpack(8), ifunpack(8), iftoss(8) .PP .SH Acknowledgements Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. Some modeules taken from INN package. Thanks to Michael Bravo (who was the first) and many others for testing. .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. ifmail-2.14tx8.10.orig/ifgate/iftoss.8100644 1751 50 6222 6014367370 15015 0ustar mdsrc.\" Set up \*(lq, \*(rq if -man hasn't already set it up. .if @@\*(lq@ \{\ . ds lq " . if t .ds lq `` . if !@@\(lq@ .ds lq "\(lq .\} .if @@\*(rq@ \{\ . ds rq " . if t .ds rq '' . if !@@\(rq@ .ds rq "\(rq .\} .de Id .ds Rv \\$3 .ds Dt \\$4 .. .de Sp .if n .sp .if t .sp 0.4 .. .TH IFTOSS 8 "\*(Dt" "Internet-Fidonet Gateway" .UC 4 .SH NAME .B iftoss \- Convert Fidonet FTN packets to RFC-822 and RFC-1036 mail/news. .PP .br .SH Synopsis .B iftoss [-h] [-N] [-x verbosity] [-I file] .PP .SH Description .B Iftoss converts Fidonet netmail packets into RFC-822 internet mail or RFC-1036 Usenet News. It expects a non-arcmail packet on stdin and passes converted mail messages and/or generated newsbatch to sendmail and/or rnews. If you specify -N, resultant messages/newsbatches will go to the directory "/tmp/ifmail" instead of being fed to sendmail/rnews. .PP Ifmail and iftoss programs try to preserve as much information as possible in "X-FTN-..." headers and "^ARFC-..." kludges, and restore messages more or less accurately to their original form when double-gatewaying. .PP If you make a system mail alias file accessible to the iftoss program, it makes attempt to "backward resolve" the "from" addresses, that is, if the originating address of the FidoNet message matches the right side of some mail alias, the "Reply-To:" header of the generated mail/news message will contain "alias@your.domain.name" address. .PP Message IDs are converted as follows: "^AMSGID:
" is converted to "@
". If there was no MSGID in the fidonet message, messageid of the form @ is generated, so that when a single message is gatewayed in several distinct places, it will have the same messageid anyway (for some (little) risk of having two different messages with the same messageid). RFC822 Message-IDs are converted back when they can be, otherwise the messageid "@" is converted to "^AMSGID crc32()". When an RFC message is split, unique MSGIDs are generated for all parts after the first one. In any case, the original "Message-ID:" header is preserved in the "^ARFC-Message-ID:" kludge and used if the message comes back to usenet on some (other) gateway. .PP .SH OPTIONS .B \-h .br Display a short help message. .PP .B \-N .br Put resutant messages/newsbatch to /tmp/ifmail, do not invoke sendmail/rnews. .PP .B \-x verbosity .br Set the debug verbosity. .B verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .PP .B \-I File .br Use the alternate configuration file .B File. .PP .SH FILES .B $IFLIBDIR/config Runtime configuration file. .PP .SH SEE ALSO ifcico(8), ifpack(8), ifunpack(8), ifmail(8) .PP .SH Acknowledgements Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. Some modeules taken from INN package. Thanks to Michael Bravo (who was the first) and many others for testing. .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. ifmail-2.14tx8.10.orig/ifgate/charconv_utf.c100644 0 0 22244 6701151723 16714 0ustar rootroot#include #include #include #include "lutil.h" #include "charset.h" #include "mime.h" #include "charconv.h" char Base_64Code[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* returns numeric value from a Base64Code[] digit */ static int index_hex2[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,0x3e, -1, -1, -1,0x3f, 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b, 0x3c,0x3d, -1, -1, -1, -1, -1, -1, -1,0x00,0x01,0x02,0x03,0x04,0x05,0x06, 0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e, 0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16, 0x17,0x18,0x19, -1, -1, -1, -1, -1, -1,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20, 0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30, 0x31,0x32,0x33, -1, -1, -1, -1, -1 }; void utf7_to_eight(char *in,char **out,int *code) { int isb64,l_code=CHRS_AUTODETECT; char *p, *q, *buf; buf=malloc(strlen(in)*sizeof(char)); isb64=0; for (p = in, q = buf; *p != '\0';) { if (isb64) { /* we are in B64 encoding, that is in utf-7 */ int bit_buffer=0; int nbits=0; int i,l,result,offset=0; /* find the lenght of the B64 string */ l=strspn(p,Base_64Code); for (i=0;i= 8) { nbits -= 8; result = ((bit_buffer >> nbits)&0xff); /* if the charset code is unknown try to find it. * it only works for latin1 (iso-8859-1), cyrillic, greek, * arabic and hebrew (iso-8859-[5678]), as for other latin * encodings it is harder, iso-8859-2 is assumed as it is * the most common */ if ((l_code==CHRS_AUTODETECT) || (l_code==CHRS_ISO_8859_1)) { if (result == 0x00) l_code=CHRS_ISO_8859_1; else if (result == 0x01) l_code=CHRS_ISO_8859_2; else if (result == 0x03) l_code=CHRS_ISO_8859_7; else if (result == 0x04) l_code=CHRS_ISO_8859_5; else if (result == 0x05) l_code=CHRS_ISO_8859_8; else if (result == 0x06) l_code=CHRS_ISO_8859_6; } /* what to add to next byte to convert to iso-8859-* * note that it doesn't work for iso-8859-{2,3,4,9,10} * as the offset changes for almost each char */ if (result == 0x00) offset=0x00; else if (result == 0x03) offset=0x30; else if (result == 0x04) offset=0xa0; else if (result == 0x05) offset=0x10; else if (result == 0x06) offset=0xa0; /* convert to the right 8bit char by adding offset */ if (result < 0x06) *q++ = (char)((bit_buffer & 0xff) + offset); else *q++ = (char)(bit_buffer & 0xff); } } /* end of B64 encoding */ if (*p == '-') p++; isb64=0; } else if (*p == '+') { /* '+' is the beginning of a new B64 section */ isb64=1; p++; } else { /* ascii encoding */ *q++=*p++; } } *q = '\0'; /* now we know the 8bit charset that was encoded whith utf-7, * so ask again to see if a conversion to FTN charset is needed */ if (*code==CHRS_AUTODETECT || *code==CHRS_NOTSET) *code=getoutcode(l_code); switch (l_code) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: switch (*code) { case CHRS_CP437 : eight2eight(buf,out,ISO_8859_1__CP437); break; case CHRS_CP850 : eight2eight(buf,out,ISO_8859_1__CP850); break; case CHRS_MACINTOSH : eight2eight(buf,out,ISO_8859_1__MACINTOSH); break; default : noconv(buf,out); break; } break; case CHRS_ISO_8859_5 : switch (*code) { case CHRS_CP866 : eight2eight(buf,out,ISO_8859_5__CP866); break; case CHRS_KOI8_R : case CHRS_KOI8_U : eight2eight(buf,out,ISO_8859_5__KOI8); break; case CHRS_MIK_CYR : eight2eight(buf,out,ISO_8859_5__MIK_CYR); break; default : noconv(buf,out); break; } break; case CHRS_ISO_8859_8 : switch (*code) { case CHRS_CP424 : eight2eight(buf,out,ISO_8859_8__CP424); break; case CHRS_CP862 : eight2eight(buf,out,ISO_8859_8__CP862); break; default : noconv(buf,out); break; } break; default : noconv(in,out); break; } } /* * UNICODE UTF-8 * ------------- ------------------------------------ * 0000 -> 007F = 7 bits = 0xxxxxxx * 0080 -> 07FF = 11 bits = 110xxxxx 10xxxxxx * 0800 -> FFFF = 16 bits = 1110xxxx 10xxxxxx 10xxxxxx */ void utf8_to_eight(char *in,char **out,int *code) { int is8bit,l_code=CHRS_AUTODETECT; char *p, *q, *buf; buf=malloc(strlen(in)*sizeof(char)); is8bit=0; for (p = in, q = buf; *p != '\0';) { int bit_buffer=0; int nbits=0; int result,offset=0; if ((*p & 0xff) >= 0xe0) { /* 16 bits = 1110xxxx 10xxxxxx 10xxxxxx */ bit_buffer=((*p++ & 0xff) & 0x0f); bit_buffer=(bit_buffer << 4); bit_buffer+=((*p++ & 0xff) & 0xbf); bit_buffer=(bit_buffer << 6); bit_buffer+=((*p++ & 0xff) & 0x3f); nbits=16; } else if ((*p & 0xff) >= 0xc0) { /* 11 bits = 110xxxxx 10xxxxxx */ bit_buffer=((*p++ & 0xff) & 0x2f); bit_buffer=(bit_buffer << 6); bit_buffer+=((*p++ & 0xff) & 0x3f); nbits=11; } else { /* 7 bits = 0xxxxxxx */ bit_buffer=(*p++ & 0xff); nbits=7; } if (nbits >= 8) { result = ((bit_buffer >> 8)&0xff); /* if the charset code is unknown try to find it. * it only works for latin1 (iso-8859-1), cyrillic, greek, * arabic and hebrew (iso-8859-[5678]), as for other latin * encodings it is harder, iso-8859-2 is assumed as it is * the most common */ if ((l_code==CHRS_AUTODETECT) || (l_code==CHRS_ISO_8859_1)) { if (result == 0x00) l_code=CHRS_ISO_8859_1; else if (result == 0x01) l_code=CHRS_ISO_8859_2; else if (result == 0x03) l_code=CHRS_ISO_8859_7; else if (result == 0x04) l_code=CHRS_ISO_8859_5; else if (result == 0x05) l_code=CHRS_ISO_8859_8; else if (result == 0x06) l_code=CHRS_ISO_8859_6; } /* what to add to next byte to convert to iso-8859-* * note that it doesn't work for iso-8859-{2,3,4,9,10} * as the offset changes for almost each char */ if (result == 0x00) offset=0x00; else if (result == 0x03) offset=0x30; else if (result == 0x04) offset=0xa0; else if (result == 0x05) offset=0x10; else if (result == 0x06) offset=0xa0; /* convert to the right 8bit char by adding offset */ if (result < 0x06) *q++ = (char)((bit_buffer & 0xff) + offset); else *q++ = (char)(bit_buffer & 0xff); } else { /* ascii encoding */ *q++ = (char)(bit_buffer & 0xff); } } *q = '\0'; /* now we know the 8bit charset that was encoded whith utf-7, * so ask again to see if a conversion to FTN charset is needed */ if (*code==CHRS_AUTODETECT || *code==CHRS_NOTSET) *code=getoutcode(l_code); switch (l_code) { case CHRS_ISO_8859_1 : case CHRS_ISO_8859_15: switch (*code) { case CHRS_CP437 : eight2eight(buf,out,ISO_8859_1__CP437); break; case CHRS_CP850 : eight2eight(buf,out,ISO_8859_1__CP850); break; case CHRS_MACINTOSH : eight2eight(buf,out,ISO_8859_1__MACINTOSH); break; default : noconv(buf,out); break; } break; case CHRS_ISO_8859_5 : switch (*code) { case CHRS_CP866 : eight2eight(buf,out,ISO_8859_5__CP866); break; case CHRS_KOI8_R : case CHRS_KOI8_U : eight2eight(buf,out,ISO_8859_5__KOI8); break; case CHRS_MIK_CYR : eight2eight(buf,out,ISO_8859_5__MIK_CYR); break; default : noconv(buf,out); break; } break; case CHRS_ISO_8859_8 : switch (*code) { case CHRS_CP424 : eight2eight(buf,out,ISO_8859_8__CP424); break; case CHRS_CP862 : eight2eight(buf,out,ISO_8859_8__CP862); break; default : noconv(buf,out); break; } break; default : noconv(in,out); break; } } ifmail-2.14tx8.10.orig/ifcico/ 40755 1751 50 0 6701151723 13307 5ustar mdsrcifmail-2.14tx8.10.orig/ifcico/lastmtime.c100644 1751 50 472 5444425520 15534 0ustar mdsrc#include #include #include int main(argc,argv) int argc; char *argv[]; { struct stat st; time_t t=0L; int i=1; while (argv[i]) { if (stat(argv[i],&st) == 0) if (st.st_mtime > t) t=st.st_mtime; i++; } if (t == 0L) time(&t); printf("%s",ctime(&t)); return 0; } ifmail-2.14tx8.10.orig/ifcico/ifcico.c100644 0 0 13431 6701151722 15461 0ustar rootroot#include #include #include #include #include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "nodelist.h" #include "trap.h" #include "config.h" #include "version.h" #include "needed.h" #if defined(SHORT_PID_T) #define pid_t short #elif defined(INT_PID_T) #define pid_t int #endif int master=0; int forcedcalls=0; char *forcedphone=NULL; char *forcedline=NULL; #if defined(HAS_TCP) || defined(HAS_TERM) char *inetaddr=NULL; int tcp_mode=0; #endif #ifdef NOISEDEBUG int junklevel=0; #endif int call(faddr *); fa_list *callall(void); int answer(char *); void mkdirs(char*); void setargspace(char**,char**); void setproctitle(char*); void usage(void) { #ifdef NOISEDEBUG #if defined(HAS_TCP) || defined(HAS_TERM) confusage("-r -j -a -t ..."); #else confusage("-r -j ..."); #endif fprintf(stderr,_("-j\t\tdamage every byte\t[%d]\n"), junklevel); #else #if defined(HAS_TCP) || defined(HAS_TERM) confusage("-r -a -t ..."); #else confusage("-r ..."); #endif #endif fprintf(stderr,_("-r 0|1\t\t1 - master, 0 - slave\t[0]\n")); fprintf(stderr,_("-n\tforced phone number\n")); fprintf(stderr,_("-l\tforced tty device\n")); #if defined(HAS_TCP) || defined(HAS_TERM) fprintf(stderr,_("-a\tuse TCP/IP instead of modem\n")); fprintf(stderr,_("-t\t0 - IFC, 1 - telnet\t[0]\n")); #endif fprintf(stderr,_(" \tshould be in domain form, e.g. f11.n22.z3\n")); fprintf(stderr,_("\t\t(this implies master mode)\n")); fprintf(stderr,_("\n or: %s tsync|yoohoo|**EMSI_INQC816\n"),myname); fprintf(stderr,_("\t\t(this implies slave mode)\n")); } int main(argc,argv,envp) int argc; char *argv[]; char *envp[]; { int c,uid; fa_list *callist=NULL,**tmpl; faddr *tmp; int rc,maxrc,callno=0,succno=0; char *answermode=NULL,*p; #ifdef NEED_FORK pid_t child,waitret; int status; #endif setargspace(argv,envp); #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); catch(myname); #ifdef NOISEDEBUG #if defined(HAS_TCP) || defined(HAS_TERM) while ((c=getopt(argc,argv,"j:x:r:n:l:a:t:I:h")) != -1) #else while ((c=getopt(argc,argv,"j:x:r:n:l:I:h")) != -1) #endif #else #if defined(HAS_TCP) || defined(HAS_TERM) while ((c=getopt(argc,argv,"x:r:n:l:a:t:I:h")) != -1) #else while ((c=getopt(argc,argv,"x:r:n:l:I:h")) != -1) #endif #endif if (confopt(c,optarg)) switch (c) { #ifdef NOISEDEBUG case 'j': junklevel=atoi(optarg); break; #endif case 'r': master=atoi(optarg); if ((master != 0) && (master != 1)) { usage(); exit(1); } break; case 'l': forcedline=xstrcpy(optarg); break; #if defined(HAS_TCP) || defined(HAS_TERM) case 'a': inetaddr=xstrcpy(optarg); break; case 't': tcp_mode=atoi(optarg); break; #endif case 'n': forcedphone=xstrcpy(optarg); break; default: usage(); exit(1); } if (readconfig()) { fprintf(stderr,"Error getting configuration, aborting\n"); exit(1); } maxpsize=0L; /* we want classic packet names here */ tmpl=&callist; while (argv[optind]) { for (p=argv[optind];(*p) && (*p == '*');p++); if ((strcasecmp(argv[optind],"tsync") == 0) || (strcasecmp(argv[optind],"yoohoo") == 0) || (strcasecmp(argv[optind],"binkp") == 0) || (strncasecmp(p,"EMSI_",5) == 0)) { master=0; answermode=argv[optind]; debug(10,"inbound \"%s\" mode",S(answermode)); } else { debug(8,"callist entry \"%s\"",argv[optind]); if ((tmp=parsefaddr(argv[optind]))) { *tmpl=(fa_list *)xmalloc(sizeof(fa_list)); (*tmpl)->next=NULL; (*tmpl)->addr=tmp; tmpl=&((*tmpl)->next); } else logerr("unrecognizable address \"%s\"",argv[optind]); } optind++; } if (callist) { master=1; forcedcalls=1; } /* The following witchkraft about uid-s is necessary to make access() work right. Unforunately, access() checks the real uid, if ifcico is invoked with supervisor real uid (as when called by uugetty) it returns X_OK for the magic files that even do not have `x' bit set. Therefore, `reference' magic file requests are taken for `execute' requests (and the actual execution natually fails). Here we set real uid equal to effective. If real uid is not zero, all these fails, but in this case it is not necessary anyway. */ uid=geteuid(); seteuid(0); setuid(uid); seteuid(uid); debug(2,"uid=%d, euid=%d",getuid(),geteuid()); umask(066); /* packets may contain confidential information */ #ifdef HAS_BSD_SIGNALS siginterrupt(SIGALRM,1); siginterrupt(SIGPIPE,1); #endif p=xstrcpy(inbound); p=xstrcat(p,"/tmp/"); mkdirs(p); free(p); maxrc=0; if (master) { #ifdef NEED_FORK if ((child=fork())) { if (child == -1) { logerr("$fork() error"); exit(1); } while (((waitret=wait(&status)) != -1) && (waitret != child)) { logerr("wait return %d, status %d,%d", waitret,status>>8,status&0xff); } if (status&0xff) kill(getpid(),status&0xff); else exit(status>>8); } #endif if (callist == NULL) callist=callall(); for (tmpl=&callist;*tmpl;tmpl=&((*tmpl)->next)) { callno++; rc=call((*tmpl)->addr); loginf("call to %s %s (rc=%d)", ascfnode((*tmpl)->addr,0x1f), rc?"failed":"successful",rc); if (rc > maxrc) maxrc=rc; if (rc == 0) succno++; } } else /* slave */ { #ifdef HAS_TCP if (!answermode && tcp_mode==TCPMODE_BINKP) answermode=xstrcpy("binkp"); #endif setproctitle("-ifcico answering"); maxrc=answer(answermode); callno=1; succno=(maxrc == 0); } if (callno) loginf("%d of %d calls, maxrc=%d",succno,callno,maxrc); return maxrc; } ifmail-2.14tx8.10.orig/ifcico/nodelist.c100644 1751 50 12511 6463053353 15416 0ustar mdsrc#include #include #include #include #include #include #include #ifdef HAS_NDBM_H #include #endif #include "directory.h" #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "nodelist.h" #include "nlindex.h" #include "needed.h" #define NULLDOMAIN "nulldomain" node *getnlent(addr) faddr *addr; { FILE *fp; static node nodebuf; static char buf[256],*p,*q; struct _ixentry xaddr; struct _loc *loc; off_t off; datum key; datum dat; int n,i,j,found=-1,maybe=-1; int ixflag,stdflag; char *dom,*mydomain; debug(20,"getnlent for %s",ascfnode(addr,0x1f)); mydomain=whoami->addr->domain; if (mydomain == NULL) mydomain=NULLDOMAIN; key.dptr=(char*)&xaddr; key.dsize=sizeof(struct _ixentry); nodebuf.addr.domain=NULL; nodebuf.addr.zone=0; nodebuf.addr.net=0; nodebuf.addr.node=0; nodebuf.addr.point=0; nodebuf.addr.name=NULL; nodebuf.hub=0; nodebuf.type=0; nodebuf.pflag=0; nodebuf.name=NULL; nodebuf.location=NULL; nodebuf.sysop=NULL; nodebuf.phone=NULL; nodebuf.speed=0; nodebuf.flags=0L; nodebuf.uflags[0]=NULL; if (addr == NULL) goto retdummy; if (addr->zone == 0) addr->zone=whoami->addr->zone; xaddr.zone=addr->zone; nodebuf.addr.zone=addr->zone; xaddr.net=addr->net; nodebuf.addr.net=addr->net; xaddr.node=addr->node; nodebuf.addr.node=addr->node; xaddr.point=addr->point; nodebuf.addr.point=addr->point; switch (initnl()) { case 0: break; case 1: loginf("WARNING: nodelist index needs to be rebuilt with \"ifindex\""); break; default: goto retdummy; } #ifdef HAS_NDBM_H dat=dbm_fetch(nldb,key); #else dat=fetch(key); #endif if (dat.dptr == NULL) goto retdummy; n=dat.dsize/sizeof(struct _loc); debug(20,"found %d entries",n); loc=(struct _loc *)dat.dptr; for (i=0;(idomain != NULL) && (strcasecmp(addr->domain,dom) == 0)) { debug(20,"strict match for domain \"%s\"",dom); found=i; } else if ((addr->domain == NULL) && (strcasecmp(mydomain,dom) == 0)) { debug(20,"match with home domain \"%s\"",dom); found=i; break; } else if (addr->domain == NULL) { debug(20,"probable match with domain \"%s\"",dom); maybe=i; break; } } if (found == -1) found=maybe; if (found == -1) { debug(20,"Match not found"); goto retdummy; } fp=nodevector[loc[found].nlnum].fp; if (fseek(fp,loc[found].off,SEEK_SET) != 0) { logerr("$seek failed for nodelist entry %d",loc[found].nlnum); } if (fgets(buf,sizeof(buf)-1,fp) == NULL) { logerr("$fgets failed for nodelist entry %d",loc[found].nlnum); } if (*(p=buf+strlen(buf)-1) == '\n') *p='\0'; if (*(p=buf+strlen(buf)-1) == '\r') *p='\0'; for (p=buf;*p;p++) if (*p == '_') *p=' '; debug(20,"Nodelist line: \"%s\"",buf); p=buf; if ((q=strchr(p,','))) *q++='\0'; nodebuf.type=NL_NONE; if (p[0] == '\0') nodebuf.type=NL_NODE; else for (j=0;pkey[j].key;j++) if (strcasecmp(p,pkey[j].key) == 0) { nodebuf.type=pkey[j].type; nodebuf.pflag=pkey[j].pflag; break; } if (nodebuf.type == NL_NONE) { for (q=buf;*q;q++) if (*q < ' ') *q='.'; logerr("nodelist %d offset +%lu: unidentified entry \"%s\"", loc[found].nlnum,(unsigned long)loc[found].off,buf); goto retdummy; } p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; nodebuf.name=p; p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; nodebuf.location=p; p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; nodebuf.sysop=p; p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; if (strcasecmp(p,"-Unpublished-") == 0) nodebuf.phone=NULL; else nodebuf.phone=p; p=q; if (p == NULL) goto badsyntax; if ((q=strchr(p,','))) *q++='\0'; nodebuf.speed=atoi(p); ixflag=0; for (p=q;p;p=q) { if ((q=strchr(p,','))) *q++='\0'; stdflag=0; for (j=0;fkey[j].key;j++) if (strcasecmp(p,fkey[j].key) == 0) { stdflag=1; nodebuf.flags|=fkey[j].flag; } if (!stdflag && (ixflag < MAXUFLAGS)) { nodebuf.uflags[ixflag++]=p; if (ixflag < MAXUFLAGS) nodebuf.uflags[ixflag]=NULL; } } nodebuf.addr.name=nodebuf.sysop; nodebuf.addr.domain=nodevector[loc[found].nlnum].domain; nodebuf.hub=loc[found].hub; if (addr->domain == NULL) addr->domain=xstrcpy(nodebuf.addr.domain); debug(20,"getnlent: type %d, pflag=%x",nodebuf.type,nodebuf.pflag); debug(20,"getnlent: name %s",nodebuf.name); debug(20,"getnlent: location %s",nodebuf.location); debug(20,"getnlent: sysop %s",nodebuf.sysop); debug(20,"getnlent: phone %s",nodebuf.phone); debug(20,"getnlent: speed %u",nodebuf.speed); debug(20,"getnlent: flags 0x%lx",nodebuf.flags); for (j=0;nodebuf.uflags[j];j++) debug(20,"getnlent: uflag %s",nodebuf.uflags[j]); return &nodebuf; badsyntax: logerr("nodelist %d offset +%lu: bad syntax in line \"%s\"", loc[found].nlnum,(unsigned long)loc[found].off,buf); /* fallthrough */ retdummy: debug(20,"getnlent returns dummy entry"); nodebuf.type=0; nodebuf.pflag=NL_DUMMY; nodebuf.name="Unknown"; nodebuf.location="Nowhere"; nodebuf.sysop="Sysop"; nodebuf.phone=NULL; nodebuf.speed=2400; nodebuf.flags=0L; nodebuf.uflags[0]=NULL; return &nodebuf; } ifmail-2.14tx8.10.orig/ifcico/call.c100644 0 0 12067 6701151722 15144 0ustar rootroot/* ### Modified by P. Saratxaga on 25 Oct 1995 ### * - added aftercall(nlent) (code from T.Tanaka) * - added Txy support from ifmail-os */ #include #include #include #include #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "nodelist.h" #include "config.h" #include "session.h" #include "callstat.h" #include "Txy.h" extern int forcedcalls; extern char *forcedphone; extern char *forcedline; #if defined(HAS_TCP) || defined(HAS_TERM) extern char *inetaddr; #endif /* ************************* */ extern int aftercall(node *); extern char *get_modem_string(modem_string*,node*); extern int openport(char*,int); #if defined(HAS_TCP) || defined(HAS_TERM) extern int opentcp(char*); extern void closetcp(void); #endif extern void localport(void); extern void nolocalport(void); extern void closeport(void); extern int dialphone(node*,char*); extern int hangup(node*); extern void rdoptions(node*); extern int nodelock(faddr*); extern int nodeulock(faddr*); extern void setproctitle(char*); int checkretry(st) callstat *st; { return 0; /* check retries and time; rc=1 - not reached, rc=2 - undialable */ } int call(addr) faddr *addr; { node *nlent; int rc=1; int speed; char *portlist,*p,*q; callstat *st; char cbuf[128]; if ((nlent=getnlent(addr)) == NULL) { logerr("cannot call %s: fatal in nodelist lookup", ascfnode(addr,0x1f)); putstatus(addr,0,6); return 6; } st=getstatus(addr); if (!forcedcalls) { if ((rc=checkretry(st))) { loginf("cannot call %s: %s", ascfnode(addr,0x1f), (rc==1)?"retry time not reached" :"node undialable"); return 5; } if (dialdelay) sleep(dialdelay); } if (nodelock(addr)) { loginf("system %s locked",ascinode(addr,0x1f)); putstatus(addr,0,4); return 4; } rdoptions(nlent); inbound=protinbound; /* master sessions are secure */ sprintf(cbuf,"ifcico calling %s (%s %s)", ascfnode(&(nlent->addr),0x1f), #if defined(HAS_TCP) || defined(HAS_TERM) inetaddr?"addr":"phone", inetaddr?inetaddr: #else "phone", #endif forcedphone?forcedphone: nlent->phone?nlent->phone:""); setproctitle(cbuf); if ((nlent->phone || forcedphone #if defined(HAS_TCP) || defined(HAS_TERM) || inetaddr #endif ) && (forcedcalls || (((nlent->pflag & (NL_DUMMY|NL_DOWN|NL_HOLD|NL_PVT)) == 0) && ((localoptions & NOCALL) == 0) && !not_work_time_now(nlent)))) { #if defined(HAS_TCP) || defined(HAS_TERM) loginf("calling %s (%s, %s %s)", ascfnode(addr,0x1f),nlent->name, inetaddr?"addr":"phone", inetaddr?inetaddr: forcedphone?forcedphone:nlent->phone); #else loginf("calling %s (%s, phone %s)", ascfnode(addr,0x1f),nlent->name, forcedphone?forcedphone:nlent->phone); #endif #if defined(HAS_TCP) || defined(HAS_TERM) if (inetaddr) { rc=opentcp(inetaddr); if (rc) { loginf("cannot connect %s",inetaddr); nodeulock(addr); putstatus(addr,1,2); return 2; } } else #endif if (forcedline) { p=forcedline; if ((q=strchr(p,':'))) { *q++='\0'; if ((*q == 'l') || (*q == 'L')) speed=atoi(++q); else { speed=atoi(q); if (nlent->speed < speed) speed=nlent->speed; } } else speed=0; setnamesfx(p); rc=openport(p,speed); if (rc) { loginf("cannot open port %s",p); nodeulock(addr); putstatus(addr,0,1); return 1; } } else { if ((portlist=xstrcpy(get_modem_string(modemport,nlent))) == NULL) { logerr("no matching ports defined"); nodeulock(addr); putstatus(addr,0,9); return 9; } for (rc=1,p=strtok(portlist," \t,"); rc && p; p=strtok(NULL," \t,")) { if ((q=strrchr(p,':'))) { *q++='\0'; if ((*q == 'l') || (*q == 'L')) { speed=atoi(++q); } else { speed=atoi(q); if (nlent->speed < speed) speed=nlent->speed; } } else speed=0; setnamesfx(p); rc=openport(p,speed); } if (rc) { loginf("no free matching ports"); free(portlist); nodeulock(addr); putstatus(addr,0,1); return 1; } free(portlist); } #if defined(HAS_TCP) || defined(HAS_TERM) if (!inetaddr) #endif if ((rc=dialphone(nlent,forcedphone?forcedphone:nlent->phone))) { loginf("dial failed"); nodeulock(addr); rc+=1; /* rc=2 - dial fail, rc=3 - could not reset */ } if (rc == 0) { #if defined(HAS_TCP) || defined(HAS_TERM) if (!inetaddr) #endif nolocalport(); rc=session(addr,nlent,SESSION_MASTER, SESSION_UNKNOWN,NULL); if (rc) rc=abs(rc)+10; } #if defined(HAS_TCP) || defined(HAS_TERM) if (inetaddr) { closetcp(); } else #endif { localport(); hangup(nlent); aftercall(nlent); closeport(); } } else { loginf("cannot call %s (%s, phone %s)", ascfnode(addr,0x1f),S(nlent->name), S(nlent->phone)); if ((nlent->phone || forcedphone #if defined(HAS_TCP) || defined(HAS_TERM) || inetaddr #endif )) rc=8; else rc=7; nodeulock(addr); } if ((rc == 2) || (rc == 30)) putstatus(addr,1,rc); else putstatus(addr,0,rc); return rc; } ifmail-2.14tx8.10.orig/ifcico/callall.c100644 1751 50 3043 6050160674 15156 0ustar mdsrc#include #include #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "nodelist.h" #include "config.h" #include "scanout.h" #include "needed.h" static int each(faddr*,char,int,char*); static fa_list *alist=NULL; fa_list *callall(void) { fa_list *tmp; int rc; debug(7,"callall requested"); if (alist) { for (tmp=alist;tmp;tmp=alist) { alist=tmp->next; tidy_faddr(tmp->addr); free(tmp); } alist=NULL; } if ((rc=scanout(each))) { logerr("Error scanning outbound, aborting"); return NULL; } return alist; } static int each(addr,flavor,isflo,fname) faddr *addr; char flavor; int isflo; char *fname; { fa_list **tmp; if ((flavor == 'h') || ((isflo != OUT_PKT) && (isflo != OUT_FLO))) return 0; for (tmp=&alist;*tmp;tmp=&((*tmp)->next)) if (((*tmp)->addr->zone == addr->zone) && ((*tmp)->addr->net == addr->net) && ((*tmp)->addr->node == addr->node) && ((*tmp)->addr->point == addr->point) && (((*tmp)->addr->domain == NULL) || (addr->domain == NULL) || (strcasecmp((*tmp)->addr->domain,addr->domain) == 0))) break; if (*tmp == NULL) { *tmp=(fa_list *)xmalloc(sizeof(fa_list)); (*tmp)->next=NULL; (*tmp)->addr=(faddr *)xmalloc(sizeof(faddr)); (*tmp)->addr->name=NULL; (*tmp)->addr->zone=addr->zone; (*tmp)->addr->net=addr->net; (*tmp)->addr->node=addr->node; (*tmp)->addr->point=addr->point; (*tmp)->addr->domain=xstrcpy(addr->domain); debug(7,"has mail to %s",ascfnode((*tmp)->addr,0x1f)); } return 0; } ifmail-2.14tx8.10.orig/ifcico/answer.c100644 0 0 2301 6701151722 15476 0ustar rootroot#include #include #include #include #include "lutil.h" #include "ftn.h" #include "nodelist.h" #include "session.h" #include "config.h" extern int rawport(void); extern void nolocalport(void); extern int cookedport(void); extern void rdoptions(node *); int answer(stype) char *stype; { int st,rc; node *nlent; char *p, *q; p = ttyname(0); if (p) { q = strrchr(ttyname(0), '/'); if (q) p = q + 1; setnamesfx(p); } if ((nlent=getnlent(NULL)) == NULL) { logerr("could not get dummy nodelist entry"); return 1; } rdoptions(nlent); inbound=norminbound; /* slave session is unsecure by default */ if (stype == NULL) st=SESSION_UNKNOWN; else if (strcmp(stype,"tsync") == 0) st=SESSION_FTSC; else if (strcmp(stype,"yoohoo") == 0) st=SESSION_YOOHOO; else if (strncmp(stype,"**EMSI_",7) == 0) st=SESSION_EMSI; else if (strcmp(stype,"binkp") == 0) st=SESSION_BINKP; else st=SESSION_UNKNOWN; debug(10,"answer to \"%s\" (%d) call",stype?stype:"unknown type",st); if ((rc=rawport()) != 0) logerr("unable to set raw mode"); else { nolocalport(); rc=session(NULL,NULL,SESSION_SLAVE,st,stype); } cookedport(); return rc; } ifmail-2.14tx8.10.orig/ifcico/modemstr.c100644 1751 50 631 5452141416 15362 0ustar mdsrc#include #include "config.h" #include "nodelist.h" static modem_string *tmp=NULL; char *get_modem_string(ms,nlent) modem_string *ms; node *nlent; { while (ms && ((ms->expr) && !flagexp(ms->expr,nlent))) ms=ms->next; if (ms) { tmp=ms->next; return ms->line; } else { tmp=NULL; return NULL; } } char *next_modem_string(nlent) node *nlent; { return get_modem_string(tmp,nlent); } ifmail-2.14tx8.10.orig/ifcico/openport.c100644 0 0 35376 6701151722 16107 0ustar rootroot/* ### Modified by P.Saratxaga on 24 Aug 1995 ### * - added CRTSFL_COMMAND and MIPS_SPEED_HACKING to allow working * on RISCos SVR4. By Marc Shaeffer. */ #include #include #include #include #ifdef HAS_IOCTL_H #include #endif #include #include #include #if defined(HAS_TERMIOS_H) #include #elif defined(HAS_TERMIO_H) #include #define speed_t int #elif defined(HAS_SGTTY_H) #include #else #error must have termios.h, termio.h or sgtty.h #endif #include "lutil.h" #include "xutil.h" #include "ulock.h" #include "ttyio.h" #ifdef HAS_DIAL #ifdef HAS_DIAL_H #include #else typedef struct { void *attr; /* struct termio may be undefined */ int baud; /* unused */ int speed; /* 212A modem: low=300, high=1200 */ char *line; /* device name for out-going line */ char *telno; /* ptr to tel-no/system name string */ int modem; /* unused */ char *device; /* pointer to a CALL_EXT structure */ /* this was unused previously */ int dev_len; /* unused */ } CALL; #ifdef CRTSFL_COMMAND extern int master; extern int execsh(char*,char*,char*,char*); #endif extern int dial(); extern void undial(); #endif /* HAS_DIAL_H */ static void dialerr(); #endif /* HAS_DIAL */ static char *openedport=NULL,*pname; static int need_detach=1; extern int f_flags; int openport(char*,int); void localport(void); void nolocalport(void); void closeport(void); int tty_raw(int); int tty_local(void); int tty_nolocal(void); int tty_cooked(void); void linedrop(int); void interrupt(int); #if defined(HAS_TERMIO_H) || defined(HAS_TERMIOS_H) static speed_t transpeed(int); #endif int hanged_up; void linedrop(sig) int sig; { loginf("got SIGHUP"); hanged_up=1; return; } void interrupt(sig) int sig; { loginf("got SIGINT"); signal(SIGINT,interrupt); return; } #ifdef TIOCWONLINE #define WONLINE_TIMEOUT 5 static void alarmsig(sig) int sig; { loginf("got TIMEOUT waiting for carrier"); hanged_up=1; /* probably the modem hung up before raising DCD */ return; } #endif int openport(port,speed) char *port; int speed; { int rc; char *errtty=NULL; int fd; int outflags; #ifdef HAS_DIAL #ifdef CS_PROB CALL_EXT callx; char protocols[64]; #endif CALL call; memset(&call,0,sizeof(call)); #ifdef CS_PROB memset(&callx,0,sizeof(callx)); callx.service="ifcico"; callx.protocol=protocols; call.device=(char*)&callx; #endif call.attr=0; call.baud=-1; call.telno=NULL; #endif debug(18,"try opening port \"%s\" at %d",S(port),speed); if (openedport) free(openedport); if (port[0] == '/') openedport=xstrcpy(port); else { openedport=xstrcpy("/dev/"); openedport=xstrcat(openedport,port); } pname=strrchr(openedport,'/'); #ifndef HAS_DIAL if ((rc=lock(pname))) { free(openedport); openedport=NULL; return rc; } #endif if (need_detach) { fflush(stdin); fflush(stdout); setbuf(stdin,NULL); setbuf(stdout,NULL); close(0); close(1); if ((errtty=ttyname(2))) { debug(18,"stderr was on \"%s\", closing",errtty); fflush(stderr); close(2); } #ifdef HAS_SETSID if (getpid() != getpgrp()) /* Already session leader? */ { if (setsid() < 0) { logerr("$setsid failed"); ulock(pname); return 1; } } #else #ifdef BSD_SETPGRP if (setpgrp(0,0) < 0) #else if (setpgrp() < 0) #endif { logerr("$setpgrp failed"); ulock(pname); return 1; } #endif } tty_status=0; hanged_up=0; signal(SIGHUP,linedrop); signal(SIGPIPE,linedrop); signal(SIGINT,interrupt); rc = 0; debug(18,"try open"); #ifdef HAS_DIAL call.line=openedport; if ((fd=dial(call)) < 0) { rc=1; dialerr(fd); fd=open("/dev/null",O_RDONLY); } else if (fd > 0) if (dup(fd) != 0) { logerr("cannot dup fd %d to 0 (fd 0 busy?)",fd); rc=1; } else { close(fd); fd=0; } if (dup(fd) != 1) { rc=1; logerr("$cannot dup stdin to stdout"); fd=open("/dev/null",O_WRONLY); } #else if ((fd=open(openedport,O_RDONLY|O_NONBLOCK)) != 0) { rc=1; loginf("$cannot open \"%s\" as stdin",S(openedport)); fd=open("/dev/null",O_RDONLY); } if ((fd=open(openedport,O_WRONLY|O_NONBLOCK)) != 1) { rc=1; loginf("$cannot open \"%s\" as stdout",S(openedport)); fd=open("/dev/null",O_WRONLY); } #endif clearerr(stdin); clearerr(stdout); if (need_detach) { #ifdef TIOCSCTTY if (ioctl(0,TIOCSCTTY,1L) < 0) { logerr("$TIOCSCTTY failed"); } #endif if (errtty) { rc = rc || (open(errtty,O_WRONLY) != 2); } need_detach=0; } debug(18,"after open rc=%d",rc); if (rc) loginf("cannot switch i/o to port \"%s\"",S(openedport)); else { if (tty_raw(speed)) { logerr("$cannot set raw mode for \"%s\"",S(openedport)); rc=1; } if (((f_flags=fcntl(0,F_GETFL,0L)) == -1) || ((outflags=fcntl(1,F_GETFL,0L)) == -1)) { rc=1; logerr("$GETFL error"); f_flags=0; outflags=0; } else { debug(18,"return to blocking mode"); f_flags &= ~O_NONBLOCK; outflags &= ~O_NONBLOCK; if ((fcntl(0,F_SETFL,f_flags) != 0) || (fcntl(1,F_SETFL,outflags) != 0)) { rc=1; logerr("$SETFL error"); } } debug(18,"file flags: stdin: 0x%04x, stdout: 0x%04x", f_flags,outflags); } if (rc) closeport(); return rc; } void localport(void) { debug(18,"setting port \"%s\" local",S(openedport)); signal(SIGHUP,SIG_IGN); signal(SIGPIPE,SIG_IGN); if (isatty(0)) tty_local(); return; } void nolocalport(void) { debug(18,"setting port \"%s\" non-local",S(openedport)); if (isatty(0)) tty_nolocal(); return; } int rawport(void) { tty_status=0; signal(SIGHUP,linedrop); signal(SIGPIPE,linedrop); if (isatty(0)) return tty_raw(0); else return 0; } int cookedport(void) { signal(SIGHUP,SIG_IGN); signal(SIGPIPE,SIG_IGN); if (isatty(0)) return tty_cooked(); else return 0; } void closeport(void) { debug(18,"closing port \"%s\"",S(openedport)); fflush(stdin); fflush(stdout); tty_cooked(); #ifdef HAS_DIAL close(1); undial(0); #else close(0); close(1); ulock(pname); #endif if (openedport) free(openedport); openedport=NULL; return; } void sendbrk(void) { if (isatty(0)) #if (defined(TIOCSBRK)) ioctl(0, TIOCSBRK, 0L); #elif (defined(TCSBRK)) ioctl(0, TCSBRK, 0L); #else /* any ideas about BSD? */ ; #endif } #if defined(HAS_TERMIO_H) static struct termio savetio; static struct termio tio; int tty_raw(speed) int speed; { int rc; speed_t tspeed; debug(18,"set tty raw"); tspeed=transpeed(speed); if ((rc=ioctl(0,TCGETA,&savetio)) != 0) { logerr("$ioctl(TCGETA) return %d",rc); return rc; } else { debug(18,"savetio.c_iflag=0x%08x",savetio.c_iflag); debug(18,"savetio.c_oflag=0x%08x",savetio.c_oflag); debug(18,"savetio.c_cflag=0x%08x",savetio.c_cflag); debug(18,"savetio.c_lflag=0x%08x",savetio.c_lflag); debug(18,"savetio.c_cc=\"%s\"",printable(savetio.c_cc,NCC)); debug(18,"file flags: stdin: 0x%04x, stdout: 0x%04x", fcntl(0,F_GETFL,0L),fcntl(1,F_GETFL,0L)); } tio=savetio; tio.c_iflag=0; tio.c_oflag=0; tio.c_cflag &= ~(CSTOPB | PARENB | PARODD); tio.c_cflag |= CS8 | CREAD | HUPCL | CLOCAL; if (tspeed) { tio.c_cflag &= ~CBAUD; tio.c_cflag |= tspeed; } tio.c_lflag=0; tio.c_cc[VMIN]=255; tio.c_cc[VTIME]=5; if ((rc=ioctl(0,TCSETAW,&tio))) logerr("$ioctl(0,TCSETAW,raw) return %d",rc); return rc; } int tty_local(void) { struct termio tio; long cflag; int rc; if ((rc=ioctl(0,TCGETA,&tio))) { logerr("$ioctl(TCGETA,save) return %d",rc); return rc; } cflag=tio.c_cflag | CLOCAL; tio.c_cflag &= ~CBAUD; if ((rc=ioctl(0,TCSETAW,&tio))) logerr("$ioctl(0,TCSETAW,hangup) return %d",rc); sleep(1); /* as far as I notice, DTR goes back high on next op. */ tio.c_cflag=cflag; if ((rc=ioctl(0,TCSETAW,&tio))) logerr("$ioctl(0,TCSETAW,clocal) return %d",rc); return rc; } int tty_nolocal(void) { struct termio tio; int rc; if ((rc=ioctl(0,TCGETA,&tio))) { logerr("$ioctl(TCGETA,save) return %d",rc); return rc; } tio.c_cflag &= ~CLOCAL; #if defined(CRTSCTS) tio.c_cflag |= CRTSCTS; #elif defined(CRTSFL) tio.c_cflag |= CRTSFL; #else /* donno what can be done here... Protocols won't run w/o hw flow ctl. */ tio.c_cflag |= 0; #endif if ((rc=ioctl(0,TCSETAW,&tio))) logerr("$ioctl(0,TCSETAW,clocal) return %d",rc); #ifdef CRTSFL_COMMAND if (master) { if ((rc=execsh(CRTSFL_COMMAND,NULL,NULL,NULL))) logerr("exec command %s return %d",CRTSFL_COMMAND,rc); } #endif return rc; } int tty_cooked(void) { int rc; if ((rc=ioctl(0,TCSETAF,&savetio)) != 0) logerr("$ioctl(TCSETAF) return %d",rc); return rc; } #elif defined(HAS_TERMIOS_H) static struct termios savetios; static struct termios tios; int tty_raw(speed) int speed; { int rc; speed_t tspeed; debug(18,"set tty raw"); tspeed=transpeed(speed); if ((rc=tcgetattr(0,&savetios))) { logerr("$tcgetattr(0,save) return %d",rc); return rc; } else { debug(18,"savetios.c_iflag=0x%08x",savetios.c_iflag); debug(18,"savetios.c_oflag=0x%08x",savetios.c_oflag); debug(18,"savetios.c_cflag=0x%08x",savetios.c_cflag); debug(18,"savetios.c_lflag=0x%08x",savetios.c_lflag); debug(18,"savetios.c_cc=\"%s\"",printable(savetios.c_cc,NCCS)); debug(18,"file flags: stdin: 0x%04x, stdout: 0x%04x", fcntl(0,F_GETFL,0L),fcntl(1,F_GETFL,0L)); } tios=savetios; tios.c_iflag=0; tios.c_oflag=0; tios.c_cflag &= ~(CSTOPB | PARENB | PARODD); tios.c_cflag |= CS8 | CREAD | HUPCL | CLOCAL; tios.c_lflag=0; tios.c_cc[VMIN]=255; tios.c_cc[VTIME]=5; if (tspeed) { cfsetispeed(&tios,tspeed); cfsetospeed(&tios,tspeed); } if ((rc=tcsetattr(0,TCSADRAIN,&tios))) logerr("$tcsetattr(0,TCSADRAIN,raw) return %d",rc); return rc; } int tty_local(void) { struct termios tios; tcflag_t cflag; speed_t ispeed,ospeed; int rc; if ((rc=tcgetattr(0,&tios))) { logerr("$tcgetattr(0,save) return %d",rc); return rc; } cflag=tios.c_cflag | CLOCAL; ispeed=cfgetispeed(&tios); ospeed=cfgetospeed(&tios); cfsetispeed(&tios,0); cfsetospeed(&tios,0); if ((rc=tcsetattr(0,TCSADRAIN,&tios))) logerr("$tcsetattr(0,TCSADRAIN,hangup) return %d",rc); sleep(1); /* as far as I notice, DTR goes back high on next op. */ tios.c_cflag=cflag; cfsetispeed(&tios,ispeed); cfsetospeed(&tios,ospeed); if ((rc=tcsetattr(0,TCSADRAIN,&tios))) logerr("$tcsetattr(0,TCSADRAIN,clocal) return %d",rc); return rc; } int tty_nolocal(void) { struct termios tios; int rc; if ((rc=tcgetattr(0,&tios))) { logerr("$tcgetattr(0,save) return %d",rc); return rc; } tios.c_cflag &= ~CLOCAL; #if defined(CRTSCTS) tios.c_cflag |= CRTSCTS; #elif defined(CRTSFL) tios.c_cflag |= CRTSFL; #else /* donno what can be done here... Protocols won't run w/o hw flow ctl. */ tios.c_cflag |= 0; #endif if ((rc=tcsetattr(0,TCSADRAIN,&tios))) logerr("$tcsetattr(0,TCSADRAIN,clocal) return %d",rc); #ifdef TIOCWONLINE /* on the dialout, wait for carrier here. I hope that this won't do harm when the modem is already connected, when tty_nolocal() is called while incoming session... */ signal(SIGALRM,alarmsig); alarm(WONLINE_TIMEOUT); (void)ioctl(0,TIOCWONLINE,0L); alarm(0); signal(SIGALRM,SIG_DFL); #endif return rc; } int tty_cooked(void) { int rc; if ((rc=tcsetattr(0,TCSAFLUSH,&savetios))) logerr("$tcsetattr(0,TCSAFLUSH,save) return %d",rc); return rc; } #elif defined(HAS_SGTTY_H) /* Never used BSD style terminal control, did you? */ /* OK, it seems that vladimir@c-press.udm.ru (Vladimir Zarozhevsky) */ /* did the job... I did not check it. =EC */ static struct sgttyb savetty; static struct sgttyb tios; int tty_raw(speed) int speed; { int iparam; debug(18,"set tty raw speed:%d", speed); if (ioctl(0, TIOCGETP, &savetty) != 0) return 1; if (ioctl(0, TIOCGETP, &tios) !=0) debug(2,"tty_raw: error TIOCGETP"); return 1; tios.sg_ispeed = tios.sg_ospeed = speed; tios.sg_flags |= RAW; tios.sg_flags &=~ECHO; /* ECHO disable */ tios.sg_flags &=~TANDEM; /* XON disable */ if (ioctl(0, TIOCSETC, &tios) !=0) return 1; return 0; } int tty_cooked(void) { return (ioctl(0, TIOCSETN, &savetty)); } int tty_local(void) { struct sgttyb tios; if (ioctl(0, TIOCGETP, &tios) != 0) return 1; tios.sg_flags |= NOHANG; if (ioctl(0, TIOCSETC, &tios) != 0) return 1; return 0; } int tty_nolocal(void) { struct sgttyb tios; if (ioctl(0, TIOCGETP, &tios) != 0) return 1; tios.sg_flags &=~NOHANG; if (ioctl(0, TIOCSETN, &tios) != 0) return 1; return 0; } #endif /* types of terminal control */ #ifdef HAS_DIAL static void dialerr(fd) int fd; { char *em; switch (fd) { case INTRPT: em="interrupt occured"; break; case D_HUNG: em="dialer hung (no return from write)"; break; case NO_ANS: em="no answer within 10 seconds"; break; case ILL_BD: em="illegal baud rate"; break; case A_PROB: em="acu problem (open() failure)"; break; case L_PROB: em="line problem (open() failure)"; break; case NO_Ldv: em="can't open LDEVS file"; break; case DV_NT_A: em="requested device not available"; break; case DV_NT_K: em="requested device not known"; break; case NO_BD_A: em="no device available at requestd baud"; break; case NO_BD_K: em="no device known at requestd baud"; break; case DV_NT_E: em="requested speed doesn't match"; break; case BAD_SYS: em="system not in System file"; break; #ifdef CS_PROB case CS_PROB: em="communication server problem"; break; #endif default: em="unknown error code"; break; } loginf("dial error\n\tfd=%d : %s",fd,em); } #endif #if defined(HAS_TERMIO_H) || defined(HAS_TERMIOS_H) speed_t transpeed(speed) int speed; { speed_t tspeed; #ifdef MIPS_SPEED_HACKING if (speed == 0) { speed = 19200; } #endif switch (speed) { case 0: tspeed=0; break; #if defined(B50) case 50: tspeed=B50; break; #endif #if defined(B75) case 75: tspeed=B75; break; #endif #if defined(B110) case 110: tspeed=B110; break; #endif #if defined(B134) case 134: tspeed=B134; break; #endif #if defined(B150) case 150: tspeed=B150; break; #endif #if defined(B200) case 200: tspeed=B200; break; #endif #if defined(B300) case 300: tspeed=B300; break; #endif #if defined(B600) case 600: tspeed=B600; break; #endif #if defined(B1200) case 1200: tspeed=B1200; break; #endif #if defined(B1800) case 1800: tspeed=B1800; break; #endif #if defined(B2400) case 2400: tspeed=B2400; break; #endif #if defined(B4800) case 4800: tspeed=B4800; break; #endif #if defined(B7200) case 7200: tspeed=B7200; break; #endif #if defined(B9600) case 9600: tspeed=B9600; break; #endif #if defined(B12000) case 12000: tspeed=B12000; break; #endif #if defined(B14400) case 14400: tspeed=B14400; break; #endif #if defined(B19200) case 19200: tspeed=B19200; break; #elif defined(EXTA) case 19200: tspeed=EXTA; break; #endif #if defined(B38400) case 38400: tspeed=B38400; break; #elif defined(EXTB) case 38400: tspeed=EXTB; break; #endif #if defined(B57600) case 57600: tspeed=B57600; break; #endif #if defined(B115200) case 115200: tspeed=B115200; break; #endif default: logerr("requested invalid speed %d",speed); tspeed=0; break; } return tspeed; } #endif ifmail-2.14tx8.10.orig/ifcico/opentcp.c100644 0 0 13153 6701151722 15676 0ustar rootroot/* ### Modified by T.Tanaka on 4 Dec 1995 */ /* experimental TELNET/TCP support added */ #ifdef HAS_TCP #include #include #include #include #include #include #include #include #include #include #include #include #include #include "lutil.h" #include "ttyio.h" extern void linedrop(int); int opentcp(char*); void closetcp(void); extern int h_errno; static int fd=-1; extern int f_flags; extern int tcp_mode; char telnet_options[256]; /* The combined options */ char do_dont_resp[256]; char will_wont_resp[256]; void tel_enter_binary(int rw); void tel_leave_binary(int rw); void send_do(register int c, register int init); void send_dont(register int c, register int init); void send_will(register int c, register int init); void send_wont(register int c, register int init); /* opentcp() was rewritten by Martin Junius */ int opentcp(name) char *name; { struct servent *se; struct hostent *he; int a1,a2,a3,a4; char *errmsg; char *portname; int fd; short portnum; struct sockaddr_in server; debug(18,"try open tcp connection to %s",S(name)); ClearArray(telnet_options); server.sin_family=AF_INET; if ((portname=strchr(name,':'))) { *portname++='\0'; if ((portnum=atoi(portname))) server.sin_port=htons(portnum); else if ((se=getservbyname(portname,"tcp"))) server.sin_port=se->s_port; else if (tcp_mode == TCPMODE_BINKP) server.sin_port=htons(BINKPPORT); else server.sin_port=htons(FIDOPORT); } else { if (tcp_mode == TCPMODE_BINKP) { if ((se=getservbyname("binkp","tcp"))) server.sin_port=se->s_port; else server.sin_port=htons(BINKPPORT); } else { if ((se=getservbyname("fido","tcp"))) server.sin_port=se->s_port; else server.sin_port=htons(FIDOPORT); } } if (sscanf(name,"%d.%d.%d.%d",&a1,&a2,&a3,&a4) == 4) server.sin_addr.s_addr=inet_addr(name); else if ((he=gethostbyname(name))) memcpy(&server.sin_addr,he->h_addr,he->h_length); else { switch (h_errno) { case HOST_NOT_FOUND: errmsg="Authoritative: Host not found"; break; case TRY_AGAIN: errmsg="Non-Authoritive: Host not found"; break; case NO_RECOVERY: errmsg="Non recoverable errors"; break; default: errmsg="Unknown error"; break; } loginf("no IP address for %s: %s\n",name,errmsg); return -1; } debug(18,"trying %s at port %d", inet_ntoa(server.sin_addr),(int)ntohs(server.sin_port)); signal(SIGPIPE,linedrop); fflush(stdin); fflush(stdout); setbuf(stdin,NULL); setbuf(stdout,NULL); close(0); close(1); if ((fd=socket(AF_INET,SOCK_STREAM,0)) != 0) { logerr("$cannot create socket (got %d, expected 0"); open("/dev/null",O_RDONLY); open("/dev/null",O_WRONLY); return -1; } if (dup(fd) != 1) { logerr("$cannot dup socket"); open("/dev/null",O_WRONLY); return -1; } clearerr(stdin); clearerr(stdout); if (connect(fd,(struct sockaddr *)&server,sizeof(server)) == -1) { loginf("$cannot connect %s",inet_ntoa(server.sin_addr)); return -1; } f_flags=0; if (tcp_mode == TCPMODE_TELNET) { tel_enter_binary(3); } else if (tcp_mode == TCPMODE_BINKP) { #if defined(FIONBIO) if (ioctl (fd, FIONBIO, (char *) &arg, sizeof arg) < 0) { loginf("$ioctl (FIONBIO) failed: %s", strerror(errno)); } #endif if (fcntl (fd, F_SETFL, O_NONBLOCK) == -1) { loginf("$fcntl failed: %s", strerror(errno)); } } if (tcp_mode == TCPMODE_TELNET) loginf("established TELNET/TCP connection with %s",inet_ntoa(server.sin_addr)); else if (tcp_mode == TCPMODE_BINKP) loginf("established BINKP/TCP connection with %s",inet_ntoa(server.sin_addr)); else loginf("established IFC/TCP connection with %s",inet_ntoa(server.sin_addr)); return 0; } void closetcp(void) { if (tcp_mode == TCPMODE_TELNET) tel_leave_binary(3); shutdown(fd,2); signal(SIGPIPE,SIG_DFL); } void tel_enter_binary(int rw) { if (rw & 1) send_do(TELOPT_BINARY, 1); if (rw & 2) send_will(TELOPT_BINARY, 1); send_dont/*do*/(TELOPT_ECHO, 1); send_do(TELOPT_SGA, 1); send_dont(TELOPT_RCTE, 1); send_dont(TELOPT_TTYPE, 1); send_wont/*will*/(TELOPT_ECHO, 1); send_will(TELOPT_SGA, 1); send_wont(TELOPT_RCTE, 1); send_wont(TELOPT_TTYPE, 1); } void tel_leave_binary(int rw) { if (rw & 1) send_dont(TELOPT_BINARY, 1); if (rw & 2) send_wont(TELOPT_BINARY, 1); } /* * These routines are in charge of sending option negotiations * to the other side. * * The basic idea is that we send the negotiation if either side * is in disagreement as to what the current state should be. */ void send_do(register int c, register int init) { /* if (init) { if (((do_dont_resp[c] == 0) && my_state_is_do(c)) || my_want_state_is_do(c)) return; set_my_want_state_do(c); do_dont_resp[c]++; } */ NET2ADD(IAC, DO); NETADD(c); } void send_dont(register int c, register int init) { /* if (init) { if (((do_dont_resp[c] == 0) && my_state_is_dont(c)) || my_want_state_is_dont(c)) return; set_my_want_state_dont(c); do_dont_resp[c]++; } */ NET2ADD(IAC, DONT); NETADD(c); } void send_will(register int c, register int init) { /* if (init) { if (((will_wont_resp[c] == 0) && my_state_is_will(c)) || my_want_state_is_will(c)) return; set_my_want_state_will(c); will_wont_resp[c]++; } */ NET2ADD(IAC, WILL); NETADD(c); } void send_wont(register int c, register int init) { /* if (init) { if (((will_wont_resp[c] == 0) && my_state_is_wont(c)) || my_want_state_is_wont(c)) return; set_my_want_state_wont(c); will_wont_resp[c]++; } */ NET2ADD(IAC, WONT); NETADD(c); } #endif ifmail-2.14tx8.10.orig/ifcico/dial.c100644 0 0 2032 6573551267 15130 0ustar rootroot/* ### Modified by P. Saratxaga on 25 Oct 1995 ### * - added aftercall(nlent) (code from T.Tanaka) */ #include #include #include #include "lutil.h" #include "nodelist.h" #include "config.h" int chat(node*,modem_string*,modem_string*,modem_string*,int,char*); int dialphone(nlent,phone) node *nlent; char *phone; { int rc; debug(18,"dialing %s",S(phone)); if ((rc=chat(nlent,modemreset,modemok,modemerror,timeoutreset,phone))) { logerr("could not reset the modem"); return 2; } else if ((rc=chat(nlent,modemdial,modemconnect,modemerror, timeoutconnect,phone))) { loginf("could not connect to the remote"); return 1; } else return 0; } int hangup(nlent) node *nlent; { debug(18,"hanging up"); chat(nlent,modemhangup,NULL,NULL,0,NULL); sleep(1); return 0; } int aftercall(nlent) node *nlent; { debug(18,"reading link stat (aftercall)"); if (modemaftercall==NULL) debug(18,"no aftercall string"); else { chat(nlent,modemaftercall,NULL,NULL,0,NULL); sleep(1); } return 0; } ifmail-2.14tx8.10.orig/ifcico/session.c100644 0 0 22054 6701151722 15711 0ustar rootroot/* ### Modified by P.Saratxaga on 13 Aug 1995 ### * - added code from T. Tanaka for the case when remote mailer wakes * too quickly */ #include #include #include #include #include #include #ifdef HAS_TCP #include #include #include #endif #include "ttyio.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "nodelist.h" #include "statetbl.h" #include "session.h" #include "config.h" #include "emsi.h" #include "version.h" extern int nodeulock(faddr*); #ifdef HAS_TCP extern int tcp_mode; #endif node *nlent; fa_list *remote=NULL; int session_flags; int remote_flags; int tx_define_type(); int rx_define_type(); static int type; static char *data=NULL; int session(a,nl,role,tp,dt) faddr *a; node *nl; int role; int tp; char *dt; { int rc=1; fa_list *tmpl; #ifdef HAS_TCP struct sockaddr_in peeraddr; int addrlen=sizeof(struct sockaddr_in); #endif session_flags=0; type=tp; nlent=nl; debug(10,"start %s session type %d with %s", role?"master":"slave",type,ascfnode(a,0x1f)); #ifdef HAS_TCP if (getpeername(0,(struct sockaddr*)&peeraddr,&addrlen) == 0) { debug(10,"%s TCP connection: len=%d, family=%hd, port=%hu, addr=%s", role?"outgoing":"incoming", addrlen,peeraddr.sin_family, peeraddr.sin_port, inet_ntoa(peeraddr.sin_addr)); if (role == 0) if (tcp_mode == TCPMODE_BINKP) loginf("incoming BINKP/TCP connection from %s", inet_ntoa(peeraddr.sin_addr)); else if (tcp_mode == TCPMODE_TELNET) loginf("incoming TELNET/TCP connection from %s", inet_ntoa(peeraddr.sin_addr)); else loginf("incoming IFC/TCP connection from %s", inet_ntoa(peeraddr.sin_addr)); session_flags |= SESSION_TCP; } #endif if (data) free(data); data=NULL; if (dt) data=xstrcpy(dt); emsi_local_protos=0; emsi_local_opts=0; emsi_local_lcodes=0; tidy_falist(&remote); remote=NULL; if (a) { remote=(fa_list*)xmalloc(sizeof(fa_list)); remote->next=NULL; remote->addr=(faddr*)xmalloc(sizeof(faddr)); remote->addr->zone=a->zone; remote->addr->net=a->net; remote->addr->node=a->node; remote->addr->point=a->point; remote->addr->domain=xstrcpy(a->domain); remote->addr->name=NULL; } else remote=NULL; if (role) { #ifdef HAS_TCP if (tcp_mode == TCPMODE_BINKP) type=SESSION_BINKP; #endif if (type == SESSION_UNKNOWN) (void)tx_define_type(); switch(type) { case SESSION_UNKNOWN: rc=20; break; case SESSION_FTSC: rc=tx_ftsc(); break; case SESSION_YOOHOO: rc=tx_yoohoo(); break; case SESSION_EMSI: rc=tx_emsi(data); break; case SESSION_BINKP: rc=binkp(role); break; } } else { if (type == SESSION_FTSC) session_flags |= FTSC_XMODEM_CRC; if (type == SESSION_UNKNOWN) (void)rx_define_type(); switch(type) { case SESSION_UNKNOWN: rc=20; break; case SESSION_FTSC: rc=rx_ftsc(); break; case SESSION_YOOHOO: rc=rx_yoohoo(); break; case SESSION_EMSI: rc=rx_emsi(data); break; case SESSION_BINKP: rc=binkp(role); break; } } sleep(2); for (tmpl=remote;tmpl;tmpl=tmpl->next) (void)nodeulock(tmpl->addr); /* unlock all systems, locks not owned by us are untouched */ return rc; } SM_DECL(tx_define_type,"tx_define_type") SM_STATES skipjunk,wake,waitchar,nextchar,checkintro,sendinq SM_NAMES "skipjunk","wake","waitchar","nextchar","checkintro","sendinq" SM_EDECL int c=0; int count=0; char buf[256],*p; char ebuf[13],*ep; int standby=0; int maybeftsc=0; int maybeyoohoo=0; type=SESSION_UNKNOWN; ebuf[0]='\0'; ep=ebuf; buf[0]='\0'; p=buf; SM_START(skipjunk) SM_STATE(skipjunk) #if 1 /* in case that remote mailer wakes too quickly */ SM_PROCEED(wake); #else while ((c=GETCHAR(1)) >= 0) /*nothing*/ ; if (c == TIMEOUT) {SM_PROCEED(wake);} else {SM_ERROR;} #endif SM_STATE(wake) if (count++ > 20) { loginf("remote did not respond"); SM_ERROR; } p=buf; /*PUTSTR(" \r");*/ PUTCHAR('\r'); if ((c=GETCHAR(2)) == TIMEOUT) { SM_PROCEED(wake); } else if (c < 0) { loginf("error while waking remote"); SM_ERROR; } else { count=0; SM_PROCEED(nextchar); } SM_STATE(waitchar) if ((c=GETCHAR(4)) == TIMEOUT) { standby=0; ep=ebuf; ebuf[0]='\0'; if (count++ > 8) { loginf("too many tries waking remote"); SM_ERROR; } SM_PROCEED(sendinq); } else if (c < 0) { loginf("error while getting intro from remote"); SM_ERROR; } else { SM_PROCEED(nextchar); } SM_STATE(nextchar) if (c == 'C') { session_flags |= FTSC_XMODEM_CRC; maybeftsc++; } if (c == NAK) { session_flags &= ~FTSC_XMODEM_CRC; maybeftsc++; } if (c == ENQ) maybeyoohoo++; if (((localoptions & NOWAZOO) == 0) && (maybeyoohoo > 1)) { type=SESSION_YOOHOO; SM_SUCCESS; } if (maybeftsc > 1) { type=SESSION_FTSC; SM_SUCCESS; } if ((c >= ' ') && (c <= '~')) { if (c != 'C') maybeftsc=0; maybeyoohoo=0; if ((p-buf) < (sizeof(buf)-1)) { *p++=c; *p='\0'; } if (c == '*') { standby=1; ep=ebuf; buf[0]='\0'; } else if (standby) { if ((ep-ebuf) < (sizeof(ebuf)-1)) { *ep++=c; *ep='\0'; } if ((ep-ebuf) >= (sizeof(ebuf)-1)) { standby=0; SM_PROCEED(checkintro); } } } else switch (c) { case DC1: break; case '\r': case '\n': standby=0; ep=ebuf; ebuf[0]='\0'; if (buf[0]) loginf("Intro: \"%s\"",buf); p=buf; buf[0]='\0'; break; default: standby=0; ep=ebuf; ebuf[0]='\0'; debug(10,"got '%s' reading intro", printablec(c)); break; } SM_PROCEED(waitchar); SM_STATE(checkintro) debug(10,"check \"%s\" for being EMSI request",ebuf); if (((localoptions & NOEMSI) == 0) && (strncasecmp(ebuf,"EMSI_REQA77E",12) == 0)) { type=SESSION_EMSI; data=xstrcpy("**EMSI_REQA77E"); PUTSTR("\r**EMSI_INQC816\r**EMSI_INQC816\r\021"); SM_SUCCESS; } else { p=buf; buf[0]='\0'; SM_PROCEED(waitchar); } SM_STATE(sendinq) PUTCHAR(DC1); if ((localoptions & NOEMSI) == 0) PUTSTR("\r**EMSI_INQC816**EMSI_INQC816"); if ((localoptions & NOWAZOO) == 0) PUTCHAR(YOOHOO); PUTCHAR(TSYNC); if ((localoptions & NOEMSI) == 0) PUTSTR("\r\021"); SM_PROCEED(waitchar); SM_END SM_RETURN SM_DECL(rx_define_type,"rx_define_type") SM_STATES sendintro,waitchar,nextchar,checkemsi,getdat SM_NAMES "sendintro","waitchar","nextchar","checkemsi","getdat" SM_EDECL int count=0; int c=0; int maybeftsc=0,maybeyoohoo=0; char ebuf[13],*ep; char *p; int standby=0; int datasize; type=SESSION_UNKNOWN; session_flags|=FTSC_XMODEM_CRC; ebuf[0]='\0'; ep=ebuf; SM_START(sendintro) SM_STATE(sendintro) if (count++ > 16) { loginf("too many tries to get anything from the caller"); SM_ERROR; } standby=0; ep=ebuf; ebuf[0]='\0'; if ((localoptions & NOEMSI) == 0) { PUTSTR("**EMSI_REQA77E\r\021"); } PUTSTR("\r\rAddress: "); PUTSTR(ascfnode(whoami->addr,0x1f)); PUTSTR(" using ifcico "); PUTSTR(version); PUTSTR(" of "); PUTSTR(reldate); PUTCHAR('\r'); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitchar);} SM_STATE(waitchar) if ((c=GETCHAR(8)) == TIMEOUT) { SM_PROCEED(sendintro); } else if (c < 0) { loginf("error while getting from the caller"); SM_ERROR; } else { SM_PROCEED(nextchar); } SM_STATE(nextchar) if ((c >= ' ') && (c <= 'z')) { if (c == '*') { standby=1; ep=ebuf; ebuf[0]='\0'; } else if (standby) { if ((ep-ebuf) < (sizeof(ebuf)-1)) { *ep++=c; *ep='\0'; } if ((ep-ebuf) >= (sizeof(ebuf)-1)) { standby=0; SM_PROCEED(checkemsi); } } SM_PROCEED(waitchar); } else switch (c) { case DC1: SM_PROCEED(waitchar); break; case TSYNC: standby=0; ep=ebuf; ebuf[0]='\0'; if (++maybeftsc > 1) { type=SESSION_FTSC; SM_SUCCESS; } else {SM_PROCEED(waitchar);} break; case YOOHOO: standby=0; ep=ebuf; ebuf[0]='\0'; if (++maybeyoohoo > 1) { type=SESSION_YOOHOO; SM_SUCCESS; } else {SM_PROCEED(waitchar);} break; case '\r': case '\n': standby=0; ep=ebuf; ebuf[0]='\0'; if (ebuf[0]) {SM_PROCEED(checkemsi);} else {SM_PROCEED(sendintro);} break; default: standby=0; ep=ebuf; ebuf[0]='\0'; debug(10,"got '%s' from remote", printablec(c)); SM_PROCEED(waitchar); break; } SM_STATE(checkemsi) debug(10,"check \"%s\" for being EMSI inquery or data",ebuf); if (localoptions & NOEMSI) { SM_PROCEED(sendintro); } if (strncasecmp(ebuf,"EMSI_INQC816",12) == 0) { type=SESSION_EMSI; data=xstrcpy("**EMSI_INQC816"); SM_SUCCESS; } else if (strncasecmp(ebuf,"EMSI_DAT",8) == 0) { SM_PROCEED(getdat); } else { SM_PROCEED(sendintro); } SM_STATE(getdat) debug(10,"try get emsi_dat packet starting with \"%s\"",ebuf); if (sscanf(ebuf+8,"%04x",&datasize) != 1) { SM_PROCEED(sendintro); } datasize += 18; /* strlen("**EMSI_DATxxxxyyyy"), include CRC */ data=xmalloc(datasize+1); strcpy(data,"**"); strcat(data,ebuf); p=data+strlen(data); while (((p-data) < datasize) && ((c=GETCHAR(8)) >= 0)) { *p++=c; *p='\0'; } if (c == TIMEOUT) { SM_PROCEED(sendintro); } else if (c < 0) { loginf("error while reading EMSI_DAT from the caller"); SM_ERROR; } type=SESSION_EMSI; SM_SUCCESS; SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/chat.c100644 0 0 12330 6701151722 15141 0ustar rootroot#include #include #include #include #include #include #include "lutil.h" #include "xutil.h" #include "nodelist.h" #include "config.h" int chat(node*,modem_string*,modem_string*,modem_string*,int,char*); struct _strlist { struct _strlist *next; char *string; }; char *get_modem_string(modem_string*,node*); char *next_modem_string(node*); struct _strlist *sel_str(modem_string*,node*); void tidy_str(struct _strlist *); void tidy_str(sl) struct _strlist *sl; { struct _strlist *tmp; while (sl) { tmp=sl->next; free(sl->string); free(sl); sl=tmp; } } struct _strlist *sel_str(msl,nlent) modem_string *msl; node *nlent; { struct _strlist *sl=NULL,*tmp=NULL; char *p,*q; for (p=get_modem_string(msl,nlent);p;p=next_modem_string(nlent)) { if (sl == NULL) { sl=(struct _strlist *) xmalloc(sizeof(struct _strlist)); tmp=sl; } else { tmp->next=(struct _strlist *) xmalloc(sizeof(struct _strlist)); tmp=tmp->next; } tmp->next=NULL; tmp->string=xmalloc(strlen(p)+1); q=tmp->string; while (*p) { if (*p == '\\') switch (*++p) { case '\0': p--; break; case '\\': *q++='\\'; break; case 'r': *q++='\r'; break; case 'n': *q++='\n'; break; case 't': *q++='\t'; break; case 's': *q++=' '; break; case ' ': *q++=' '; break; case 'b': *q++='\b'; break; } else *q++ = *p; p++; } *q='\0'; } return sl; } char *tranphone(char*,node*); char *tranphone(phone,nlent) char *phone; node *nlent; { static char trp[32]; char buf[32]; char *tf,*p,*q; int ln; if (phone == NULL) return NULL; strncpy(trp,phone,sizeof(trp)-1); for (tf=get_modem_string(phonetrans,nlent);tf; tf=next_modem_string(nlent)) { strncpy(buf,tf,sizeof(buf)-1); if ((p=strchr(buf,'/'))) *p++='\0'; else p=buf+strlen(buf); while (*p && isspace(*p)) p++; q=buf+strlen(buf)-1; while (*q && isspace(*q)) *q--='\0'; q=p+strlen(p)-1; while (*q && isspace(*q)) *q--='\0'; ln=strlen(buf); if (strncmp(phone,buf,ln) == 0) { strcpy(trp,p); strncat(trp,phone+ln,sizeof(trp)-strlen(q)-1); break; } } return trp; } int send_str(char *,char*,node*); int send_str(str,phone,nlent) char *str,*phone; node *nlent; { char *p; p=str; debug(18,"send_str \"%s\"",str); while (*p) { if (*p == '\\') switch (*++p) { case '\0': p--; break; case '\\': putchar('\\'); break; case 'r': putchar('\r'); break; case 'n': putchar('\n'); break; case 't': putchar('\t'); break; case 'b': putchar('\b'); break; case 's': putchar(' '); break; case ' ': putchar(' '); break; case 'd': sleep(1); break; case 'p': usleep(250000L); break; case 'D': if (phone) fputs(phone,stdout); break; case 'T': if (phone) fputs(tranphone(phone,nlent),stdout); break; default: putchar(*p); break; } else putchar(*p); p++; } if (ferror(stdout)) { logerr("$send_str error"); return 1; } else return 0; } static volatile int expired=0; void almhdl(int); void almhdl(sig) int sig; { expired=1; debug(18,"timeout"); return; } int expect_str(struct _strlist *,struct _strlist *,int); int expect_str(succs,errs,timeout) struct _strlist *succs,*errs; int timeout; { int maxl,l,i,rc; char *buf; struct _strlist *ts; int matched=0,smatch=0,ematch=0,ioerror=0; maxl=0; for (ts=errs;ts;ts=ts->next) if ((l=strlen(ts->string)) > maxl) maxl=l; for (ts=succs;ts;ts=ts->next) if ((l=strlen(ts->string)) > maxl) maxl=l; buf=xmalloc(maxl+1); memset(buf,0,maxl+1); expired=0; signal(SIGALRM,almhdl); alarm(timeout); while (!matched && !expired && !ioerror && !feof(stdin)) { for (i=0;inext) if (strcmp(ts->string,buf+maxl-strlen(ts->string)) == 0) { matched=1; ematch=1; loginf("chat got \"%s\", aborting",ts->string); } for (ts=succs;ts && !matched;ts=ts->next) if (strcmp(ts->string,buf+maxl-strlen(ts->string)) == 0) { matched=1; smatch=1; loginf("chat got \"%s\", continue",ts->string); } if (expired) loginf("chat got timeout, aborting"); else if (ferror(stdin)) loginf("chat got error, aborting"); if (feof(stdin)) logerr("chat got EOF, aborting"); } alarm(0); signal(SIGALRM,SIG_DFL); rc=!(matched && smatch); free(buf); return rc; } int chat(nlent,send,success,error,timeout,phone) node *nlent; modem_string *send; modem_string *success; modem_string *error; int timeout; char *phone; { char *sends; struct _strlist *succs=NULL, *errs=NULL; int rc; if ((sends=get_modem_string(send,nlent)) == NULL) { logerr("chat cannot find appropriate send string"); return 1; } if ((success) && ((succs=sel_str(success,nlent)) == NULL)) { logerr("chat cannot find appropriate expect string"); return 1; } if ((error) && ((errs=sel_str(error,nlent)) == NULL)) { tidy_str(succs); logerr("chat cannot find appropriate error string"); return 1; } rc=send_str(sends,phone,nlent); if ((rc == 0) && (errs) && (succs)) rc=expect_str(succs,errs,timeout); tidy_str(succs); tidy_str(errs); return rc; } ifmail-2.14tx8.10.orig/ifcico/ttyio.c100644 0 0 23724 6701151722 15403 0ustar rootroot/* ### Modified by P.Saratxaga on 25 Oct 1995 ### * - Added if (inetaddr) code from T. Tanaka */ #include #include #include #include #include #include #include #if defined(HAS_TCP) || defined(HAS_TERM) #if defined(HAS_NET_ERRNO_H) || defined(SELECT_NEED_BSDTYPES_H) #include #endif #ifdef HAS_NET_ERRNO_H #include #endif #include #endif #ifdef HAS_SELECT #ifdef HAS_TERMIOS_H #include #else #error "No termios.h - don't know what to do" #endif #ifdef SELECT_NEED_SYS_TIMES_H #include #endif #ifdef HAS_SYS_SELECT_H #include #else #include #endif #else #include #endif #ifdef HAS_IOCTL_H #include #endif #ifdef NOISEDEBUG #include #include #include #endif #include "ttyio.h" #include "lutil.h" extern int hanged_up; #ifdef HAS_TCP extern char *inetaddr; #endif #ifndef BUFSIZ #define BUFSIZ 1024 #endif #ifndef NUMTIMERS #define NUMTIMERS 3 #endif int tty_status=0; int f_flags; static char buffer[BUFSIZ]; static char *next; static int left=0; static time_t timer[NUMTIMERS]; /* timer functions */ int tty_resettimer(int tno) { if (tno >= NUMTIMERS) { errno=EINVAL; logerr("$invalid timer No for resettimer()"); return -1; } debug(18,"resettimer(%d)", tno); timer[tno] = (time_t) 0; return 0; } void tty_resettimers(void) { int i; debug(18,"resettimers"); for (i=0;i= NUMTIMERS) { errno=EINVAL; logerr("$invalid timer No for settimer()"); return -1; } debug(18,"settimer(%d,%d)",tno,interval); timer[tno]=time((time_t*)NULL)+interval; return 0; } int tty_expired(tno) int tno; { time_t now; /* check if timer is running */ if (timer[tno] == (time_t) 0) return 0; (void)time(&now); if (tno >= NUMTIMERS) { errno=EINVAL; logerr("$invalid timer No for expired()"); return -1; } debug(19,"expired(%d) now=%lu,timer=%lu,return %s", tno,now,timer[tno],(now >= timer[tno])?"yes":"no"); return (now >= timer[tno]); } int tty_running(tno) int tno; { /* check if timer is running */ if (timer[tno] == (time_t) 0) return 0; else return 1; } /* private r/w functions */ static int tty_read(buf,size,tot) char *buf; int size,tot; { time_t timeout,now; int i,rc; #ifdef HAS_SELECT fd_set readfds,writefds,exceptfds; struct timeval seltimer; #else #error unimplemented non-select()-based i/o #endif debug(18,"tty_read(%08lx,%d)",buf,size); if (size == 0) return 0; tty_status=0; (void)time(&now); timeout=(time_t)300; /* maximum of 5 minutes */ for (i=0;i= timer[i]) { tty_status=STAT_TIMEOUT; debug(18,"timer %d already expired, return",i); return -tty_status; } else { if (timeout > (timer[i]-now)) timeout=timer[i]-now; } } } if ((tot != -1) && (timeout > tot)) timeout=tot; debug(18,"tty_read timeout=%d",timeout); #ifdef HAS_SELECT FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(0,&readfds); FD_SET(0,&exceptfds); seltimer.tv_sec=timeout; seltimer.tv_usec=0; rc=select(1,&readfds,&writefds,&exceptfds,&seltimer); if (rc < 0) { if (hanged_up) { tty_status=STAT_HANGUP; } else { logerr("$select for read failed"); tty_status=STAT_ERROR; } } else if (rc == 0) { tty_status=STAT_TIMEOUT; } else /* rc > 0 */ { if (FD_ISSET(0,&exceptfds)) tty_status=STAT_ERROR; } if (tty_status) { debug(18,"returning after select with status %d",tty_status); return -tty_status; } if (!FD_ISSET(0,&readfds)) { logerr("Cannot be: select returned but read fd not set"); tty_status=STAT_ERROR; return -tty_status; } rc=read(0,buf,size); if (rc <= 0) { debug(18,"read() return %d",rc); if (hanged_up || (errno == EPIPE) #if defined(HAS_TCP) || defined(HAS_TERM) || (errno == ECONNRESET) #endif ) tty_status=STAT_HANGUP; else tty_status=STAT_ERROR; rc=-tty_status; } else debug(19,"read %d: \"%s\"",rc,printable(buf,rc)); return rc; #else #endif } int tty_write(buf,size) char *buf; int size; { int result; debug(18,"tty_write(%08lx,%d)",buf,size); tty_status=0; result=write(1,buf,size); if (result != size) { if (hanged_up || (errno == EPIPE) #if defined(HAS_TCP) || defined(HAS_TERM) || (errno == ECONNRESET) #endif ) tty_status=STAT_HANGUP; else tty_status=STAT_ERROR; } return -tty_status; } /* public r/w functions */ /** * Check if there is data available on stdin. */ int tty_check(void) { int rc; if (!left) { // try to read available (timeout = 0) data if we have no data in // our buffer rc = tty_read(buffer, BUFSIZ, 0); if (rc > 0) { left = rc; } } return (left > 0); } int tty_putcheck(int size) { fd_set set; struct timeval timeout; /* Initialize the file descriptor set. */ FD_ZERO(&set); FD_SET(1, &set); /* Initialize the timeout data structure. */ timeout.tv_sec = 0; timeout.tv_usec = 0; /* `select' returns 0 if timeout, 1 if input available, -1 if error. */ return select(FD_SETSIZE, NULL, &set, NULL, &timeout); } int tty_waitputget(int tot) { int i, rc; time_t timeout, now; #ifdef HAS_SELECT fd_set readfds, writefds, exceptfds; struct timeval seltimer; #else #error unimplemented non-select()-based i/o #endif tty_status=0; (void)time(&now); timeout=(time_t)300; /* maximum of 5 minutes */ for (i=0; i= timer[i]) { tty_status=STAT_TIMEOUT; debug(18,"timer %d already expired, return",i); return -tty_status; } else { if (timeout > (timer[i]-now)) timeout=timer[i]-now; } } } if ((tot != -1) && (timeout > tot)) timeout=tot; debug(18,"tty_waitputget timeout=%d",timeout); #ifdef HAS_SELECT /* Initialize the file descriptor set. */ FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(0, &readfds); FD_SET(1, &writefds); FD_SET(0, &exceptfds); FD_SET(1, &exceptfds); /* Initialize the timeout data structure. */ seltimer.tv_sec = timeout; seltimer.tv_usec = 0; /* `select' returns 0 if timeout, 1 if input available, -1 if error. */ rc = select(FD_SETSIZE, &readfds, &writefds, &exceptfds, &seltimer); if (rc < 0) { if (hanged_up) { tty_status=STAT_HANGUP; } else { logerr("$select for putget failed"); tty_status=STAT_ERROR; } } else if (rc == 0) { tty_status=STAT_TIMEOUT; } else /* rc > 0 */ { if ((FD_ISSET(0,&exceptfds)) || (FD_ISSET(1,&exceptfds))) tty_status=STAT_ERROR; } if (tty_status) { debug(18,"returning after select with status %d",tty_status); return -tty_status; } rc = 0; if (FD_ISSET(0,&readfds)) { rc |= 1; } if (FD_ISSET(1,&writefds)) { rc |= 2; } #else #endif return rc; } void tty_flushin(void) { tcflush(0, TCIFLUSH); } void tty_flushout(void) { tcflush(1, TCOFLUSH); } int tty_ungetc(int c) { if (next == buffer) { if (left >= BUFSIZ) { return -1; } next = buffer + BUFSIZ - left; memcpy(next, buffer, left); } next--; *next = c; left++; return 0; } int tty_getc(tot) int tot; { if (!left) { left=tty_read(buffer,BUFSIZ,tot); next=buffer; } if (left <= 0) { left=0; return -tty_status; } else { left--; return (*next++)&0xff; } } int tty_get(buf,size,tot) char *buf; int size,tot; { int result=0; if (left >= size) { memcpy(buf,next,size); next += size; left -= size; return 0; } if (left > 0) { memcpy(buf,next,left); buf += left; next += left; size -= left; left=0; } #if 0 tty_resettimers(); tty_settimer(0,tot); #endif while ((result=tty_read(buf,size,tot)) > 0) { buf += result; size -= result; } #if 0 tty_resettimers(); #endif return result; } int tty_putc(c) int c; { char buf=c; return tty_write(&buf,1); } int tty_put(buf,size) char *buf; int size; { return tty_write(buf,size); } int tty_putget(obuf,osize,ibuf,isize) char **obuf; int *osize; char **ibuf; int *isize; { time_t timeout,now; int i,rc; #ifdef HAS_SELECT fd_set readfds,writefds,exceptfds; struct timeval seltimer; #else #error unimplemented non-select()-based i/o #endif tty_status=0; (void)time(&now); timeout=(time_t)300; /* maximum of 5 minutes */ for (i=0;i= timer[i]) { tty_status=STAT_TIMEOUT; debug(18,"timer %d already expired, return",i); return -tty_status; } else { if (timeout > (timer[i]-now)) timeout=timer[i]-now; } } } debug(18,"tty_putget timeout=%d",timeout); #ifdef HAS_SELECT FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(0,&readfds); FD_SET(1,&writefds); FD_SET(0,&exceptfds); FD_SET(1,&exceptfds); seltimer.tv_sec=timeout; seltimer.tv_usec=0; rc=select(2,&readfds,&writefds,&exceptfds,&seltimer); if (rc < 0) { if (hanged_up) { tty_status=STAT_HANGUP; } else { logerr("$select for putget failed"); tty_status=STAT_ERROR; } } else if (rc == 0) { tty_status=STAT_TIMEOUT; } else /* rc > 0 */ { if ((FD_ISSET(0,&exceptfds)) || (FD_ISSET(1,&exceptfds))) tty_status=STAT_ERROR; } if (tty_status) { debug(18,"returning after select with status %d",tty_status); return -tty_status; } if (FD_ISSET(0,&readfds) && *isize) { rc=read(0,*ibuf,*isize); if (rc < 0) { logerr("$read failed"); tty_status=STAT_ERROR; } else { (*ibuf)+=rc; (*isize)-=rc; } } if (FD_ISSET(1,&writefds) && *osize) { rc=write(1,*obuf,*osize); if (rc < 0) { logerr("$write failed"); tty_status=STAT_ERROR; } else { (*obuf)+=rc; (*osize)-=rc; } } #else #endif if (tty_status) return -tty_status; else return ((*isize == 0) | ((*osize == 0) << 1)); } ifmail-2.14tx8.10.orig/ifcico/emsi.c100644 0 0 27477 6701151722 15201 0ustar rootroot#include #include #include #include #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" #include "config.h" #include "emsi.h" #include "nodelist.h" #include "version.h" #ifdef HAS_TCP #define LOCAL_PROTOS (PROT_ZMO | PROT_ZAP | PROT_HYD | PROT_TCP) #else #define LOCAL_PROTOS (PROT_ZMO | PROT_ZAP | PROT_HYD) #endif #ifdef HAS_TCP extern int rxtcp(void); extern int txtcp(void); #endif extern int janus(void); extern int hydra(int); extern int rxwazoo(void); extern int txwazoo(void); extern unsigned INT16 crc16(char*,int); extern void rdoptions(node *); extern void setproctitle(char*); static int rxemsi(void); static int txemsi(void); static char *intro; static int caller; int emsi_local_lcodes; int emsi_remote_lcodes; int emsi_local_protos; int emsi_remote_protos; int emsi_local_opts; int emsi_remote_opts; char *emsi_local_password; char *emsi_remote_password; char emsi_remote_comm[4]="8N1"; int rx_emsi(data) char *data; { int rc; fa_list *tmp,*tmr; int denypw=0; node *nlent=NULL; char cbuf[128]; loginf("start inbound EMSI session"); emsi_local_lcodes=LCODE_RH1; if (localoptions & NOPUA) emsi_local_lcodes |= LCODE_PUP; emsi_remote_lcodes=0; emsi_local_protos=LOCAL_PROTOS; if (localoptions & NOZMODEM) emsi_local_protos &= ~(PROT_ZMO|PROT_ZAP|PROT_DZA); if (localoptions & NOZEDZAP) emsi_local_protos &= ~PROT_ZAP; if (localoptions & NOJANUS) emsi_local_protos &= ~PROT_JAN; if (localoptions & NOHYDRA) emsi_local_protos &= ~PROT_HYD; #ifdef HAS_TCP if ((localoptions & NOTCP) || ((session_flags & SESSION_TCP) == 0)) { emsi_local_protos &= ~PROT_TCP; } #endif emsi_remote_protos=0; emsi_local_opts=OPT_XMA; emsi_remote_opts=0; emsi_local_password=NULL; emsi_remote_password=NULL; intro=data+2; caller=0; if ((rc=rxemsi())) return rc; if (localoptions & NOFREQS) emsi_local_opts |= OPT_NRQ; debug(10,"local lcodes 0x%04x, protos 0x%04x, opts 0x%04x", emsi_local_lcodes,emsi_local_protos,emsi_local_opts); debug(10,"remote lcodes 0x%04x, protos 0x%04x, opts 0x%04x", emsi_remote_lcodes,emsi_remote_protos,emsi_remote_opts); if (emsi_remote_opts & OPT_EII) { emsi_local_opts |= OPT_EII; } emsi_local_protos &= emsi_remote_protos; #ifdef HAS_TCP if (emsi_local_protos & PROT_TCP) emsi_local_protos &= PROT_TCP; else #endif if (emsi_local_protos & PROT_HYD) emsi_local_protos &= PROT_HYD; else if (emsi_local_protos & PROT_JAN) emsi_local_protos &= PROT_JAN; else if (emsi_local_protos & PROT_ZAP) emsi_local_protos &= PROT_ZAP; else if (emsi_local_protos & PROT_ZMO) emsi_local_protos &= PROT_ZMO; else if (emsi_local_protos & PROT_DZA) emsi_local_protos &= PROT_DZA; else if (emsi_local_protos & PROT_KER) emsi_local_protos &= PROT_KER; emsi_local_password=NULL; for (tmr=remote;tmr;tmr=tmr->next) if (((nlent=getnlent(tmr->addr))) && (nlent->pflag != NL_DUMMY)) { loginf("remote is a listed system"); inbound=listinbound; break; } if (nlent) rdoptions(nlent); for (tmp=pwlist;tmp;tmp=tmp->next) for (tmr=remote;tmr;tmr=tmr->next) if (metric(tmr->addr,tmp->addr) == 0) { if (strncasecmp(emsi_remote_password,tmp->addr->name,8) != 0) { denypw=1; loginf("remote gave password \"%s\", expected \"%s\"", S(emsi_remote_password),S(tmp->addr->name)); emsi_local_password="BAD_PASSWORD"; emsi_local_lcodes=LCODE_HAT; } else { emsi_local_password=tmp->addr->name; inbound=protinbound; loginf("remote gave correct password, protected EMSI session"); } } debug(10,"local lcodes 0x%04x, protos 0x%04x, opts 0x%04x", emsi_local_lcodes,emsi_local_protos,emsi_local_opts); if ((rc=txemsi())) return rc; if (denypw || (emsi_local_protos == 0)) { loginf("refusing remote: %s", emsi_local_protos?"bad password presented": "no common protocols"); return 0; } sprintf(cbuf,"-EMSI %s inbound",ascfnode(remote->addr,0x1f)); setproctitle(cbuf); if ((emsi_remote_opts & OPT_NRQ) == 0) session_flags |= SESSION_WAZOO; else session_flags &= ~SESSION_WAZOO; #ifdef HAS_TCP if (emsi_local_protos & PROT_TCP) return rxtcp(); else #endif if (emsi_local_protos & PROT_HYD) return hydra(0); else if (emsi_local_protos & PROT_JAN) return janus(); else return rxwazoo(); } int tx_emsi(data) char* data; { int rc; char cbuf[128]; loginf("start outbound EMSI session"); emsi_local_lcodes=LCODE_PUA | LCODE_RH1; if (localoptions & NOPUA) { emsi_local_lcodes |= LCODE_PUP; emsi_local_lcodes &= ~LCODE_PUA; } emsi_remote_lcodes=0; emsi_local_protos=LOCAL_PROTOS; if (localoptions & NOZMODEM) emsi_local_protos &= ~(PROT_ZMO|PROT_ZAP|PROT_DZA); if (localoptions & NOZEDZAP) emsi_local_protos &= ~PROT_ZAP; if (localoptions & NOJANUS) emsi_local_protos &= ~PROT_JAN; if (localoptions & NOHYDRA) emsi_local_protos &= ~PROT_HYD; #ifdef HAS_TCP if ((localoptions & NOTCP) || ((session_flags & SESSION_TCP) == 0)) { emsi_local_protos &= ~PROT_TCP; } #endif emsi_remote_protos=0; emsi_local_opts=OPT_XMA | OPT_EII; if (localoptions & NOFREQS) emsi_local_opts |= OPT_NRQ; emsi_remote_opts=0; emsi_local_password=NULL; emsi_remote_password=NULL; intro=data+2; caller=1; emsi_local_password=NULL; debug(10,"local lcodes 0x%04x, protos 0x%04x, opts 0x%04x", emsi_local_lcodes,emsi_local_protos,emsi_local_opts); if ((rc=txemsi())) return rc; else if ((rc=rxemsi())) return rc; debug(10,"remote lcodes 0x%04x, protos 0x%04x, opts 0x%04x", emsi_remote_lcodes,emsi_remote_protos,emsi_remote_opts); if ((emsi_remote_opts & OPT_EII) == 0) { emsi_local_opts &= ~OPT_EII; } if ((emsi_remote_protos == 0) || (emsi_remote_lcodes & LCODE_HAT)) { loginf("remote refused us: %s", emsi_remote_protos?"traffic held":"no common protos"); return 0; } sprintf(cbuf,"-EMSI %s outbound",ascfnode(remote->addr,0x1f)); setproctitle(cbuf); emsi_local_protos &= emsi_remote_protos; if ((emsi_remote_opts & OPT_NRQ) == 0) session_flags |= SESSION_WAZOO; else session_flags &= ~SESSION_WAZOO; #ifdef HAS_TCP if (emsi_local_protos & PROT_TCP) return txtcp(); else #endif if (emsi_local_protos & PROT_HYD) return hydra(1); else if (emsi_local_protos & PROT_JAN) return janus(); else return txwazoo(); } SM_DECL(rxemsi,"rxemsi") SM_STATES waitpkt,waitchar,checkemsi,getdat,checkpkt,checkdat, sendnak,sendack SM_NAMES "waitpkt","waitchar","checkemsi","getdat","checkpkt","checkdat", "sendnak","sendack" SM_EDECL int c=0; unsigned INT16 lcrc,rcrc; int len; int standby=0,tries=0; char buf[13],*p; char *databuf=NULL; p=buf; databuf=xstrcpy(intro); SM_START(checkpkt) SM_STATE(waitpkt) standby=0; SM_PROCEED(waitchar); SM_STATE(waitchar) c=GETCHAR(5); if (c == TIMEOUT) { if (++tries > 9) { loginf("too many tries waiting EMSI handshake"); SM_ERROR; } else {SM_PROCEED(sendnak);} } else if (c < 0) { SM_ERROR; } else if ((c >= ' ') && (c <= '~')) { if (c == '*') { standby=1; p=buf; *p='\0'; } else if (standby) { if ((p-buf) < (sizeof(buf)-1)) { *p++=c; *p='\0'; } if ((p-buf) >= (sizeof(buf)-1)) { standby=0; SM_PROCEED(checkemsi); } } } else switch(c) { case DC1: break; case '\n': case '\r': standby=0; break; default: standby=0; debug(10,"got '%s' reading emsi", printablec(c)); break; } SM_PROCEED(waitchar); SM_STATE(checkemsi) debug(10,"rxemsi got: \"%s\"",buf); if (strncasecmp(buf,"EMSI_DAT",8) == 0) {SM_PROCEED(getdat);} else if (strncasecmp(buf,"EMSI_",5) == 0) { if (databuf) free(databuf); databuf=xstrcpy(buf); SM_PROCEED(checkpkt); } else { SM_PROCEED(waitpkt); } SM_STATE(getdat) debug(10,"try get emsi_dat packet starting with \"%s\"",buf); if (sscanf(buf+8,"%04x",&len) != 1) {SM_PROCEED(sendnak);} len += 16; /* strlen("EMSI_DATxxxxyyyy"), include CRC */ if (databuf) free(databuf); databuf=xmalloc(len+1); strcpy(databuf,buf); p=databuf+strlen(databuf); while (((p-databuf) < len) && ((c=GETCHAR(8)) >= 0)) { debug(10,"got '%s'",printablec(c)); *p++=c; *p='\0'; } debug(10,"len %d, databuf \"%s\"",len,databuf); if (c == TIMEOUT) { SM_PROCEED(sendnak); } else if (c < 0) { loginf("error while reading EMSI_DAT packet"); SM_ERROR; } SM_PROCEED(checkdat); SM_STATE(checkpkt) if (strncasecmp(databuf,"EMSI_DAT",8) == 0) { SM_PROCEED(checkdat); } lcrc=crc16(databuf,8); sscanf(databuf+8,"%04hx",&rcrc); if (lcrc != rcrc) { loginf("got EMSI packet \"%s\" with bad crc: %04x/%04x", printable(databuf,0),lcrc,rcrc); SM_PROCEED(sendnak); } if (strncasecmp(databuf,"EMSI_HBT",8) == 0) { tries=0; SM_PROCEED(waitpkt); } else if (strncasecmp(databuf,"EMSI_INQ",8) == 0) { SM_PROCEED(sendnak); } else { debug(10,"rxemsi ignores packet \"%s\"",databuf); SM_PROCEED(waitpkt); } SM_STATE(checkdat) sscanf(databuf+8,"%04x",&len); if (len != (strlen(databuf)-16)) { loginf("bad EMSI_DAT length: %d/%d",len,strlen(databuf)); SM_PROCEED(sendnak); } /* Some FD versions send length of the packet including the trailing CR. Arrrgh! Dirty overwork follows: */ if (*(p=databuf+strlen(databuf)-1) == '\r') *p='\0'; sscanf(databuf+strlen(databuf)-4,"%04hx",&rcrc); *(databuf+strlen(databuf)-4)='\0'; lcrc=crc16(databuf,strlen(databuf)); if (lcrc != rcrc) { loginf("got EMSI_DAT packet \"%s\" with bad crc: %04x/%04x", printable(databuf,0),lcrc,rcrc); SM_PROCEED(sendnak); } if (scanemsidat(databuf+12) == 0) { SM_PROCEED(sendack); } else { logerr("could not parse EMSI_DAT packet \"%s\"",databuf); SM_ERROR; } SM_STATE(sendnak) if (++tries > 9) { loginf("too many tries getting EMSI_DAT"); SM_ERROR; } if (caller) { PUTSTR("**EMSI_NAKEEC3\r\021"); } else { PUTSTR("**EMSI_REQA77E\r\021"); #ifdef SLAVE_SENDS_NAK_TOO if (tries > 1) PUTSTR("**EMSI_NAKEEC3\r\021"); #endif } SM_PROCEED(waitpkt); SM_STATE(sendack) PUTSTR("**EMSI_ACKA490\r\021"); PUTSTR("**EMSI_ACKA490\r\021"); SM_SUCCESS; SM_END free(databuf); SM_RETURN SM_DECL(txemsi,"txemsi") SM_STATES senddata,waitpkt,waitchar,checkpkt,sendack SM_NAMES "senddata","waitpkt","waitchar","checkpkt","sendack" SM_EDECL int c; unsigned INT16 lcrc,rcrc; int standby=0,tries=0; char buf[13],*p; char trailer[8]; p=buf; strncpy(buf,intro,sizeof(buf)-1); SM_START(senddata) SM_STATE(senddata) p=mkemsidat(caller); PUTCHAR('*'); PUTCHAR('*'); PUTSTR(p); sprintf(trailer,"%04X\r\021",crc16(p,strlen(p))); PUTSTR(trailer); free(p); SM_PROCEED(waitpkt); SM_STATE(waitpkt) standby=0; SM_PROCEED(waitchar); SM_STATE(waitchar) c=GETCHAR(8); if (c == TIMEOUT) { if (++tries > 9) { loginf("too many tries sending EMSI"); SM_ERROR; } else {SM_PROCEED(senddata);} } else if (c < 0) { SM_ERROR; } else if ((c >= ' ') && (c <= '~')) { if (c == '*') { standby=1; p=buf; *p='\0'; } else if (standby) { if ((p-buf) < (sizeof(buf)-1)) { *p++=c; *p='\0'; } if ((p-buf) >= (sizeof(buf)-1)) { standby=0; SM_PROCEED(checkpkt); } } } else switch(c) { case DC1: SM_PROCEED(waitchar); break; case '\n': case '\r': standby=0; break; default: standby=0; debug(10,"got '%s' from remote", printablec(c)); break; } {SM_PROCEED(waitchar);} SM_STATE(checkpkt) debug(10,"txemsi got: \"%s\"",buf); if (strncasecmp(buf,"EMSI_DAT",8) == 0) { SM_PROCEED(sendack); } else if (strncasecmp(buf,"EMSI_",5) == 0) { lcrc=crc16(buf,8); sscanf(buf+8,"%04hx",&rcrc); if (lcrc != rcrc) { loginf("got EMSI packet \"%s\" with bad crc: %04x/%04x", printable(buf,0),lcrc,rcrc); SM_PROCEED(senddata); } if (strncasecmp(buf,"EMSI_REQ",8) == 0) { SM_PROCEED(waitpkt); } if (strncasecmp(buf,"EMSI_ACK",8) == 0) { SM_SUCCESS; } else { SM_PROCEED(senddata); } } else { SM_PROCEED(waitpkt); } SM_STATE(sendack) PUTSTR("**EMSI_ACKA490\r\021"); PUTSTR("**EMSI_ACKA490\r\021"); /* SM_PROCEED(senddata); */ SM_PROCEED(waitpkt); SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/ftsc.c100644 0 0 16036 6701151722 15170 0ustar rootroot#include #include #include "ftn.h" #include "getheader.h" #include "xutil.h" #include "lutil.h" #include "session.h" #include "ttyio.h" #include "statetbl.h" #include "config.h" extern int master; extern int nodelock(faddr*); #ifndef IGNORE_SOFTCR /* ### this is an ugly kludge. I need pgpsigned in bread.c and this file needs * ### functions of getheader.o, which needs bread.o .... * ### If -DIGNORE_SOFTCR is used then it isn't need, so I recomend it, which * ### is also good for russian, japanese, chinese, etc. -- P.Saratxaga */ int pgpsigned=0; #endif int rx_ftsc(void); int tx_ftsc(void); extern unsigned INT32 sequencer(void); extern int xmrecv(char*); extern int xmsend(char*,char*,int); extern int xmsndfiles(file_list*); extern int sendbark(void); extern int recvbark(void); extern void rdoptions(node*); extern int setproctitle(char*); static int rxftsc(void); static int txftsc(void); static int recvfiles(void); static file_list *tosend; int rx_ftsc(void) { int rc; char cbuf[128]; loginf("start inbound ftsc session"); sprintf(cbuf,"-FTS-0001 (undefined yet) inbound"); setproctitle(cbuf); session_flags |= SESSION_BARK; rc=rxftsc(); if (rc) { loginf("inbound ftsc session failed, rc=%d",rc); PUTCHAR(CAN); PUTCHAR(CAN); PUTCHAR(CAN); } else debug(10,"inbound ftsc session rc=%d",rc); tidy_filelist(tosend,0); tosend=NULL; return rc; } int tx_ftsc(void) { int rc; char cbuf[128]; loginf("start outbound ftsc session with %s", ascfnode(remote->addr,0x1f)); sprintf(cbuf,"-FTS-0001 %s outbound",ascfnode(remote->addr,0x1f)); setproctitle(cbuf); rc=txftsc(); if (rc) { loginf("outbound ftsc session failed, rc=%d",rc); PUTCHAR(CAN); PUTCHAR(CAN); PUTCHAR(CAN); } else debug(10,"outbound ftsc session rc=%d",rc); tidy_filelist(tosend,0); tosend=NULL; return rc; } SM_DECL(txftsc,"txftsc") SM_STATES wait_command,recv_mail,send_req,recv_req SM_NAMES "wait_command","recv_mail","send_req","recv_req" SM_EDECL int c,rc; char *nonhold_mail; if (localoptions & NOHOLD) nonhold_mail=ALL_MAIL; else nonhold_mail=NONHOLD_MAIL; tosend=create_filelist(remote,nonhold_mail,2); if ((rc=xmsndfiles(tosend))) return rc; SM_START(wait_command) SM_STATE(wait_command) c=GETCHAR(30); if (c == TIMEOUT) { loginf("timeout waiting for remote action, try receive"); SM_PROCEED(recv_mail); } else if (c < 0) { loginf("got error waiting for TSYNC: received %d",c); SM_ERROR; } else switch (c) { case TSYNC: SM_PROCEED(recv_mail); break; case SYN: SM_PROCEED(recv_req); break; case ENQ: SM_PROCEED(send_req); break; case 'C': case NAK: PUTCHAR(EOT); SM_PROCEED(wait_command); break; case CAN: SM_SUCCESS; /* this is not in BT */ break; default: if (c > ' ') debug(10,"got '%c' waiting command",c); else debug(10,"got '\\%03o' waiting command",c); PUTCHAR(SUB); SM_PROCEED(wait_command); break; } SM_STATE(recv_mail) if (recvfiles()) {SM_ERROR;} else {SM_PROCEED(wait_command);} SM_STATE(send_req) if (sendbark()) {SM_ERROR;} else {SM_SUCCESS;} SM_STATE(recv_req) if (recvbark()) {SM_ERROR;} else {SM_PROCEED(wait_command);} SM_END SM_RETURN SM_DECL(rxftsc,"rxftsc") SM_STATES recv_mail,send_mail,send_req,recv_req SM_NAMES "recv_mail","send_mail","send_req","recv_req" SM_EDECL int c,count=0; SM_START(recv_mail) SM_STATE(recv_mail) if (recvfiles()) {SM_ERROR;} else {SM_PROCEED(send_mail);} SM_STATE(send_mail) if (count > 6) {SM_ERROR;} if (tosend == NULL) {SM_PROCEED(send_req);} PUTCHAR(TSYNC); c=GETCHAR(15); count++; if (c == TIMEOUT) { loginf("no NAK, cannot send mail"); SM_ERROR; } else if (c < 0) { loginf("got error waiting for NAK: received %d",c); SM_ERROR; } else switch (c) { case 'C': case NAK: if (xmsndfiles(tosend)) {SM_ERROR;} else {SM_PROCEED(send_req);} break; case CAN: loginf("remote refused to pick mail"); SM_SUCCESS; break; case EOT: PUTCHAR(ACK); SM_PROCEED(send_mail); break; default: if (c > ' ') debug(10,"got '%c' waiting NAK",c); else debug(10,"got '\\%03o' waiting NAK",c); SM_PROCEED(send_mail); break; } SM_STATE(send_req) if (count > 6) {SM_ERROR;} if ( 1 /* has no .req file */ ) {SM_PROCEED(recv_req);} PUTCHAR(SYN); c=GETCHAR(15); count++; if (c == TIMEOUT) { loginf("no ENQ, cannot send requests"); SM_ERROR; } else if (c < 0) { loginf("got error waiting for ENQ: received %d",c); SM_ERROR; } else switch (c) { case ENQ: if (sendbark()) {SM_ERROR;} else {SM_PROCEED(recv_req);} break; case CAN: loginf("remote refused to accept request"); SM_PROCEED(recv_req); break; case 'C': case NAK: PUTCHAR(EOT); SM_PROCEED(send_req); break; case SUB: SM_PROCEED(send_req); break; default: if (c > ' ') debug(10,"got '%c' waiting ENQ",c); else debug(10,"got '\\%03o' waiting ENQ",c); SM_PROCEED(send_req); break; } SM_STATE(recv_req) if (recvbark()) {SM_ERROR;} else {SM_SUCCESS;} SM_END SM_RETURN SM_DECL(recvfiles,"recvfiles") SM_STATES recv_packet,scan_packet,recv_file SM_NAMES "recv_packet","scan_packet","recv_file" SM_EDECL int rc=0; char recvpktname[16]; char *fpath; FILE *fp; faddr f,t; fa_list **tmpl; char cbuf[128]; SM_START(recv_packet) SM_STATE(recv_packet) sprintf(recvpktname,"%08lx.pkt",(unsigned long)sequencer()); rc=xmrecv(recvpktname); if (rc == 1) {SM_SUCCESS;} else if (rc == 0) { if (master) {SM_PROCEED(recv_file);} else {SM_PROCEED(scan_packet);} } else {SM_ERROR;} SM_STATE(scan_packet) fpath=xstrcpy(inbound); fpath=xstrcat(fpath,"/"); fpath=xstrcat(fpath,recvpktname); fp=fopen(fpath,"r"); free(fpath); if (fp == NULL) { logerr("$cannot open received packet"); SM_ERROR; } switch (getheader(&f,&t,fp)) { case 3: loginf("remote mistook us for %s",ascfnode(&t,0x1f)); fclose(fp); SM_ERROR; case 0: loginf("accepting session"); fclose(fp); for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next)); (*tmpl)=(fa_list*)xmalloc(sizeof(fa_list)); (*tmpl)->next=NULL; (*tmpl)->addr=(faddr*)xmalloc(sizeof(faddr)); (*tmpl)->addr->zone=f.zone; (*tmpl)->addr->net=f.net; (*tmpl)->addr->node=f.node; (*tmpl)->addr->point=f.point; (*tmpl)->addr->name=NULL; (*tmpl)->addr->domain=xstrcpy(f.domain); for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next)) (void)nodelock((*tmpl)->addr); /* try lock all remotes, ignore locking result */ if (((nlent=getnlent(remote->addr))) && (nlent->pflag != NL_DUMMY)) { loginf("remote is a listed system"); inbound=listinbound; } if (nlent) rdoptions(nlent); if (f.name) { loginf("remote gave correct password, protected FTS-0001 session"); inbound=listinbound; } sprintf(cbuf,"-FTS-0001 %s inbound", ascfnode(remote->addr,0x1f)); setproctitle(cbuf); tosend=create_filelist(remote,ALL_MAIL,1); if (rc == 0) {SM_PROCEED(recv_file);} else {SM_SUCCESS;} default: loginf("received bad packet apparently from",ascfnode(&f,0x1f)); fclose(fp); SM_ERROR; } SM_STATE(recv_file) switch (xmrecv(NULL)) { case 0: SM_PROCEED(recv_file); break; case 1: SM_SUCCESS; break; default: SM_ERROR; break; } SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/yoohoo.c100644 0 0 35606 6701151722 15551 0ustar rootroot#include #include #include "statetbl.h" #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "session.h" #include "ftscprod.h" #include "config.h" #include "ftn.h" #include "emsi.h" #include "nodelist.h" #include "version.h" /*------------------------------------------------------------------------*/ /* YOOHOO CAPABILITY VALUES */ /*------------------------------------------------------------------------*/ #define Y_DIETIFNA 0x0001 /* Can do fast "FTS-0001" 0000 0000 0000 0001 */ #define FTB_USER 0x0002 /* Full-Tilt Boogie 0000 0000 0000 0010 */ #define ZED_ZIPPER 0x0004 /* Does ZModem, 1K blocks 0000 0000 0000 0100 */ #define ZED_ZAPPER 0x0008 /* Can do ZModem variant 0000 0000 0000 1000 */ #define DOES_IANUS 0x0010 /* Can do Janus 0000 0000 0001 0000 */ #define DOES_HYDRA 0x0020 /* Can do Hydra 0000 0000 0010 0000 */ #define Bit_6 0x0040 /* reserved by FTSC 0000 0000 0100 0000 */ #define Bit_7 0x0080 /* reserved by FTSC 0000 0000 1000 0000 */ #define Bit_8 0x0100 /* reserved by FTSC 0000 0001 0000 0000 */ #define Bit_9 0x0200 /* reserved by FTSC 0000 0010 0000 0000 */ #define Bit_a 0x0400 /* reserved by FTSC 0000 0100 0000 0000 */ #define Bit_b 0x0800 /* reserved by FTSC 0000 1000 0000 0000 */ #define Bit_c 0x1000 /* reserved by FTSC 0001 0000 0000 0000 */ #define Bit_d 0x2000 /* reserved by FTSC 0010 0000 0000 0000 */ #define DO_DOMAIN 0x4000 /* Packet contains domain 0100 0000 0000 0000 */ #define WZ_FREQ 0x8000 /* WZ file req. ok 1000 0000 0000 0000 */ #define LOCALCAPS (Y_DIETIFNA|ZED_ZIPPER|ZED_ZAPPER|DOES_HYDRA|DO_DOMAIN) extern unsigned INT16 crc16(char*,int); extern int janus(void); extern int hydra(int); extern int rxwazoo(void); extern int txwazoo(void); extern int rxdietifna(void); extern int txdietifna(void); extern void rdoptions(node*); extern int nodelock(faddr*); extern void setproctitle(char*); static int rxyoohoo(void); static int txyoohoo(void); static void fillhello(unsigned short,char*); static void checkhello(void); static int iscaller; static struct _hello { unsigned char data[128]; unsigned char crc[2]; } hello; typedef struct _Hello { unsigned short signal; /* always 'o' (0x6f) */ unsigned short hello_version; /* currently 1 (0x01) */ unsigned short product; /* product code */ unsigned short product_maj; /* major revision of the product */ unsigned short product_min; /* minor revision of the product */ unsigned char my_name[60]; /* Other end's name, will include domain */ /* if DO_DOMAIN is set in capabilities */ unsigned char sysop[20]; /* sysop's name */ unsigned short my_zone; /* 0== not supported */ unsigned short my_net; /* out primary net number */ unsigned short my_node; /* our primary node number */ unsigned short my_point; /* 0 == not supported */ unsigned char my_password[8]; /* This isn't necessarily null-terminated */ unsigned char reserved2[8]; /* reserved by Opus */ unsigned short capabilities; /* see below */ unsigned char reserved3[12]; /* for non-Opus systems with "approval" */ /* total size 128 bytes */ } Hello; Hello hello2; Hello gethello2(unsigned char[]); int rx_yoohoo(void) { int rc; unsigned short capabilities,localcaps; char *pwd; fa_list *tmp; node *nlent; char cbuf[128]; loginf("start inbound WaZOO session"); pwd=NULL; localcaps=LOCALCAPS; if (localoptions & NOZMODEM) localcaps &= ~(ZED_ZAPPER|ZED_ZIPPER); if (localoptions & NOZEDZAP) localcaps &= ~ZED_ZAPPER; if (localoptions & NOJANUS) localcaps &= ~DOES_IANUS; if (localoptions & NOHYDRA) localcaps &= ~DOES_HYDRA; emsi_local_opts=0; emsi_remote_opts=0; iscaller=0; if ((rc=rxyoohoo()) == 0) { checkhello(); capabilities=hello2.capabilities; if (capabilities & WZ_FREQ) session_flags |= SESSION_WAZOO; else session_flags &= ~SESSION_WAZOO; localcaps&=capabilities; if (localcaps & DOES_HYDRA) localcaps &= DOES_HYDRA; else if (localcaps & DOES_IANUS) localcaps &= DOES_IANUS; else if (localcaps & ZED_ZAPPER) localcaps &= ZED_ZAPPER; else if (localcaps & ZED_ZIPPER) localcaps &= ZED_ZIPPER; else if (localcaps & FTB_USER) localcaps &= FTB_USER; else if (localcaps & Y_DIETIFNA) localcaps &= Y_DIETIFNA; if ((localoptions & NOFREQS) == 0) localcaps |= WZ_FREQ; else emsi_local_opts |= OPT_NRQ; if (((nlent=getnlent(remote->addr))) && (nlent->pflag != NL_DUMMY)) { loginf("remote is a listed system"); inbound=listinbound; } if (nlent) rdoptions(nlent); for (tmp=pwlist;tmp;tmp=tmp->next) if (metric(remote->addr,tmp->addr) == 0) { if (strncasecmp((char*)hello2.my_password,tmp->addr->name,8) != 0) { pwd="BAD_PASS"; loginf("remote gave password \"%s\", expected \"%s\"", (char*)hello2.my_password,S(tmp->addr->name)); localcaps=0; } else /* password did match, return it back */ { loginf("remote gave correct password, protected WaZOO session"); inbound=protinbound; pwd=tmp->addr->name; break; } } fillhello(localcaps,pwd); rc=txyoohoo(); } if ((rc == 0) && ((localcaps & LOCALCAPS) == 0)) { loginf("No common WaZOO protocols or bad password"); return 0; } if (rc) return rc; sprintf(cbuf,"-WaZOO %s inbound",ascfnode(remote->addr,0x1f)); setproctitle(cbuf); session_flags |= SESSION_WAZOO; if (localcaps & DOES_HYDRA) return hydra(0); else if (localcaps & DOES_IANUS) return janus(); else if ((localcaps & ZED_ZAPPER) || (localcaps & ZED_ZIPPER)) { if (localcaps & ZED_ZAPPER) emsi_local_protos=PROT_ZAP; else emsi_local_protos=PROT_ZMO; return rxwazoo(); } else if (localcaps & Y_DIETIFNA) return rxdietifna(); else logerr("WaZOO internal error - no proto for 0x%04xh",localcaps); return 1; } int tx_yoohoo(void) { int rc; unsigned short capabilities; char *pwd; fa_list *tmp; char cbuf[128]; loginf("start outbound WaZOO session"); pwd=NULL; for (tmp=pwlist;tmp;tmp=tmp->next) if (metric(remote->addr,tmp->addr) == 0) { pwd=tmp->addr->name; break; } capabilities=LOCALCAPS; if (localoptions & NOZMODEM) capabilities &= ~(ZED_ZAPPER|ZED_ZIPPER); if (localoptions & NOZEDZAP) capabilities &= ~ZED_ZAPPER; if (localoptions & NOJANUS) capabilities &= ~DOES_IANUS; if (localoptions & NOHYDRA) capabilities &= ~DOES_HYDRA; if ((localoptions & NOFREQS) == 0) capabilities |= WZ_FREQ; else emsi_local_opts |= OPT_NRQ; fillhello(capabilities,pwd); iscaller=1; if ((rc=txyoohoo()) == 0) { rc=rxyoohoo(); checkhello(); capabilities=hello2.capabilities; if (capabilities & WZ_FREQ) session_flags |= SESSION_WAZOO; else session_flags &= ~SESSION_WAZOO; } if ((rc == 0) && ((capabilities & LOCALCAPS) == 0)) { loginf("No common WaZOO protocols"); return 0; } if (rc) return rc; sprintf(cbuf,"-WaZOO %s outbound",ascfnode(remote->addr,0x1f)); setproctitle(cbuf); session_flags |= SESSION_WAZOO; if (capabilities & DOES_HYDRA) return hydra(1); else if (capabilities & DOES_IANUS) return janus(); else if ((capabilities & ZED_ZAPPER) || (capabilities & ZED_ZIPPER)) { if (capabilities & ZED_ZAPPER) emsi_local_protos=PROT_ZAP; else emsi_local_protos=PROT_ZMO; return txwazoo(); } else if (capabilities & Y_DIETIFNA) return txdietifna(); else logerr("WaZOO internal error - no proto for 0x%04xh",capabilities); return 1; } SM_DECL(rxyoohoo,"rxyoohoo") SM_STATES sendenq,waitchar,getpacket,sendnak,sendack SM_NAMES "sendenq","waitchar","getpacket","sendnak","sendack" SM_EDECL int c; int count=0; unsigned short lcrc,rcrc; SM_START(sendenq) SM_STATE(sendenq) if (count++ > 9) { loginf("too many tries to get hello packet"); SM_ERROR; } PUTCHAR(ENQ); SM_PROCEED(waitchar) SM_STATE(waitchar) c=GETCHAR(10); if (c == TIMEOUT) {SM_PROCEED(sendenq);} else if (c < 0) { SM_ERROR; } else switch (c) { case 0x1f: SM_PROCEED(getpacket); break; case YOOHOO: SM_PROCEED(sendenq); break; default: debug(10,"got '%s' waiting hello", printablec(c)); SM_PROCEED(waitchar); break; } SM_STATE(getpacket) GET((char*)&hello,sizeof(hello),30); if (STATUS) { SM_ERROR; } lcrc=crc16((char*)hello.data,sizeof(hello.data)); rcrc=(hello.crc[0]<<8)+hello.crc[1]; if (lcrc != rcrc) { debug(10,"crc does not match in hello packet: %04xh/%04xh", rcrc,lcrc); SM_PROCEED(sendnak); } else {SM_PROCEED(sendack);} SM_STATE(sendnak) if (count++ > 9) { loginf("too many tries to get hello packet"); SM_ERROR; } PUTCHAR('?'); SM_PROCEED(waitchar); SM_STATE(sendack) PUTCHAR(ACK); SM_SUCCESS; SM_END SM_RETURN SM_DECL(txyoohoo,"txyoohoo") SM_STATES sendyoohoo,waitenq,sendpkt,waitchar SM_NAMES "sendyoohoo","waitenq","sendpkt","waitchar" SM_EDECL int c; int count=0; int startstate; unsigned short lcrc; if (iscaller) startstate=sendpkt; else startstate=sendyoohoo; lcrc=crc16((char*)hello.data,sizeof(hello.data)); hello.crc[0]=lcrc>>8; hello.crc[1]=lcrc&0xff; SM_START(startstate) SM_STATE(sendyoohoo) PUTCHAR(YOOHOO); SM_PROCEED(waitenq); SM_STATE(waitenq) c=GETCHAR(10); if (c == TIMEOUT) { if (count++ > 9) { loginf("timeout waiting ENQ"); SM_ERROR; } else { SM_PROCEED(sendyoohoo); } } else if (c < 0) { SM_ERROR; } else switch (c) { case ENQ: SM_PROCEED(sendpkt); case YOOHOO: SM_PROCEED(waitenq); default: debug(10,"got '%s' waiting hello ACK", printablec(c)); SM_PROCEED(waitchar); break; } SM_STATE(sendpkt) if (count++ > 9) { loginf("too many tries to send hello packet"); SM_ERROR; } PUTCHAR(0x1f); PUT((char*)&hello,sizeof(hello)); if (STATUS) {SM_ERROR;} SM_PROCEED(waitchar); SM_STATE(waitchar) c=GETCHAR(30); if (c == TIMEOUT) { loginf("timeout waiting hello ACK"); SM_ERROR; } else if (c < 0) { SM_ERROR; } else switch (c) { case ACK: SM_SUCCESS; break; case '?': SM_PROCEED(sendpkt); break; case ENQ: SM_PROCEED(sendpkt); break; default: debug(10,"got '%s' waiting hello ACK", printablec(c)); SM_PROCEED(waitchar); break; } SM_END SM_RETURN void fillhello(capabilities,password) unsigned short capabilities; char *password; { faddr *best; unsigned short majver,minver; debug(10,"fillhello(0x%04hx)",capabilities); best=bestaka_s(remote->addr); sscanf(version,"%hd.%hd",&majver,&minver); memset(&hello,0,sizeof(hello)); hello.data[0]='o'; /* signal */ hello.data[2]=1; /* hello-version */ hello.data[4]=PRODCODE; /* product */ hello.data[6]=majver&0xff; /* prod-ver-major */ hello.data[7]=majver>>8; /* prod-ver-major */ hello.data[8]=minver&0xff; /* prod-ver-minor */ hello.data[9]=minver>>8; /* prod-ver-minor */ strncpy((char*)hello.data+10,name?name:"Unavailable",59); /* name */ if (best->domain) { /* domain */ if (name) { hello.data[10+strlen(name)]='\0'; strncpy((char*)hello.data+11+strlen(name), best->domain,58-strlen(name)); } else strncpy((char*)hello.data+22,best->domain,47); } strncpy((char*)hello.data+70,sysop?sysop:"Unavailable",19); /* sysop */ hello.data[90]=best->zone&0xff; /* zone */ hello.data[91]=best->zone>>8; /* zone */ hello.data[92]=best->net&0xff; /* net */ hello.data[93]=best->net>>8; /* net */ hello.data[94]=best->node&0xff; /* node */ hello.data[95]=best->node>>8; /* node */ hello.data[96]=best->point&0xff; /* point */ hello.data[97]=best->point>>8; /* point */ if (password) strncpy((char*)hello.data+98,password,8); hello.data[114]=capabilities&0xff; /* capabilities */ hello.data[115]=capabilities>>8; /* capabilities */ debug(10,"filled hello \"%s\"",printable((char*)hello.data,128)); } void checkhello(void) { unsigned short i,majver,minver; fa_list **tmpl,*tmpn; faddr remaddr; char *prodnm, *q; debug(10,"check hello \"%s\"",printable((char*)hello.data,128)); hello2=gethello2(hello.data); if ((hello2.signal != 0x6f) || (hello2.hello_version != 0x01)) { loginf("got \"%s\" instead of \"o\\000\\001\000\"", printable((char*)hello.data,3)); } for (i=0;ftscprod[i].name;i++) if (ftscprod[i].code == hello2.product) break; prodnm=ftscprod[i].name; majver=hello2.product_maj; minver=hello2.product_min; remaddr.zone=hello2.my_zone; remaddr.net=hello2.my_net; remaddr.node=hello2.my_node; remaddr.point=hello2.my_point; remaddr.name=NULL; remaddr.domain=NULL; if (hello2.my_name[0]) remaddr.domain=hello2.my_name+(strlen(hello2.my_name))+1; if (remaddr.domain[0]) { if ((q=strchr(remaddr.domain,'.'))) *q='\0'; } else { remaddr.domain=NULL; } if (remote) debug(10,"remote known address: %s",ascfnode(remote->addr,0x1f)); debug(10,"remote presented address: %s",ascfnode(&remaddr,0x1f)); for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next)); if ((remote == NULL) || (metric(remote->addr,&remaddr) != 0)) { (*tmpl)=(fa_list*)xmalloc(sizeof(fa_list)); (*tmpl)->next=NULL; (*tmpl)->addr=(faddr*)xmalloc(sizeof(faddr)); (*tmpl)->addr->zone=remaddr.zone; (*tmpl)->addr->net=remaddr.net; (*tmpl)->addr->node=remaddr.node; (*tmpl)->addr->point=remaddr.point; (*tmpl)->addr->domain=xstrcpy(remaddr.domain); } else { tmpl=&remote; debug(10,"using single remote address"); } for (tmpn=remote;tmpn;tmpn=tmpn->next) (void)nodelock(tmpn->addr); /* lock all remotes, ignore locking result */ loginf("remote address: %s",ascfnode(remote->addr,0x1f)); loginf("remote password: %s",(char*)hello2.my_password); if (hello2.product < 0x0100) loginf("remote uses: %s [%02X] version %d.%d", prodnm?prodnm:"",hello2.product, majver,minver); else loginf("remote uses: %s [%04X] version %d.%d", prodnm?prodnm:"",hello2.product, majver,minver); loginf("remote system: %s",(char*)hello2.my_name); loginf("remote operator: %s",(char*)hello2.sysop); } Hello gethello2(Hellop) unsigned char Hellop[]; { int i; Hello p; p.signal=Hellop[0]+(Hellop[1]<<8); p.hello_version=Hellop[2]+(Hellop[3]<<8); p.product=Hellop[4]+(Hellop[5]<<8); p.product_maj=Hellop[6]+(Hellop[7]<<8); p.product_min=Hellop[8]+(Hellop[9]<<8); for (i=0;i<60;i++) p.my_name[i]=Hellop[10+i]; for (i=0;i<20;i++) p.sysop[i]=Hellop[70+i]; p.my_zone=Hellop[90]+(Hellop[91]<<8); p.my_net=Hellop[92]+(Hellop[93]<<8); p.my_node=Hellop[94]+(Hellop[95]<<8); p.my_point=Hellop[96]+(Hellop[97]<<8); for (i=0;i<8;i++) p.my_password[i]=Hellop[98+i]; for (i=0;i<8;i++) p.reserved2[i]=Hellop[106+i]; p.capabilities=Hellop[114]+(Hellop[115]<<8); for (i=0;i<12;i++) p.reserved3[i]=Hellop[116+i]; return p; } ifmail-2.14tx8.10.orig/ifcico/filelist.c100644 0 0 23176 6701151722 16047 0ustar rootroot#include #include #include #include #include #include #include #include #include #include #include "config.h" #include "xutil.h" #include "lutil.h" #include "bwrite.h" #include "session.h" #include "ftn.h" #ifndef PATH_MAX #define PATH_MAX 512 #endif #define LEAVE 0 #define TFS 1 #define KFS 2 #define DSF 3 extern int master; int made_request; extern FILE *openpkt(FILE *,faddr*,char); extern char *pktname(faddr*,char); extern char *floname(faddr*,char); extern char *reqname(faddr*,char); extern char *splname(faddr*,char); extern unsigned INT32 sequencer(void); static char *tmpkname(void); static char *tmpkname(void) { static char buf[16]; sprintf(buf,"%08lx.pkt",(unsigned long)sequencer()); return buf; } char *xtodos(char*); /* return a _new_copy_ like xstrcpy() */ char *xtodos(orig) char *orig; { int i; char buf[8+1+3+1],*copy,*p,*q,*r; if (orig == NULL) return NULL; if ((remote_flags & SESSION_FNC) == 0) { debug(12,"No filename conversion for \"%s\"",S(orig)); return xstrcpy(orig); } copy=xstrcpy(orig); if ((p=strrchr(copy,'/'))) p++; else p=copy; if (strcmp(q=copy+strlen(copy)-strlen(".tar.gz"),".tar.gz") == 0) { *q='\0'; q="tgz"; } else if (strcmp(q=copy+strlen(copy)-strlen(".tar.z"),".tar.z") == 0) { *q='\0'; q="tgz"; } else if (strcmp(q=copy+strlen(copy)-strlen(".tar.Z"),".tar.Z") == 0) { *q='\0'; q="taz"; } else if ((q=strrchr(p,'.'))) *q++='\0'; else q=NULL; r=buf; for (i=0;(i<8) && (*p);i++,p++,r++) switch (*p) { case '.': case '\\': *r='_'; break; default: *r=toupper(*p); } if (q) { *r++='.'; for (i=0;(i<3) && (*q);i++,q++,r++) switch (*q) { case '.': case '\\': *r='_'; break; default: *r=toupper(*q); } } *r++='\0'; debug(12,"name \"%s\" converted to \"%s\"",S(orig),S(buf)); free(copy); return xstrcpy(buf); } /** * Add the specified entry to the list of files which should be sent * to the remote system. * @param lst file list to add entry to * @param local local file name * @param remote remote file name * @param disposition disposition * @param floff offset of entry in flo-file (-1 if this entry is a flo-file) * @param flofp FILE * of flo-file * @param toend append or prepend to list */ void add_list(file_list**,char*,char*,int,off_t,FILE*,int); void add_list(lst,local,remote,disposition,floff,flofp,toend) file_list **lst; char *local; char *remote; int disposition; off_t floff; FILE *flofp; int toend; { file_list **tmpl; file_list *tmp; debug(12,"add_list(\"%s\",\"%s\",%d,%s)", S(local),S(remote),disposition,toend?"to end":"to beg"); if (toend) for (tmpl=lst;*tmpl;tmpl=&((*tmpl)->next)); else tmpl=&tmp; *tmpl=(file_list*)xmalloc(sizeof(file_list)); if (toend) { (*tmpl)->next=NULL; } else { (*tmpl)->next=*lst; *lst=*tmpl; } (*tmpl)->local=xstrcpy(local); (*tmpl)->remote=xtodos(remote); (*tmpl)->disposition=disposition; (*tmpl)->floff=floff; (*tmpl)->flofp=flofp; return; } static void check_flo(file_list**,char*); static void check_flo(lst,nm) file_list **lst; char *nm; { FILE *fp; off_t off; struct flock fl; char buf[PATH_MAX],buf2[PATH_MAX],*p,*q; int disposition; struct stat stbuf; debug(12,"check_flo(\"%s\")",S(nm)); if ((fp=fopen(nm,"r+")) == NULL) { debug(12,"no flo file"); return; } fl.l_type=F_RDLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if (fcntl(fileno(fp),F_SETLK,&fl) != 0) { if (errno != EAGAIN) logerr("$cannot read-lock \"%s\"",S(nm)); else debug(12,"flo file busy"); fclose(fp); return; } if (stat(nm,&stbuf) != 0) { logerr("$cannot access \"%s\"",S(nm)); fclose(fp); return; } while (!feof(fp) && !ferror(fp)) { off=ftell(fp); if (fgets(buf,sizeof(buf)-1,fp) == NULL) continue; if (buf[0] == '~') continue; /* skip sent files */ if (*(p=buf+strlen(buf)-1) == '\n') *p--='\0'; if (*p == '\r') *p='\0'; switch (buf[0]) { case '#': p=buf+1; disposition=TFS; break; case '-': case '^': p=buf+1; disposition=KFS; break; case '@': p=buf+1; disposition=LEAVE; break; case 0: continue; default: p=buf; disposition=LEAVE; break; } if (dosoutbound && (strncasecmp(p,dosoutbound,strlen(dosoutbound)) == 0)) { strcpy(buf2,outbound); for (p+=strlen(dosoutbound),q=buf2+strlen(buf2); *p;p++,q++) *q=((*p) == '\\')?'/':tolower(*p); *q='\0'; p=buf2; } if ((q=strrchr(p,'/'))) q++; else q=p; add_list(lst,p,q,disposition,off,fp,1); } /* add flo-file to file list */ add_list(lst,nm,NULL,KFS,-1L,fp,1); /* here, we leave .flo file open, it will be closed by */ /* execute_disposition */ return; } file_list *create_filelist(al,fl,create) fa_list *al; char *fl; int create; { file_list *st=NULL,*tmpf; fa_list *tmpa; char flavor; char *nm; char tmpreq[13]; struct stat stbuf; int packets=0; FILE *fp; debug(12,"create_filelist(%s,\"%s\",%d)", al?ascfnode(al->addr,0x1f):"", S(fl),create); made_request=0; while ((flavor=*fl++)) for (tmpa=al;tmpa;tmpa=tmpa->next) { if (flavor == 'o') { nm=splname(tmpa->addr,flavor); if ((fp=fopen(nm,"w"))) fclose(fp); if ((nm != NULL) && (stat(nm,&stbuf) == 0)) { add_list(&st,nm,NULL,DSF,0L,NULL,1); } } nm=pktname(tmpa->addr,flavor); if ((nm != NULL) && (stat(nm,&stbuf) == 0)) { packets++; add_list(&st,nm,tmpkname(),KFS,0L,NULL,1); } nm=floname(tmpa->addr,flavor); check_flo(&st,nm); if ((session_flags & SESSION_WAZOO) && ((session_flags & SESSION_HYDRA) == 0) && (master || ((session_flags & SESSION_IFNA) == 0))) if (flavor == 'o') /* we don't distinguish flavoured reqs */ { nm=reqname(tmpa->addr,flavor); if ((nm != NULL) && (stat(nm,&stbuf) == 0)) { sprintf(tmpreq,"%04X%04X.REQ", tmpa->addr->net,tmpa->addr->node); add_list(&st,nm,tmpreq,DSF,0L,NULL,1); made_request=1; } } } if (((st == NULL) && (create > 1)) || ((st != NULL) && (packets == 0) && (create > 0))) { debug(12,"create packet for %s",ascfnode(al->addr,0x1f)); if ((fp=openpkt(NULL,al->addr,'o'))) { iwrite(0,fp); fclose(fp); } add_list(&st,pktname(al->addr,'o'),tmpkname(),KFS,0L,NULL,0); } for (tmpf=st;tmpf;tmpf=tmpf->next) debug(12,"flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu", S(tmpf->local),S(tmpf->remote),tmpf->disposition, (unsigned long)tmpf->flofp,(unsigned long)tmpf->floff); return st; } void tidy_filelist(fl,dsf) file_list *fl; int dsf; { file_list *tmp; for (tmp=fl;fl;fl=tmp) { tmp=fl->next; if (dsf && (fl->disposition == DSF)) { debug(12,"removing sent file \"%s\"",S(fl->local)); if (unlink(fl->local) != 0) if (errno == ENOENT) debug(12,"cannot unlink nonexistent file \"%s\"", S(fl->local)); else logerr("$cannot unlink file \"%s\"", S(fl->local)); } if (fl->local) free(fl->local); if (fl->remote) free(fl->remote); else if (fl->flofp) fclose(fl->flofp); free(fl); } return; } void execute_disposition(fl) file_list *fl; { FILE *fp=NULL; char *nm; char tpl='~'; nm=fl->local; if (fl->flofp) { /* check for special case: flo-file */ if (fl->floff == -1) { /* * We check if there are any files left for transmission * in the flo-file to decide whether to remove or leave it * on disk */ char buf[PATH_MAX]; int files_remain = 0; if (fseek(fl->flofp, 0L, 0) == 0) { while (!feof(fl->flofp) && !ferror(fl->flofp)) { if (fgets(buf, sizeof(buf)-1, fl->flofp) == NULL) continue; /* count nr of files which haven't been sent yet */ if (buf[0] != '~') files_remain++; } } else { logerr("$error seeking in .flo to 0"); files_remain = -1; /* keep flo-file */ } if (files_remain) { debug(DBG_FILELIST, "leaving flo-file \"%s\", %d files remaining", S(nm), files_remain); fl->disposition = LEAVE; } else { fl->disposition = KFS; } } else { /* mark file as sent in flo-file */ if (fseek(fl->flofp,fl->floff,0) == 0) { if (fwrite(&tpl,1,1,fl->flofp) != 1) { logerr("$error writing '~' to .flo at %lu", (unsigned long) fl->floff); } fflush(fl->flofp); #ifdef HAS_FSYNC fsync(fileno(fl->flofp)); #endif } else { logerr("$error seeking in .flo to %lu", (unsigned long) fl->floff); } } } switch (fl->disposition) { case DSF: case LEAVE: debug(12,"leaving sent file \"%s\"",S(nm)); break; case TFS: debug(12,"truncating sent file \"%s\"",S(nm)); if ((fp=fopen(nm,"w"))) fclose(fp); else logerr("$cannot truncate file \"%s\"",S(nm)); break; case KFS: debug(12,"removing sent file \"%s\"",S(nm)); if (unlink(nm) != 0) if (errno == ENOENT) debug(12,"cannot unlink nonexistent file \"%s\"", S(nm)); else logerr("$cannot unlink file \"%s\"", S(nm)); break; default: logerr("execute_disposition: unknown disp %d for \"%s\"", fl->disposition,S(nm)); break; } return; } file_list *create_freqlist(fa_list *al); file_list *create_freqlist(fa_list *al) { file_list *st=NULL, *tmpf; fa_list *tmpa; char *nm; char tmpreq[13]; struct stat stbuf; debug(12,"create_freqlist(%s)", al?ascfnode(al->addr,0x1f):""); made_request=0; for (tmpa=al;tmpa;tmpa=tmpa->next) { nm=reqname(tmpa->addr,'o'); if ((nm != NULL) && (stat(nm,&stbuf) == 0)) { sprintf(tmpreq,"%04X%04X.REQ", tmpa->addr->net,tmpa->addr->node); add_list(&st,nm,tmpreq,DSF,0L,NULL,1); made_request=1; } } for (tmpf=st;tmpf;tmpf=tmpf->next) debug(12,"flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu", S(tmpf->local),S(tmpf->remote),tmpf->disposition, tmpf->flofp,tmpf->floff); return st; } ifmail-2.14tx8.10.orig/ifcico/xmsend.c100644 0 0 23510 6701151722 15522 0ustar rootroot#include #include #include #include #include #include #include #include "session.h" #include "lutil.h" #include "ttyio.h" #include "statetbl.h" #include "version.h" #define XMBLKSIZ 128 #define DEFAULT_WINDOW 127 extern unsigned INT16 crc16(char*,int); extern unsigned char checksum(char*,int); extern long atol(char*); extern time_t mtime2sl(time_t); extern int m7send(char*); static char *ln,*rn; static int flg; static int xm_send(void); int xmsend(char*,char*,int); int xmsend(local,remote,fl) char *local,*remote; int fl; { int rc; ln=local; rn=remote; flg=fl; rc=xm_send(); if (rc) loginf("send failed"); return rc; } SM_DECL(xm_send,"xmsend") SM_STATES sendm7,sendblk0,waitack0,sendblk,writeblk, waitack,resync,sendeot SM_NAMES "sendm7","sendblk0","waitack0","sendblk","writeblk", "waitack","resync","sendeot" SM_EDECL FILE *fp; struct stat st; struct flock fl; unsigned INT16 lcrc=0,rcrc; int startstate; int crcmode,seamode,telink; int a,a1,a2; int i; time_t seatime; time_t stm,etm; unsigned char header=SOH; struct _xmblk { unsigned char n1; unsigned char n2; char data[XMBLKSIZ]; unsigned char c1; unsigned char c2; } xmblk; int count=0; int cancount=0; int window; long last_blk; long send_blk; long next_blk; long ackd_blk; long tmp; char resynbuf[16]; fl.l_type=F_RDLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; (void)time(&stm); /* if we got 'C' than hopefully remote is sealink capable... */ if (session_flags & FTSC_XMODEM_CRC) { telink=0; crcmode=1; session_flags |= FTSC_XMODEM_RES; session_flags |= FTSC_XMODEM_SLO; session_flags |= FTSC_XMODEM_XOF; window=DEFAULT_WINDOW; send_blk=0L; next_blk=0L; ackd_blk=-1L; startstate=sendblk0; } else { telink=1; crcmode=0; session_flags &= ~FTSC_XMODEM_RES; session_flags |= FTSC_XMODEM_SLO; session_flags |= FTSC_XMODEM_XOF; window=1; send_blk=0L; next_blk=0L; ackd_blk=-1L; if (flg && !(session_flags & SESSION_IFNA)) startstate=sendm7; else startstate=sendblk0; } seamode=-1; /* not yet sure about numbered ACKs */ if (stat(ln,&st) != 0) { logerr("$cannot stat local file \"%s\" to send",S(ln)); return 1; } last_blk=(st.st_size-1)/XMBLKSIZ+1; if ((fp=fopen(ln,"r")) == NULL) { logerr("$cannot open local file \"%s\" to send",S(ln)); return 1; } fl.l_pid=getpid(); if (fcntl(fileno(fp),F_SETLK,&fl) != 0) { loginf("$cannot lock local file \"%s\" to send, skip it",S(ln)); return 0; } if (stat(ln,&st) != 0) { loginf("$cannot access local file \"%s\" to send, skip it",S(ln)); return 0; } loginf("xmodem send \"%s\" as \"%s\", size=%lu", S(ln),S(rn),(unsigned long)st.st_size); SM_START(startstate) SM_STATE(sendm7) if (m7send(rn)) {SM_PROCEED(sendblk0);} else {SM_ERROR;} SM_STATE(sendblk0) debug(11,"xmsendblk0 send:%ld, next:%ld, ackd:%ld, last:%ld", send_blk,next_blk,ackd_blk,last_blk); memset(xmblk.data,0,sizeof(xmblk.data)); xmblk.data[0]=(st.st_size)&0xff; xmblk.data[1]=(st.st_size>>8)&0xff; xmblk.data[2]=(st.st_size>>16)&0xff; xmblk.data[3]=(st.st_size>>24)&0xff; seatime=mtime2sl(st.st_mtime); xmblk.data[4]=(seatime)&0xff; xmblk.data[5]=(seatime>>8)&0xff; xmblk.data[6]=(seatime>>16)&0xff; xmblk.data[7]=(seatime>>24)&0xff; strncpy(xmblk.data+8,rn,17); if (telink) for (i=23;(i>8) && (xmblk.data[i] == '\0');i--) xmblk.data[i]=' '; sprintf(xmblk.data+25,"ifcico %s",version); xmblk.data[40]=((session_flags & FTSC_XMODEM_SLO) != 0); xmblk.data[41]=((session_flags & FTSC_XMODEM_RES) != 0); xmblk.data[42]=((session_flags & FTSC_XMODEM_XOF) != 0); debug(11,"sealink block: \"%s\"",printable(xmblk.data,44)); next_blk=send_blk+1; SM_PROCEED(sendblk); SM_STATE(sendblk) if (send_blk == 0) {SM_PROCEED(writeblk);} debug(11,"xmsendblk send:%ld, next:%ld, ackd:%ld, last:%ld", send_blk,next_blk,ackd_blk,last_blk); if (send_blk > last_blk) { if (send_blk == (last_blk+1)) {SM_PROCEED(sendeot);} else if (ackd_blk < last_blk) {SM_PROCEED(waitack);} else { (void)time(&etm); if (etm == stm) etm++; loginf("sent %lu bytes in %lu seconds (%lu cps)", (unsigned long)st.st_size,etm-stm, (unsigned long)st.st_size/(etm-stm)); fclose(fp); SM_SUCCESS; } } memset(xmblk.data,SUB,sizeof(xmblk.data)); if (send_blk != next_blk) if (fseek(fp,(send_blk-1)*XMBLKSIZ,SEEK_SET) != 0) { logerr("$fseek error setting block %ld (byte %lu) in file \"%s\"", send_blk,(send_blk-1)*XMBLKSIZ,S(ln)); SM_ERROR; } if (fread(xmblk.data,1,XMBLKSIZ,fp) <= 0) { logerr("$read error for block %lu in file \"%s\"", send_blk,S(ln)); SM_ERROR; } next_blk=send_blk+1; SM_PROCEED(writeblk); SM_STATE(writeblk) xmblk.n1=send_blk&0xff; xmblk.n2=~xmblk.n1; if (crcmode) { lcrc=crc16(xmblk.data,sizeof(xmblk.data)); xmblk.c1=(lcrc>>8)&0xff; xmblk.c2=lcrc&0xff; } else { xmblk.c1=checksum(xmblk.data,sizeof(xmblk.data)); } PUTCHAR(header); PUT((char*)&xmblk,crcmode?sizeof(xmblk):sizeof(xmblk)-1); if (STATUS) {SM_ERROR;} if (crcmode) debug(11,"sent '\\%03o',no 0x%02x %d bytes crc 0x%04x", header,xmblk.n1,XMBLKSIZ,lcrc); else debug(11,"sent '\\%03o',no 0x%02x, %d bytes checksum 0x%02x", header,xmblk.n1,XMBLKSIZ,xmblk.c1); send_blk++; SM_PROCEED(waitack); SM_STATE(waitack) if ((count > 4) && (ackd_blk < 0)) { loginf("cannot send sealink block, try xmodem"); window=1; ackd_blk++; SM_PROCEED(sendblk); } if (count > 9) { loginf("too many errors in xmodem send"); SM_ERROR; } if (!((ackd_blk < 0) || (send_blk > (last_blk+1)) || ((send_blk-ackd_blk) > window))) { if ((WAITPUTGET(0) & 3) == 2) {SM_PROCEED(sendblk);} } a=GETCHAR(20); if (a == TIMEOUT) { if(count++ > 9) { loginf("too many tries to send block"); SM_ERROR; } debug(11,"timeout waiting for ACK"); send_blk=ackd_blk+1; SM_PROCEED(sendblk); } else if (a < 0) { SM_ERROR; } else switch (a) { case ACK: count=0; cancount=0; switch (seamode) { case -1: if ((a1=GETCHAR(1)) < 0) { seamode=0; UNGETCHAR(a); SM_PROCEED(waitack); } else if ((a2=GETCHAR(1)) < 0) { seamode=0; UNGETCHAR(a1); UNGETCHAR(a); SM_PROCEED(waitack); } else if ((a1&0xff) != ((~a2)&0xff)) { seamode=0; UNGETCHAR(a2); UNGETCHAR(a1); UNGETCHAR(a); SM_PROCEED(waitack); } else { seamode=1; UNGETCHAR(a2); UNGETCHAR(a1); UNGETCHAR(a); SM_PROCEED(waitack); } break; case 0: ackd_blk++; SM_PROCEED(sendblk); break; case 1: a1=GETCHAR(1); a2=GETCHAR(1); if ((a1 < 0) || (a2 < 0) || (a1 != ((~a2)&0xff))) { debug(11,"bad ACK: 0x%02x/0x%02x, ignore", a1,a2); SM_PROCEED(sendblk); } else { if (a1 != ((ackd_blk+1)&0xff)) debug(11,"got ACK %d, expected %d", a1,(ackd_blk+1)&0xff); tmp=send_blk-((send_blk-a1)&0xff); if ((tmp > ackd_blk) && (tmp < send_blk)) ackd_blk=tmp; else debug(11,"bad ACK: %ld, ignore", a1,a2); if ((ackd_blk+1) == send_blk) {SM_PROCEED(sendblk);} else /* read them all if more than 1 */ {SM_PROCEED(waitack);} } break; } break; case NAK: if (ackd_blk <= 0) crcmode=0; count++; send_blk=ackd_blk+1; SM_PROCEED(sendblk); break; case SYN: SM_PROCEED(resync); break; case DC3: if (session_flags & FTSC_XMODEM_XOF) while (((a=GETCHAR(15)) > 0) && (a != DC1)) if (a < 0) debug(11,"got %d waiting for DC1",a); else debug(11,"got '%s' waiting for DC1", printablec(a)); SM_PROCEED(waitack); break; case CAN: if (cancount++ > 5) { loginf("remote requested cancel transfer"); SM_ERROR; } else {SM_PROCEED(waitack);} break; case 'C': if (ackd_blk < 0) { crcmode=1; count++; send_blk=ackd_blk+1; SM_PROCEED(sendblk); } /* fallthru */ default: if (a < ' ') debug(11,"got '\\%03o' waiting for ACK",a); else debug(11,"got '%c' waiting for ACK",a); SM_PROCEED(waitack); break; } SM_STATE(resync) if (count++ > 9) { loginf("too may tries to resync"); SM_ERROR; } i=-1; do { a=GETCHAR(15); resynbuf[++i]=a; } while ((a >= '0') && (a <= '9') && (i < sizeof(resynbuf)-1)); resynbuf[i]='\0'; debug(11,"got resync \"%s\", i=%d",resynbuf,i); lcrc=crc16(resynbuf,strlen(resynbuf)); rcrc=0; if (a != ETX) { if (a > 0) loginf("got %d waiting for resync",a); else loginf("got %s waiting for resync",printablec(a)); PUTCHAR(NAK); SM_PROCEED(waitack); } if ((a=GETCHAR(1)) < 0) { PUTCHAR(NAK); SM_PROCEED(waitack); } rcrc=a&0xff; if ((a=GETCHAR(1)) < 0) { PUTCHAR(NAK); SM_PROCEED(waitack); } rcrc |= (a << 8); if (rcrc != lcrc) { loginf("bad resync crc: 0x%04x != 0x%04x",lcrc,rcrc); PUTCHAR(NAK); SM_PROCEED(waitack); } send_blk=atol(resynbuf); ackd_blk=send_blk-1; loginf("resyncing at block %ld (byte %lu)", send_blk,(send_blk-1L)*XMBLKSIZ); PUTCHAR(ACK); SM_PROCEED(sendblk); SM_STATE(sendeot) PUTCHAR(EOT); if (STATUS) {SM_ERROR;} send_blk++; SM_PROCEED(waitack); SM_END SM_RETURN int xmsndfiles(file_list*); int xmsndfiles(tosend) file_list *tosend; { int rc,c=0,gotnak,count; file_list *nextsend; for (nextsend=tosend;nextsend;nextsend=nextsend->next) if (*(nextsend->local) != '~') { if (nextsend->remote) if ((rc=xmsend(nextsend->local,nextsend->remote, (nextsend != tosend)))) /* send m7 for rest */ return rc; /* and thus avoid execute_disposition() */ else { gotnak=0; count=0; while (!gotnak && (count < 6)) { c=GETCHAR(15); if (c < 0) return STATUS; if (c == CAN) { loginf("remote refused receiving"); return 1; } if ((c == 'C') || (c == NAK)) gotnak=1; else debug(11,"got '%s' waiting NAK", printablec(c)); } if (c == 'C') session_flags |= FTSC_XMODEM_CRC; if (!gotnak) return 1; } execute_disposition(nextsend); } PUTCHAR(EOT); return STATUS; } ifmail-2.14tx8.10.orig/ifcico/xmrecv.c100644 0 0 25116 6701151722 15534 0ustar rootroot#include #include #include #include #include #include #include #include #include #include "session.h" #include "ttyio.h" #include "statetbl.h" #include "xutil.h" #include "lutil.h" #include "config.h" #define XMBLKSIZ 128 extern unsigned INT16 crc16(char*,int); extern unsigned char checksum(char*,int); extern time_t sl2mtime(time_t); extern time_t tl2mtime(time_t); extern int m7recv(char*); static int xm_recv(void); static int resync(off_t); FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); int closefile(int); static int closeit(int); static char *recvname=NULL; static char *fpath=NULL; static FILE *fp=NULL; static int last; static time_t stm,etm; static off_t startofs; static long recv_blk; int xmrecv(char*); int xmrecv(name) char *name; { int rc; debug(11,"start xmodem receive \"%s\"",S(name)); recvname=name; last=0; rc=xm_recv(); if (fp) closeit(0); if (rc) return -1; else if (last) return 1; else return 0; } int closeit(success) int success; { off_t endofs; endofs=recv_blk*XMBLKSIZ; (void)time(&etm); if (etm == stm) etm++; loginf("%s %lu bytes in %lu seconds (%lu cps)", success?"received":"dropped after", (unsigned long)(endofs-startofs),etm-stm, (unsigned long)(endofs-startofs)/(etm-stm)); fp=NULL; return closefile(success); } SM_DECL(xm_recv,"xmrecv") SM_STATES sendnak0,waitblk0, sendnak,waitblk,recvblk,sendack,checktelink, recvm7,goteof SM_NAMES "sendnak0","waitblk0", "sendnak","waitblk","recvblk","sendack","checktelink", "recvm7","goteof" SM_EDECL int tmp; int crcmode=session_flags&FTSC_XMODEM_CRC; int count=0,junk=0,cancount=0; int header; struct _xmblk { unsigned char n1,n2; char data[XMBLKSIZ]; unsigned char c1,c2; } xmblk; unsigned INT16 localcrc,remotecrc; unsigned char localcs,remotecs; long ackd_blk=-1L; long next_blk=1L; long last_blk=0L; off_t resofs; int telink=0; char tmpfname[16]; off_t wsize; time_t remtime=0L; off_t remsize=0; char ctt[32]; (void)time(&stm); recv_blk=-1L; if (recvname) strncpy(tmpfname,recvname,sizeof(tmpfname)-1); else tmpfname[0]='\0'; SM_START(sendnak0) SM_STATE(sendnak0) if (count++ > 9) { loginf("too many errors while xmodem receive init"); SM_ERROR; } if ((ackd_blk < 0) && crcmode && (count > 4)) { debug(11,"no responce to 'C', try checksum mode"); session_flags &= ~FTSC_XMODEM_CRC; crcmode=0; } if (crcmode) PUTCHAR('C'); else PUTCHAR(NAK); junk=0; SM_PROCEED(waitblk0); SM_STATE(waitblk0) header=GETCHAR(5); if (header == TIMEOUT) { debug(11,"timeout waiting for xmodem block 0 header, count=%d", count); if ((count > 2) && (session_flags & SESSION_IFNA)) { loginf("timeout waiting for file in WaZOO session, report success"); last=1; SM_SUCCESS; } SM_PROCEED(sendnak0); } else if (header < 0) {SM_ERROR;} else switch (header) { case EOT: last=1; SM_SUCCESS; break; case CAN: loginf("got CAN while xmodem receive init"); SM_ERROR; break; case SOH: SM_PROCEED(recvblk); break; case SYN: telink=1; SM_PROCEED(recvblk); break; case ACK: telink=1; SM_PROCEED(recvm7); break; case TSYNC: SM_PROCEED(sendnak0); break; case NAK: case 'C': PUTCHAR(EOT); /* other end still waiting us to send? */ SM_PROCEED(waitblk0); break; default: debug(11,"got '%s' waiting for block 0", printablec(header)); if (junk++ > 300) {SM_PROCEED(sendnak0);} else {SM_PROCEED(waitblk0);} break; } SM_STATE(sendnak) if (ackd_blk < 0) {SM_PROCEED(sendnak0);} if (count++ > 9) { loginf("too many errors while xmodem receive"); SM_ERROR; } junk=0; if (remote_flags&FTSC_XMODEM_RES) { if (resync(ackd_blk*XMBLKSIZ)) {SM_ERROR;} else {SM_PROCEED(waitblk);} } else /* simple NAK */ { debug(11,"negative acknowlege block %ld",ackd_blk+1); PUTCHAR(NAK); PUTCHAR(ackd_blk+1); PUTCHAR(~(ackd_blk+1)); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitblk);} } SM_STATE(sendack) ackd_blk=recv_blk; count=0; cancount=0; debug(11,"acknowlege block %ld",ackd_blk); PUTCHAR(ACK); PUTCHAR(ackd_blk); PUTCHAR(~ackd_blk); if (STATUS) {SM_ERROR;} SM_PROCEED(waitblk); SM_STATE(waitblk) header=GETCHAR(15); if (header == TIMEOUT) { debug(11,"timeout waiting for xmodem block header, count=%d", count); SM_PROCEED(sendnak); } else if (header < 0) {SM_ERROR;} else switch (header) { case EOT: if (last_blk && (ackd_blk != last_blk)) { debug(11,"false EOT after %ld block, need after %ld", ackd_blk,last_blk); SM_PROCEED(waitblk); } else {SM_PROCEED(goteof);} break; case CAN: if (cancount++ > 4) { closeit(0); loginf("got CAN while xmodem receive"); SM_ERROR; } else {SM_PROCEED(waitblk);} break; case SOH: SM_PROCEED(recvblk); break; default: if (header < ' ') debug(11,"got '\\%03o' waiting SOH", header); else debug(11,"got '%c' waiting SOH",header); if (junk++ > 200) {SM_PROCEED(sendnak);} else {SM_PROCEED(waitblk);} break; } SM_STATE(recvblk) GET((char*)&xmblk,(crcmode && (header != SYN))? sizeof(xmblk): sizeof(xmblk)-1,15); if (STATUS == STAT_TIMEOUT) { debug(11,"xmrecv timeout waiting for block body"); SM_PROCEED(sendnak); } if (STATUS) {SM_ERROR;} if ((xmblk.n1&0xff) != ((~xmblk.n2)&0xff)) { debug(11,"bad block number: 0x%02x/0x%02x (0x%02x)", xmblk.n1,xmblk.n2,(~xmblk.n2)&0xff); SM_PROCEED(waitblk); } /* recv_blk=ackd_blk-(ackd_blk-(unsigned)xmblk.n1); */ recv_blk = xmblk.n1 + (ackd_blk & ~0xff); if (abs(recv_blk - ackd_blk) > 128) recv_blk += 256; if (crcmode && (header != SYN)) { remotecrc=(INT16)xmblk.c1<<8|xmblk.c2; localcrc=crc16(xmblk.data,sizeof(xmblk.data)); if (remotecrc != localcrc) { debug(11,"bad crc: 0x%04x/0x%04x",remotecrc,localcrc); if (recv_blk == (ackd_blk+1)) {SM_PROCEED(sendnak);} else {SM_PROCEED(waitblk);} } } else { remotecs=xmblk.c1; localcs=checksum(xmblk.data,sizeof(xmblk.data)); if (remotecs != localcs) { debug(11,"bad checksum: 0x%02x/0x%02x",remotecs,localcs); if (recv_blk == (ackd_blk+1)) {SM_PROCEED(sendnak);} else {SM_PROCEED(waitblk);} } } if ((ackd_blk == -1L) && (recv_blk == 0L)) {SM_PROCEED(checktelink);} if ((ackd_blk == -1L) && (recv_blk == 1L)) { if (count < 3) {SM_PROCEED(sendnak0);} else ackd_blk=0L; } if (recv_blk < (ackd_blk+1L)) { debug(11,"old block number %ld after %ld, go on", recv_blk,ackd_blk); SM_PROCEED(waitblk); } else if (recv_blk > (ackd_blk+1L)) { debug(11,"bad block order: %ld after %ld, go on", recv_blk,ackd_blk); SM_PROCEED(waitblk); } debug(11,"received block %ld \"%s\"", recv_blk,printable(xmblk.data,128)); if (fp == NULL) { if ((fp=openfile(tmpfname,remtime,remsize,&resofs,resync)) == NULL) { SM_ERROR; } else { if (resofs) ackd_blk=(resofs-1)/XMBLKSIZ+1L; else ackd_blk=-1L; } startofs=resofs; loginf("xmodem receive: \"%s\"",tmpfname); } if (recv_blk > next_blk) { logerr("xmrecv internal error: recv_blk %ld > next_blk %ld", recv_blk,next_blk); SM_ERROR; } if (recv_blk == next_blk) { if (recv_blk == last_blk) wsize=remsize%XMBLKSIZ; else wsize=XMBLKSIZ; if (wsize == 0) wsize=XMBLKSIZ; if ((tmp=fwrite(xmblk.data,wsize,1,fp)) != 1) { logerr("$error writing block %l (%d bytes) to file \"%s\" (fwrite return %d)", recv_blk,wsize,fpath,tmp); SM_ERROR; } else debug(11,"Block %ld size %d written (ret %d)", recv_blk,wsize,tmp); next_blk++; } else { debug(11,"recv_blk %ld < next_blk %ld, ack without writing", recv_blk,next_blk); } SM_PROCEED(sendack); SM_STATE(checktelink) debug(11,"checktelink got \"%s\"",printable(xmblk.data,45)); if (tmpfname[0] == '\0') { strncpy(tmpfname,xmblk.data+8,16); } else { loginf("Remote uses %s",printable(xmblk.data+25,-14)); debug(11,"Remote file name \"%s\" discarded", printable(xmblk.data+8,-16)); } remsize=((off_t)xmblk.data[0])+((off_t)xmblk.data[1]<<8)+ ((off_t)xmblk.data[2]<<16)+((off_t)xmblk.data[3]<<24); last_blk=(remsize-1)/XMBLKSIZ+1; if (header == SOH) { remtime=sl2mtime(((time_t)xmblk.data[4])+ ((time_t)xmblk.data[5]<<8)+ ((time_t)xmblk.data[6]<<16)+ ((time_t)xmblk.data[7]<<24)); if (xmblk.data[40]) remote_flags |= FTSC_XMODEM_SLO; else remote_flags &= ~FTSC_XMODEM_SLO; if (xmblk.data[41]) remote_flags |= FTSC_XMODEM_RES; else remote_flags &= ~FTSC_XMODEM_RES; if (xmblk.data[42]) remote_flags |= FTSC_XMODEM_XOF; else remote_flags &= ~FTSC_XMODEM_XOF; } else /* Telink */ { remtime=tl2mtime(((time_t)xmblk.data[4])+ ((time_t)xmblk.data[5]<<8)+ ((time_t)xmblk.data[6]<<16)+ ((time_t)xmblk.data[7]<<24)); /* if (xmblk.data[40]) remote_flags |= FTSC_XMODEM_NOACKS; else remote_flags &= ~FTSC_XMODEM_NOACKS; */ if (xmblk.data[41]) session_flags |= FTSC_XMODEM_CRC; else session_flags &= ~FTSC_XMODEM_CRC; } debug(11,"%s block, session_flags=0x%04x, remote_flags=0x%04x", (header == SYN)?"Telink":"Sealink",session_flags,remote_flags); strcpy(ctt,date(remtime)); debug(11,"Remote file size %lu timestamp %s", (unsigned long)remsize,ctt); if ((fp=openfile(tmpfname,remtime,remsize,&resofs,resync)) == NULL) { SM_ERROR; } if (resofs) ackd_blk=(resofs-1)/XMBLKSIZ+1L; else ackd_blk=-1L; startofs=resofs; loginf("xmodem receive: \"%s\" %ld bytes dated %s", tmpfname,remsize,ctt); if (ackd_blk == -1) {SM_PROCEED(sendack);} else {SM_PROCEED(waitblk);} SM_STATE(recvm7) switch (m7recv(tmpfname)) { case 0: ackd_blk=0; SM_PROCEED(sendnak); break; case 1: last=1; SM_SUCCESS; break; default: SM_PROCEED(sendnak); } SM_STATE(goteof) closeit(1); if (ackd_blk == -1L) last=1; else { ackd_blk++; PUTCHAR(ACK); PUTCHAR(ackd_blk); PUTCHAR(~ackd_blk); } if (STATUS) {SM_ERROR;} SM_SUCCESS; SM_END SM_RETURN int resync(resofs) off_t resofs; { char resynbuf[16]; INT16 lcrc; int count=0; int gotack,gotnak; int c; long sblk; debug(11,"trying to resync at offset %ld",resofs); sblk=resofs/XMBLKSIZ+1; sprintf(resynbuf,"%ld",sblk); lcrc=crc16(resynbuf,strlen(resynbuf)); gotack=0; gotnak=0; do { count++; PUTCHAR(SYN); PUTSTR(resynbuf); PUTCHAR(ETX); PUTCHAR(lcrc&0xff); PUTCHAR(lcrc>>8); do { if ((c=GETCHAR(5)) == ACK) { if ((c=GETCHAR(1)) == SOH) gotack=1; UNGETCHAR(c); } else if (c == NAK) { if ((c=GETCHAR(1)) == TIMEOUT) gotnak=1; UNGETCHAR(c); } } while (!gotack && !gotnak && (c >= 0)); if ((c < 0) && (c != TIMEOUT)) return 1; } while (!gotack && !gotnak && (count < 6)); if (gotack) { debug(11,"resyncing at offset %ld",resofs); return 0; } else { loginf("sealink resync at offset %ld failed",resofs); return 1; } } ifmail-2.14tx8.10.orig/ifcico/sendbark.c100644 1751 50 4700 6374433114 15345 0ustar mdsrc#include #include #include #include #include "ftn.h" #include "lutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" extern unsigned INT16 crc16(char*,int); extern char *reqname(faddr*); extern int xmrecv(char*); static int send_bark(void); static char *nm,*pw,*dt; int sendbark(void); int sendbark(void) { char *fn; FILE *fp; char buf[256],*p; int rc=0; fn=reqname(remote->addr); if ((fp=fopen(fn,"r")) == NULL) { debug(10,"no request file for this node"); PUTCHAR(ETB); return 0; } while (fgets(buf,sizeof(buf)-1,fp)) { nm=buf; pw=strchr(buf,'!'); /* if ((dt=strchr(buf,'-')) == NULL) */ dt=strchr(buf,'+'); if (pw) *pw++='\0'; if (dt) *dt++='\0'; if (nm) { while (isspace(*nm)) nm++; for (p=nm;(*p != '!') && (*p != '+') && (!isspace(*p));p++); *p='\0'; } if (pw) { while (isspace(*pw)) pw++; for (p=pw;(*p != '!') && (*p != '+') && (!isspace(*p));p++); *p='\0'; } else pw=""; if (dt) { while (isspace(*nm)) nm++; for (p=nm;(*p != '!') && (*p != '+') && (*p != '-') && (!isspace(*p));p++); *p='\0'; } else dt="0"; if (*nm == ';') continue; loginf("sending bark request for \"%s\", password \"%s\", update \"%s\"", S(nm),S(pw),S(dt)); if ((rc=send_bark())) break; } if (rc == 0) PUTCHAR(ETB); fclose(fp); if (rc == 0) unlink(fn); return rc; } SM_DECL(send_bark,"sendbark") SM_STATES send,waitack,getfile SM_NAMES "send","waitack","getfile" SM_EDECL int c; char buf[256]; unsigned INT16 crc; int count=0; sprintf(buf,"%s %s %s",nm,dt,pw); crc=crc16(buf,strlen(buf)); debug(10,"sending bark packet \"%s\", crc=0x%04x",buf,crc); SM_START(send) SM_STATE(send) if (count++ > 6) { loginf("bark request failed"); SM_ERROR; } PUTCHAR(ACK); PUT(buf,strlen(buf)); PUTCHAR(ETX); PUTCHAR(crc&0xff); PUTCHAR((crc>>8)&0xff); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitack);} SM_STATE(waitack) c=GETCHAR(15); if (c == TIMEOUT) { debug(10,"sendbark got timeout waiting for ACK"); SM_PROCEED(send); } else if (c < 0) { SM_PROCEED(send); } else if (c == ACK) { SM_PROCEED(getfile); } else if (c == NAK) { SM_PROCEED(send); } else { debug(10,"sendbark got %s waiting for ACK", printablec(c)); SM_PROCEED(send); } SM_STATE(getfile) switch (xmrecv(NULL)) { case 0: SM_PROCEED(getfile); break; case 1: SM_SUCCESS; break; default: SM_ERROR; break; } SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/recvbark.c100644 1751 50 5624 6374432571 15367 0ustar mdsrc#include #include "lutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" int recvbark(void); static int recv_bark(void); extern unsigned INT16 crc16(char*,int); extern int xmsndfiles(file_list*); extern file_list *respond_bark(char*); int recvbark(void) { if ((session_flags&SESSION_BARK) && !(localoptions&NOFREQS)) { return recv_bark(); } else /* deny requests */ { PUTCHAR(CAN); return STATUS; } } SM_DECL(recv_bark,"recvbark") SM_STATES sendenq,waitack,waitchar,scanreq,sendack, waitnak,sendfiles SM_NAMES "sendenq","waitack","waitchar","scanreq","sendack", "waitnak","sendfiles" SM_EDECL int c,c1,c2; INT16 lcrc,rcrc; char buf[256],*p=NULL; int count=0,rc=0; file_list *tosend=NULL; SM_START(sendenq) SM_STATE(sendenq) if (count++ > 6) { loginf("failed to get bark request"); SM_ERROR; } PUTCHAR(ENQ); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitack);} SM_STATE(waitack) c=GETCHAR(15); if (c == TIMEOUT) { debug(10,"recvbark got timeout waiting for ACK"); SM_PROCEED(sendenq); } else if (c < 0) { SM_ERROR; } else switch (c) { case ACK: p=buf; SM_PROCEED(waitchar); break; case ETB: SM_SUCCESS; break; case ENQ: PUTCHAR(ETB); SM_PROCEED(waitack); break; case EOT: PUTCHAR(ACK); SM_PROCEED(waitack); break; default: debug(10,"recvbark got '%s' waiting for ACK", printablec(c)); SM_PROCEED(waitack); break; } SM_STATE(waitchar) c=GETCHAR(15); if (c == TIMEOUT) { debug(10,"recvbark got timeout waiting for char"); SM_PROCEED(sendenq); } else if (c < 0) { SM_ERROR; } else switch (c) { case ACK: SM_PROCEED(waitchar); break; case ETX: *p='\0'; SM_PROCEED(scanreq); break; case SUB: SM_PROCEED(sendenq); break; default: if ((p-buf) < sizeof(buf)) *p++=c; SM_PROCEED(waitchar); break; } SM_STATE(scanreq) lcrc=crc16(buf,strlen(buf)); c1=GETCHAR(15); if (c1 == TIMEOUT) {SM_PROCEED(sendenq);} else if (c1 < 0) {SM_ERROR;} c2=GETCHAR(15); if (c2 == TIMEOUT) {SM_PROCEED(sendenq);} else if (c2 < 0) {SM_ERROR;} rcrc=(c2<<8)+(c1&0xff); if (lcrc != rcrc) { debug(10,"lcrc 0x%04x != rcrc 0x%04x",lcrc,rcrc); SM_PROCEED(sendenq); } SM_PROCEED(sendack); SM_STATE(sendack) count=0; PUTCHAR(ACK); tosend=respond_bark(buf); SM_PROCEED(waitnak); SM_STATE(waitnak) c=GETCHAR(15); if (c == TIMEOUT) { debug(10,"recvbark got timeout waiting for NAK"); SM_PROCEED(sendenq); } else if (c < 0) { SM_ERROR; } else switch (c) { case NAK: session_flags &= ~FTSC_XMODEM_CRC; /* fallthrough */ case 'C': session_flags |= FTSC_XMODEM_CRC; SM_PROCEED(sendfiles); break; case ENQ: PUTCHAR(ETB); SM_PROCEED(waitack); break; case SUB: SM_PROCEED(sendenq); break; default: debug(10,"recvbark got '%s' waiting for NAK", printablec(c)); SM_PROCEED(waitack); break; } SM_STATE(sendfiles) rc=xmsndfiles(tosend); tidy_filelist(tosend,0); if (rc == 0) {SM_PROCEED(sendenq);} else {SM_ERROR;} SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/filetime.c100644 1751 50 2341 5725275752 15364 0ustar mdsrc#include #include time_t mtime2sl(time_t); time_t sl2mtime(time_t); time_t mtime2tl(time_t); time_t tl2mtime(time_t); time_t gmtoff(time_t); time_t gmtoff(tt) time_t tt; { struct tm lt; #ifdef DONT_HAVE_TM_GMTOFF struct tm gt; time_t offset; lt=*localtime(&tt); gt=*gmtime(&tt); offset=gt.tm_yday-lt.tm_yday; if (offset > 1) offset=-24; else if (offset < -1) offset=24; else offset*=24; offset+=gt.tm_hour-lt.tm_hour; offset*=60; offset+=gt.tm_min-lt.tm_min; offset*=60; offset+=gt.tm_sec-lt.tm_sec; return offset; #else lt=*localtime(&tt); return -lt.tm_gmtoff; #endif } time_t mtime2sl(tt) time_t tt; { return tt-gmtoff(tt); } time_t sl2mtime(tt) time_t tt; { return tt+gmtoff(tt); } time_t mtime2tl(tt) time_t tt; { time_t tlt=0L; struct tm *tm; tm=localtime(&tt); tlt |= ((tm->tm_year)-1980)<<25; tlt |= (tm->tm_mon)<<21; tlt |= (tm->tm_mday)<<16; tlt |= (tm->tm_hour)<<11; tlt |= (tm->tm_min)<<5; tlt |= (tm->tm_sec)>>1; return tlt; } time_t tl2mtime(tt) time_t tt; { struct tm tm; tm.tm_year= ((tt>>25)&0x7f)+1980; tm.tm_mon= (tt>>21)&0x0f; tm.tm_mday= (tt>>16)&0x1f; tm.tm_hour= (tt>>11)&0x1f; tm.tm_min= (tt>>5 )&0x3f; tm.tm_sec= ((tt )&0x1f)*2; return mktime(&tm); } ifmail-2.14tx8.10.orig/ifcico/m7recv.c100644 1751 50 3632 5552037174 14765 0ustar mdsrc#include #include "statetbl.h" #include "ttyio.h" #include "lutil.h" static int m7_recv(void); static char* fn; static int last; int m7recv(char*); int m7recv(fname) char *fname; { int rc; fn=fname; last=0; rc=m7_recv(); if (rc) return -1; else if (last) return 1; else return 0; } SM_DECL(m7_recv,"m7recv") SM_STATES sendnak,waitack,waitchar,sendack,sendcheck,waitckok SM_NAMES "sendnak","waitack","waitchar","sendack","sendcheck","waitckok" SM_EDECL int count=0; int c,i=0; char *p=fn; char cs=0; SM_START(waitchar) SM_STATE(sendnak) if (count++ > 6) { loginf("too many tries getting modem7 name"); SM_ERROR; } p=fn; cs=SUB; i=0; PUTCHAR(NAK); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitack);} SM_STATE(waitack) c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timout waiting for ACK"); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; } else switch (c) { case ACK: SM_PROCEED(waitchar); break; case EOT: last=1; SM_SUCCESS; break; default: debug(11,"m7 got '%s' waiting for ACK", printablec(c)); break; } SM_STATE(waitchar) c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timeout waiting for char",c); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; } else switch (c) { case EOT: last=1; SM_SUCCESS; break; case SUB: *p='\0'; SM_PROCEED(sendcheck); break; case 'u': SM_PROCEED(sendnak); break; default: cs+=c; if (i < 15) { if (c != ' ') { if (i == 8) *p++='.'; *p++=tolower(c); } i++; } SM_PROCEED(sendack); break; } SM_STATE(sendack) PUTCHAR(ACK); SM_PROCEED(waitchar); SM_STATE(sendcheck) PUTCHAR(cs); SM_PROCEED(waitckok); SM_STATE(waitckok) c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timout waiting for ack ACK"); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; } else if (c == ACK) { SM_SUCCESS; } else { SM_PROCEED(sendnak); } SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/m7send.c100644 1751 50 4417 5552037214 14754 0ustar mdsrc#include #include #include "statetbl.h" #include "ttyio.h" #include "lutil.h" static int m7_send(void); static char *fn; int m7send(char*); int m7send(fname) char *fname; { fn=fname; return m7_send(); } SM_DECL(m7_send,"m7send") SM_STATES waitnak,sendack,sendchar,waitack,sendsub, waitcheck,ackcheck SM_NAMES "waitnak","sendack","sendchar","waitack","sendsub", "waitcheck","ackcheck" SM_EDECL char buf[12],*p; int i,c,count=0; char cs=SUB; memset(buf,' ',sizeof(buf)); for (i=0,p=fn;(i<8) && (*p) && (*p != '.');i++,p++) buf[i]=toupper(*p); if (*p == '.') p++; for (;(i<11) && (*p);i++,p++) buf[i]=toupper(*p); for (i=0;i<11;i++) cs+=buf[i]; buf[11]='\0'; debug(11,"modem7 filename \"%s\", checksum %02x", buf,(unsigned char)cs); SM_START(sendack) SM_STATE(waitnak) if (count++ > 6) { loginf("too many tries sending modem7 name"); SM_ERROR; } c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timeout waiting NAK"); SM_PROCEED(waitnak); } else if (c < 0) { SM_ERROR; } else if (c == NAK) { SM_PROCEED(sendack); } else { debug(11,"m7 got '%s' waiting NAK", printablec(c)); PUTCHAR('u'); SM_PROCEED(waitnak); } SM_STATE(sendack) i=0; PUTCHAR(ACK); if (STATUS) {SM_ERROR;} else {SM_PROCEED(sendchar)}; SM_STATE(sendchar) if (i > 11) {SM_PROCEED(sendsub);} PUTCHAR(buf[i++]); if (STATUS) {SM_ERROR;} else {SM_PROCEED(waitack)}; SM_STATE(waitack) c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timeout waiting ACK for char %d",i); PUTCHAR('u'); SM_PROCEED(waitnak); } else if (c < 0) { SM_ERROR; } else if (c == ACK) { SM_PROCEED(sendchar); } else { debug(11,"m7 got '%s' waiting ACK for char %d", printablec(c),i); PUTCHAR('u'); SM_PROCEED(waitnak); } SM_STATE(sendsub) PUTCHAR(SUB); SM_PROCEED(waitcheck); SM_STATE(waitcheck) c=GETCHAR(15); if (c == TIMEOUT) { debug(11,"m7 got timeout waiting check"); PUTCHAR('u'); SM_PROCEED(waitnak); } else if (c < 0) { SM_ERROR; } else if (c == cs) { SM_PROCEED(ackcheck); } else { debug(11,"m7 got %02x waiting check %02x", (unsigned char)c,(unsigned char)cs); PUTCHAR('u'); SM_PROCEED(waitnak); } SM_STATE(ackcheck) PUTCHAR(ACK); if (STATUS) {SM_ERROR;} else {SM_SUCCESS;} SM_END SM_RETURN ifmail-2.14tx8.10.orig/ifcico/respfreq.c100644 1751 50 32205 6463053353 15426 0ustar mdsrc#include #include #include #include #include #include #include #ifdef HAS_REGEX_H #define _REGEX_RE_COMP #include #else char *re_comp(char*); int re_exec(char*); #endif #include "directory.h" #include "session.h" #include "xutil.h" #include "lutil.h" #include "config.h" #ifndef NOFREQREPORT #include #include "ftnmsg.h" #endif #include "version.h" #ifndef S_ISDIR #define S_ISDIR(st_mode) (((st_mode) & S_IFMT) == S_IFDIR) #endif #ifndef S_ISREG #define S_ISREG(st_mode) (((st_mode) & S_IFMT) == S_IFREG) #endif #define KFS 2 extern char *freqname; extern char *logname; extern int execsh(char*,char*,char*,char*); extern unsigned long atoul(char*); extern unsigned INT32 sequencer(void); static file_list *respfreq(char*,char*,char*); static file_list *respmagic(char*); static file_list *resplist(char*); #ifndef NOFREQREPORT static void attach_report(file_list**); static void add_report(); static char *report_text=NULL; static unsigned long report_total=0L; #endif file_list *respond_wazoo(char*); file_list *respond_wazoo(fn) char *fn; { char buf[256]; char *nm,*pw,*dt,*p; file_list *fl=NULL,**tmpl; FILE *fp; if (freqname == NULL) return NULL; if ((fp=fopen(freqname,"r")) == NULL) { logerr("$cannot open received wazoo freq \"%s\"",freqname); unlink(freqname); free(freqname); freqname=NULL; return NULL; } tmpl=&fl; while (fgets(buf,sizeof(buf)-1,fp)) { nm=NULL; pw=NULL; dt=NULL; p=strtok(buf," \n\r"); if ((p == NULL) || (*p == '\0')) continue; nm=p; p=strtok(NULL," \n\r"); if (p && (*p == '!')) pw=p+1; else if (p && ((*p == '+') || (*p == '-'))) dt=p; p=strtok(NULL," \n\r"); if (p && (*p == '!')) pw=p+1; else if (p && ((*p == '+') || (*p == '-'))) dt=p; *tmpl=respfreq(nm,pw,dt); while (*tmpl) tmpl=&((*tmpl)->next); } fclose(fp); unlink(freqname); free(freqname); freqname=NULL; for (tmpl=&fl;*tmpl;tmpl=&((*tmpl)->next)) { debug(12,"resplist: %s",S((*tmpl)->local)); } #ifndef NOFREQREPORT attach_report(&fl); #endif return fl; } file_list *respond_bark(char*); file_list *respond_bark(buf) char *buf; { char *nm,*pw,*dt,*p; file_list *fl; nm=buf; pw=""; dt="0"; while (isspace(*nm)) nm++; for (p=nm;*p && (!isspace(*p));p++); if (*p) { *p++='\0'; dt=p; while (isspace(*dt)) dt++; for (p=dt;*p && (!isspace(*p));p++); if (*p) { *p++='\0'; pw=p; while (isspace(*pw)) pw++; for (p=pw;*p && (!isspace(*p));p++); *p='\0'; } } fl=respfreq(nm,pw,dt); #ifndef NOFREQREPORT attach_report(&fl); #endif return fl; } file_list *respfreq(nm,pw,dt) char *nm,*pw,*dt; { file_list *fl=NULL; DIR *dp; struct dirent *de; struct stat st; char mask[256],*p,*q; char *tnm,*tdir; time_t upd=0L; int newer=1,pass; FILE* reqlist; char mapline[1024],*fullname=NULL,*r; loginf("remote requested \"%s\" (update %s, password \"%s\")", S(nm),S(dt),S(pw)); if (localoptions & NOFREQS) { loginf("File requests forbidden"); #ifndef NOFREQREPORT add_report("ER: \"%s\" denied: file requests forbidden", nm); #endif return NULL; } if (dt) { if (*dt == '+') { newer=1; dt++; } else if (*dt == '-') { newer=0; dt++; } else newer=1; upd=atoul(dt); } if (magic && !strchr(nm,'/')) { tnm=xstrcpy(magic); tnm=xstrcat(tnm,"/"); tnm=xstrcat(tnm,nm); if ((stat(tnm,&st) == 0) && (S_ISREG(st.st_mode))) { if (access(tnm,X_OK) == 0) { loginf("Execute request"); return respmagic(tnm); /* respmagic will free(tnm) */ } else if (access(tnm,R_OK) == 0) { loginf("Reference request"); return resplist(tnm); /* resplist will free(tnm) */ } else free(tnm); } else free(tnm); } if (pubdir == NULL) { #ifndef NOFREQREPORT add_report("ER: \"%s\" failed: no requestable files available", nm); #endif return NULL; } #ifndef NOFREQREPORT add_report("RQ: Regular file \"%s\"",nm); #endif tdir=xstrcpy(pubdir); if ((p=strrchr(nm,'/'))) { *p++='\0'; tdir=xstrcat(tdir,"/"); tdir=xstrcat(tdir,nm); if ((strstr(tdir,"/../")) || (strstr(tdir+strlen(tdir)-3,"/.."))) { #ifndef NOFREQREPORT add_report("WN: attempt to leave restricted directory"); #endif loginf("attempt to leave restricted directory: \"%s\"",tdir); free(tdir); tdir=xstrcpy(pubdir); tdir=xstrcat(tdir,"/"); } } else { p=nm; if ((reqlist=fopen(reqmap, "r"))) { /* MapRequests */ q=mask; *q++='^'; while ((*p) && (q < (mask+sizeof(mask)-4))) { switch (*p) { case '\\': *q++='\\'; *q++='\\'; break; case '?': *q++='.'; break; case '.': *q++='\\'; *q++='.'; break; case '+': *q++='\\'; *q++='+'; break; case '*': *q++='.'; *q++='*'; break; /* default: *q++=tolower(*p); break; */ default: *q++=*p; break; } p++; } *q='\0'; for (pass=0;(pass < 2) && (fullname == NULL);pass++) { if (pass > 0) { for (p=mask;*p;p++) *p=tolower(*p); rewind(reqlist); } re_comp (mask); while (fgets(mapline,1024,reqlist)) { if (pass > 0) { p=q=mapline; if ((q=strchr(p,' ')) || (q=strchr(p,'\t'))) *q='\0'; while (*p) *p++=tolower(*p); if (q) *q=' '; } if (re_exec(mapline)) { fullname=mapline; while ((fullname upd)) || ((!newer) && (st.st_mtime <= upd)))) { #ifndef NOFREQREPORT report_total+=st.st_size; add_report("OK: Sending \"%s\" as \"%s\" (%lu bytes)", fullname,mapline,(unsigned long)st.st_size); #endif add_list(&fl,tnm,mapline,0,0L,NULL,1); } else { #ifndef NOFREQREPORT add_report("ER: Not sending \"%s\" as \"%s\" (could not access or does not meet update condition)", fullname,mapline); #endif } free(tnm); } /* if (fullname 0) { for (p=mask;*p;p++) *p=tolower(*p); rewinddir(dp); } debug(12,"try search mask: \"%s\"",mask); re_comp(mask); while ((de=readdir(dp))) if (re_exec(de->d_name)) { debug(12,"matching file \"%s\"",de->d_name); tnm=xstrcpy(tdir); tnm=xstrcat(tnm,"/"); tnm=xstrcat(tnm,de->d_name); if ((stat(tnm,&st) == 0) && (S_ISREG(st.st_mode)) && (access(tnm,R_OK) == 0) && ((upd == 0L) || ((newer) && (st.st_mtime > upd)) || ((!newer) && (st.st_mtime <= upd)))) { #ifndef NOFREQREPORT report_total+=st.st_size; add_report("OK: Sending \"%s\" (%lu bytes)", de->d_name,(unsigned long)st.st_size); #endif add_list(&fl,tnm,de->d_name,0,0L,NULL,1); } else { #ifndef NOFREQREPORT add_report("ER: Not sending \"%s\" (could not access or does not meet update condition)", de->d_name); #endif } free(tnm); } } if (fl == NULL) { #ifndef NOFREQREPORT add_report("ER: No matching files found."); #endif } free(tdir); closedir(dp); return fl; } #define MAXRECURSE 5 static int recurse=0; file_list *resplist(listfn) /* must free(listfn) before exit */ char *listfn; { FILE *fp; char buf[256],*p; file_list *fl=NULL,**pfl; if (++recurse > MAXRECURSE) { logerr("Excessive recursion in file lists for \"%s\"", S(listfn)); #ifndef NOFREQREPORT add_report("ER: Exessive recursion for reference \"%s\", contact sysop", listfn); #endif recurse=0; free(listfn); return NULL; } pfl=&fl; if ((fp=fopen(listfn,"r")) == NULL) { logerr("$cannot open file list \"%s\"",listfn); #ifndef NOFREQREPORT add_report("ER: Could not open reference file \"%s\", contact sysop", listfn); #endif free(listfn); recurse--; return NULL; } #ifndef NOFREQREPORT add_report("RQ: Expanding reference \"%s\"",listfn); #endif while(fgets(buf,sizeof(buf)-1,fp)) { if ((p=strchr(buf,'#'))) *p='\0'; if ((p=strtok(buf," \t\n\r"))) { *pfl=respfreq(p,NULL,NULL); while (*pfl) pfl=&((*pfl)->next); } } fclose(fp); free(listfn); recurse--; return fl; } file_list *respmagic(cmd) /* must free(cmd) before exit */ char *cmd; { struct stat st; char cmdbuf[256]; char tmpfn[L_tmpnam]; char remname[32],*p,*q,*z; int escaped; file_list *fl=NULL; debug(12,"respond to \"magic\" file request \"%s\"",S(cmd)); #ifndef NOFREQREPORT add_report("RQ: Magic \"%s\"",cmd); #endif (void)tmpnam(tmpfn); if ((p=strrchr(cmd,'/'))) p++; else p=cmd; strncpy(remname,p,sizeof(remname)-1); remname[sizeof(remname)-1]='\0'; if (remote->addr->name == NULL) remote->addr->name=xstrcpy("Sysop"); strncpy(cmdbuf,cmd,sizeof(cmdbuf)-2); cmdbuf[sizeof(cmdbuf)-2]='\0'; q=cmdbuf+strlen(cmdbuf); z=cmdbuf+sizeof(cmdbuf)-2; *q++=' '; escaped=0; for (p=ascfnode(remote->addr,0x7f); *p && (q < z); p++) { if (escaped) { escaped=0; } else switch (*p) { case '\\': escaped=1; break; case '\'': case '`': case '"': case '(': case ')': case '<': case '>': case '|': case ';': case '$': *q++='\\'; break; } *q++=*p; } *q++='\0'; if (execsh(cmdbuf,"/dev/null",tmpfn,logname)) { logerr("error executing magic file request"); #ifndef NOFREQREPORT add_report("ER: Magic command execution failed"); #endif unlink(tmpfn); } else { if (stat(tmpfn,&st) == 0) { add_list(&fl,tmpfn,remname,KFS,0L,NULL,1); #ifndef NOFREQREPORT report_total+=st.st_size; add_report("OK: Sending magic output (%lu bytes)", (unsigned long)st.st_size); #endif debug(12,"magic resp list: \"%s\" -> \"%s\"", S(fl->local),S(fl->remote)); } else { logerr("$cannot stat() magic stdout \"%s\"",tmpfn); #ifndef NOFREQREPORT add_report("ER: Could not get magic command output, contact sysop"); #endif } } free(cmd); return fl; } #ifndef NOFREQREPORT static void attach_report(fl) file_list **fl; { FILE *fp; char tmpfn[L_tmpnam]; char remname[14]; long zeroes=0L; ftnmsg fmsg; char *svname; if (report_text == NULL) { logerr("Empty FREQ report"); add_report("ER: empty request report, contact sysop"); } add_report("\r\n\ Total to send: %lu bytes\r\n\r\n\ --- ifcico v.%s\r\n\ ",report_total,version); debug(12,"\nFREQ report is:\n====\n%s\n====",report_text); (void)tmpnam(tmpfn); if ((fp=fopen(tmpfn,"w"))) { fmsg.flags=FLG_PVT|FLG_K_S; fmsg.from=bestaka_s(remote->addr); svname=fmsg.from->name; fmsg.from->name="ifcico FREQ processor"; debug(12,"from: %s",ascfnode(fmsg.from,0x7f)); fmsg.to=remote->addr; debug(12,"to: %s",ascfnode(fmsg.to,0x7f)); fmsg.date=time((time_t*)NULL); fmsg.subj="File request status report"; fmsg.msgid_s=NULL; fmsg.msgid_a=NULL; fmsg.reply_s=NULL; fmsg.reply_a=NULL; fmsg.origin=NULL; fmsg.area=NULL; (void)ftnmsghdr(&fmsg,fp,NULL,'f'); fwrite(report_text,1,strlen(report_text),fp); fwrite(&zeroes,1,3,fp); fclose(fp); sprintf(remname,"%08lX.PKT",(unsigned long)sequencer()); add_list(fl,tmpfn,remname,KFS,0L,NULL,0); fmsg.from->name=svname; } else { logerr("$cannot open temp file \"%s\"",S(tmpfn)); } report_total=0L; free(report_text); report_text=NULL; } static void add_report(va_alist) va_dcl { va_list args; char *fmt; char buf[1024]; va_start(args); fmt=va_arg(args,char*); if (report_text == NULL) { sprintf(buf, " Status of file request\r\n\ ======================\r\n\r\n\ Received By: %s\r\n\ ", ascfnode(bestaka_s(remote->addr),0x1f)); sprintf(buf+strlen(buf), " From: %s\r\n\ On: %s\r\n\r\n\ ", ascfnode(remote->addr,0x1f), date(0L)); report_text=xstrcat(report_text,buf); } vsprintf(buf,fmt,args); strcat(buf,"\r\n"); report_text=xstrcat(report_text,buf); } #endif ifmail-2.14tx8.10.orig/ifcico/rdoptions.c100644 1751 50 2741 6050161175 15574 0ustar mdsrc#include #include #include "session.h" #include "xutil.h" #include "lutil.h" #include "nodelist.h" #include "config.h" #include "needed.h" extern char *get_modem_string(modem_string*,node*); extern char *next_modem_string(node*); int localoptions; static struct _ktab { char *key; int flag; } ktab[] = { {"Call",NOCALL}, {"Hold",NOHOLD}, {"PUA",NOPUA}, {"WaZOO",NOWAZOO}, {"EMSI",NOEMSI}, {"Freqs",NOFREQS}, {"Zmodem",NOZMODEM}, {"ZedZap",NOZEDZAP}, {"Janus",NOJANUS}, {"Hydra",NOHYDRA}, {"Tcp",NOTCP}, {NULL,0} }; void rdoptions(node*); void rdoptions(nlent) node *nlent; { char *str,*s,*p; int i; int match; localoptions=0; for (str=get_modem_string(options,nlent);str; str=next_modem_string(nlent)) { s=xstrcpy(str); debug(10,"applicable option string: \"%s\"",S(s)); for (p=strtok(s," \t,");p;p=strtok(NULL," \t,")) { match=0; for (i=0;ktab[i].key;i++) { if (strcasecmp(ktab[i].key,p) == 0) { localoptions &= ~(ktab[i].flag); match=1; } else if ((strncasecmp("No",p,2) == 0) && (strcasecmp(ktab[i].key,p+2) == 0)) { localoptions |= ktab[i].flag; match=1; } } if (!match) logerr("illegal option \"%s\" ignored",p); } free(s); debug(10,"new options value: 0x%04x",localoptions); } s=NULL; for (i=0;ktab[i].key;i++) { s=xstrcat(s," "); if (localoptions & ktab[i].flag) s=xstrcat(s,"No"); s=xstrcat(s,ktab[i].key); } loginf("options:%s",s); free(s); } ifmail-2.14tx8.10.orig/ifcico/emsidat.c100644 0 0 27013 6701151722 15654 0ustar rootroot#include #include #include #include #include #include "ftn.h" #include "xutil.h" #include "lutil.h" #include "emsi.h" #include "session.h" #include "config.h" #include "version.h" #include "falists.h" extern time_t mtime2sl(time_t); extern time_t sl2mtime(time_t); extern char *gmtoffset(time_t); extern int nodelock(faddr*); char *emsiencode(s) char *s; { char Base16Code[]="0123456789ABCDEF"; static char *buf; char *p, *q; if (buf) free(buf); if ((buf = malloc(2 * strlen(s) + 1 * sizeof(char))) == NULL) { loginf("emsiencode:out of memory:string too long:\"%s\"", s); return s; } for (p = s, q = buf; *p != '\0';) { switch (*p) { case '\\': *q++ = '\\'; *q++ = *p++; break; case '[': case ']': case '{': case '}': *q++ = '\\'; *q++ = Base16Code[(*p >> 4) & 0x0f]; *q++ = Base16Code[*p & 0x0f]; p++; break; default: *q++ = *p++; break; } } *q = '\0'; return buf; } char *mkemsidat(caller) int caller; { time_t tt; char cbuf[16]; char *p; fa_list *tmp; faddr *primary; p=xstrcpy("EMSI_DAT0000{EMSI}{"); primary=bestaka_s(remote->addr); p=xstrcat(p,ascfnode(primary,0x1f)); for (tmp=whoami;tmp;tmp=tmp->next) if (tmp->addr != primary) { p=xstrcat(p," "); p=xstrcat(p,ascfnode(tmp->addr,0x1f)); } p=xstrcat(p,"}{"); if (emsi_local_password) p=xstrcat(p,emsi_local_password); else if (remote) for (tmp=pwlist;tmp;tmp=tmp->next) if (metric(remote->addr,tmp->addr) == 0) { p=xstrcat(p,tmp->addr->name); break; } if (emsi_local_opts & OPT_EII) { p = xstrcat(p, "}{"); if (emsi_local_lcodes & LCODE_FNC) p = xstrcat(p, "FNC,"); if (emsi_local_lcodes & LCODE_RMA) p = xstrcat(p, "RMA,"); if (emsi_local_lcodes & LCODE_RH1) p = xstrcat(p, "RH1,"); if (emsi_local_lcodes & LCODE_PUA) p=xstrcat(p,"PUA,"); else if (emsi_local_lcodes & LCODE_PUP) p=xstrcat(p,"PUP,"); else if (emsi_local_lcodes & LCODE_NPU) p=xstrcat(p,"NPU,"); if (emsi_local_lcodes & LCODE_HAT) p=xstrcat(p,"HAT,"); if (emsi_local_lcodes & LCODE_HXT) p=xstrcat(p,"HXT,"); if (emsi_local_lcodes & LCODE_HRQ) p=xstrcat(p,"HRQ,"); if (*(p+strlen(p)-1) == ',') *(p+strlen(p)-1) = '}'; else p=xstrcat(p,"}"); } else { p=xstrcat(p,"}{8N1"); if (emsi_local_lcodes & LCODE_RH1) p = xstrcat(p, ",RH1"); if (caller) { if (emsi_local_lcodes & LCODE_PUA) p=xstrcat(p,",PUA"); else if (emsi_local_lcodes & LCODE_PUP) p=xstrcat(p,",PUP"); else if (emsi_local_lcodes & LCODE_NPU) p=xstrcat(p,",NPU"); } else { if (emsi_local_lcodes & LCODE_HAT) p=xstrcat(p,",HAT"); if (emsi_local_lcodes & LCODE_HXT) p=xstrcat(p,",HXT"); if (emsi_local_lcodes & LCODE_HRQ) p=xstrcat(p,",HRQ"); } p=xstrcat(p,"}"); } p=xstrcat(p,"{"); if (emsi_local_protos & PROT_TCP) p=xstrcat(p,"TCP,"); if (emsi_local_protos & PROT_HYD) p=xstrcat(p,"HYD,"); if (emsi_local_protos & PROT_JAN) p=xstrcat(p,"JAN,"); if (emsi_local_protos & PROT_ZAP) p=xstrcat(p,"ZAP,"); if (emsi_local_protos & PROT_ZMO) p=xstrcat(p,"ZMO,"); if (emsi_local_protos & PROT_DZA) p=xstrcat(p,"DZA,"); if (emsi_local_protos & PROT_KER) p=xstrcat(p,"KER,"); if (emsi_local_protos == 0) p=xstrcat(p,"NCP,"); if (emsi_local_opts & OPT_NRQ) p=xstrcat(p,"NRQ,"); if (emsi_local_opts & OPT_ARC) p=xstrcat(p,"ARC,"); if (emsi_local_opts & OPT_XMA) p=xstrcat(p,"XMA,"); if (emsi_local_opts & OPT_FNC) p=xstrcat(p,"FNC,"); if (emsi_local_opts & OPT_CHT) p=xstrcat(p,"CHT,"); if (emsi_local_opts & OPT_SLK) p=xstrcat(p,"SLK,"); if (emsi_local_opts & OPT_EII) p=xstrcat(p,"EII,"); if (emsi_local_opts & OPT_DFB) p=xstrcat(p,"DFB,"); if (emsi_local_opts & OPT_FRQ) p=xstrcat(p,"FRQ,"); if (*(p+strlen(p)-1) == ',') *(p+strlen(p)-1) = '}'; else p=xstrcat(p,"}"); sprintf(cbuf,"{%X}",PRODCODE); p=xstrcat(p,cbuf); p=xstrcat(p,"{ifcico}{"); p=xstrcat(p,version); p=xstrcat(p,"}{"); p=xstrcat(p,reldate); p=xstrcat(p,"}{TRX#}{["); (void)time(&tt); sprintf(cbuf,"%08lX",mtime2sl(tt)); p=xstrcat(p,cbuf); p=xstrcat(p,"]}{TZUTC}{["); p=xstrcat(p,gmtoffset(tt)); p=xstrcat(p,"]}{IDENT}{["); p=xstrcat(p,name?emsiencode(name):"Unknown"); p=xstrcat(p,"]["); p=xstrcat(p,location?emsiencode(location):"Unknown"); p=xstrcat(p,"]["); p=xstrcat(p,sysop?emsiencode(sysop):"Unknown"); p=xstrcat(p,"]["); p=xstrcat(p,phone?emsiencode(phone):"-Unpublished-"); p=xstrcat(p,"]["); if (speed) sprintf(cbuf,"%ld",speed); else strcpy(cbuf,"9600"); p=xstrcat(p,cbuf); p=xstrcat(p,"]["); p=xstrcat(p,flags?emsiencode(flags):""); p=xstrcat(p,"]}"); sprintf(cbuf,"%04X",strlen(p+12)); memcpy(p+8,cbuf,4); debug(10,"prepared: \"%s\"",p); return p; } char *sel_brace(char*); char *sel_brace(s) char *s; { static char *save; char *p,*q; int i; if (s == NULL) s=save; for (;*s && (*s != '{');s++); if (*s == '\0') { save=s; return NULL; } else s++; for (p=s,q=s;*p;p++) switch (*p) { case '}': if (*(p+1) == '}') *q++=*p++; else { *q='\0'; save=p+1; goto exit; } break; case '\\': if (*(p+1) == '\\') { *q++=*p++; *q++=*p; } else { sscanf(p+1,"%02x",&i); if ((i == '\\') || (i == ']')) *q++=i; *q++=i; p+=2; } break; default: *q++=*p; break; } exit: return s; } char *sel_bracket(char*); char *sel_bracket(s) char *s; { static char *save; char *p,*q; int i; if (s == NULL) s=save; for (;*s && (*s != '[');s++); if (*s == '\0') { save=s; return NULL; } else s++; for (p=s,q=s;*p;p++) switch (*p) { case ']': if (*(p+1) == ']') *q++=*p++; else { *q='\0'; save=p+1; goto exit; } break; case '\\': if (*(p+1) == '\\') *q++=*p++; else { sscanf(p+1,"%02x",&i); *q++=i; p+=2; } break; default: *q++=*p; break; } exit: return s; } int scanemsidat(buf) char *buf; { char *p,*q; fa_list **tmp,*tmpa; faddr *fa; char *mailer_prod,*mailer_name,*mailer_version,*mailer_serial; debug(10,"got data packet: \"%s\"",buf); p=sel_brace(buf); if (strcasecmp(p,"EMSI") != 0) { loginf("This can never occur. Got \"%s\" instead of \"EMSI\"",p); return 1; } p=sel_brace(NULL); /* tidy_falist(&remote); remote=NULL; tmp=&remote; hmm, I've been reported that this may cause trouble. If we are calling to a node that does not send its nodelist address in the emsi packet, packets to this address will never be delivered. So, we need to take care of the address *we* know, add any addresses sent to us in emsi_dat and remove duplicates. The latter is useful anyway... */ for (tmp=&remote;*tmp;tmp=&((*tmp)->next)) /*nothing*/ ; /* yes, feels better... tmp points on the NULL pointer at the end */ for (q=strtok(p," ");q;q=strtok(NULL," ")) if ((fa=parsefnode(q))) { *tmp=(fa_list*)xmalloc(sizeof(fa_list)); (*tmp)->next=NULL; (*tmp)->addr=fa; tmp=&((*tmp)->next); } /* and now, have to eliminate duplicates */ sort_list(&remote); uniq_list(&remote); /* well, should be OK now. See what happens... */ for (tmpa=remote;tmpa;tmpa=tmpa->next) { loginf("remote address: %s",ascfnode(tmpa->addr,0x1f)); (void)nodelock(tmpa->addr); } if (emsi_remote_password) free(emsi_remote_password); emsi_remote_password=xstrcpy(sel_brace(NULL)); #ifdef SUPPRESS_PASSWORD_LOGGING loginf("remote password: %s", emsi_remote_password?"*SUPPRESSED*":"(none)"); #else loginf("remote password: %s", emsi_remote_password?emsi_remote_password:"(none)"); #endif p=sel_brace(NULL); for (q=strtok(p,",");q;q=strtok(NULL,",")) { if (((q[0] >= '5') && (q[0] <= '8')) && ((toupper(q[1]) == 'N') || (toupper(q[1]) == 'O') || (toupper(q[1]) == 'E') || (toupper(q[1]) == 'S') || (toupper(q[1]) == 'M')) && ((q[2] == '1') || (q[2] == '2'))) { strncpy(emsi_remote_comm,q,3); } else if (strcasecmp(q,"PUA") == 0) emsi_remote_lcodes |= LCODE_PUA; else if (strcasecmp(q,"PUP") == 0) emsi_remote_lcodes |= LCODE_PUP; else if (strcasecmp(q,"NPU") == 0) emsi_remote_lcodes |= LCODE_NPU; else if (strcasecmp(q,"HAT") == 0) emsi_remote_lcodes |= LCODE_HAT; else if (strcasecmp(q,"HXT") == 0) emsi_remote_lcodes |= LCODE_HXT; else if (strcasecmp(q,"HRQ") == 0) emsi_remote_lcodes |= LCODE_HRQ; else if (strcasecmp(q,"FNC") == 0) emsi_remote_lcodes |= LCODE_FNC; else if (strcasecmp(q,"RMA") == 0) emsi_remote_lcodes |= LCODE_RMA; else if (strcasecmp(q,"RH1") == 0) emsi_remote_lcodes |= LCODE_RH1; else loginf("unrecognized EMSI link code: \"%s\"",q); } p=sel_brace(NULL); for (q=strtok(p,",");q;q=strtok(NULL,",")) { if (strcasecmp(q,"DZA") == 0) emsi_remote_protos |= PROT_DZA; else if (strcasecmp(q,"ZAP") == 0) emsi_remote_protos |= PROT_ZAP; else if (strcasecmp(q,"ZMO") == 0) emsi_remote_protos |= PROT_ZMO; else if (strcasecmp(q,"JAN") == 0) emsi_remote_protos |= PROT_JAN; else if (strcasecmp(q,"HYD") == 0) emsi_remote_protos |= PROT_HYD; else if (strcasecmp(q,"KER") == 0) emsi_remote_protos |= PROT_KER; else if (strcasecmp(q,"TCP") == 0) emsi_remote_protos |= PROT_TCP; else if (strcasecmp(q,"NCP") == 0) emsi_remote_protos = 0; else if (strcasecmp(q,"NRQ") == 0) emsi_remote_opts |= OPT_NRQ; else if (strcasecmp(q,"ARC") == 0) emsi_remote_opts |= OPT_ARC; else if (strcasecmp(q,"XMA") == 0) emsi_remote_opts |= OPT_XMA; else if (strcasecmp(q,"FNC") == 0) emsi_remote_opts |= OPT_FNC; else if (strcasecmp(q,"CHT") == 0) emsi_remote_opts |= OPT_CHT; else if (strcasecmp(q,"SLK") == 0) emsi_remote_opts |= OPT_SLK; else if (strcasecmp(q,"EII") == 0) emsi_remote_opts |= OPT_EII; else if (strcasecmp(q,"DFB") == 0) emsi_remote_opts |= OPT_DFB; else if (strcasecmp(q,"FRQ") == 0) emsi_remote_opts |= OPT_FRQ; else if (strcasecmp(q,"BBS") == 0) loginf ("remote has BBS activity now"); else loginf("unrecognized EMSI proto/option code: \"%s\"",q); } if ((emsi_remote_opts & OPT_FNC) == 0) remote_flags &= ~SESSION_FNC; mailer_prod=sel_brace(NULL); mailer_name=sel_brace(NULL); mailer_version=sel_brace(NULL); mailer_serial=sel_brace(NULL); loginf("remote uses: %s [%s] version %s/%s", mailer_name,mailer_prod,mailer_version,mailer_serial); while ((p=sel_brace(NULL))) if (strcasecmp(p,"IDENT") == 0) { p=sel_brace(NULL); loginf("remote system: %s",sel_bracket(p)); loginf("remote location: %s",sel_bracket(NULL)); loginf("remote operator: %s",(p=sel_bracket(NULL))); if (remote && remote->addr) remote->addr->name=xstrcpy(p); loginf("remote phone: %s",sel_bracket(NULL)); loginf("remote baud: %s",sel_bracket(NULL)); loginf("remote flags: %s",sel_bracket(NULL)); } else if (strcasecmp(p,"TZUTC") == 0) { p=sel_brace(NULL); p=sel_bracket(p); if ((strlen(p) == 4) || (strlen(p) == 5)) { loginf("remote timezone: %s",p); } else loginf("remote TZUTC: %s",p); } else if (strcasecmp(p,"TRX#") == 0) { time_t tt; char ctt[32]; p=sel_brace(NULL); p=sel_bracket(p); if (sscanf(p,"%08lx",&tt) == 1) { strcpy(ctt,date(sl2mtime(tt))); loginf("remote time: %s",ctt); } else loginf("remote TRX#: %s",p); } else if (strcasecmp(p, "TRAF") == 0) { u_long tt, tt1; p=sel_brace(NULL); if (sscanf(p, "%08lx %08lx", &tt, &tt1) == 2) { loginf("remote netmail: %u byte(s)", tt); loginf("remote echomail: %u byte(s)", tt1); } else loginf("remote TRAF: %s", p); } else if (strcasecmp(p, "MOH#") == 0) { u_long tt; p=sel_brace(NULL); p=sel_bracket(p); if (sscanf(p, "%08lx", &tt) == 1) loginf("remote files: %u byte(s)", tt); else loginf("remote MOH#: %s",p); } else { q=sel_brace(NULL); loginf("remote tag: \"%s\" value: \"%s\"",p,q); } return 0; } ifmail-2.14tx8.10.orig/ifcico/wazoo.c100644 0 0 4017 6701151722 15344 0ustar rootroot#include #include #include #include "lutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" #include "config.h" #include "emsi.h" extern int made_request; extern int zmsndfiles(file_list*); extern int zmrcvfiles(void); extern file_list *respond_wazoo(char*); extern int rxwazoo(void); extern int rxwazoo(void) { int rc=0; fa_list *eff_remote,tmpl; file_list *tosend=NULL,**tmpfl; debug(10,"start rxwazoo transfer"); if (emsi_remote_lcodes & LCODE_NPU) { loginf("remote requested \"no pickup\", no send"); eff_remote=NULL; } else if (emsi_remote_lcodes & LCODE_PUP) { loginf("remote requested \"pickup primary\""); tmpl.addr=remote->addr; tmpl.next=NULL; eff_remote=&tmpl; } else eff_remote=remote; tosend=create_filelist(eff_remote,ALL_MAIL,0); if ((rc=zmrcvfiles()) == 0) { if ((emsi_local_opts & OPT_NRQ) == 0) { for (tmpfl=&tosend;*tmpfl;tmpfl=&((*tmpfl)->next)); *tmpfl=respond_wazoo(NULL); } if ((tosend != NULL) || ((emsi_remote_lcodes & LCODE_NPU) == 0)) rc=zmsndfiles(tosend); if ((rc == 0) && (made_request)) { loginf("freq was made, trying to receive files"); rc=zmrcvfiles(); } } tidy_filelist(tosend,(rc == 0)); debug(10,"rxwazoo transfer rc=%d",rc); return rc; } extern int txwazoo(void); extern int txwazoo(void) { int rc=0; file_list *tosend=NULL,*respond=NULL; char *nonhold_mail; debug(10,"start txwazoo transfer"); if (localoptions & NOHOLD) nonhold_mail=ALL_MAIL; else nonhold_mail=NONHOLD_MAIL; if (emsi_remote_lcodes & LCODE_HAT) { loginf("remote asked to \"hold all traffic\", no send"); tosend=NULL; } else tosend=create_filelist(remote,nonhold_mail,0); if ((tosend != NULL) || ((emsi_remote_lcodes & LCODE_NPU) == 0)) rc=zmsndfiles(tosend); if (rc == 0) if ((rc=zmrcvfiles()) == 0) if ((emsi_local_opts & OPT_NRQ) == 0) if ((respond=respond_wazoo(NULL))) rc=zmsndfiles(respond); tidy_filelist(tosend,(rc == 0)); tidy_filelist(respond,0); debug(10,"end txwazoo transfer"); return rc; } ifmail-2.14tx8.10.orig/ifcico/janus.c100644 0 0 4643 6701151722 15332 0ustar rootroot#include #include #include #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "session.h" #include "config.h" #include "emsi.h" #include "janus.h" #define JBLKSIZE 2048 #define RECV_TIMEOUT 10 #define DEAD_TIMEOUT 120 #define GOODNEEDED 65536 #define TX_CASE(x) \ break;\ case x:\ debug(15,"janus tx state %s (%d)",#x,x); #define RX_CASE(x) \ break;\ case x:\ debug(15,"janus rx state %s (%d)",#x,x); static void sendpkt(int,char*,int); #if 0 static char *txbuf=NULL,*rxbuf=NULL; #endif extern int janus(void); extern int janus(void) { #if 0 int cleartosend=1; int rxstate=JR_RCVFNAME; int txstate=JS_SENDFNAME; int tx_inhibit=0; off_t txpos=0L,lasttx,txlen=0L; off_t rxpos=0L; int txblkmax=JBLKSIZE; int rxblkmax=JBLKSIZE; int txblksize=JBLKSIZE; int rxblksize=JBLKSIZE; int blklen; long goodbytes=0L; char *txfname=NULL,*rxfname=NULL; FILE *txfile=NULL,*rxfile=NULL; debug(11,"start janus transfer"); if (txbuf == NULL) txbuf=xmalloc(JBLKSIZE*2+8); if (rxbuf == NULL) rxbuf=xmalloc(JBLKSIZE*2+8); debug(14,"entering janus state machine rx=%d, tx=%d", rxstate,txstate); do { /*--------------- Transmit ----------------*/ debug(15,"janus transmit stage"); if (cleartosend) switch (txstate) { default: logerr("Internal janus error: tx=%d",txstate); goto abrt; TX_CASE(JS_SENDBLK) lasttx=txpos; txbuf[0]=(txpos >> 0)&0xff; txbuf[1]=(txpos >> 8)&0xff; txbuf[2]=(txpos >> 16)&0xff; txbuf[3]=(txpos >> 24)&0xff; blklen=fread(txbuf+4,txblksize,1,txfile); if (blklen < 0) { logerr("$error reading file \"%s\"", S(txfname)); goto abrt; } sendpkt(JPKT_BLK,txbuf,blklen+4); if ((txpos >= txlen) || (blklen < txblksize)) { SETTIMER(1,RECV_TIMEOUT); txstate=JS_RCVEOFACK; } else { SETTIMER(0,DEAD_TIMEOUT); } if ((txblksize < txblkmax) && ((goodbytes += txlen) >= GOODNEEDED)) { txblksize <<= 1; goodbytes=0; } TX_CASE(JS_SENDFNAME) TX_CASE(JS_SENDFREQNAK) } /*--------------- I/O --------------------*/ /*--------------- Receive ----------------*/ debug(15,"janus receive stage"); } while (rxstate || txstate); abrt: debug(14,"exiting janus state machine rx=%d, tx=%d", rxstate,txstate); #endif return 0; } static void sendpkt(typ,buf,len) int typ; char *buf; int len; { debug(18,"sendpkt '%s' \"%s\" (%d)", printablec(typ),printable(buf,len),len); } ifmail-2.14tx8.10.orig/ifcico/hydra.c100644 0 0 110627 6701151722 15361 0ustar rootroot/* -*- C -*- * ifcico v3.0.cm - hydra protocol module * Copyright (C) 1996-98 Christof Meerwald. * * $RCSfile: hydra.c,v $ - $Author: cmeerw $ * $Revision: 1.10 $ - $Date: 1998/07/05 20:41:21 $ */ /* * The HYDRA protocol was designed by * Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT and * Joaquim H. Homrighausen * COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED */ #include #include #include #include #include #include #include #include #include #include "lutil.h" #include "xutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" #include "config.h" #include "emsi.h" #include "hydra.h" #define H_RXWINDOW 0L #define H_TXWINDOW 0L #define TIMERNO_BRAIN 0 #define TIMERNO_TX 1 #define TIMERNO_RX 2 extern time_t mtime2sl(time_t); extern time_t sl2mtime(time_t); extern int closefile(int); extern FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); extern unsigned short crc16ccitt(char *, int); extern unsigned long crc32ccitt(char *, int); extern file_list *respond_wazoo(char *); extern file_list *create_freqlist(fa_list *al); static int put_binbyte(char *outbuf, char c); static int put_hexbyte(char *outbuf, char c); static enum HyPktTypes hyrxpkt(char *rxbuf, int *rxlen, int tot); static void hytxpkt(enum HyPktTypes pkttype, char *txbuf, int txlen); static int put_flags(char *buf, unsigned long flags); static unsigned long get_flags(char *buf); static int resync(off_t off); static int hydra_batch(int role, file_list *to_send); int hydra(int role); static struct h_flags_struct { char *str; unsigned long val; } h_flags[] = { { "XON", HOPT_XONXOFF }, { "TLN", HOPT_TELENET }, { "CTL", HOPT_CTLCHRS }, { "HIC", HOPT_HIGHCTL }, { "HI8", HOPT_HIGHBIT }, { "BRK", HOPT_CANBRK }, { "ASC", HOPT_CANASC }, { "UUE", HOPT_CANUUE }, { "C32", HOPT_CRC32 }, { "DEV", HOPT_DEVICE }, { "FPT", HOPT_FPT }, { NULL , 0x0L } }; static int txoptions, rxoptions; extern char *version; static char *put_long(char *buffer, long val) { #if defined(__i386__) *(unsigned long *) buffer = (unsigned long) val; #else buffer[0] = (unsigned long) val & 0xff; buffer[1] = ((unsigned long) val >> 8) & 0xff; buffer[2] = ((unsigned long) val >> 16) & 0xff; buffer[3] = ((unsigned long) val >> 24) & 0xff; #endif return buffer; } static long get_long(char *buffer) { #if defined(__i386__) return *(long *) buffer; #else return ((unsigned long) ((unsigned char) buffer[0])) | ((unsigned long) ((unsigned char) buffer[1]) << 8) | ((unsigned long) ((unsigned char) buffer[2]) << 16) | ((unsigned long) ((unsigned char) buffer[3]) << 24); #endif } int put_binbyte(char *outbuf, char c) { static int lastc = -1; register int count = 0; register char n; n = c; if (txoptions & HOPT_HIGHCTL) { n &= 0x7f; } if ((n == H_DLE) || ((txoptions & HOPT_XONXOFF) && ((n == XON) || (n == XOFF))) || ((txoptions & HOPT_TELENET) && (n == '\r') && (lastc == '@')) || ((txoptions & HOPT_CTLCHRS) && ((n < 32) || (n == 127)))) { *outbuf++ = H_DLE; c ^= 0x40; count++; } *outbuf++ = c; lastc = n; return count + 1; } int put_hexbyte(char *outbuf, char c) { static const char hexdigit[] = "0123456789abcdef"; register int count = 0; if (c & 0x80) { *outbuf++ = '\\'; *outbuf++ = hexdigit[(c >> 4) & 0x0f]; *outbuf++ = hexdigit[c & 0x0f]; count = 3; } else if ((c < 32) || (c == 127)) { *outbuf++ = H_DLE; *outbuf++ = c ^ 0x40; count = 2; } else if (c == '\\') { *outbuf++ = '\\'; *outbuf++ = '\\'; count = 2; } else { *outbuf++ = c; count = 1; } return count; } /* TODO: code cleanup */ /* TODO: error handling */ enum HyPktTypes hyrxpkt(char *rxbuf, int *rxlen, int tot) { static char rxencbuf[H_BUFLEN]; static enum HyPktTypes pkttype = H_NOPKT; static char *inbuf = rxencbuf, *outbuf; int c, i, n; static int rxdle = 0; static enum HyPktFormats format; while ((c = GETCHAR(tot)) >= 0) { if (rxoptions & HOPT_HIGHBIT) { c &= 0x7f; } n = c; if (rxoptions & HOPT_HIGHCTL) { n &= 0x7f; } if ((n != H_DLE) && (((rxoptions & HOPT_XONXOFF) && ((n == XON) || (n == XOFF))) || ((rxoptions & HOPT_CTLCHRS) && ((n < 32) || (n == 127))))) continue; if ((rxdle) || (c == H_DLE)) { switch (c) { case H_DLE: rxdle++; if (rxdle >= 5) { inbuf = rxencbuf; return H_CANCEL; } break; case HCHR_PKTEND: switch (format) { case HCHR_BINPKT: *rxlen = inbuf - rxencbuf; memcpy(rxbuf, rxencbuf, *rxlen); break; case HCHR_HEXPKT: outbuf = rxencbuf; *rxlen = 0; while (outbuf < inbuf) { if ((*outbuf == '\\') && (*++outbuf != '\\')) { i = *outbuf++; n = *outbuf++; if ((i -= '0') > 9) i -= ('a' - ':'); if ((n -= '0') > 9) n -= ('a' - ':'); if ((i & ~0x0f) || (n & ~ 0x0f)) { assert(0); break; } rxbuf[*rxlen] = (i << 4) | n; *rxlen += 1; } else { rxbuf[*rxlen] = *outbuf++; *rxlen += 1; } } break; case HCHR_ASCPKT: case HCHR_UUEPKT: default: assert(0); } if ((format != HCHR_HEXPKT) && (rxoptions & HOPT_CRC32)) { n = h_crc32test(crc32ccitt(rxbuf, *rxlen)); *rxlen -= 4; /* remove CRC-32 */ } else { n = h_crc16test(crc16ccitt(rxbuf, *rxlen)); *rxlen -= 2; /* remove CRC-16 */ } *rxlen -= 1; /* remove packet type */ pkttype = rxbuf[*rxlen]; /* check if CRC test succeeded */ if (n) { inbuf = rxencbuf; debug(DBG_HYDRA, "HPKT received '%c'", pkttype); return pkttype; } else { /* debug(DBG_HYDRA, "CRC test failed"); */ loginf("Hydra: CRC test failed"); } break; case HCHR_BINPKT: case HCHR_HEXPKT: case HCHR_ASCPKT: case HCHR_UUEPKT: format = c; inbuf = rxencbuf; rxdle = 0; break; default: *inbuf++ = c ^ 0x40; rxdle = 0; break; } } else { *inbuf++ = c; } } debug(DBG_HYDRA, "GETCHAR returned %i", c); if ((c == ERROR) || (c == EOFILE) || (c == HANGUP)) { return H_CARRIER; } return H_NOPKT; } /* TODO: support packet prefix string */ void hytxpkt(enum HyPktTypes pkttype, char *txbuf, int txlen) { static char txencbuf[H_BUFLEN]; char *outbuf, *inbuf; enum HyPktFormats format; /* * some packets have to be transferred in HEX mode */ if ((pkttype == HPKT_START) || (pkttype == HPKT_INIT) || (pkttype == HPKT_INITACK) || (pkttype == HPKT_END) || (pkttype == HPKT_IDLE)) { format = HCHR_HEXPKT; } else { /* do we need to strip high bit */ if (txoptions & HOPT_HIGHBIT) { if ((txoptions & HOPT_CTLCHRS) && (txoptions & HOPT_CANUUE)) { format = HCHR_UUEPKT; /* use UUE packet encoding */ } else if (txoptions & HOPT_CANASC) { format = HCHR_ASCPKT; /* we can use ASCII packet encoding */ } else { format = HCHR_HEXPKT; /* fall back to hex packet encoding */ } } else { format = HCHR_BINPKT; /* we can use binary packet encoding */ } } /* * Append format byte to data */ txbuf[txlen] = pkttype; txlen++; /* * check if we can use 32-bit CRC's */ if ((format != HCHR_HEXPKT) && (txoptions & HOPT_CRC32)) { unsigned long crc; /* * Calc CRC-32 of data + pkttype */ crc = ~crc32ccitt(txbuf, txlen); /* * Append one's complement of CRC to data, lowbyte first */ txbuf[txlen++] = crc; txbuf[txlen++] = crc >> 8; txbuf[txlen++] = crc >> 16; txbuf[txlen++] = crc >> 24; } else { unsigned short crc; /* * Calc CRC-16 of data + pkttype */ crc = ~crc16ccitt(txbuf, txlen); /* * Append one's complement of CRC to data, lowbyte first */ txbuf[txlen++] = crc; txbuf[txlen++] = crc >> 8; } inbuf = txbuf; outbuf = txencbuf; *outbuf++ = H_DLE; *outbuf++ = format; /* encode packet data */ switch (format) { case HCHR_BINPKT: while (txlen > 0) { outbuf += put_binbyte(outbuf, *inbuf); inbuf++; txlen--; } break; case HCHR_HEXPKT: while (txlen > 0) { outbuf += put_hexbyte(outbuf, *inbuf); inbuf++; txlen--; } break; /* ASCII and UUE packets are not yet supported */ case HCHR_ASCPKT: case HCHR_UUEPKT: default: assert(0); } *outbuf++ = H_DLE; *outbuf++ = HCHR_PKTEND; if ((pkttype != HPKT_DATA) && (format != HCHR_BINPKT)) { *outbuf++ = '\r'; *outbuf++ = '\n'; } debug(DBG_HYDRA, "HPKT sent '%c'", pkttype); PUT(txencbuf, outbuf - txencbuf); return; } int put_flags(char *buf, unsigned long flags) { int i, count = 0; for (i = 0; h_flags[i].val; i++) { if (flags & h_flags[i].val) { if (count > 0) { *buf++ = ','; count++; } strcpy(buf, h_flags[i].str); buf += H_FLAGLEN; count += H_FLAGLEN; } } *buf = 0; return count; } unsigned long get_flags(char *buf) { unsigned long flags = 0L; char *p; int i; for (p = strtok(buf, ","); p != NULL; p = strtok(NULL, ",")) { for (i = 0; h_flags[i].val; i++) { if (!strcmp(p, h_flags[i].str)) { flags |= h_flags[i].val; break; } } } return flags; } int resync(off_t off) { return 0; } int hydra_batch(int role, file_list *to_send) { static char txbuf[H_BUFLEN], rxbuf[H_BUFLEN]; struct stat txstat; /* file stat being transmitted */ FILE *txfp = NULL; /* file currently being transmitted */ FILE *rxfp = NULL; /* file currently being received */ char *inbuf, *outbuf; int rxlen, txlen; /* length of receive/transmit buffer */ long txwindow, rxwindow; /* window sizes */ long txpos, rxpos; /* file positions */ long stxpos, srxpos; long longnum; int hdxlink = 0; int txretries, rxretries; int txlastack, txsyncid; int rxlastsync, rxsyncid; int rxlastdatalen; int blksize; int goodbytes; int goodneeded; enum HyTxStates txstate; enum HyRxStates rxstate; int txwaitpkt, rxwaitpkt; enum HyPktTypes pkttype; int waitputget = 0; time_t rxstarttime, rxendtime; time_t txstarttime, txendtime; RESETTIMERS(); txpos = rxpos = 0; stxpos = srxpos = 0; txretries = rxretries = 0; txlastack = txsyncid = 0; rxlastsync = rxsyncid = 0; rxlastdatalen = 0; blksize = 512; goodbytes = 0; goodneeded = 1024; SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); txstate = HTX_START; txoptions = HTXI_OPTIONS; rxstate = HRX_INIT; rxoptions = HRXI_OPTIONS; while ((txstate != HTX_DONE) && (txstate != HTX_Abort)) { /* * Is transmitter waiting for packet? */ txwaitpkt = ((txstate == HTX_SWAIT) || (txstate == HTX_INITACK) || ((txstate == HTX_RINIT) && (rxstate == HRX_INIT)) || (txstate == HTX_FINFOACK) || (txstate == HTX_DATA) || (txstate == HTX_DATAACK) || ((txstate == HTX_XWAIT) && (rxstate != HRX_DONE)) || (txstate == HTX_EOFACK) || (txstate == HTX_ENDACK) || (txstate == HTX_REND)); /* * Is receiver waiting for packet? */ rxwaitpkt = ((rxstate == HRX_INIT) || (rxstate == HRX_FINFO) || (rxstate == HRX_DATA) || (rxstate == HRX_DONE)); /* * Do we have to wait for a packet? */ if (txwaitpkt && rxwaitpkt) { /* * Don't wait for a packet if transmitter is in DATA state */ if ((txstate == HTX_DATA) || ((txstate == HTX_REND) && (rxstate == HRX_DONE))) { if (txstate == HTX_DATA) { waitputget = WAITPUTGET(-1); if (waitputget & 1) { pkttype = hyrxpkt(rxbuf, &rxlen, 0); } else { pkttype = H_NOPKT; } } else { pkttype = hyrxpkt(rxbuf, &rxlen, 0); } } else { pkttype = hyrxpkt(rxbuf, &rxlen, -1); } if ((pkttype == H_CARRIER) || (EXPIRED(TIMERNO_BRAIN))) { txstate = HTX_Abort; break; } } else { pkttype = H_NOPKT; } debug(DBG_HYDRA, "Packet type: %c", pkttype); /* * Special handling for RPOS packet */ if ((pkttype == HPKT_RPOS) && (rxlen == 12) && ((txstate == HTX_DATA) || (txstate == HTX_DATAACK) || (txstate == HTX_XWAIT) || (txstate == HTX_EOFACK))) { long rpos_pos = get_long(rxbuf); long rpos_blksize = get_long(rxbuf + 4); long rpos_id = get_long(rxbuf + 8); if (rpos_pos < 0) { /* * this differs from the protocol definition: txpos is used * instead of rxpos (I think it's wrong in the protocol * definition as in the example source also txpos is used) */ if ((rpos_pos == -2) && (txpos != -2) && (txstate == HTX_EOFACK)) { txpos = -2; txstate = HTX_EOF; } else { SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); txstate = HTX_SkipFile; } } if (rpos_id == txsyncid) { txretries++; if (txretries >= 10) { loginf("Hydra: too many errors"); txstate = HTX_Abort; break; } } else { if (rpos_pos >= 0) { txpos = rpos_pos; txsyncid = rpos_id; txretries = 1; blksize = rpos_blksize; goodbytes = 0; goodneeded += 1024; if (goodneeded > 8192) { goodneeded = 8192; } /* if we receive an RPOS packet in EOFACK-state we have to change back to DATA-state */ if (txstate == HTX_EOFACK) { txstate = HTX_DATA; } SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); } } pkttype = H_NOPKT; /* packet has already been processed */ } switch (txstate) { /* * initiate Hydra session */ case HTX_START: debug(DBG_HYDRA, "SM 'HTX' entering 'START'"); if (txretries < 10) { PUT("hydra\r", 6); /* send AutoStart string */ hytxpkt(HPKT_START, txbuf, 0); SETTIMER(TIMERNO_TX, H_START); txstate = HTX_SWAIT; } else { loginf("unable to initiate Hydra session"); txstate = HTX_Abort; break; } break; /* * wait for START packet */ case HTX_SWAIT: debug(DBG_HYDRA, "SM 'HTX' entering 'SWAIT'"); if (((pkttype == HPKT_START) && (rxlen == 0)) || (pkttype == HPKT_INIT)) { txretries = 0; RESETTIMER(TIMERNO_TX); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); txstate = HTX_INIT; pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra transmitter timeout (HTX_SWAIT)"); txretries++; txstate = HTX_START; } break; /* * send INIT packet */ case HTX_INIT: debug(DBG_HYDRA, "SM 'HTX' entering 'INIT'"); if (txretries < 10) { outbuf = txbuf; /* Application ID string */ outbuf += sprintf(outbuf, "%08lx%s,%s", H_REVSTAMP, "ifcico", version) + 1; /* Supported options */ outbuf += put_flags(outbuf, HCAN_OPTIONS) + 1; debug(DBG_HYDRA, "supported options: %08lx", HCAN_OPTIONS); /* Desired options */ outbuf += put_flags(outbuf, HDEF_OPTIONS & HCAN_OPTIONS & ~HUNN_OPTIONS) + 1; debug(DBG_HYDRA, "desired options: %08lx", HDEF_OPTIONS & HCAN_OPTIONS & ~HUNN_OPTIONS); /* Desired transmitter and receiver window size */ outbuf += sprintf(outbuf, "%08lx%08lx", H_TXWINDOW, H_RXWINDOW) + 1; /* Packet prefix string */ *outbuf++ = 0; hytxpkt(HPKT_INIT, txbuf, outbuf - txbuf); SETTIMER(TIMERNO_TX, H_MINTIMER/2); txstate = HTX_INITACK; } else { loginf("Hydra: too many errors waiting for INITACK"); txstate = HTX_Abort; break; } break; /* * wait for an INIT acknowledge packet */ case HTX_INITACK: debug(DBG_HYDRA, "SM 'HTX' entering 'INITACK'"); if ((pkttype == HPKT_INITACK) && (rxlen == 0)) { txretries = 0; RESETTIMER(TIMERNO_TX); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); txstate = HTX_RINIT; pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra: tx timeout"); txretries++; txstate = HTX_INIT; } break; /* * wait for receiver to leave INIT state */ case HTX_RINIT: debug(DBG_HYDRA, "SM 'HTX' entering 'RINIT'"); if (rxstate != HRX_INIT) { txstate = HTX_NextFile; } break; /* * prepare next file for transmitting */ case HTX_NextFile: debug(DBG_HYDRA, "SM 'HTX' entering 'NextFile'"); /* * skip file with NULL remote name */ while (to_send && (to_send->remote == NULL)) { execute_disposition(to_send); to_send = to_send->next; } if (to_send) { struct flock txflock; if (to_send->remote == NULL) break; txflock.l_type=F_RDLCK; txflock.l_whence=0; txflock.l_start=0L; txflock.l_len=0L; txfp = fopen(to_send->local, "r"); if (txfp == NULL) { logerr("$hydra_batch cannot open file %s, skipping", S(to_send->local)); to_send = to_send->next; break; } if (fcntl(fileno(txfp), F_SETLK, &txflock) != 0) { loginf("$hydra_batch cannot lock file %s, skipping", S(to_send->local)); fclose(txfp); to_send = to_send->next; break; } if (stat(to_send->local, &txstat) != 0) { loginf("$cannot access \"%s\", skipping",S(to_send->local)); fclose(txfp); to_send = to_send->next; break; } loginf("Hydra send \"%s\" as \"%s\" (%lu bytes) dated %s", S(to_send->local), S(to_send->remote), (unsigned long) txstat.st_size, date(txstat.st_mtime)); (void) time(&txstarttime); } txstate = HTX_ToFName; break; /* TODO: fallthrough */ case HTX_ToFName: debug(DBG_HYDRA, "SM 'HTX' entering 'ToFName'"); txsyncid = 0; txretries = 0; RESETTIMER(TIMERNO_TX); txstate = HTX_FINFO; break; /* TODO: fallthrough */ /* * transmit File Information packet */ case HTX_FINFO: debug(DBG_HYDRA, "SM 'HTX' entering 'FINFO'"); if (txretries >= 10) { txstate = HTX_Abort; break; } else { if (to_send) { txlen = sprintf(txbuf, "%08lx%08lx%08lx%08lx%08lx", mtime2sl(txstat.st_mtime), txstat.st_size, 0UL, 0UL, 0UL); /* * convert file name to DOS-format */ outbuf = xtodos(to_send->remote); strcpy(txbuf + txlen, outbuf); free(outbuf); for(; txbuf[txlen]; txlen++) { txbuf[txlen] = tolower(txbuf[txlen]); } txlen++; strcpy(txbuf + txlen, to_send->remote); txlen += strlen(to_send->remote) + 1; } else { txbuf[0] = 0; txlen = 1; } hytxpkt(HPKT_FINFO, txbuf, txlen); if (txretries > 0) { SETTIMER(TIMERNO_TX, H_MINTIMER/2); } else { SETTIMER(TIMERNO_TX, H_MINTIMER); } txstate = HTX_FINFOACK; } break; /* * get FINFOACK packet */ case HTX_FINFOACK: debug(DBG_HYDRA, "SM 'HTX' entering 'FINFOACK'"); if ((pkttype == HPKT_FINFOACK) && (rxlen == 4)) { txpos = get_long(rxbuf); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); if (to_send == NULL) { SETTIMER(TIMERNO_TX, H_MINTIMER); txstate = HTX_REND; } else if (txpos >= 0L) { stxpos = txpos; txretries = 0; txlastack = 0; RESETTIMER(TIMERNO_TX); txstate = HTX_DATA; } else if (txpos == -1) { fclose(txfp); execute_disposition(to_send); to_send = to_send->next; txstate = HTX_NextFile; } else if (txpos == -2) { loginf("Receiver requested to skip this file for now"); fclose(txfp); to_send = to_send->next; txstate = HTX_NextFile; } pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra transmitter timeout (HTX_FINFOACK)"); txretries++; txstate = HTX_FINFO; } break; case HTX_DATA: debug(DBG_HYDRA, "SM 'HTX' entering 'DATA'"); if ((rxstate != HRX_DONE) && (hdxlink)) { SETTIMER(TIMERNO_TX, H_MINTIMER); txstate = HTX_XWAIT; } else if ((pkttype == HPKT_DATAACK) && (rxlen == 4)) { longnum = get_long(rxbuf); debug(DBG_HYDRA, "received 'DATAACK' (0x%08lx)", longnum); if (longnum > txlastack) { txlastack = longnum; } pkttype = H_NOPKT; /* packet has already been processed */ } else if ((txwindow) && (txpos >= txlastack + txwindow)) { /* * We have to wait for an ACK before we can continue */ if (txretries > 0) { SETTIMER(TIMERNO_TX, H_MINTIMER/2); } else { SETTIMER(TIMERNO_TX, H_MINTIMER); } txstate = HTX_DATAACK; } else { /* * check if there is enough room in output */ if ((waitputget & 2) == 0) { break; } fseek(txfp, txpos, SEEK_SET); put_long(txbuf, txpos); debug(DBG_HYDRA, "send 'DATA' (0x%08lx)", txpos); txlen = fread(txbuf + 4, 1, blksize, txfp); if (txlen == 0) { if (ferror(txfp)) { logerr("$error reading from file"); txstate = HTX_SkipFile; } else { txstate = HTX_EOF; } } else { txpos += txlen; goodbytes += txlen; txlen += 4; hytxpkt(HPKT_DATA, txbuf, txlen); if (goodbytes > goodneeded) { blksize *= 2; if (blksize > H_MAXBLKLEN) { blksize = H_MAXBLKLEN; } } } } break; case HTX_SkipFile: debug(DBG_HYDRA, "SM 'HTX' entering 'SkipFile'"); /* * this differs from the protocol definition: -2 is used * instead of -1 (I think it's wrong in the protocol * definition as in the example source also -2 is used) */ txpos = -2; txretries = 0; txstate = HTX_EOF; break; case HTX_DATAACK: debug(DBG_HYDRA, "SM 'HTX' entering 'DATAACK'"); if ((pkttype == HPKT_DATAACK) && (rxlen == 4)) { longnum = get_long(rxbuf); if ((longnum > txlastack) && (txpos < longnum + txwindow)) { txlastack = longnum; txretries = 0; RESETTIMER(TIMERNO_TX); txstate = HTX_DATA; } pkttype = H_NOPKT; /* packet has already been processed */ } else if (txretries >= 10) { loginf("Hydra: too many errors"); txstate = HTX_Abort; } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra: tx timeout"); txretries++; txstate = HTX_DATA; } break; case HTX_XWAIT: debug(DBG_HYDRA, "SM 'HTX' entering 'XWAIT'"); if (rxstate == HRX_DONE) { RESETTIMER(TIMERNO_RX); txstate = HTX_DATA; } else if ((pkttype == HPKT_DATAACK) && (rxlen == 4)) { longnum = get_long(rxbuf); if (longnum > txlastack) { txlastack = longnum; } pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_IDLE) && (rxlen == 0)) { hdxlink = 0; RESETTIMER(TIMERNO_TX); txstate = HTX_DATA; pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { hytxpkt(HPKT_IDLE, txbuf, 0); SETTIMER(TIMERNO_TX, H_MINTIMER); } break; case HTX_EOF: debug(DBG_HYDRA, "SM 'HTX' entering 'EOF'"); if (txretries >= 10) { txstate = HTX_Abort; break; } else { put_long(txbuf, txpos); hytxpkt(HPKT_EOF, txbuf, 4); if (txretries > 0) { SETTIMER(TIMERNO_TX, H_MINTIMER/2); } else { SETTIMER(TIMERNO_TX, H_MINTIMER); } txstate = HTX_EOFACK; } break; case HTX_EOFACK: debug(DBG_HYDRA, "SM 'HTX' entering 'EOFACK'"); if ((pkttype == HPKT_EOFACK) && (rxlen == 0)) { SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); /* * calculate time needed and bytes transferred */ (void) time(&txendtime); txstarttime = txendtime - txstarttime; if (txstarttime <= 0L) { txstarttime = 1L; } /* close transmitter file */ fclose(txfp); if (txpos >= 0) { stxpos = txpos - stxpos; loginf("sent %lu bytes in %ld seconds (%ld cps)", stxpos, txstarttime, stxpos/txstarttime); execute_disposition(to_send); } else { loginf("transmitter skipped file after %ld seconds", txstarttime); } to_send = to_send->next; txstate = HTX_NextFile; pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_DATAACK) && (rxlen == 4)) { longnum = get_long(rxbuf); txlastack = longnum; pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra transmitter timeout (HTX_EOFACK)"); txretries++; txstate = HTX_EOF; } break; case HTX_REND: debug(DBG_HYDRA, "SM 'HTX' entering 'REND'"); if (rxstate == HRX_DONE) { txretries = 0; txstate = HTX_END; } else if (EXPIRED(TIMERNO_TX)) { hytxpkt(HPKT_IDLE, txbuf, 0); SETTIMER(TIMERNO_TX, H_MINTIMER/2); } break; case HTX_END: debug(DBG_HYDRA, "SM 'HTX' entering 'END'"); if (txretries >= 10) { txstate = HTX_Abort; break; } else { hytxpkt(HPKT_END, txbuf, 0); hytxpkt(HPKT_END, txbuf, 0); SETTIMER(TIMERNO_TX, H_MINTIMER/2); txstate = HTX_ENDACK; } break; case HTX_ENDACK: debug(DBG_HYDRA, "SM 'HTX' entering 'ENDACK'"); if ((pkttype == HPKT_END) && (rxlen == 0)) { hytxpkt(HPKT_END, txbuf, 0); hytxpkt(HPKT_END, txbuf, 0); hytxpkt(HPKT_END, txbuf, 0); txstate = HTX_DONE; pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_TX)) { loginf("Hydra transmitter timeout (HTX_ENDACK)"); txretries++; txstate = HTX_END; } break; case HTX_DONE: case HTX_Abort: /* nothing to do */ break; default: assert(0); } switch (rxstate) { case HRX_INIT: debug(DBG_HYDRA, "SM 'HRX' entering 'INIT'"); if (pkttype == HPKT_INIT) { /* TODO: some checking, error handling */ /* Skip application ID */ inbuf = rxbuf + strlen(rxbuf) + 1; inbuf += strlen(inbuf) + 1; rxoptions = (HDEF_OPTIONS & HCAN_OPTIONS) | HUNN_OPTIONS; /* * get supported options */ rxoptions |= get_flags(inbuf); inbuf += strlen(inbuf) + 1; /* * get desired options */ rxoptions &= get_flags(rxbuf + strlen(rxbuf) + 1); rxoptions &= HCAN_OPTIONS; /* * set options */ txoptions = rxoptions; put_flags(txbuf, rxoptions); debug(DBG_HYDRA, "HYDRA options: %s (%08lx)", txbuf, rxoptions); /* * get desired window sizes */ txwindow = rxwindow = 0; sscanf(inbuf, "%08lx%08lx", &rxwindow, &txwindow); if (rxwindow < 0) { rxwindow = 0; } if (H_RXWINDOW && ((rxwindow == 0) || (rxwindow > H_RXWINDOW))) { rxwindow = H_RXWINDOW; } if (txwindow < 0) { txwindow = 0; } if (H_TXWINDOW && ((txwindow == 0) || (txwindow > H_TXWINDOW))) { txwindow = H_TXWINDOW; } debug(DBG_HYDRA, "HYDRA: txwindow=%d, rxwindow=%d", txwindow, rxwindow); hytxpkt(HPKT_INITACK, txbuf, 0); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); rxstate = HRX_FINFO; pkttype = H_NOPKT; /* packet has already been processed */ } break; case HRX_FINFO: debug(DBG_HYDRA, "SM 'HRX' entering 'FINFO'"); if (pkttype == HPKT_FINFO) { /* * check if we have received an `End of batch' FINFO packet */ if ((rxlen == 1) && (rxbuf[0] == 0)) { put_long(txbuf, 0); hytxpkt(HPKT_FINFOACK, txbuf, 4); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); rxstate = HRX_DONE; } /* * check if FINFO packet is at least long enough to contain * file information */ else if ((rxlen > 41) && (rxbuf[rxlen - 1] == 0)) { time_t timestamp; long filesize; char dosname[8 + 1 + 3 + 1], *name; sscanf(rxbuf, "%08lx%08lx%*08x%*08x%*08x", ×tamp, &filesize); /* convert timestamp to UNIX time */ timestamp = sl2mtime(timestamp); /* * check if DOS conforming file name is max. 8+1+3 chars long */ if (strlen(rxbuf + 40) <= 12) { strcpy(dosname, rxbuf + 40); } else { strcpy(dosname, "BadWazoo"); } /* * check if real file name is specified */ if ((strlen(rxbuf + 40) + 41) < rxlen) { name = rxbuf + strlen(rxbuf + 40) + 41; /* * use DOS-filename if real- and DOS-name only differ in * case sensitivity */ if (strcasecmp(name, dosname) == 0) { name = dosname; } } else { name = dosname; } loginf("Hydra receive: \"%s\" (%ld bytes) dated %s", name, filesize, date(timestamp)); rxfp = openfile(name, timestamp, filesize, &rxpos, resync); (void) time(&rxstarttime); /* check for error opening file */ if (rxfp) { srxpos = rxpos; rxstate = HRX_ToData; } else { /* Skip this file for now if error opening file */ put_long(txbuf, -2); hytxpkt(HPKT_FINFOACK, txbuf, 4); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); } } pkttype = H_NOPKT; /* packet has already been processed */ } else if (pkttype == HPKT_INIT) { hytxpkt(HPKT_INITACK, txbuf, 0); pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_EOF) && (rxlen == 4)) { hytxpkt(HPKT_EOFACK, txbuf, 0); pkttype = H_NOPKT; /* packet has already been processed */ } break; case HRX_ToData: debug(DBG_HYDRA, "SM 'HRX' entering 'ToData'"); put_long(txbuf, rxpos); hytxpkt(HPKT_FINFOACK, txbuf, 4); rxsyncid = 0; rxlastsync = 0; rxretries = 0; RESETTIMER(TIMERNO_RX); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); rxstate = HRX_DATA; break; case HRX_DATA: debug(DBG_HYDRA, "SM 'HRX' entering 'DATA'"); if ((pkttype == HPKT_DATA) && (rxlen > 4)) { longnum = get_long(rxbuf); debug(DBG_HYDRA, "received 'DATA' (0x%08lx, 0x%08lx)", longnum, rxpos); if (longnum == rxpos) { if (fwrite(rxbuf + 4, 1, rxlen - 4, rxfp) != (rxlen - 4)) { logerr("$error writing to file"); rxpos = -2; } else { rxlastdatalen = rxlen - 4; rxpos += rxlen - 4; rxretries = 0; rxlastsync = rxpos; RESETTIMER(TIMERNO_RX); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); if (rxwindow) { put_long(txbuf, rxpos); hytxpkt(HPKT_DATAACK, txbuf, 4); } } } else { if (rxpos >= 0) { loginf("Hydra received bad rxpos"); } rxstate = HRX_BadPos; } pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_EOF) && (rxlen == 4)) { longnum = get_long(rxbuf); if (longnum == rxpos) { /* * calculate time and CPU usage needed */ (void) time(&rxendtime); if (rxpos >= 0) { rxfp = NULL; if (!closefile(1)) { srxpos = rxpos - srxpos; rxstarttime = rxendtime - rxstarttime; if (rxstarttime <= 0) { rxstarttime = 1L; } loginf("received %lu bytes in %ld seconds (%ld cps)", srxpos, rxstarttime, srxpos/rxstarttime); rxstate = HRX_OkEOF; } else /* error closing file */ { rxpos = -2; /* * Note: the following state change isn't 100 % * conformant with the Hydra protocol specification. */ rxstate = HRX_BadPos; } } else { loginf("receiver skipped file after %ld seconds", rxendtime - rxstarttime); if (rxfp) { closefile(0); rxfp = NULL; } rxstate = HRX_OkEOF; } } else if (longnum == -2) { if (rxfp) { closefile(0); rxfp = NULL; } rxstate = HRX_OkEOF; } else { if (longnum >= 0) { loginf("Hydra received bad rxpos"); } rxstate = HRX_BadPos; /* TODO: fallthrough */ } pkttype = H_NOPKT; /* packet has already been processed */ } else if (pkttype == HPKT_FINFO) { put_long(txbuf, rxpos); hytxpkt(HPKT_FINFOACK, txbuf, 4); pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_IDLE) && (rxlen == 0)) { SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); pkttype = H_NOPKT; /* packet has already been processed */ } else if (EXPIRED(TIMERNO_RX)) { /* TODO: check this hack */ rxstate = HRX_HdxLink; } break; case HRX_BadPos: debug(DBG_HYDRA, "SM 'HRX' entering 'BadPos'"); longnum = get_long(rxbuf); if (longnum <= rxlastsync) { rxretries = 0; RESETTIMER(TIMERNO_RX); rxlastsync = longnum; rxstate = HRX_Timer; } else { rxlastsync = longnum; rxstate = HRX_Timer; } break; case HRX_Timer: debug(DBG_HYDRA, "SM 'HRX' entering 'Timer'"); if ((!RUNNING(TIMERNO_RX)) || (EXPIRED(TIMERNO_RX))) { rxstate = HRX_HdxLink; } else { rxstate = HRX_DATA; } break; case HRX_HdxLink: debug(DBG_HYDRA, "SM 'HRX' entering 'HdxLink'"); /* TODO: hdxlink */ if ((rxretries > 4) && (txstate != HTX_REND) && (role == 0)) { rxretries = 0; rxstate = HRX_Retries; } else { rxstate = HRX_Retries; } break; /* TODO: fallthrough */ case HRX_Retries: debug(DBG_HYDRA, "SM 'HRX' entering 'Retries'"); rxretries++; if (rxretries >= 10) { loginf("Hydra: too many errors"); txstate = HTX_Abort; } else if (rxretries == 1) { rxsyncid++; rxstate = HRX_RPos; } else { rxstate = HRX_RPos; } break; /* TODO: fallthrough */ case HRX_RPos: debug(DBG_HYDRA, "SM 'HRX' entering 'RPos'"); rxlastdatalen /= 2; if (rxlastdatalen < 64) { rxlastdatalen = 64; } put_long(txbuf, rxpos); put_long(txbuf + 4, rxlastdatalen); put_long(txbuf + 8, rxsyncid); hytxpkt(HPKT_RPOS, txbuf, 12); SETTIMER(TIMERNO_RX, H_MINTIMER); rxstate = HRX_DATA; break; case HRX_OkEOF: debug(DBG_HYDRA, "SM 'HRX' entering 'OkEOF'"); hytxpkt(HPKT_EOFACK, txbuf, 0); RESETTIMER(TIMERNO_RX); SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); rxstate = HRX_FINFO; break; case HRX_DONE: debug(DBG_HYDRA, "SM 'HRX' entering 'DONE'"); if (pkttype == HPKT_FINFO) { put_long(txbuf, -2); hytxpkt(HPKT_FINFOACK, txbuf, 4); pkttype = H_NOPKT; /* packet has already been processed */ } else if ((pkttype == HPKT_IDLE) && (rxlen == 0)) { SETTIMER(TIMERNO_BRAIN, H_BRAINDEAD); pkttype = H_NOPKT; /* packet has already been processed */ } break; } if (pkttype != H_NOPKT) { debug(DBG_HYDRA, "Hydra received packet `%c' - ignored", pkttype); pkttype = H_NOPKT; /* ignore received packet */ } } RESETTIMERS(); if (txstate == HTX_Abort) { /* check if file is still open */ /* if ((rxstate == HRX_ToData) || (rxstate == HRX_DATA) || (rxstate == HRX_BadPos) || (rxstate == HRX_Timer) || (rxstate == HRX_HdxLink) || (rxstate == HRX_Retries) || (rxstate == HRX_RPos)) */ if (rxfp) { rxfp = NULL; closefile(0); } FLUSHOUT(); PUT("\030\030\030\030\030\030\030\030\010\010\010\010\010\010\010\010\010\010", 18); sleep(2); /* wait a few seconds... */ FLUSHIN(); return 2; } return 0; } int hydra(int role) { int rc; fa_list *eff_remote, tmpl; file_list *tosend = NULL, *request = NULL, *respond = NULL, *tmpfl; char *nonhold_mail; debug(DBG_HANDSHAKE, "start hydra transfer"); session_flags |= SESSION_HYDRA; /* Hydra special file requests */ if (emsi_remote_lcodes & LCODE_NPU) { loginf("remote requested \"no pickup\", no send"); eff_remote = NULL; } else if (emsi_remote_lcodes & LCODE_PUP) { loginf("remote requested \"pickup primary\""); tmpl.addr = remote->addr; tmpl.next = NULL; eff_remote = &tmpl; } else { eff_remote = remote; } if (role) { if (localoptions & NOHOLD) nonhold_mail = ALL_MAIL; else nonhold_mail = NONHOLD_MAIL; } else { nonhold_mail = ALL_MAIL; } if (emsi_remote_lcodes & LCODE_HAT) { loginf("remote asked to \"hold all traffic\", no send"); tosend = NULL; } else { tosend = create_filelist(eff_remote, nonhold_mail, 0); } if (session_flags & SESSION_WAZOO) request = create_freqlist(remote); /* * Send only file requests during first batch if remote supports * "RH1" flag. */ if (emsi_remote_lcodes & LCODE_RH1) { rc = hydra_batch(role, request); } else { if (request != NULL) { tmpfl = tosend; tosend = request; for (; request->next; request = request->next); request->next = tmpfl; request = NULL; } rc = hydra_batch(role, tosend); } if (rc == 0) { if ((emsi_local_opts & OPT_NRQ) == 0) respond = respond_wazoo(NULL); if (emsi_remote_lcodes & LCODE_RH1) { for (tmpfl = tosend; tmpfl->next; tmpfl = tmpfl->next); tmpfl->next = respond; rc = hydra_batch(role, tosend); tmpfl->next = NULL; /* split filelist into tosend and respond again */ } else { rc = hydra_batch(role, respond); } } tidy_filelist(request, (rc == 0)); tidy_filelist(tosend, (rc == 0)); tidy_filelist(respond, 0); debug(DBG_HANDSHAKE, "end hydra transfer"); return rc; } ifmail-2.14tx8.10.orig/ifcico/zmsend.c100644 0 0 32110 6701151723 15521 0ustar rootroot#include #include #include #include #include #include #include #include #include #include "ttyio.h" #include "xutil.h" #include "lutil.h" #include "session.h" #include "zmodem.h" #include "emsi.h" static int initsend(void); static int sendfile(char*,char*); static int finsend(void); static int getzrxinit(void); static int sendzsinit(void); static int zfilbuf(void); static int zsendfile(char*,int); static int zsendfdata(void); static int getinsync(int); static FILE *in; static int Test=0; static int Eofseen; static int Rxflags; static int Usevhdrs; static int Wantfcs32=TRUE; static int Rxbuflen; static int Txwindow; static int Txwcnt; static int blklen; static int blkopt; static int Txwspac; static int errors; static int Lastsync; static int bytcnt; static int Lrxpos=0; static int Lztrans=0; static int Lzmanag=0; static int Lskipnocor=0; static int Lzconv=0; static int Beenhereb4; static char Myattn[]={0}; static long startime,endtime; static long skipsize; #if 1 static char *qbf= "The quick brown fox jumped over the lazy dog's back 1234567890\r\n"; #else static char *qbf= "÷ ÞÁÝÁÈ ÀÇÁ ÖÉÌ ÂÙ ÃÉÔÒÕÓ? äÁ! îÏ ÆÁÌØÛÉ×ÙÊ ÜËÚÅÍÐÌÑÒ 0123456789\r\n"; #endif extern void get_frame_buffer(void); int zmsndfiles(file_list*); int zmsndfiles(lst) file_list *lst; { int rc,maxrc=0; file_list *tmpf; loginf("start %s send%s", (emsi_local_protos & PROT_ZAP)?"ZedZap":"Zmodem", lst?"":" (dummy)"); get_frame_buffer(); if ((rc=initsend())) return abs(rc); for (tmpf=lst;tmpf && (maxrc < 2);tmpf=tmpf->next) { if (tmpf->remote) { rc=sendfile(tmpf->local,tmpf->remote); rc=abs(rc); if (rc > maxrc) maxrc=rc; if (rc == 0) execute_disposition(tmpf); } else if (maxrc == 0) execute_disposition(tmpf); } if (maxrc < 2) { rc=finsend(); rc=abs(rc); } if (rc > maxrc) maxrc=rc; loginf("zmodem send rc=%d",maxrc); return (maxrc<2)?0:maxrc; } static int initsend(void) { debug(11,"initsend"); PUTSTR("rz\r"); stohdr(0x80L/*0L*/); /* Show we can var header */ /* ### 19960304 T.Tanaka, from rzsz 3.41, QUICK FIX */ zshhdr(4,ZRQINIT,Txhdr); if (getzrxinit()) { loginf("unable to initiate zmodem send"); return 1; } return 0; } static int finsend(void) { int i,rc; debug(11,"finsend"); while (GETCHAR(1) >= 0) /*nothing*/; for (i=0;i<30;i++) { stohdr(0L); zshhdr(4,ZFIN,Txhdr); if ((rc=zgethdr(Rxhdr,0)) == ZFIN) PUTSTR("OO"); if ((rc == ZFIN) || (rc == ZCAN) || (rc < 0)) break; } return (rc != ZFIN); } static int sendfile(ln,rn) char *ln,*rn; { int rc=0; struct stat st; struct flock fl; int bufl; int sverr; fl.l_type=F_RDLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if (txbuf == NULL) txbuf=xmalloc(MAXBLOCK); skipsize=0L; if ((in=fopen(ln,"r")) == NULL) { sverr=errno; logerr("$zmsend cannot open file %s, skipping",S(ln)); if (sverr == ENOENT) return 0; else return 1; } if (fcntl(fileno(in),F_SETLK,&fl) != 0) { loginf("$zmsend cannot lock file %s, skipping",S(ln)); fclose(in); return 1; } if (stat(ln,&st) != 0) { loginf("$cannot access \"%s\", skipping",S(ln)); fclose(in); return 1; } loginf("zmodem send \"%s\" as \"%s\" (%lu bytes)", S(ln),S(rn),(unsigned long)st.st_size); (void)time(&startime); sprintf(txbuf,"%s %lu %lo %o 0 0 0", rn,(unsigned long)st.st_size, st.st_mtime+(st.st_mtime%2), st.st_mode); bufl=strlen(txbuf); *(strchr(txbuf,' '))='\0'; /*hope no blanks in filename*/ Eofseen = 0; rc=zsendfile(txbuf,bufl); if (rc == ZSKIP) { loginf("file %s considered normally sent",S(ln)); return 0; } else if ((rc == OK) && (st.st_size-skipsize)) /* ### Quick fix T.Tanaka, 18 Jan 1996 */ { (void)time(&endtime); if ((startime=endtime-startime) == 0) startime=1; loginf("sent %lu bytes in %ld seconds (%ld cps)", (unsigned long)st.st_size-skipsize,startime, (long)(st.st_size-skipsize)/startime); return 0; } else return 2; } /* * Get the receiver's init parameters */ int getzrxinit(void) { int n; debug(11,"getzrxinit"); for (n=10; --n>=0; ) { switch (zgethdr(Rxhdr, 1)) { case ZCHALLENGE: /* Echo receiver's challenge numbr */ stohdr(Rxpos); zshhdr(4, ZACK, Txhdr); continue; case ZCOMMAND: /* They didn't see out ZRQINIT */ stohdr(0L); zshhdr(4, ZRQINIT, Txhdr); continue; case ZRINIT: Rxflags = 0377 & Rxhdr[ZF0]; Usevhdrs = Rxhdr[ZF1] & CANVHDR; Txfcs32 = (Wantfcs32 && (Rxflags & CANFC32)); Zctlesc |= Rxflags & TESCCTL; Rxbuflen = (0377 & Rxhdr[ZP0])+((0377 & Rxhdr[ZP1])<<8); if ( !(Rxflags & CANFDX)) Txwindow = 0; debug(11,"remote allowed Rxbuflen=%d", Rxbuflen); /* Set initial subpacket length */ if (blklen < 1024) { /* Command line override? */ blklen = 1024; } if (Rxbuflen && blklen>Rxbuflen) blklen = Rxbuflen; if (blkopt && blklen > blkopt) blklen = blkopt; /* if (Rxbuflen == 0) Rxbuflen=MAXBLOCK; */ /* leave it off for now, because of problems reported */ debug(11,"Rxbuflen=%d blklen=%d", Rxbuflen, blklen); debug(11,"Txwindow = %u Txwspac = %d", Txwindow, Txwspac); if (Lztrans == ZTRLE && (Rxflags & CANRLE)) Txfcs32 = 2; else Lztrans = 0; return (sendzsinit()); case ZCAN: case ERROR: return ERROR; case HANGUP: return HANGUP; case TIMEOUT: stohdr(0L); zshhdr(4, ZRQINIT, Txhdr); continue; case ZRQINIT: if (Rxhdr[ZF0] == ZCOMMAND) continue; default: zshhdr(4, ZNAK, Txhdr); continue; } } return ERROR; } /* Send send-init information */ int sendzsinit(void) { int c; debug(11,"sendzsinit"); if (Myattn[0] == '\0' && (!Zctlesc || (Rxflags & TESCCTL))) return OK; errors = 0; for (;;) { stohdr(0L); if (Zctlesc) { Txhdr[ZF0] |= TESCCTL; zshhdr(4, ZSINIT, Txhdr); } else zsbhdr(4, ZSINIT, Txhdr); zsdata(Myattn, ZATTNLEN, ZCRCW); c = zgethdr(Rxhdr, 1); switch (c) { case ERROR: case ZCAN: return ERROR; case HANGUP: return HANGUP; case ZACK: return OK; default: if (++errors > 19) return ERROR; continue; } } } /* Fill buffer with blklen chars */ int zfilbuf(void) { int n; debug(11,"zfilbuf (%d)",blklen); n = fread(txbuf, 1, blklen, in); if (n < blklen) Eofseen = 1; debug(11,"zfilbuf return %d",n); return n; } /* Send file name and related info */ int zsendfile(buf, blen) char *buf; int blen; { int c; int INT32 crc=-1L; long lastcrcrq = -1; debug(11,"zsendfile %s (%d)",buf,blen); for (errors=0; ++errors<11;) { Txhdr[ZF0] = Lzconv; /* file conversion request */ Txhdr[ZF1] = Lzmanag; /* file management request */ if (Lskipnocor) Txhdr[ZF1] |= ZMSKNOLOC; Txhdr[ZF2] = Lztrans; /* file transport request */ Txhdr[ZF3] = 0; zsbhdr(4, ZFILE, Txhdr); zsdata(buf, blen, ZCRCW); again: c = zgethdr(Rxhdr, 1); switch (c) { case ZRINIT: while ((c = GETCHAR(5)) > 0) if (c == ZPAD) { goto again; } continue; case ZCAN: case ERROR: case HANGUP: case TIMEOUT: case ZABORT: case ZFIN: loginf("Got %s on pathname", frametypes[c+FTOFFSET]); return c; default: loginf("Got %d frame type on pathname", c); continue; case ZNAK: continue; case ZCRC: if (Rxpos != lastcrcrq) { lastcrcrq = Rxpos; crc = 0xFFFFFFFFL; fseek(in, 0L, 0); while (((c = getc(in)) != EOF) && --lastcrcrq) crc = updcrc32(c, crc); crc = ~crc; clearerr(in); /* Clear possible EOF */ lastcrcrq = Rxpos; } stohdr(crc); zsbhdr(4, ZCRC, Txhdr); goto again; case ZFERR: case ZSKIP: loginf("File skipped by receiver request"); fclose(in); return c; case ZRPOS: /* * Suppress zcrcw request otherwise triggered by * lastyunc==bytcnt */ if (Rxpos > 0) skipsize=Rxpos; if (fseek(in, Rxpos, 0)) return ERROR; Lastsync = (bytcnt = Txpos = Lrxpos = Rxpos) -1; return zsendfdata(); } } fclose(in); return ERROR; } /* Send the data in the file */ int zsendfdata(void) { int c=0, e, n; int newcnt; long tcount = 0; int junkcount; /* Counts garbage chars received by TX */ static int tleft = 6; /* Counter for test mode */ int maxblklen,goodblks=0,goodneeded=8; debug(11,"zsendfdata"); /* XXX strnge problem with 8K blocks - cut down XXX */ if (emsi_local_protos & PROT_ZAP) maxblklen=MAXBLOCK/2; else maxblklen=1024; if (Rxbuflen && (maxblklen > Rxbuflen)) maxblklen=Rxbuflen; junkcount = 0; Beenhereb4 = 0; somemore: if (0) { waitack: junkcount = 0; c = getinsync(0); gotack: switch (c) { default: case ZCAN: fclose(in); return ERROR; case ZSKIP: fclose(in); return c; case ZACK: break; case ZRPOS: blklen=((blklen >> 2) > 64) ? (blklen >> 2) : 64; goodblks=0; goodneeded=((goodneeded<<1) > 16) ? 16 : goodneeded << 1; break; case ZRINIT: fclose(in); return OK; case TIMEOUT: goto to; } /* * If the reverse channel can be tested for data, * this logic may be used to detect error packets * sent by the receiver, in place of setjmp/longjmp * rdchk(fd) returns non 0 if a character is available */ if (CHECK()) { c=GETCHAR(1); if (c < 0) { return c; } else switch (c) { case CAN: case ZPAD: c = getinsync(1); goto gotack; case DC3: /* Wait a while for an XON */ case DC3|0200: GETCHAR(10); } } } to: newcnt = Rxbuflen; Txwcnt = 0; stohdr(Txpos); zsbhdr(4, ZDATA, Txhdr); /* * Special testing mode. This should force receiver to Attn,ZRPOS * many times. Each time the signal should be caught, causing the * file to be started over from the beginning. */ if (Test) { if ( --tleft) while (tcount < 20000) { printf(qbf); fflush(stdout); tcount += strlen(qbf); if (CHECK()) { c=GETCHAR(1); if (c < 0) { return c; } else switch (c) { case CAN: case ZPAD: goto waitack; case DC3: /* Wait for XON */ case DC3|0200: GETCHAR(10); } } } sleep(3); fflush(stdout); printf("\nsz: Tcount = %ld\n", tcount); if (tleft) { printf("ERROR: Interrupts Not Caught\n"); exit(1); } exit(0); } do { n = zfilbuf(); if (Eofseen) e = ZCRCE; else if (junkcount > 3) e = ZCRCW; else if (bytcnt == Lastsync) e = ZCRCW; else if (Rxbuflen && (newcnt -= n) <= 0) e = ZCRCW; else if (Txwindow && (Txwcnt += n) >= Txwspac) { Txwcnt = 0; e = ZCRCQ; } else e = ZCRCG; debug(11,"%7ld ZMODEM%s ", Txpos, Crc32t?" CRC-32":""); zsdata(txbuf, n, e); bytcnt = Txpos += n; if ((blklen < maxblklen) && (++goodblks > goodneeded)) { blklen = ((blklen << 1) < maxblklen) ? blklen << 1 : maxblklen; goodblks = 0; } if (e == ZCRCW) goto waitack; /* * If the reverse channel can be tested for data, * this logic may be used to detect error packets * sent by the receiver, in place of setjmp/longjmp * rdchk(fd) returns non 0 if a character is available */ if (CHECK()) { c=GETCHAR(1); if (c < 0) { return c; } else switch (c) { case CAN: case ZPAD: c = getinsync(1); if (c == ZACK) break; /* zcrce - dinna wanna starta ping-pong game */ zsdata(txbuf, 0, ZCRCE); goto gotack; case DC3: /* Wait a while for an XON */ case DC3|0200: GETCHAR(10); default: ++junkcount; } } if (Txwindow) { while ((tcount = (Txpos - Lrxpos)) >= Txwindow) { debug(11,"%ld window >= %u", tcount, Txwindow); if (e != ZCRCQ) zsdata(txbuf, 0, e = ZCRCQ); c = getinsync(1); if (c != ZACK) { zsdata(txbuf, 0, ZCRCE); goto gotack; } } debug(11,"window = %ld", tcount); } } while (!Eofseen); for (;;) { stohdr(Txpos); zsbhdr(4, ZEOF, Txhdr); switch (getinsync(0)) { case ZACK: continue; case ZRPOS: goto somemore; case ZRINIT: fclose(in); return OK; case ZSKIP: fclose(in); loginf("File skipped by receiver request"); return c; default: debug(11,"Got %d trying to send end of file", c); fclose(in); return ERROR; } } } /* * Respond to receiver's complaint, get back in sync with receiver */ int getinsync(flag) int flag; { int c; debug(11,"getinsync"); for (;;) { c = zgethdr(Rxhdr, 0); switch (c) { case HANGUP: return HANGUP; case ZCAN: case ZABORT: case ZFIN: case ERROR: case TIMEOUT: loginf("Got %s sending data", frametypes[c+FTOFFSET]); blklen=64; return c; case ZRPOS: /* ************************************* */ /* If sending to a buffered modem, you */ /* might send a break at this point to */ /* dump the modem's buffer. */ clearerr(in); /* In case file EOF seen */ if (fseek(in, Rxpos, 0)) return ERROR; Eofseen = 0; bytcnt = Lrxpos = Txpos = Rxpos; if (Lastsync == Rxpos) { if (++Beenhereb4 > 12) { loginf("Can't send block"); return ERROR; } /* if (Beenhereb4 > 4) if (blklen > 32) blklen /= 2; */ } else Beenhereb4=0; Lastsync = Rxpos; return c; case ZACK: Lrxpos = Rxpos; if (flag || Txpos == Rxpos) return ZACK; continue; case ZRINIT: return c; case ZSKIP: loginf("File skipped by receiver request"); return c; default: zsbhdr(4, ZNAK, Txhdr); continue; } } } ifmail-2.14tx8.10.orig/ifcico/zmrecv.c100644 0 0 23633 6701151723 15541 0ustar rootroot#include #include #include #include #include #include #include #include #include #include #include "cspace.h" #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "zmodem.h" #include "session.h" #include "config.h" #include "emsi.h" #ifndef BELEIVE_ZFIN #define BELEIVE_ZFIN 2 #endif static FILE *fout=NULL; static int Usevhdrs; static long rxbytes; static int Eofseen; /* indicates cpm eof (^Z) has been received */ static int errors; static time_t startime,etime; static long sbytes; #define DEFBYTL 2000000000L /* default rx file size */ static long Bytesleft; /* number of bytes of incoming file left */ static long Modtime; /* Unix style mod time for incoming file */ static int Filemode; /* Unix style mode for incoming file */ #ifndef PATH_MAX #define PATH_MAX 512 #endif static int Thisbinary; /* current file is to be received in bin mode */ static char *secbuf=0; static int tryzhdrtype; static char zconv; /* ZMODEM file conversion request */ static char zmanag; /* ZMODEM file management request */ static char ztrans; /* ZMODEM file transport request */ static int resync(off_t); static int tryz(void); static int rzfiles(void); static int rzfile(void); static void zmputs(char*); int closefile(int); int closeit(int); FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); static int putsec(char*,int); static int procheader(char*); static int ackbibi(void); #if defined(HAS_STATFS) | defined(HAS_STATVFS) static long getfree(void); #endif void get_frame_buffer(void); int zmrcvfiles(void); int zmrcvfiles(void) { int rc; loginf("start %s receive", (emsi_local_protos & PROT_ZAP)?"ZedZap":"Zmodem"); get_frame_buffer(); if (secbuf == NULL) secbuf=xmalloc(MAXBLOCK+1); tryzhdrtype=ZRINIT; if ((rc=tryz()) < 0) { loginf("zmrecv could not initiate receive, rc=%d",rc); } else switch (rc) { case ZCOMPL: rc=0; break; case ZFILE: rc=rzfiles(); break; } if (fout) { if (closeit(0)) { logerr("Error closing file"); } } loginf("zmodem receive rc=%d",rc); return abs(rc); } /* * Initialize for Zmodem receive attempt, try to activate Zmodem sender * Handles ZSINIT frame * Return ZFILE if Zmodem filename received, -1 on error, * ZCOMPL if transaction finished, else 0 */ int tryz(void) { int c, n, numfin=0; int cmdzack1flg; debug(11,"tryz"); for (n=15; --n>=0; ) { /* Set buffer length (0) and capability flags */ stohdr(0L); Txhdr[ZF0] = CANFC32|CANFDX|CANOVIO; if (Zctlesc) Txhdr[ZF0] |= TESCCTL; Txhdr[ZF0] |= CANRLE; Txhdr[ZF1] = CANVHDR; zshhdr(4,tryzhdrtype, Txhdr); if (tryzhdrtype == ZSKIP) /* Don't skip too far */ tryzhdrtype = ZRINIT; /* CAF 8-21-87 */ again: switch (zgethdr(Rxhdr, 0)) { case ZRQINIT: if (Rxhdr[ZF3] & 0x80) Usevhdrs = 1; /* we can var header */ continue; case ZEOF: continue; case TIMEOUT: if (numfin > 0) return ackbibi(); else continue; case ZFILE: zconv = Rxhdr[ZF0]; zmanag = Rxhdr[ZF1]; ztrans = Rxhdr[ZF2]; if (Rxhdr[ZF3] & ZCANVHDR) Usevhdrs = TRUE; tryzhdrtype = ZRINIT; c = zrdata(secbuf, MAXBLOCK); if (c == GOTCRCW) return ZFILE; zshhdr(4,ZNAK, Txhdr); goto again; case ZSINIT: Zctlesc = TESCCTL & Rxhdr[ZF0]; if (zrdata(Attn, ZATTNLEN) == GOTCRCW) { stohdr(1L); zshhdr(4,ZACK, Txhdr); goto again; } zshhdr(4,ZNAK, Txhdr); goto again; case ZFREECNT: stohdr(getfree()); zshhdr(4,ZACK, Txhdr); goto again; case ZCOMMAND: cmdzack1flg = Rxhdr[ZF0]; if (zrdata(secbuf, MAXBLOCK) == GOTCRCW) { if (cmdzack1flg & ZCACK1) stohdr(0L); else loginf("request for command \"%s\" ignored", printable(secbuf,-32)); stohdr(0L); do { zshhdr(4,ZCOMPL, Txhdr); } while (++errors<20 && zgethdr(Rxhdr,1) != ZFIN); return ackbibi(); } zshhdr(4,ZNAK, Txhdr); goto again; case ZCOMPL: goto again; case ZRINIT: case ZFIN: /* do not beleive in first ZFIN */ if (++numfin >= BELEIVE_ZFIN) return ackbibi(); else continue; case ERROR: case HANGUP: case ZCAN: return ERROR; default: continue; } } return 0; } /* * Receive 1 or more files with ZMODEM protocol */ int rzfiles(void) { int c; debug(11,"rzfiles"); for (;;) { switch (c = rzfile()) { case ZEOF: case ZSKIP: switch (tryz()) { case ZCOMPL: return OK; default: return ERROR; case ZFILE: break; } continue; default: return c; case ERROR: return ERROR; } } } /* * Receive a file with ZMODEM protocol * Assumes file name frame is in secbuf */ int rzfile(void) { int c, n; debug(11,"rzfile"); Eofseen=FALSE; rxbytes = 0l; if ((c = procheader(secbuf))) { return (tryzhdrtype = c); } n = 20; for (;;) { stohdr(rxbytes); zshhdr(4,ZRPOS, Txhdr); nxthdr: switch (c = zgethdr(Rxhdr, 0)) { default: debug(11,"rzfile: Wrong header %d", c); if ( --n < 0) { loginf("Wrong header %d", c); return ERROR; } continue; case ZCAN: loginf("Sender CANcelled"); return ERROR; case ZNAK: if ( --n < 0) { loginf("got ZNAK", c); return ERROR; } continue; case TIMEOUT: if ( --n < 0) { loginf("TIMEOUT", c); return ERROR; } continue; case ZFILE: zrdata(secbuf, MAXBLOCK); continue; case ZEOF: if (rclhdr(Rxhdr) != rxbytes) { /* * Ignore eof if it's at wrong place - force * a timeout because the eof might have gone * out before we sent our zrpos. */ errors = 0; goto nxthdr; } if (closeit(1)) { tryzhdrtype = ZFERR; logerr("Error closing file"); return ERROR; } fout=NULL; debug(11,"rzfile: normal EOF"); return c; case HANGUP: loginf("Line drop"); return ERROR; case ERROR: /* Too much garbage in header search error */ if (--n < 0) { loginf("Too much errors"); return ERROR; } zmputs(Attn); continue; case ZSKIP: Modtime = 1; closeit(1); loginf("Sender SKIPPED file"); return c; case ZDATA: if (rclhdr(Rxhdr) != rxbytes) { if ( --n < 0) { loginf("Data has bad addr"); return ERROR; } zmputs(Attn); continue; } moredata: debug(11,"%7ld ZMODEM%s ", rxbytes, Crc32r?" CRC-32":""); switch (c = zrdata(secbuf, MAXBLOCK)) { case ZCAN: loginf("Sender CANcelled"); return ERROR; case HANGUP: loginf("Line drop"); return ERROR; case ERROR: /* CRC error */ if (--n < 0) { loginf("Too many errors"); return ERROR; } zmputs(Attn); continue; case TIMEOUT: if ( --n < 0) { loginf("TIMEOUT"); return ERROR; } continue; case GOTCRCW: n = 20; putsec(secbuf, Rxcount); rxbytes += Rxcount; stohdr(rxbytes); zshhdr(4,ZACK, Txhdr); PUTCHAR(DC1); goto nxthdr; case GOTCRCQ: n = 20; putsec(secbuf, Rxcount); rxbytes += Rxcount; stohdr(rxbytes); zshhdr(4,ZACK, Txhdr); goto moredata; case GOTCRCG: n = 20; putsec(secbuf, Rxcount); rxbytes += Rxcount; goto moredata; case GOTCRCE: n = 20; putsec(secbuf, Rxcount); rxbytes += Rxcount; goto nxthdr; } } } } /* * Send a string to the modem, processing for \336 (sleep 1 sec) * and \335 (break signal) */ void zmputs(s) char *s; { int c; debug(11,"zmputs"); while (*s) { switch (c = *s++) { case '\336': sleep(1); continue; case '\335': sendbrk(); continue; default: PUTCHAR(c); } } } int resync(off) off_t off; { return 0; } int closeit(success) int success; { int rc; rc=closefile(success); fout=NULL; sbytes=rxbytes-sbytes; (void)time(&etime); if ((startime=etime-startime) == 0L) startime=1L; loginf("%s %lu bytes in %ld seconds (%ld cps)", success?"received":"dropped after", sbytes,startime,sbytes/startime); return rc; } /* * Ack a ZFIN packet, let byegones be byegones */ int ackbibi(void) { int n; int c; debug(11,"ackbibi:"); stohdr(0L); for (n=3; --n>=0; ) { zshhdr(4,ZFIN, Txhdr); switch ((c=GETCHAR(10))) { case ZPAD: zgethdr(Rxhdr,0); debug(11,"skipped unexpected header"); break; case 'O': GETCHAR(1); /* Discard 2nd 'O' */ debug(11,"ackbibi complete"); return ZCOMPL; case ERROR: case HANGUP: debug(11,"ackbibi got %d, ignore",c); return 0; case TIMEOUT: default: debug(11,"ackbibi got '%s', continue", printablec(c)); break; } } return ZCOMPL; } /* * Process incoming file information header */ int procheader(name) char *name; { char *openmode, *p; static dummy; char ctt[32]; debug(11,"proheader \"%s\"",printable(name,0)); /* set default parameters and overrides */ openmode = "w"; /* * Process ZMODEM remote file management requests */ Thisbinary = (zconv != ZCNL); /* Remote ASCII override */ if (zmanag == ZMAPND) openmode = "a"; Bytesleft = DEFBYTL; Filemode = 0; Modtime = 0L; p = name + 1 + strlen(name); sscanf(p, "%ld%lo%o%lo%d%ld%d%d", &Bytesleft, &Modtime, &Filemode, &dummy, &dummy, &dummy, &dummy, &dummy); strcpy(ctt,date(Modtime)); loginf("zmodem receive: \"%s\" %ld bytes dated %s mode %o", name, Bytesleft, ctt, Filemode); fout=openfile(name,Modtime,Bytesleft,&rxbytes,resync); (void)time(&startime); sbytes=rxbytes; if (Bytesleft == rxbytes) { loginf("Skipping %s", name); closeit(0); return ZSKIP; } else if ( !fout) return ZFERR; else return 0; } /* * Putsec writes the n characters of buf to receive file fout. * If not in binary mode, carriage returns, and all characters * starting with CPMEOF are discarded. */ int putsec(buf, n) char *buf; int n; { char *p; debug(11,"putsec %d bytes",n); if (n == 0) return OK; if (Thisbinary) { for (p=buf; --n>=0; ) putc( *p++, fout); } else { if (Eofseen) return OK; for (p=buf; --n>=0; ++p ) { if ( *p == '\r') continue; if (*p == SUB) { Eofseen=TRUE; return OK; } putc(*p ,fout); } } return OK; } long getfree(void) { return freespace(inbound); } ifmail-2.14tx8.10.orig/ifcico/zmmisc.c100644 0 0 50167 6701151723 15537 0ustar rootroot/* ### Modified on Thu 4 Jan 1996 ### * - added #ifdef RZSZ3_40 code from T.Tanaka */ /* * Z M . C * ZMODEM protocol primitives * 05-24-89 Chuck Forsberg Omen Technology Inc * * Entry point Functions: * zsbhdr(type, hdr) send binary header * zshhdr(type, hdr) send hex header * zgethdr(hdr, eflag) receive header - binary or hex * zsdata(buf, len, frameend) send data * zrdata(buf, len) receive data * stohdr(pos) store position data in Txhdr * long rclhdr(hdr) recover position offset from header * * * This version implements numerous enhancements including ZMODEM * Run Length Encoding and variable length headers. These * features were not funded by the original Telenet development * contract. * * This software may be freely used for non commercial and * educational (didactic only) purposes. This software may also * be freely used to support file transfer operations to or from * licensed Omen Technology products. Any programs which use * part or all of this software must be provided in source form * with this notice intact except by written permission from Omen * Technology Incorporated. * * Use of this software for commercial or administrative purposes * except when exclusively limited to interfacing Omen Technology * products requires a per port license payment of $20.00 US per * port (less in quantity). Use of this code by inclusion, * decompilation, reverse engineering or any other means * constitutes agreement to these conditions and acceptance of * liability to license the materials and payment of reasonable * legal costs necessary to enforce this license agreement. * * * Omen Technology Inc FAX: 503-621-3745 * Post Office Box 4681 * Portland OR 97208 * * This code is made available in the hope it will be useful, * BUT WITHOUT ANY WARRANTY OF ANY KIND OR LIABILITY FOR ANY * DAMAGES OF ANY KIND. * */ static void zputhex(int); static void zsbh32(int,char*,int,int); static void zsda32(char*,int,int); static int zrdat32(char*,int); static int noxrd7(void); static int zrbhd32(char*); static int zrbhdr(char*); static int zrhhdr(char*); static int zgethex(void); static int zgeth1(void); static void garbitch(void); #include #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "zmodem.h" static int Rxtimeout = 20; /* Tenths of seconds to wait for something */ int Zctlesc; /* Globals used by ZMODEM functions */ int Rxframeind; /* ZBIN ZBIN32, or ZHEX type of frame */ int Rxtype; /* Type of header received */ int Rxhlen; /* Length of header received */ int Rxcount; /* Count of data bytes received */ char Rxhdr[ZMAXHLEN]; /* Received header */ char Txhdr[ZMAXHLEN]; /* Transmitted header */ long Rxpos; /* Received file position */ long Txpos; /* Transmitted file position */ int Txfcs32; /* TURE means send binary frames with 32 bit FCS */ int Crc32t; /* Controls 32 bit CRC being sent */ /* 1 == CRC32, 2 == CRC32 + RLE */ int Crc32r; /* Indicates/controls 32 bit CRC being received */ /* 0 == CRC16, 1 == CRC32, 2 == CRC32 + RLE */ int Usevhdrs; /* Use variable length headers */ int Znulls; /* Number of nulls to send at beginning of ZDATA hdr */ char Attn[ZATTNLEN+1]; /* Attention string rx sends to tx on err */ char *Altcan; /* Alternate canit string */ char *txbuf=NULL; char *rxbuf=NULL; static lastsent; /* Last char we sent */ static Not8bit; /* Seven bits seen on header */ char *frametypes[] = { "EMPTY", /* -16 */ "Can't be (-15)", "Can't be (-14)", "Can't be (-13)", "Can't be (-12)", "Can't be (-11)", "Can't be (-10)", "Can't be (-9)", "HANGUP", /* -8 */ "Can't be (-7)", "Can't be (-6)", "Can't be (-5)", "EOFILE", /* -4 */ "Can't be (-3)", "TIMEOUT", /* -2 */ "ERROR", /* -1 */ "ZRQINIT", "ZRINIT", "ZSINIT", "ZACK", "ZFILE", "ZSKIP", "ZNAK", "ZABORT", "ZFIN", "ZRPOS", "ZDATA", "ZEOF", "ZFERR", "ZCRC", "ZCHALLENGE", "ZCOMPL", "ZCAN", "ZFREECNT", "ZCOMMAND", "ZSTDERR", "xxxxx" #define FRTYPES 22 /* Total number of frame types in this array */ /* not including psuedo negative entries */ }; static char badcrc[] = "Bad CRC"; /**** I am including this fix as a temporary solution... Gonna got the entire zmodem rewritten some day. = E.C. ****/ /***** Hack by mj ***********************************************************/ /* * Buffer for outgoing frames. Sending them with single character write()'s * is a waste of processor time and causes severe performance degradation * on TCP and ISDN connections. */ #define FRAME_BUFFER_SIZE 16384 static char *frame_buffer=NULL; static int frame_length = 0; #define BUFFER_CLEAR() do { frame_length=0; } while(0) #define BUFFER_BYTE(c) do { frame_buffer[frame_length++]=(c); } while(0) #define BUFFER_FLUSH() do { PUT(frame_buffer, frame_length); \ frame_length=0; } while(0); /****************************************************************************/ void get_frame_buffer(void) { if (frame_buffer == NULL) frame_buffer=xmalloc(FRAME_BUFFER_SIZE); } /* Send ZMODEM binary header hdr of type type */ void zsbhdr(len, type, hdr) int len,type; register char *hdr; { register int n; register unsigned INT16 crc; debug(11,"zsbhdr: %c %d %s %lx", Usevhdrs?'v':'f', len, frametypes[type+FTOFFSET], rclhdr(hdr)); BUFFER_CLEAR(); if (type == ZDATA) for (n = Znulls; --n >=0; ) BUFFER_BYTE(0); BUFFER_BYTE(ZPAD); BUFFER_BYTE(ZDLE); switch (Crc32t=Txfcs32) { case 1: zsbh32(len, hdr, type, Usevhdrs?ZVBIN32:ZBIN32); break; case 2: zsbh32(len, hdr, type, Usevhdrs?ZVBINR32:ZBINR32); BUFFER_FLUSH(); break; /* 19960304 T.Tanaka, from rzsz 3.41 */ default: if (Usevhdrs) { BUFFER_BYTE(ZVBIN); zsendline(len); } else BUFFER_BYTE(ZBIN); zsendline(type); crc = updcrc16(type, 0); for (n=len; --n >= 0; ++hdr) { zsendline(*hdr); crc = updcrc16((0377& *hdr), crc); } crc = updcrc16(0,updcrc16(0,crc)); zsendline(crc>>8); zsendline(crc); } BUFFER_FLUSH(); } /* Send ZMODEM binary header hdr of type type */ void zsbh32(len, hdr, type, flavour) int len; register char *hdr; int type,flavour; { register int n; register INT32 crc; BUFFER_BYTE(flavour); if (Usevhdrs) zsendline(len); zsendline(type); crc = 0xFFFFFFFFL; crc = updcrc32(type, crc); for (n=len; --n >= 0; ++hdr) { crc = updcrc32((0377 & *hdr), crc); zsendline(*hdr); } crc = ~crc; for (n=4; --n >= 0;) { zsendline((int)crc); crc >>= 8; } } /* Send ZMODEM HEX header hdr of type type */ void zshhdr(len, type, hdr) int len,type; register char *hdr; { register int n; register unsigned INT16 crc; debug(11,"zshhdr: %c %d %s %lx", Usevhdrs?'v':'f', len, frametypes[type+FTOFFSET], rclhdr(hdr)); BUFFER_CLEAR(); BUFFER_BYTE(ZPAD); BUFFER_BYTE(ZPAD); BUFFER_BYTE(ZDLE); if (Usevhdrs) { BUFFER_BYTE(ZVHEX); zputhex(len); } else BUFFER_BYTE(ZHEX); zputhex(type); Crc32t = 0; crc = updcrc16(type, 0); for (n=len; --n >= 0; ++hdr) { zputhex(*hdr); crc = updcrc16((0377 & *hdr), crc); } crc = updcrc16(0,updcrc16(0,crc)); zputhex(crc>>8); zputhex(crc); /* Make it printable on remote machine */ BUFFER_BYTE(015); BUFFER_BYTE(0212); /* * Uncork the remote in case a fake XOFF has stopped data flow */ if (type != ZFIN && type != ZACK) BUFFER_BYTE(021); BUFFER_FLUSH(); } /* * Send binary array buf of length length, with ending ZDLE sequence frameend */ char *Zendnames[] = { "ZCRCE", "ZCRCG", "ZCRCQ", "ZCRCW"}; void zsdata(buf, length, frameend) register char *buf; int length,frameend; { register unsigned INT16 crc; debug(11,"zsdata: %d %s", length, Zendnames[(frameend-ZCRCE)&3]); BUFFER_CLEAR(); switch (Crc32t) { case 1: zsda32(buf, length, frameend); break; case 2: zsdar32(buf, length, frameend); break; /* ### 19960304 T.Tanaka, IPAD hack */ default: crc = 0; for (;--length >= 0; ++buf) { zsendline(*buf); crc = updcrc16((0377 & *buf), crc); } BUFFER_BYTE(ZDLE); BUFFER_BYTE(frameend); crc = updcrc16(frameend, crc); crc = updcrc16(0,updcrc16(0,crc)); zsendline(crc>>8); zsendline(crc); } if (frameend == ZCRCW) BUFFER_BYTE(DC1); BUFFER_FLUSH(); } void zsda32(buf, length, frameend) register char *buf; int length,frameend; { register int c; /*###*/ register unsigned INT32 crc; crc = 0xFFFFFFFFL; for (;--length >= 0; ++buf) { c = *buf & 0377; if (c & 0140) BUFFER_BYTE(lastsent = c); else zsendline(c); crc = updcrc32(c, crc); } BUFFER_BYTE(ZDLE); BUFFER_BYTE(frameend); crc = updcrc32(frameend, crc); crc = ~crc; for (c=4; --c >= 0;) { zsendline((int)crc); crc >>= 8; } } /* * Receive array buf of max length with ending ZDLE sequence * and CRC. Returns the ending character or error code. * NB: On errors may store length+1 bytes! */ int zrdata(buf, length) register char *buf; int length; { register int c; register unsigned INT16 crc; register char *end; register int d; switch (Crc32r) { case 1: return zrdat32(buf, length); case 2: return zrdatr32(buf, length); /* ### 19960304 T.Tanaka, IPAD hack */ } crc = Rxcount = 0; end = buf + length; while (buf <= end) { if ((c = zdlread()) & ~0377) { crcfoo: switch (c) { case GOTCRCE: case GOTCRCG: case GOTCRCQ: case GOTCRCW: crc = updcrc16((((d=c))&0377), crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc16(c, crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc16(c, crc); if (crc & 0xFFFF) { loginf(badcrc); return ERROR; } Rxcount = length - (end - buf); debug(11,"zrdata: %d %s", Rxcount, Zendnames[(d-GOTCRCE)&3]); return d; case GOTCAN: loginf("Sender Canceled"); return ZCAN; case TIMEOUT: loginf("TIMEOUT receiving data"); return c; case HANGUP: loginf("Carrier lost while receiving"); return c; default: garbitch(); return c; } } *buf++ = c; crc = updcrc16(c, crc); } loginf("Data subpacket too long"); return ERROR; } int zrdat32(buf, length) register char *buf; int length; { register int c; /*###*/ register unsigned INT32 crc; register char *end; register int d; crc = 0xFFFFFFFFL; Rxcount = 0; end = buf + length; while (buf <= end) { if ((c = zdlread()) & ~0377) { crcfoo: switch (c) { case GOTCRCE: case GOTCRCG: case GOTCRCQ: case GOTCRCW: d = c; c &= 0377; /*loginf("zrdat32:c=%d,crc=%X.",c,crc);*/ crc = updcrc32(c, crc); /*loginf("zrdat32:c=%d,crc=%X..",c,crc);*/ if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); /*loginf("zrdat32:c=%d,crc=%X...",c,crc);*/ if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); /*loginf("zrdat32:c=%d,crc=%X....",c,crc);*/ if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); /*loginf("zrdat32:c=%d,crc=%X.....",c,crc);*/ if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); /*loginf("zrdat32:c=%d,crc=%X......",c,crc);*/ if (crc != 0xDEBB20E3) { loginf(badcrc); return ERROR; } Rxcount = length - (end - buf); debug(11,"zrdat32: %d %s", Rxcount, Zendnames[(d-GOTCRCE)&3]); return d; case GOTCAN: loginf("Sender Canceled"); return ZCAN; case TIMEOUT: loginf("TIMEOUT"); return c; case HANGUP: loginf("Carrier lost while receiving"); return c; default: garbitch(); return c; } } *buf++ = c; crc = updcrc32(c, crc); } loginf("Data subpacket too long"); return ERROR; } void garbitch(void) { loginf("Garbled data subpacket"); } /* * Read a ZMODEM header to hdr, either binary or hex. * eflag controls local display of non zmodem characters: * 0: no display * 1: display printing characters only * 2: display all non ZMODEM characters * * Set Rxhlen to size of header (default 4) (valid iff good hdr) * On success, set Zmodem to 1, set Rxpos and return type of header. * Otherwise return negative on error. * Return ERROR instantly if ZCRCW sequence, for fast error recovery. */ int zgethdr(hdr, eflag) char *hdr; int eflag; { register int c, n, cancount, tmcount; #ifdef RZSZ3_40 int Zrwindow = 1024; int Baudrate = 2400; n = Zrwindow + Baudrate; #endif Rxframeind = Rxtype = 0; startover: cancount = 5; tmcount = 5; again: /* Return immediate ERROR if ZCRCW sequence seen */ if (((c = GETCHAR(Rxtimeout)) < 0) && (c != TIMEOUT)) goto fifi; else switch (c) { case TIMEOUT: if (--tmcount <= 0) { c = ERROR; goto fifi; } goto startover; case 021: case 0221: goto again; case CAN: gotcan: if (--cancount <= 0) { c = ZCAN; goto fifi; } switch (c = GETCHAR(1)) { case TIMEOUT: goto again; case ZCRCW: switch (GETCHAR(1)) { case TIMEOUT: c = ERROR; goto fifi; case HANGUP: goto fifi; default: goto agn2; } case HANGUP: goto fifi; default: break; case CAN: if (--cancount <= 0) { c = ZCAN; goto fifi; } goto again; } /* **** FALL THRU TO **** */ default: agn2: #ifdef RZSZ3_40 #define GCOUNT (-4) if ( --n == 0) { c = GCOUNT; goto fifi; } #endif goto startover; case ZPAD|0200: /* This is what we want. */ Not8bit = c; case ZPAD: /* This is what we want. */ break; } cancount = 5; splat: switch (c = noxrd7()) { case ZPAD: goto splat; case HANGUP: case TIMEOUT: goto fifi; default: goto agn2; case ZDLE: /* This is what we want. */ break; } Rxhlen = 4; /* Set default length */ Rxframeind = c = noxrd7(); switch (c) { case ZVBIN32: if ((Rxhlen = c = zdlread()) < 0) goto fifi; if (c > ZMAXHLEN) goto agn2; Crc32r = 1; c = zrbhd32(hdr); break; case ZBIN32: if (Usevhdrs) goto agn2; Crc32r = 1; c = zrbhd32(hdr); break; case ZVBINR32: if ((Rxhlen = c = zdlread()) < 0) goto fifi; if (c > ZMAXHLEN) goto agn2; Crc32r = 2; c = zrbhd32(hdr); break; case ZBINR32: if (Usevhdrs) goto agn2; Crc32r = 2; c = zrbhd32(hdr); break; case HANGUP: case TIMEOUT: goto fifi; case ZVBIN: if ((Rxhlen = c = zdlread()) < 0) goto fifi; if (c > ZMAXHLEN) goto agn2; Crc32r = 0; c = zrbhdr(hdr); break; case ZBIN: if (Usevhdrs) goto agn2; Crc32r = 0; c = zrbhdr(hdr); break; case ZVHEX: if ((Rxhlen = c = zgethex()) < 0) goto fifi; if (c > ZMAXHLEN) goto agn2; Crc32r = 0; c = zrhhdr(hdr); break; case ZHEX: if (Usevhdrs) goto agn2; Crc32r = 0; c = zrhhdr(hdr); break; case CAN: goto gotcan; default: goto agn2; } for (n = Rxhlen; ++n < ZMAXHLEN; ) /* Clear unused hdr bytes */ hdr[n] = 0; Rxpos = hdr[ZP3] & 0377; Rxpos = (Rxpos<<8) + (hdr[ZP2] & 0377); Rxpos = (Rxpos<<8) + (hdr[ZP1] & 0377); Rxpos = (Rxpos<<8) + (hdr[ZP0] & 0377); fifi: switch (c) { case GOTCAN: c = ZCAN; /* **** FALL THRU TO **** */ case ZNAK: case ZCAN: case ERROR: case TIMEOUT: case HANGUP: default: if (c >= -FTOFFSET && c <= FRTYPES) debug(11,"zgethdr: %c %d %s %lx", Rxframeind, Rxhlen, frametypes[c+FTOFFSET], Rxpos); else debug(11,"zgethdr: %c %d %lx", Rxframeind, c, Rxpos); } /* Use variable length headers if we got one */ if (c >= 0 && c <= FRTYPES && Rxframeind & 040) Usevhdrs = 1; return c; } /* Receive a binary style header (type and position) */ int zrbhdr(hdr) register char *hdr; { register int c, n; register unsigned INT16 crc; if ((c = zdlread()) & ~0377) return c; Rxtype = c; crc = updcrc16(c, 0); for (n=Rxhlen; --n >= 0; ++hdr) { if ((c = zdlread()) & ~0377) return c; crc = updcrc16(c, crc); *hdr = c; } if ((c = zdlread()) & ~0377) return c; crc = updcrc16(c, crc); if ((c = zdlread()) & ~0377) return c; crc = updcrc16(c, crc); if (crc & 0xFFFF) { loginf(badcrc); return ERROR; } return Rxtype; } /* Receive a binary style header (type and position) with 32 bit FCS */ int zrbhd32(hdr) register char *hdr; { register int c, n; /*###*/ register unsigned INT32 crc; if ((c = zdlread()) & ~0377) return c; Rxtype = c; crc = 0xFFFFFFFFL; crc = updcrc32(c, crc); debug(11,"zrbhd32 c=%X crc=%lX", c, crc); for (n=Rxhlen; --n >= 0; ++hdr) { if ((c = zdlread()) & ~0377) return c; crc = updcrc32(c, crc); *hdr = c; debug(11,"zrbhd32 c=%X crc=%lX", c, crc); } for (n=4; --n >= 0;) { if ((c = zdlread()) & ~0377) return c; crc = updcrc32(c, crc); debug(11,"zrbhd32 c=%X crc=%lX", c, crc); } if (crc != 0xDEBB20E3) { loginf(badcrc); return ERROR; } return Rxtype; } /* Receive a hex style header (type and position) */ int zrhhdr(hdr) char *hdr; { register int c; register unsigned INT16 crc; register int n; if ((c = zgethex()) < 0) return c; Rxtype = c; crc = updcrc16(c, 0); for (n=Rxhlen; --n >= 0; ++hdr) { if ((c = zgethex()) < 0) return c; crc = updcrc16(c, crc); *hdr = c; } if ((c = zgethex()) < 0) return c; crc = updcrc16(c, crc); if ((c = zgethex()) < 0) return c; crc = updcrc16(c, crc); if (crc & 0xFFFF) { loginf(badcrc); return ERROR; } switch ( c = GETCHAR(2)) { case 0215: Not8bit = c; /* **** FALL THRU TO **** */ case 015: /* Throw away possible cr/lf */ switch (c = GETCHAR(2)) { case 012: Not8bit |= c; } } if (c < 0) return c; return Rxtype; } /* Send a byte as two hex digits */ void zputhex(c) register int c; { static char digits[] = "0123456789abcdef"; debug(19,"zputhex: %02X", c & 0xff); /* 19960303 T.Tanaka */ BUFFER_BYTE(digits[(c&0xF0)>>4]); BUFFER_BYTE(digits[(c)&0xF]); } /* * Send character c with ZMODEM escape sequence encoding. * Escape XON, XOFF. Escape CR following @ (Telenet net escape) */ void zsendline(c) int c; { /* Quick check for non control characters */ if (c & 0140) BUFFER_BYTE(lastsent = c); else { switch (c &= 0377) { case ZDLE: BUFFER_BYTE(ZDLE); BUFFER_BYTE (lastsent = (c ^= 0100)); break; case 015: case 0215: if (!Zctlesc && (lastsent & 0177) != '@') goto sendit; /* **** FALL THRU TO **** */ case 020: case 021: case 023: case 0220: case 0221: case 0223: BUFFER_BYTE(ZDLE); c ^= 0100; sendit: BUFFER_BYTE(lastsent = c); break; default: if (Zctlesc && ! (c & 0140)) { BUFFER_BYTE(ZDLE); c ^= 0100; } BUFFER_BYTE(lastsent = c); } } } /* Decode two lower case hex digits into an 8 bit byte value */ int zgethex(void) { register int c; c = zgeth1(); debug(19,"zgethex: %02X", c); return c; } int zgeth1(void) { register int c, n; if ((c = noxrd7()) < 0) return c; n = c - '0'; if (n > 9) n -= ('a' - ':'); if (n & ~0xF) return ERROR; if ((c = noxrd7()) < 0) return c; c -= '0'; if (c > 9) c -= ('a' - ':'); if (c & ~0xF) return ERROR; c += (n<<4); return c; } /* * Read a byte, checking for ZMODEM escape encoding * including CAN*5 which represents a quick abort */ int zdlread(void) { register int c; again: /* Quick check for non control characters */ if ((c = GETCHAR(Rxtimeout)) & 0140) return c; switch (c) { case ZDLE: break; case 023: case 0223: case 021: case 0221: goto again; default: if (Zctlesc && !(c & 0140)) { goto again; } return c; } again2: if ((c = GETCHAR(Rxtimeout)) < 0) return c; if (c == CAN && (c = GETCHAR(Rxtimeout)) < 0) return c; if (c == CAN && (c = GETCHAR(Rxtimeout)) < 0) return c; if (c == CAN && (c = GETCHAR(Rxtimeout)) < 0) return c; switch (c) { case CAN: return GOTCAN; case ZCRCE: case ZCRCG: case ZCRCQ: case ZCRCW: return (c | GOTOR); case ZRUB0: return 0177; case ZRUB1: return 0377; case 023: case 0223: case 021: case 0221: goto again2; default: if (Zctlesc && ! (c & 0140)) { goto again2; } if ((c & 0140) == 0100) return (c ^ 0100); break; } debug(11,"Bad escape sequence %x", c); return ERROR; } /* * Read a character from the modem line with timeout. * Eat parity, XON and XOFF characters. */ int noxrd7(void) { register int c; for (;;) { if ((c = GETCHAR(Rxtimeout)) < 0) return c; switch (c &= 0177) { case DC1: case DC3: continue; default: if (Zctlesc && !(c & 0140)) continue; case '\r': case '\n': case ZDLE: return c; } } } /* Store long integer pos in Txhdr */ void stohdr(pos) long pos; { Txhdr[ZP0] = pos; Txhdr[ZP1] = pos>>8; Txhdr[ZP2] = pos>>16; Txhdr[ZP3] = pos>>24; } /* Recover a long integer from a header */ long rclhdr(hdr) register char *hdr; { register long l; l = (hdr[ZP3] & 0377); l = (l << 8) | (hdr[ZP2] & 0377); l = (l << 8) | (hdr[ZP1] & 0377); l = (l << 8) | (hdr[ZP0] & 0377); return l; } /* End of zmmisc.c */ ifmail-2.14tx8.10.orig/ifcico/zmrle.c100644 1751 50 10733 6374434317 14736 0ustar mdsrc/* * File: zmr.c 07-30-1989 * Copyright 1988, 1989 Omen Technology Inc All Rights Reserved * * * * This module implements ZMODEM Run Length Encoding, an * extension that was not funded by the original Telenet * development contract. * * This software may be freely used for non commercial and * educational (didactic only) purposes. This software may also * be freely used to support file transfer operations to or from * licensed Omen Technology products. Any programs which use * part or all of this software must be provided in source form * with this notice intact except by written permission from Omen * Technology Incorporated. * * Use of this software for commercial or administrative purposes * except when exclusively limited to interfacing Omen Technology * products requires a per port license payment of $20.00 US per * port (less in quantity). Use of this code by inclusion, * decompilation, reverse engineering or any other means * constitutes agreement to these conditions and acceptance of * liability to license the materials and payment of reasonable * legal costs necessary to enforce this license agreement. * * * Omen Technology Inc FAX: 503-621-3745 * Post Office Box 4681 * Portland OR 97208 * * This code is made available in the hope it will be useful, * BUT WITHOUT ANY WARRANTY OF ANY KIND OR LIABILITY FOR ANY * DAMAGES OF ANY KIND. * * ZMODEM RLE compression and decompression functions */ #include "lutil.h" #include "ttyio.h" #include "zmodem.h" static char *badcrc="Bad CRC"; /* Send data subpacket RLE encoded with 32 bit FCS */ void zsdar32(buf, length, frameend) char *buf; int length,frameend; { register int c, l, n; register INT32 crc; crc = 0xFFFFFFFFL; l = *buf++ & 0377; if (length == 1) { zsendline(l); crc = updcrc32(l, crc); if (l == ZRESC) { zsendline(1); crc = updcrc32(1, crc); } } else { for (n = 0; --length >= 0; ++buf) { if ((c = *buf & 0377) == l && n < 126 && length>0) { ++n; continue; } switch (n) { case 0: zsendline(l); crc = updcrc32(l, crc); if (l == ZRESC) { zsendline(0100); crc = updcrc32(0100, crc); } l = c; break; case 1: if (l != ZRESC) { zsendline(l); zsendline(l); crc = updcrc32(l, crc); crc = updcrc32(l, crc); n = 0; l = c; break; } /* **** FALL THRU TO **** */ default: zsendline(ZRESC); crc = updcrc32(ZRESC, crc); if (l == 040 && n < 34) { n += 036; zsendline(n); crc = updcrc32(n, crc); } else { n += 0101; zsendline(n); crc = updcrc32(n, crc); zsendline(l); crc = updcrc32(l, crc); } n = 0; l = c; break; } } } PUTCHAR(ZDLE); PUTCHAR(frameend); crc = updcrc32(frameend, crc); crc = ~crc; for (length=4; --length >= 0;) { zsendline((int)crc); crc >>= 8; } } /* Receive data subpacket RLE encoded with 32 bit FCS */ int zrdatr32(buf, length) register char *buf; int length; { register int c; register INT32 crc; register char *end; register int d; crc = 0xFFFFFFFFL; Rxcount = 0; end = buf + length; d = 0; /* Use for RLE decoder state */ while (buf <= end) { if ((c = zdlread()) & ~0377) { crcfoo: switch (c) { case GOTCRCE: case GOTCRCG: case GOTCRCQ: case GOTCRCW: d = c; c &= 0377; crc = updcrc32(c, crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); if ((c = zdlread()) & ~0377) goto crcfoo; crc = updcrc32(c, crc); if (crc != 0xDEBB20E3) { loginf(badcrc); return ERROR; } Rxcount = length - (end - buf); debug(11,"zrdatr32: %d %s", Rxcount, Zendnames[(d-GOTCRCE)&3]); return d; case GOTCAN: loginf("Sender Canceled"); return ZCAN; case TIMEOUT: loginf("TIMEOUT"); return c; default: loginf("Bad data subpacket"); return c; } } crc = updcrc32(c, crc); switch (d) { case 0: if (c == ZRESC) { d = -1; continue; } *buf++ = c; continue; case -1: if (c >= 040 && c < 0100) { d = c - 035; c = 040; goto spaces; } if (c == 0100) { d = 0; *buf++ = ZRESC; continue; } d = c; continue; default: d -= 0100; if (d < 1) goto badpkt; spaces: if ((buf + d) > end) goto badpkt; while ( --d >= 0) *buf++ = c; d = 0; continue; } } badpkt: loginf("Data subpacket too long"); return ERROR; } ifmail-2.14tx8.10.orig/ifcico/tcp.c100644 0 0 4077 6701151722 15001 0ustar rootroot/* contributed by Stanislav Voronyi */ #ifdef HAS_TCP #include #include #include #include "lutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" #include "config.h" #include "emsi.h" extern int made_request; extern int tcprcvfiles(void); extern int tcpsndfiles(file_list *); extern file_list *respond_wazoo(char *); extern int rxtcp(void) { int rc=0; fa_list *eff_remote,tmpl; file_list *tosend=NULL,**tmpfl; debug(10,"start rxtcp transfer"); if (emsi_remote_lcodes & LCODE_NPU) { loginf("remote requested \"no pickup\", no send"); eff_remote=NULL; } else if (emsi_remote_lcodes & LCODE_PUP) { loginf("remote requested \"pickup primary\""); tmpl.addr=remote->addr; tmpl.next=NULL; eff_remote=&tmpl; } else eff_remote=remote; tosend=create_filelist(eff_remote,ALL_MAIL,0); if ((rc=tcprcvfiles()) == 0) { if ((emsi_local_opts & OPT_NRQ) == 0) { for (tmpfl=&tosend;*tmpfl;tmpfl=&((*tmpfl)->next)); *tmpfl=respond_wazoo(NULL); } if ((tosend != NULL) || ((emsi_remote_lcodes & LCODE_NPU) == 0)) rc=tcpsndfiles(tosend); if ((rc == 0) && (made_request)) { loginf("freq was made, trying to receive files"); rc=tcprcvfiles(); } } tidy_filelist(tosend,(rc == 0)); debug(10,"rxtcp transfer rc=%d",rc); return rc; } extern int txtcp(void) { int rc=0; file_list *tosend=NULL,*respond=NULL; char *nonhold_mail; debug(10,"start txtcp transfer"); if (localoptions & NOHOLD) nonhold_mail=ALL_MAIL; else nonhold_mail=NONHOLD_MAIL; if (emsi_remote_lcodes & LCODE_HAT) { loginf("remote asked to \"hold all traffic\", no send"); tosend=NULL; } else tosend=create_filelist(remote,nonhold_mail,0); if ((tosend != NULL) || ((emsi_remote_lcodes & LCODE_NPU) == 0)) rc=tcpsndfiles(tosend); if (rc == 0) if ((rc=tcprcvfiles()) == 0) if ((emsi_local_opts & OPT_NRQ) == 0) if ((respond=respond_wazoo(NULL))) rc=tcpsndfiles(respond); tidy_filelist(tosend,(rc == 0)); tidy_filelist(respond,0); debug(10,"end txtcp transfer"); return rc; } #endif /* HAS_TCP */ ifmail-2.14tx8.10.orig/ifcico/tcpproto.c100644 0 0 15265 6701151722 16106 0ustar rootroot/* * contributed by Stanislav Voronyi * - some modifications by Jean-Louis Noel */ #ifdef HAS_TCP #include #include #include #include #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "ttyio.h" #include "session.h" #include "config.h" #include "emsi.h" #define TCP_CMD 0x87 #define TCP_DATA 0xe1 static FILE *fout; static FILE *in; static char txbuf[2048]; static char rxbuf[2048]; static int rx_type; static long startime,endtime,rxbytes,sbytes; static int sendfile(char *,char *); static int finsend(void); static int receivefile(char *,time_t,off_t); static int resync(off_t); static int closeit(int); static int tcp_sblk(char *,int,int); static int tcp_rblk(char *,int *); static int getsync(); extern FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); extern int closefile(int); int tcpsndfiles(file_list*); int tcpsndfiles(lst) file_list *lst; { int rc=0,maxrc=0; file_list *tmpf; loginf("start TCP send%s",lst?"":" (dummy)"); if(getsync()){ logerr("cant get synchronization"); return 1; } for (tmpf=lst;tmpf && (maxrc == 0);tmpf=tmpf->next) { if (tmpf->remote) { rc=sendfile(tmpf->local,tmpf->remote); rc=abs(rc); if (rc > maxrc) maxrc=rc; if (rc == 0) execute_disposition(tmpf); } else if (maxrc == 0) execute_disposition(tmpf); } if (maxrc < 2) { rc=finsend(); rc=abs(rc); } if (rc > maxrc) maxrc=rc; loginf("TCP send rc=%d",maxrc); return maxrc; } int tcprcvfiles(void); int tcprcvfiles(void) { int rc,bufl; long filesize,filetime; char *filename,*p; loginf("start TCP receive"); if(getsync()){ logerr("cant get synchronization"); return 1; } next: if((rc=tcp_rblk(rxbuf,&bufl))==0){ if(strncmp(rxbuf,"SN",2)==0){ rc=tcp_sblk("RN",2,TCP_CMD); return rc; } else if(strncmp(rxbuf,"S ",2)==0){ p=strchr(rxbuf+2,' '); if (p!=NULL) *p=0; else return 1; filename=xstrcpy(rxbuf+2); p++; filesize=strtol(p,&p,10); filetime=strtol(++p,(char **)NULL,10); } else return rc==0?1:rc; if(strlen(filename) && filesize && filetime) rc=receivefile(filename,filetime,filesize); if (fout) { if (closeit(0)) { logerr("Error closing file"); } (void)tcp_sblk("FERROR",6,TCP_CMD); } else goto next; } loginf("TCP receive rc=%d",rc); return abs(rc); } static int sendfile(ln,rn) char *ln,*rn; { int rc=0; struct stat st; struct flock fl; int bufl; long offset; int sverr; fl.l_type=F_RDLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; if ((in=fopen(ln,"r")) == NULL) { sverr=errno; logerr("$tcpsend cannot open file %s, skipping",ln); if (sverr == ENOENT) return 0; else return 1; } if (fcntl(fileno(in),F_SETLK,&fl) != 0) { loginf("$tcpsend cannot lock file %s, skipping",ln); fclose(in); return 1; } if (stat(ln,&st) != 0) { loginf("$cannot access \"%s\", skipping",ln); fclose(in); return 1; } if(st.st_size>0){ loginf("TCP send \"%s\" as \"%s\" (%lu bytes)", ln,rn,(unsigned long)st.st_size); (void)time(&startime); } else{ loginf("File \"%s\" has 0 size, skiped",ln); return 0; } sprintf(txbuf,"S %s %lu %lu",rn,(unsigned long)st.st_size,st.st_mtime); bufl=strlen(txbuf); rc=tcp_sblk(txbuf,bufl,TCP_CMD); rc=tcp_rblk(rxbuf,&bufl); if (strncmp(rxbuf,"RS",2)==0) { loginf("file %s considered normally sent",ln); return 0; } else if (strncmp(rxbuf,"RN",2)==0) { loginf("remote refusing receiving, aborting",ln); return 2; } else if(strncmp(rxbuf,"ROK",3)==0){ if(bufl > 3 && rxbuf[3]==' '){ offset=strtol(rxbuf+4,(char **)NULL,10); if(fseek(in,offset,SEEK_SET)!=0){ logerr("$tcpsend cannot seek in file %s",ln); return 1; } } else offset=0; } else return rc; while((bufl=fread(&txbuf,1,1024,in))!=0){ if((rc=tcp_sblk(txbuf,bufl,TCP_DATA))>0) break; } fclose(in); if(rc==0){ strcpy(txbuf,"EOF"); rc=tcp_sblk(txbuf,3,TCP_CMD); rc=tcp_rblk(rxbuf,&bufl); } if (rc == 0 && strncmp(rxbuf,"FOK",3)==0) { (void)time(&endtime); if ((startime=endtime-startime) == 0) startime=1; debug(7,"st_size %d, offset %d",st.st_size,offset); loginf("sent %lu bytes in %ld seconds (%ld cps)", (unsigned long)st.st_size-offset, startime, (long)(st.st_size-offset)/startime); return 0; } else if(strncmp(rxbuf,"FERROR",6)==0){ logerr("$tcpsend remote file error",ln); return rc==0?1:rc; } else return rc==0?1:rc; } static int resync(off) off_t off; { sprintf(txbuf,"ROK %ld",(long)off); return 0; } static int closeit(success) int success; { int rc; rc=closefile(success); fout=NULL; sbytes=rxbytes-sbytes; (void)time(&endtime); if ((startime=endtime-startime) == 0L) startime=1L; loginf("%s %lu bytes in %ld seconds (%ld cps)", success?"received":"dropped after", sbytes,startime,sbytes/startime); return rc; } static int finsend() { int rc,bufl; rc=tcp_sblk("SN",2,TCP_CMD); if(rc) return rc; rc=tcp_rblk(rxbuf,&bufl); if(strncmp(rxbuf,"RN",2)==0) return rc; else return 1; } static int receivefile(fn,ft,fs) char *fn; time_t ft; off_t fs; { int rc,bufl; loginf("TCP receive \"%s\" (%lu bytes)",fn,fs); strcpy(txbuf,"ROK"); fout=openfile(fn,ft,fs,&rxbytes,resync); if ( !fout) return 1; (void)time(&startime); sbytes=rxbytes; if (fs == rxbytes) { loginf("Skipping %s", fn); closeit(1); rc=tcp_sblk("RS",2,TCP_CMD); return rc; } bufl=strlen(txbuf); rc=tcp_sblk(txbuf,bufl,TCP_CMD); while((rc=tcp_rblk(rxbuf,&bufl))==0){ if(rx_type==TCP_CMD) break; if(fwrite(rxbuf,1,bufl,fout)!=bufl) break; rxbytes+=bufl; } if(rc) return rc; if(rx_type==TCP_CMD && bufl==3 && strncmp(rxbuf,"EOF",3)==0){ if(ftell(fout)==fs){ closeit(1); rc=tcp_sblk("FOK",3,TCP_CMD); return rc; } else return 1; } else return 1; } static int tcp_sblk(buf,len,typ) char *buf; int len,typ; { PUTCHAR(0xc6); PUTCHAR(typ); PUTCHAR((len>>8)&0x0ff); PUTCHAR(len&0x0ff); PUT(buf,len); PUTCHAR(0x6c); return tty_status; } static int tcp_rblk(buf,len) char *buf; int *len; { int c; *len=0; c=GETCHAR(120); if(c!=0xc6) return c; c=GETCHAR(120); rx_type=c; if(c!=TCP_CMD && c!=TCP_DATA) return c; c=GETCHAR(120); *len=c<<8; c=GETCHAR(120); *len+=c; GET(buf,*len,120); c=GETCHAR(120); if(c!=0x6c) return c; return tty_status; } static int getsync() { int c; PUTCHAR(0xaa); PUTCHAR(0x55); debug(9,"getsync try to synchronize"); gs: if(tty_status==STAT_TIMEOUT){ debug(9,"getsync failed"); return 1;} while((c=GETCHAR(120))!=0xaa) if(tty_status==STAT_TIMEOUT){ debug(9,"getsync failed"); return 1;} if((c=GETCHAR(120))!=0x55) goto gs; debug(9,"getsync ok"); return tty_status; } #endif /* HAS_TCP */ ifmail-2.14tx8.10.orig/ifcico/openfile.c100644 1751 50 11536 6374432526 15410 0ustar mdsrc#include #include #include #include #include #include #include #include #include #include "xutil.h" #include "lutil.h" #include "config.h" #include "needed.h" extern unsigned INT32 sequencer(void); static FILE *infp=NULL; static char *infpath=NULL; static time_t intime; static int isfreq; char *freqname=NULL; /* Try to find present (probably incomplete) file with the same timestamp (it might be renamed), open it for append and store resync offset. Store 0 in resync offset if the file is new. Return FILE* or NULL. resync() must accept offset in bytes and return 0 on success, nonzero otherwise (and then the file will be open for write). For Zmodem, resync is always possible, but for SEAlink it is not. Do not try any resyncs if remsize == 0. */ FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); FILE *openfile(fname,remtime,remsize,resofs,resync) char *fname; time_t remtime; off_t remsize; off_t *resofs; int (*resync)(off_t); { char *opentype; char *p,x; char ctt[32]; int rc,ncount; struct stat st; struct flock fl; char tmpfname[16]; fl.l_type=F_WRLCK; fl.l_whence=0; fl.l_start=0L; fl.l_len=0L; strcpy(ctt,date(remtime)); debug(11,"openfile(\"%s\",%s,%lu,...)", S(fname),S(ctt),(unsigned long)remsize); if ((fname == NULL) || (fname[0] == '\0')) { sprintf(tmpfname,"%08lx.pkt",(unsigned long)sequencer()); fname=tmpfname; } if (infpath) free(infpath); infpath=xstrcpy(inbound); infpath=xstrcat(infpath,"/tmp/"); infpath=xstrcat(infpath,fname); if ((strlen(fname) == 12) && (strspn(fname,"0123456789abcdefABCDEF") == 8) && (strcasecmp(fname+8,".req") == 0)) { debug(12,"received wazoo freq file"); isfreq=1; } else isfreq=0; /* Renaming algorythm is as follows: start with the present name, increase the last character of the file name, jumping from '9' to 'a', from 'z' to 'A', from 'Z' to '0'. If _all_ these names are occupied, */ p=infpath+strlen(infpath)-1; x=*p; ncount=0; while (((rc=stat(infpath,&st)) == 0) && (remtime != st.st_mtime) && (ncount++ < 62)) { if (x == '9') x='a'; else if (x == 'z') x='A'; else if (x == 'Z') x='0'; else x++; *p=x; } if (isfreq || (ncount >= 62)) /* names exhausted */ { rc=1; p=strrchr(infpath,'/'); *p='\0'; p=tempnam(infpath,","); free(infpath); infpath=xstrcpy(p); /* tempnam() returns pointer to a static buffer, right? */ } *resofs=0L; opentype="w"; if ((rc == 0) && (remsize != 0)) { loginf("resyncing at offset %lu of \"%s\"", (unsigned long)st.st_size,infpath); if (resync(st.st_size) == 0) { opentype="a"; *resofs=st.st_size; } } debug(11,"try fopen(\"%s\",\"%s\")",infpath,opentype); if ((infp=fopen(infpath,opentype)) == NULL) { logerr("$cannot open local file \"%s\" for \"%s\"", infpath,opentype); free(infpath); infpath=NULL; return NULL; } fl.l_pid=getpid(); if (fcntl(fileno(infp),F_SETLK,&fl) != 0) { loginf("$cannot lock local file \"%s\"",infpath); fclose(infp); infp=NULL; free(infpath); infpath=NULL; return NULL; } intime=remtime; if (isfreq) { if (freqname) free(freqname); freqname=xstrcpy(infpath); } debug(11,"opened file \"%s\" for \"%s\", restart at %lu", infpath,opentype,(unsigned long)*resofs); return infp; } /* close file and if (success) { move it to the final location } */ int closefile(int); int closefile(success) int success; { char *newpath,*p; int rc=0,ncount; char x; struct stat st; struct utimbuf ut; debug(11,"closefile(%d), for file \"%s\"",success,S(infpath)); if ((infp == NULL) || (infpath == NULL)) { logerr("internal error: try close unopened file!"); return 1; } rc=fclose(infp); infp=NULL; if (rc == 0) { ut.actime=intime; ut.modtime=intime; if ((rc=utime(infpath,&ut))) { logerr("$utime failed"); } } if (isfreq) { if ((rc != 0) || (!success)) { loginf("removing unsuccessfuly received wazoo freq"); unlink(freqname); free(freqname); freqname=NULL; } isfreq=0; } else if ((rc == 0) && success) { newpath=xstrcpy(inbound); newpath=xstrcat(newpath,strrchr(infpath,'/')); p=newpath+strlen(newpath)-1; x=*p; ncount=0; while (((rc=stat(newpath,&st)) == 0) && (ncount++ < 62)) { if (x == '9') x='a'; else if (x == 'z') x='A'; else if (x == 'Z') x='0'; else x++; *p=x; } if (ncount >= 62) /* names exhausted */ { rc=1; p=strrchr(newpath,'/'); *p='\0'; p=tempnam(newpath,","); free(newpath); newpath=xstrcpy(p); /* tempnam() returns pointer to a static buffer, right? */ } debug(11,"moving \"%s\" -> \"%s\"",S(infpath),S(newpath)); rc=rename(infpath,newpath); if (rc) logerr("$error renaming \"%s\" -> \"%s\"", S(infpath),S(newpath)); free(newpath); } free(infpath); infpath=NULL; return rc; } ifmail-2.14tx8.10.orig/ifcico/dietifna.c100644 0 0 4150 6701151722 15766 0ustar rootroot#include #include "lutil.h" #include "ttyio.h" #include "session.h" #include "emsi.h" extern int made_request; static int sendfiles(file_list*); extern int xmsndfiles(file_list*); static int xmrcvfiles(void); extern int xmrecv(char*); extern file_list *respond_wazoo(char*); int rxdietifna(void); int rxdietifna(void) { int rc; file_list *tosend=NULL,**tmpfl; debug(10,"start rxDietIFNA"); session_flags |= SESSION_IFNA; session_flags &= ~SESSION_BARK; tosend=create_filelist(remote,ALL_MAIL,0); if ((rc=xmrcvfiles()) == 0) { if ((emsi_local_opts & OPT_NRQ) == 0) { for (tmpfl=&tosend;*tmpfl;tmpfl=&((*tmpfl)->next)); *tmpfl=respond_wazoo(NULL); } rc=sendfiles(tosend); /* we are not sending file requests in slave session */ } tidy_filelist(tosend,(rc == 0)); debug(10,"rxdietifna transfer rc=%d",rc); return rc; } int txdietifna(void); int txdietifna(void) { int rc; file_list *tosend=NULL,*respond=NULL; char *nonhold_mail; debug(10,"start txDietIFNA"); session_flags |= SESSION_IFNA; session_flags &= ~SESSION_BARK; if (localoptions & NOHOLD) nonhold_mail=ALL_MAIL; else nonhold_mail=NONHOLD_MAIL; tosend=create_filelist(remote,nonhold_mail,2); if ((rc=sendfiles(tosend)) == 0) if ((rc=xmrcvfiles()) == 0) if ((emsi_local_opts & OPT_NRQ) == 0) if ((respond=respond_wazoo(NULL))) rc=sendfiles(respond); /* but we are trying to respond other's file requests in master */ /* session, though they are not allowed by the DietIFNA protocol */ tidy_filelist(tosend,(rc == 0)); tidy_filelist(respond,0); debug(10,"rxdietifna transfer rc=%d",rc); return rc; } int xmrcvfiles(void) { int rc; while ((rc=xmrecv(NULL)) == 0); if (rc == 1) return 0; else return rc; } int sendfiles(tosend) file_list *tosend; { int c,count; count=0; while (((c=GETCHAR(15)) >= 0) && (c != NAK) && (c != 'C') && (count++ < 9)) debug(11,"got '%s' waiting for C/NAK", printablec(c)); if (c == NAK) { session_flags &= ~FTSC_XMODEM_CRC; } else if (c == 'C') { session_flags |= FTSC_XMODEM_CRC; } else if (c < 0) return c; else return 1; return xmsndfiles(tosend); } ifmail-2.14tx8.10.orig/ifcico/openterm.c100644 1751 50 2270 6463053353 15407 0ustar mdsrc#ifdef HAS_TERM #include #include #include #include #include #include #include #include #include "lutil.h" #include extern void linedrop(int); int opentcp(char*); void closetcp(void); static int fd=-1; int opentcp(name) char *name; { debug(2,"try open term connection to %s",S(name)); signal(SIGPIPE,linedrop); fflush(stdin); fflush(stdout); setbuf(stdin,NULL); setbuf(stdout,NULL); close(0); close(1); debug(2,"try to connect to TERM server"); if ((fd = connect_server(0)) < 0) { logerr("$cannot connect to TERM server"); return -1; } debug(2,"trying %s at port %d", name, FIDOPORT); if ((send_command(fd,C_PORT,0,"%s:%d",name,FIDOPORT)) < 0) { logerr("$cannot create termsocket (got %d, expected 0"); open("/dev/null",O_RDONLY); open("/dev/null",O_WRONLY); return -1; } send_command(fd,C_DUMB, 1,0); if (dup(fd) != 1) { logerr("$cannot dup socket"); open("/dev/null",O_WRONLY); return -1; } clearerr(stdin); clearerr(stdout); loginf("connected to %s",name); return 0; } void closetcp(void) { shutdown(fd,2); signal(SIGPIPE,SIG_DFL); } #endif ifmail-2.14tx8.10.orig/ifcico/nlindex.c100644 1751 50 7370 6463053353 15225 0ustar mdsrc#include #include #include #include #include #include #include "directory.h" #include #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "nodelist.h" #include "nlindex.h" #ifndef IF_DBM_SUFFIX #ifdef HAS_BSD_DB #define IF_DBM_SUFFIX ".db" #else #define IF_DBM_SUFFIX ".dir" #endif #endif #ifdef HAS_NDBM_H DBM *nldb=NULL; #endif int openstatus = 0; int n; DIR *dp; struct dirent *de; struct _nodelist *nodevector; struct _pkey pkey[] = { {"Down",NL_NODE,NL_DOWN}, {"Hold",NL_NODE,NL_HOLD}, {"Host",NL_NET,0}, {"Hub",NL_NODE,NL_HUB}, {"Point",NL_POINT,0}, {"Pvt",NL_NODE,NL_PVT}, {"Region",NL_NET,NL_REGION}, {"Zone",NL_ZONE,0}, {NULL,0,0} }; struct _fkey fkey[] = { {"CM",CM}, {"MO",MO}, {"LO",LO}, {"V21",V21}, {"V22",V22}, {"V29",V29}, {"V32",V32}, {"V32B",V32B|V32}, {"V33",V33}, {"V34",V34}, {"V42",V42|MNP}, {"V42B",V42B|V42|MNP}, {"MNP",MNP}, {"H96",H96}, {"HST",HST|MNP}, {"H14",H14|HST|MNP}, {"H16",H16|H14|HST|MNP|V42B}, {"MAX",NL_MAX}, {"PEP",PEP}, {"CSP",CSP}, {"ZYX",ZYX|V32B|V32|V42B|V42|MNP}, {"MN",MN}, {"XA",XA}, {"XB",XB}, {"XC",XC}, {"XP",XP}, {"XR",XR}, {"XW",XW}, {"XX",XX}, {NULL,0} }; int initnl(void) { int i,rc; fa_list *tmp; time_t lastmtime; struct stat stbuf; char *indexnm,*nlnm=NULL,*p; if (openstatus > 1) return openstatus; if (openstatus == 1) return 0; n=0; for (tmp=nllist;tmp;tmp=tmp->next) n++; debug(20,"Initialize %d nodelists",n); nodevector=(struct _nodelist *)xmalloc(n * sizeof(struct _nodelist)); lastmtime=configtime; i=0; for (tmp=nllist;tmp;tmp=tmp->next) { if (tmp->addr->domain) nodevector[i].domain=tmp->addr->domain; else if (whoami->addr->domain) nodevector[i].domain=whoami->addr->domain; else nodevector[i].domain="fidonet"; nlnm=xstrcpy(tmp->addr->name); if ((rc=stat(tmp->addr->name,&stbuf)) != 0) { int next,mext=0; if (nlnm) free(nlnm); if ((nlnm=strrchr(tmp->addr->name,'/'))) nlnm++; else nlnm=tmp->addr->name; if (dp == NULL) dp=opendir(nlbase); if (dp != NULL) { rewinddir(dp); while ((de=readdir(dp))) if (strncmp(de->d_name,nlnm,strlen(nlnm)) == 0) { p=(de->d_name)+strlen(nlnm); if ((*p == '.') && (strlen(p) == 4) && (strspn(p+1,"0123456789") == 3)) { next=atoi(p+1); if (next > mext) mext=next; } } } else logerr("$cannot open \"%s\" directory",S(nlbase)); nlnm=xstrcpy(tmp->addr->name); nlnm=xstrcat(nlnm,".999"); sprintf(nlnm+strlen(nlnm)-3,"%03d",mext); debug(20,"try \"%s\" nodelist",S(nlnm)); rc=stat(nlnm,&stbuf); } if (rc == 0) { if (stbuf.st_mtime > lastmtime) lastmtime=stbuf.st_mtime; nodevector[i].fp=fopen(nlnm,"r"); if (nodevector[i].fp == NULL) logerr("$cannot open nodelist \"%s\"",S(nlnm)); else debug(20,"opened nodelist \"%s\"",S(nlnm)); } else { logerr("$cannot stat nodelist \"%s\"", S(tmp->addr->name)); nodevector[i].fp=NULL; } i++; if (nlnm) free(nlnm); } if (dp != NULL) closedir(dp); dp=NULL; for (i=0;i 1) { openstatus=2; logerr("$cannot open nodelist index (%d)",rc); } else openstatus=1; return rc; } ifmail-2.14tx8.10.orig/ifcico/nodebld.c100644 1751 50 13114 6463053353 15204 0ustar mdsrc#include #include #include #include #include #include #include #ifdef HAS_NDBM_H #include #endif #include "directory.h" #include "xutil.h" #include "lutil.h" #include "ftn.h" #include "config.h" #include "nodelist.h" #include "nlindex.h" #include "needed.h" #ifndef IF_DBM_SUFFIX #ifdef HAS_BSD_DB #define IF_DBM_SUFFIX ".db" #else #define IF_DBM_SUFFIX ".dir" #endif #endif int nodebld(void) { int typ,impltyp=NL_NODE,num,i,j,rc=0; int lineno,entries,total; fa_list *tmp; #ifndef HAS_BSD_DB FILE *ifp; #endif off_t off; struct _loc *loc,*oldloc; unsigned short hub; unsigned char pflag; char buf[256],*p,*q; struct _ixentry addr; faddr *tmpa; datum key; datum dat; char *nm; loginf("Nodelist index rebuild requested"); key.dptr=(char*)&addr; key.dsize=sizeof(struct _ixentry); #ifndef DONT_HAVE_DBMCLOSE #ifdef HAS_NDBM_H if (nldb != NULL) { dbm_close(nldb); nldb=NULL; } #else dbmclose(); #endif #endif nm=xstrcpy(nlbase); nm=xstrcat(nm,INDEX); nm=xstrcat(nm,IF_DBM_SUFFIX); #ifdef HAS_BSD_DB unlink(nm); #else if ((ifp=fopen(nm,"w"))) fclose(ifp); else { logerr("$cannot create new %s",S(nm)); return 1; } strcpy(nm+strlen(nm)-strlen(IF_DBM_SUFFIX),".pag"); if ((ifp=fopen(nm,"w"))) fclose(ifp); else { logerr("$cannot create new %s",S(nm)); return 1; } #endif nm[strlen(nm)-strlen(IF_DBM_SUFFIX)]='\0'; #ifdef HAS_NDBM_H if ((nldb=dbm_open(nm,O_RDWR | O_CREAT,0600)) == NULL) rc=1; #else rc=dbminit(nm); #endif if (rc) { logerr("$cannot open dbm \"%s\"",S(nm)); free(nm); return rc; } free(nm); rc=0; total=0; for (i=0,tmp=nllist;tmp;tmp=tmp->next,i++) if (nodevector[i].fp) { debug(20,"making index for \"%s[.???]\"",S(tmp->addr->name)); addr.zone=0; addr.net=0; addr.node=0; addr.point=0; hub=0; if (tmp->addr) { addr.zone=tmp->addr->zone; addr.net=tmp->addr->net; addr.node=tmp->addr->node; addr.point=tmp->addr->point; } entries=0; lineno=0; while (!feof(nodevector[i].fp)) { off=ftell(nodevector[i].fp); lineno++; if (fgets(buf,sizeof(buf)-1,nodevector[i].fp) == NULL) continue; if (*(buf+strlen(buf)-1) != '\n') { while (fgets(buf,sizeof(buf)-1,nodevector[i].fp) && (*(buf+strlen(buf)-1) != '\n')) /*void*/; logerr("nodelist %d(%u): too long line junked", i,lineno); continue; } if (*(p=buf+strlen(buf)-1) == '\n') *p--='\0'; if (*p == '\r') *p='\0'; if ((buf[0] == ';') || (buf[0] == '\032') || (buf[0] == '\0')) continue; if ((p=strchr(buf,','))) *p++='\0'; if ((q=strchr(p,','))) *q++='\0'; typ=NL_NONE; pflag=0; if (buf[0] == '\0') typ=impltyp; else if (strcasecmp(buf,"Boss") == 0) { impltyp=NL_POINT; if ((tmpa=parsefnode(p)) == NULL) { logerr("%s(%u): unparsable Boss addr \"%s\"", S(tmp->addr->name),lineno,p); continue; } if (tmpa->zone) addr.zone=tmpa->zone; addr.net=tmpa->net; addr.node=tmpa->node; tidy_faddr(tmpa); typ=NL_NONE; continue; /* no further processing */ } else { impltyp=NL_NODE; for (j=0;pkey[j].key;j++) if (strcasecmp(buf,pkey[j].key) == 0) { typ=pkey[j].type; pflag=pkey[j].pflag; } } if (typ == NL_NONE) { for (q=buf;*q;q++) if (*q < ' ') *q='.'; logerr("%s(%u): unidentified entry \"%s\"", S(tmp->addr->name),lineno,buf); continue; } debug(21,"got \"%s\" as \"%s\" typ %d",S(buf),S(p),typ); if ((num=atoi(p)) == 0) { logerr("%s(%u): bad numeric \"%s\"", S(tmp->addr->name),lineno,S(p)); continue; } /* first check it for being a hub */ if (typ == NL_NODE) { if (pflag == NL_HUB) hub=num; /* else it is under the same hub */ } else hub=0; /* reset hub assignment */ /* now update the current address */ switch (typ) { case NL_ZONE: addr.zone=num; addr.net=num; addr.node=0; addr.point=0; break; case NL_NET: addr.net=num; addr.node=0; addr.point=0; break; case NL_NODE: addr.node=num; addr.point=0; break; case NL_POINT: addr.point=num; break; } debug(21,"put: %u:%u/%u.%u as (%u,%lu)", addr.zone,addr.net,addr.node, addr.point,i,(unsigned long)off); #ifdef HAS_NDBM_H dat=dbm_fetch(nldb,key); #else dat=fetch(key); #endif oldloc=(struct _loc *)dat.dptr; /* FIXME: must check multiple entries in oldloc */ if (oldloc && (tmp->addr->domain) && (nodevector[oldloc->nlnum].domain) && strcasecmp(nodevector[oldloc->nlnum].domain, tmp->addr->domain)) { /* same addr from another domain */ loc=(struct _loc *)xmalloc(sizeof(struct _loc)+ dat.dsize); loc->nlnum=i; loc->off=off; loc->hub=hub; memcpy(loc+1,oldloc,dat.dsize); dat.dsize+=sizeof(struct _loc); } else { loc=(struct _loc *)xmalloc(sizeof(struct _loc)); loc->nlnum=i; loc->off=off; loc->hub=hub; dat.dsize=sizeof(struct _loc); } dat.dptr=(char *)loc; debug(21,"store: [%d] %s",dat.dsize, printable(dat.dptr,dat.dsize)); #ifdef HAS_NDBM_H if (dbm_store(nldb,key,dat,DBM_REPLACE) < 0) #else if (store(key,dat)) #endif { logerr("cannot store %u:%u/%u.%u as (%u,%lu)", addr.zone,addr.net,addr.node, addr.point,i,(unsigned long)off); } free(loc); entries++; total++; } loginf("%d entries in nodelist \"%s[.???]\"", entries,S(tmp->addr->name)); } #ifndef DONT_HAVE_DBMCLOSE #ifdef HAS_NDBM_H dbm_close(nldb); #else dbmclose(); #endif #endif loginf("Total %d entries in nodelist index",total); return rc; } ifmail-2.14tx8.10.orig/ifcico/ifindex.c100644 0 0 2053 6573551267 15650 0ustar rootroot#include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "lutil.h" #include "nodelist.h" #include "nlindex.h" #include "config.h" #include "version.h" #include "trap.h" extern int nodebld(void); void usage(void) { confusage(""); } int main(argc,argv) int argc; char *argv[]; { int c,rc; char buf[64]; #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); catch(myname); while ((c=getopt(argc,argv,"x:I:h")) != -1) if (confopt(c,optarg)) switch (c) { default: usage(); exit(1); } if ((rc=readconfig())) { fprintf(stderr,"Error getting configuration, aborting\n"); return rc; } rc=initnl(); if ((rc == 0) && (isatty(0))) { printf("Nodelist index is up to date.\n"); printf("Do you really want to rebuild it [y/N] ? "); fflush(stdout); fgets(buf,sizeof(buf)-1,stdin); if ((buf[0] == 'y') || (buf[0] == 'Y')) { rc=nodebld(); } } else rc=nodebld(); loginf("rc=%d",rc); return rc; } ifmail-2.14tx8.10.orig/ifcico/ifroute.c100644 0 0 5506 6573551267 15705 0ustar rootroot#include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include #include #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "nodelist.h" #include "config.h" #include "version.h" #include "trap.h" #define MAX_MX 16 extern int lookup_node_mxes(char *, char *, char **, int); void usage() { confusage("-d -f -n \n"); fprintf (stderr, _("-d\tspecify top level domain for routing\n")); fprintf (stderr, _("-f\tspecify fallback node\n")); fprintf (stderr, _("-n\t\tdo not use nodelist when MX ok\n")); fprintf (stderr, _(" \tin domain form, e.g. f11.n22.z3\n")); fprintf (stderr, "Changes copyright (c) Ruslan Belkin \n"); } static char *mxbuf[MAX_MX]; /* returned MX RRs */ static char hostname[MAXHOSTNAMELEN]; int main (argc, argv) int argc; char *argv[]; { int nolist_flag = 0; int c,rc; faddr *adr = NULL, *raddr = NULL; node *nlent ; char *domain = NULL; /* default local domain for FIDO */ char *fallback = NULL; /* fallback node */ #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); catch(myname); while ((c = getopt(argc,argv,"hx:l:d:f:n")) != -1) if (confopt(c,optarg)) switch (c) { case 'd': domain = optarg; break; case 'f': fallback = optarg; break; case 'n': nolist_flag = 1; break; default: usage(argv[0]); exit(EX_USAGE); } if (readconfig()) { fprintf(stderr, "Error getting configuration, aborting\n"); exit(EX_DATAERR); } rc = 1; if (argv[optind] == NULL) { usage(); rc=EX_USAGE; } else if ((adr=parsefaddr(argv[optind])) == NULL) { logerr("unrecognizable address \"%s\"",argv[optind]); rc=EX_USAGE; } else if (gethostname(hostname, sizeof(hostname) - 1) != 0) { logerr("cannot get hostname"); rc=EX_NOHOST; } else { if (!lookup_node_mxes(ascinode(adr, 0x2|0x4|0x8), domain, mxbuf, MAX_MX)) { int i; for (i = 0; i < MAX_MX && mxbuf[i] != NULL; i++) { if ((raddr = parsefaddr(mxbuf[i])) != NULL) { raddr->domain = NULL; nlent = getnlent(raddr); if (nlent->pflag != NL_DUMMY || nolist_flag) { printf("%s\n", ascinode (raddr, 0x3e)); rc = 0; break; } } else if (!strncasecmp(mxbuf[i], "direct", 6) || !strcasecmp(mxbuf[i], hostname)) { printf("%s\n", ascinode (adr, 0x3e)); rc = 0; break; } } } if (rc == 1) { nlent = getnlent(adr); if ((nlent->pflag != NL_DUMMY) || (fallback != NULL && (adr = parsefaddr(fallback)) != NULL)) { printf("%s\n", ascinode(adr, 0x3e)); rc = 0; } else { rc = EX_NOHOST; } } } return rc; } ifmail-2.14tx8.10.orig/ifcico/mxlookup.c100644 1751 50 10705 6157407347 15464 0ustar mdsrc/* ----------------------------------------------------------------------------] Retrieve MX-es by name developed for Eugene Crosser's ifmail by Ruslan Belkin 1994 ----------------------------------------------------------------------------] */ # include # include # include # include # include # include # include # include # include # include # include # include extern int h_errno; # ifndef NO_DATA # define NO_DATA NO_ADDRESS # endif typedef union { HEADER qb1; char qb2 [PACKETSZ]; } querybuf; char * store_rr (char * cp, querybuf * msg, char ** mxp); char * exp_cdname (char * cp, querybuf * msg, char * name); static char *cname = NULL; /* * Store records in user(s) buffer */ int storeinfo (answer, eom, mxp, mxplen) querybuf *answer; char *eom, **mxp; int mxplen; { HEADER *hp; char *cp; int ancount, nscount, arcount, qdcount, i; /* * find first satisfactory answer */ hp = (HEADER *) answer; ancount = ntohs (hp->ancount); qdcount = ntohs (hp->qdcount); nscount = ntohs (hp->nscount); arcount = ntohs (hp->arcount); if (hp -> rcode != NOERROR || (ancount + nscount + arcount) == 0) { switch (hp -> rcode) { case NXDOMAIN: /* Check if it's an authoritive answer */ if (hp -> aa) { h_errno = HOST_NOT_FOUND; return 0; } else { h_errno = TRY_AGAIN; return 0; } case SERVFAIL: h_errno = TRY_AGAIN; return 0; case NOERROR : h_errno = NO_DATA; return 0; case NOTIMP : case REFUSED: h_errno = NO_RECOVERY; return 0; } return 0; } cp = (char *)answer + sizeof(HEADER); if (qdcount) { cp += dn_skipname (cp, eom) + QFIXEDSZ; while (--qdcount > 0) cp += dn_skipname (cp, eom) + QFIXEDSZ; } for (i = 0; i < mxplen && --ancount >= 0 && cp && cp < eom; i++) cp = store_rr (cp, answer, &mxp[i]); return 1; } int getinfo (name, domain, type, mxp, mxplen) char *name, *domain, **mxp; int type, mxplen; { char host [2 * MAXDNAME + 2], *eom; int n; querybuf buf, answer; if (domain == NULL) sprintf (host, "%.*s", MAXDNAME, name); else sprintf (host, "%.*s.%.*s", MAXDNAME, name, MAXDNAME, domain); n = res_mkquery (QUERY, host, C_IN, type, (char *)NULL, 0, NULL, (char *)&buf, sizeof (buf) ); if (n < 0) { h_errno = NO_RECOVERY; return 0; } n = res_send ((char *)&buf, n, (char *)&answer, sizeof(answer)); if (n < 0) { h_errno = TRY_AGAIN; return 0; } eom = (char *)&answer + n; return storeinfo (&answer, eom, mxp, mxplen); } int lookup_node_mxes (node, domain, mxp, mxplen) char *node, *domain, ** mxp; int mxplen; { char *oldcname = NULL; unsigned addr; int ncnames = 5, hp = 0; res_init (); _res.options &= ~RES_DEFNAMES; _res.retrans = 3; addr = inet_addr (node); h_errno = TRY_AGAIN; oldcname = NULL; ncnames = 5; while (!hp && h_errno == TRY_AGAIN) if (addr == -1) { cname = NULL; if (oldcname == NULL) hp = getinfo (node, domain, T_MX, mxp, mxplen); else hp = getinfo (node, domain, T_MX, mxp, mxplen); if (cname) { /* * too many CNAMEs ? */ if (ncnames-- == 0) return -1; oldcname = cname; hp = 0; h_errno = TRY_AGAIN; continue; } } else { hp = (int)gethostbyaddr ((char*)&addr, 4, AF_INET); break; } if (hp == 0) return -1; return 0; } char * store_rr (cp, msg, mxp) char *cp, **mxp; querybuf *msg; { int type, class, dlen, ttl; char *cp1; char name[MAXDNAME]; if ((cp = exp_cdname (cp, msg, name)) == NULL) return NULL; /* compression error */ type = _getshort (cp); cp += sizeof (u_short); class= _getshort (cp); cp += sizeof (u_short); ttl = _getlong (cp); cp += sizeof (u_long); dlen = _getshort (cp); cp += sizeof (u_short); cp1 = cp; /* * Print type specific data, if appropriate */ switch (type) { case T_MX: cp = exp_cdname (cp + sizeof (u_short), msg, name); if (cp != NULL) strcpy (*mxp = malloc (strlen (name) + 1), name); break; default: cp += dlen; } if (cp != cp1 + dlen) return NULL; return cp; } /* * expand correct host name */ char * exp_cdname (cp, msg, name) char *cp, *name; querybuf *msg; { int n = dn_expand (msg, msg + 512, cp, name, MAXDNAME - 2); if (n < 0) return NULL; if (name[0] == '\0') { name[0] = '.'; name[1] = '\0'; } return cp + n; } ifmail-2.14tx8.10.orig/ifcico/nlpatch.c100644 0 0 7100 6573551267 15651 0ustar rootroot#include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include "getopt.h" #include "xutil.h" #include "lutil.h" #include "version.h" #include "config.h" #ifndef BLKSIZ #define BLKSIZ 512 #endif extern unsigned INT16 crc16tab[]; #define updcrc(cp, crc) ( crc16tab[((crc >> 8) & 255) ^ cp] ^ (crc << 8)) void usage(void) { confusage(" "); } static int apply(char*,char*,char*); int main(argc,argv) int argc; char *argv[]; { int c,rc; char *nl,*nd,*nn; char *p,*q; #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); while ((c=getopt(argc,argv,"x:I:h")) != -1) if (confopt(c,optarg)) switch (c) { default: usage(); exit(1); } if (((nl=argv[optind++]) == NULL) || ((nd=argv[optind++]) == NULL) || (argv[optind])) { usage(); exit(1); } if ((rc=readconfig())) { fprintf(stderr,"Error getting configuration, aborting\n"); return rc; } if (((p=strrchr(nl,'.'))) && ((q=strrchr(nd,'.'))) && (strlen(p) == strlen(q))) { nn=xstrcpy(nl); p=strrchr(nn,'.')+1; q++; strcpy(p,q); } else nn=xstrcpy("newnodelist"); if (strcmp(nl,nn) == 0) { loginf("attempt to update notelist to the same version"); exit(2); } loginf("patching %s with %s to %s",nl,nd,nn); rc=apply(nl,nd,nn); if (rc) unlink(nn); free(nn); return rc; } int apply(nl,nd,nn) char *nl,*nd,*nn; { FILE *fo,*fd,*fn; unsigned char cmdbuf[BLKSIZ]; unsigned char lnbuf[BLKSIZ]; int i,count; int ac=0,cc=0,dc=0; int rc=0; int firstline=1; unsigned INT16 theircrc=0,mycrc=0; unsigned char *p; if (((fo=fopen(nl,"r")) == NULL) || ((fd=fopen(nd,"r")) == NULL) || ((fn=fopen(nn,"w")) == NULL)) { logerr("$cannot open some file(s)"); return 2; } if ((fgets(cmdbuf,sizeof(cmdbuf)-1,fd) == NULL) || (fgets(lnbuf,sizeof(cmdbuf)-1,fo) == NULL) || (strcmp(cmdbuf,lnbuf) != 0)) { rc=6; } else { rewind(fo); rewind(fd); while ((rc == 0) && fgets(cmdbuf,sizeof(cmdbuf)-1,fd)) switch (cmdbuf[0]) { case ';': debug(20,"COM: %s",cmdbuf); break; case 'A': count=atoi(cmdbuf+1); ac+=count; debug(20,"ADD %d: %s",count,cmdbuf); for (i=0;(i < count) && (rc == 0);i++) if (fgets(lnbuf,sizeof(lnbuf)-1,fd)) { if (firstline) { firstline=0; if ((p=strrchr(lnbuf,':'))) { theircrc=atoi(p+1); } } else { for (p=lnbuf;*p;p++) mycrc=updcrc(*p,mycrc); } fputs(lnbuf,fn); } else rc=3; break; case 'D': count=atoi(cmdbuf+1); dc+=count; debug(20,"DEL %d: %s",count,cmdbuf); for (i=0;(i < count) && (rc == 0);i++) if (fgets(lnbuf,sizeof(lnbuf)-1,fo) == NULL) rc=3; break; case 'C': count=atoi(cmdbuf+1); cc+=count; debug(20,"CPY %d: %s",count,cmdbuf); for (i=0;(i < count) && (rc == 0);i++) if (fgets(lnbuf,sizeof(lnbuf)-1,fo)) { for (p=lnbuf;*p;p++) mycrc=updcrc(*p,mycrc); fputs(lnbuf,fn); } else rc=3; break; default: rc=5; break; } } fclose(fo); fclose(fd); fclose(fn); debug(20,"theircrc=%hu, mycrc=%hu",theircrc,mycrc); if ((rc == 0) && (mycrc != theircrc)) rc=4; if (rc == 3) loginf("could not read some of the files"); else if (rc == 4) loginf("crc of resulting file %hu does not match official %hu", mycrc,theircrc); else if (rc == 5) loginf("unknown command line: \"%s\"",cmdbuf); else if (rc == 6) loginf("diff does not match old list"); else loginf("copied %d, added %d, deleted %d, difference %d, rc=%d", cc,ac,dc,ac-dc,rc); return rc; } ifmail-2.14tx8.10.orig/ifcico/nodelist.h100644 1751 50 3247 6463053353 15411 0ustar mdsrc#ifndef NODELIST_H #define NODELIST_H #include "ftn.h" #define MAXUFLAGS 16 typedef struct _node { faddr addr; unsigned short hub; unsigned char type; unsigned char pflag; char *name; char *location; char *sysop; char *phone; unsigned speed; unsigned long flags; char *uflags[MAXUFLAGS]; } node; /* type values */ #define NL_NONE 0 #define NL_ZONE 1 #define NL_NET 2 #define NL_NODE 3 #define NL_POINT 4 /* pflag values */ #define NL_DOWN 0x01 #define NL_HOLD 0x02 #define NL_DUMMY 0x04 #define NL_HUB 0x08 #define NL_PVT 0x10 #define NL_REGION 0x20 /* flag values */ #define CM 0x00000001L #define MO 0x00000002L #define LO 0x00000004L #define V21 0x00000008L #define V22 0x00000010L #define V29 0x00000020L #define V32 0x00000040L #define V32B 0x00000080L #define V33 0x00000100L #define V34 0x00000200L #define V42 0x00000400L #define V42B 0x00000800L #define MNP 0x00001000L #define H96 0x00002000L #define HST 0x00004000L #define H14 0x00008000L #define H16 0x00010000L #define NL_MAX 0x00020000L #define PEP 0x00040000L #define CSP 0x00080000L #define ZYX 0x00100000L #define MN 0x08000000L #define RQMODE 0xf0000000L #define RQ_BR 0x10000000L #define RQ_BU 0x20000000L #define RQ_WR 0x40000000L #define RQ_WU 0x80000000L #define XA (RQ_BR | RQ_BU | RQ_WR | RQ_WU) #define XB (RQ_BR | RQ_BU | RQ_WR ) #define XC (RQ_BR | RQ_WR | RQ_WU) #define XP (RQ_BR | RQ_BU ) #define XR (RQ_BR | RQ_WR ) #define XW ( RQ_WR ) #define XX ( RQ_WR | RQ_WU) extern node *getnlent(); extern void *endnlent(); extern int flagexp(); extern struct _fkey { char *key; unsigned long flag; } fkey[]; #endif ifmail-2.14tx8.10.orig/ifcico/statetbl.h100644 1751 50 1647 5551573676 15430 0ustar mdsrc#ifndef STATETBL_H #define STATETBL_H #define SM_DECL(proc,name) \ int proc(void)\ {\ int sm_success=0;\ char *sm_name=name; #define SM_STATES \ enum { #define SM_NAMES \ } sm_state;\ char * sm_sname[] = { #define SM_EDECL \ }; #define SM_START(x) \ sm_state=x;\ debug(14,"statemachine %s start %s (%d)",\ sm_name,sm_sname[sm_state],sm_state);\ while (!sm_success) switch (sm_state)\ {\ default: logerr("statemachine %s error: state=%d",sm_name,sm_state);\ sm_success=-1; #define SM_STATE(x) \ break;\ case x: debug(15,"statemachine %s entering %s (%d)",\ sm_name,sm_sname[sm_state],sm_state); #define SM_END \ }\ debug(14,"statemachine %s exit %s (%d)",\ sm_name,(sm_success == -1)?"error":"success",sm_success); #define SM_RETURN \ return (sm_success != 1);\ } #define SM_PROCEED(x) \ sm_state=x; break; #define SM_SUCCESS \ sm_success=1; break; #define SM_ERROR \ sm_success=-1; break; #endif ifmail-2.14tx8.10.orig/ifcico/session.h100644 0 0 3703 6573551267 15715 0ustar rootroot#ifndef SESSION_H #define SESSION_H #include #include #include "ftn.h" #include "nodelist.h" #define SESSION_UNKNOWN 0 #define SESSION_FTSC 1 #define SESSION_YOOHOO 2 #define SESSION_EMSI 3 #define SESSION_BINKP 4 #define SESSION_SLAVE 0 #define SESSION_MASTER 1 extern node *nlent; extern fa_list *remote; typedef struct _file_list { struct _file_list *next; char *local; char *remote; int disposition; FILE *flofp; off_t floff; } file_list; #define HOLD_MAIL "h" #define NONHOLD_MAIL "co" #define ALL_MAIL "coh" extern int session_flags; extern int remote_flags; #define FTSC_XMODEM_CRC 1 /* xmodem-crc */ #define FTSC_XMODEM_RES 2 /* sealink-resync */ #define FTSC_XMODEM_SLO 4 /* sealink-overdrive */ #define FTSC_XMODEM_XOF 8 /* xoff flow control, aka macflow */ #define WAZOO_ZMODEM_ZAP 1 /* ZedZap allowed */ #define SESSION_WAZOO 0x8000 /* WaZOO type file requests */ #define SESSION_BARK 0x4000 /* bark type file requests */ #define SESSION_IFNA 0x2000 /* DietIFNA transfer from Yoohoo session */ #define SESSION_FNC 0x1000 /* Filename conversion sending files */ #define SESSION_TCP 0x0800 /* Established over TCP/IP link */ #define SESSION_HYDRA 0x0400 /* Hydra special file requests */ extern int localoptions; #define NOCALL 0x0001 #define NOHOLD 0x0002 #define NOPUA 0x0004 #define NOWAZOO 0x0008 #define NOEMSI 0x0010 #define NOFREQS 0x0020 #define NOZMODEM 0x0040 #define NOZEDZAP 0x0080 #define NOJANUS 0x0100 #define NOHYDRA 0x0200 #define NOTCP 0x0400 extern int session(faddr*,node*,int,int,char*); extern int tx_ftsc(void); extern int tx_yoohoo(void); extern int tx_emsi(char*); extern int rx_ftsc(void); extern int rx_yoohoo(void); extern int rx_emsi(char*); extern int binkp(int mode); extern file_list *create_filelist(fa_list*,char*,int); void add_list(file_list**,char*,char*,int,off_t,FILE*,int); extern void tidy_filelist(file_list*,int); extern void execute_disposition(file_list*); #endif ifmail-2.14tx8.10.orig/ifcico/ttyio.h100644 0 0 13060 6701151722 15400 0ustar rootroot#ifndef TTYIO_H #define TTYIO_H #define RESETTIMER(x) tty_resettimer(x) #define RESETTIMERS() tty_resettimers() #define SETTIMER(x,y) tty_settimer(x,y) #define EXPIRED(x) tty_expired(x) #define RUNNING(x) tty_running(x) #define CHECK() tty_check() #define PUTCHECK(x) tty_putcheck(x) #define WAITPUTGET(x) tty_waitputget(x) #define FLUSHOUT() tty_flushout() #define FLUSHIN() tty_flushin() #define PUTCHAR(x) tty_putc(x) #define PUT(x,y) tty_put(x,y) #define PUTSTR(x) tty_put(x,strlen(x)) #define GETCHAR(x) tty_getc(x) #define UNGETCHAR(x) tty_ungetc(x) #define GET(x,y,z) tty_get(x,y,z) #define PUTGET(a,b,x,y) tty_putget(a,b,x,y) #define STATUS tty_status #define STAT_SUCCESS 0 #define STAT_ERROR 1 #define STAT_TIMEOUT 2 #define STAT_EOFILE 3 #define STAT_HANGUP 4 #define STAT_EMPTY 5 #define SUCCESS (STATUS == 0) #define ERROR (-STAT_ERROR) #define TIMEOUT (-STAT_TIMEOUT) #define EOFILE (-STAT_EOFILE) #define HANGUP (-STAT_HANGUP) #define EMPTY (-STAT_EMPTY) #define GET_COMPLETE(x) (x & 1) #define PUT_COMPLETE(x) (x & 2) #define NUL 0x00 #define SOH 0x01 #define STX 0x02 #define ETX 0x03 #define EOT 0x04 #define ENQ 0x05 #define ACK 0x06 #define BEL 0x07 #define BS 0x08 #define HT 0x09 #define LF 0x0a #define VT 0x0b #define FF 0x0c #define CR 0x0d #define SO 0x0e #define SI 0x0f #define DLE 0x10 #define DC1 0x11 #define DC2 0x12 #define DC3 0x13 #define DC4 0x14 #define NAK 0x15 #define SYN 0x16 #define ETB 0x17 #define CAN 0x18 #define EM 0x19 #define SUB 0x1a #define ESC 0x1b #define FS 0x1c #define GS 0x1d #define RS 0x1e #define US 0x1f #define TSYNC 0xae #define YOOHOO 0xf1 /* ### Modifned by T.Tanaka on 4 Dec 1995 */ #define ClearArray(x) memset((char *)x, 0, sizeof x) #define NETADD(c) { PUTCHAR(c); } #define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } #define MY_STATE_WILL 0x01 #define MY_WANT_STATE_WILL 0x02 #define MY_STATE_DO 0x04 #define MY_WANT_STATE_DO 0x08 #define my_state_is_do(opt) (telnet_options[opt]&MY_STATE_DO) #define my_state_is_will(opt) (telnet_options[opt]&MY_STATE_WILL) #define my_want_state_is_do(opt) (telnet_options[opt]&MY_WANT_STATE_DO) #define my_want_state_is_will(opt) (telnet_options[opt]&MY_WANT_STATE_WILL) #define my_state_is_dont(opt) (!my_state_is_do(opt)) #define my_state_is_wont(opt) (!my_state_is_will(opt)) #define my_want_state_is_dont(opt) (!my_want_state_is_do(opt)) #define my_want_state_is_wont(opt) (!my_want_state_is_will(opt)) #define set_my_want_state_do(opt) {telnet_options[opt] |= MY_WANT_STATE_DO;} #define set_my_want_state_will(opt) {telnet_options[opt] |= MY_WANT_STATE_WILL;} #define set_my_want_state_dont(opt) {telnet_options[opt] &= ~MY_WANT_STATE_DO;} #define set_my_want_state_wont(opt) {telnet_options[opt] &= ~MY_WANT_STATE_WILL;} #define IAC 255 /* interpret as command: */ #define DONT 254 /* you are not to use option */ #define DO 253 /* please, you use option */ #define WONT 252 /* I won't use option */ #define WILL 251 /* I will use option */ /* telnet options */ #define TELOPT_BINARY 0 /* 8-bit data path */ #define TELOPT_ECHO 1 /* echo */ #define TELOPT_RCP 2 /* prepare to reconnect */ #define TELOPT_SGA 3 /* suppress go ahead */ #define TELOPT_NAMS 4 /* approximate message size */ #define TELOPT_STATUS 5 /* give status */ #define TELOPT_TM 6 /* timing mark */ #define TELOPT_RCTE 7 /* remote controlled transmission and echo */ #define TELOPT_NAOL 8 /* negotiate about output line width */ #define TELOPT_NAOP 9 /* negotiate about output page size */ #define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ #define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ #define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ #define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ #define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ #define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ #define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ #define TELOPT_XASCII 17 /* extended ascic character set */ #define TELOPT_LOGOUT 18 /* force logout */ #define TELOPT_BM 19 /* byte macro */ #define TELOPT_DET 20 /* data entry terminal */ #define TELOPT_SUPDUP 21 /* supdup protocol */ #define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ #define TELOPT_SNDLOC 23 /* send location */ #define TELOPT_TTYPE 24 /* terminal type */ #define TELOPT_EOR 25 /* end or record */ #define TELOPT_TUID 26 /* TACACS user identification */ #define TELOPT_OUTMRK 27 /* output marking */ #define TELOPT_TTYLOC 28 /* terminal location number */ #define TELOPT_3270REGIME 29 /* 3270 regime */ #define TELOPT_X3PAD 30 /* X.3 PAD */ #define TELOPT_NAWS 31 /* window size */ #define TELOPT_TSPEED 32 /* terminal speed */ #define TELOPT_LFLOW 33 /* remote flow control */ #define TELOPT_LINEMODE 34 /* Linemode option */ #define TELOPT_XDISPLOC 35 /* X Display Location */ #define TELOPT_ENVIRON 36 /* Environment variables */ #define TELOPT_AUTHENTICATION 37/* Authenticate */ #define TELOPT_ENCRYPT 38 /* Encryption option */ #define TELOPT_EXOPL 255 /* extended-options-list */ /* ### */ extern int tty_status; extern int tty_check(void); extern int tty_waitputget(int); extern int tty_ungetc(int); extern int tty_getc(int); extern int tty_get(char*,int,int); extern int tty_putcheck(int); extern int tty_putc(int); extern int tty_put(char*,int); extern int tty_putget(char**,int*,char**,int*); extern void tty_flushout(void); extern void tty_flushin(void); extern void sendbrk(void); extern int tty_resettimer(int tno); extern void tty_resettimers(void); extern int tty_settimer(int,int); extern int tty_expired(int); extern int tty_running(int); #endif ifmail-2.14tx8.10.orig/ifcico/emsi.h100644 0 0 2017 6701151722 15145 0ustar rootroot#define PRODCODE 0xfe /* product code for ifcico */ #ifndef EMSI_H #define EMSI_H #define LCODE_PUA 0x0001 #define LCODE_PUP 0x0002 #define LCODE_NPU 0x0004 #define LCODE_HAT 0x0008 #define LCODE_HXT 0x0010 #define LCODE_HRQ 0x0020 #define LCODE_FNC 0x0040 #define LCODE_RMA 0x0080 #define LCODE_RH1 0x0100 extern int emsi_local_lcodes; extern int emsi_remote_lcodes; #define PROT_DZA 0x0001 #define PROT_ZAP 0x0002 #define PROT_ZMO 0x0004 #define PROT_JAN 0x0008 #define PROT_KER 0x0010 #define PROT_HYD 0x0020 #define PROT_TCP 0x0040 extern int emsi_local_protos; extern int emsi_remote_protos; #define OPT_NRQ 0x0002 #define OPT_ARC 0x0004 #define OPT_XMA 0x0008 #define OPT_FNC 0x0010 #define OPT_CHT 0x0020 #define OPT_SLK 0x0040 #define OPT_EII 0x0080 #define OPT_DFB 0x0100 #define OPT_FRQ 0x0200 extern int emsi_local_opts; extern int emsi_remote_opts; extern char *emsi_local_password; extern char *emsi_remote_password; extern char emsi_remote_comm[]; extern char *mkemsidat(int); extern int scanemsidat(char*); #endif ifmail-2.14tx8.10.orig/ifcico/zmodem.h100644 1751 50 16206 6374434265 15110 0ustar mdsrc#ifndef ZMODEM_H #define ZMODEM_H #ifndef TRUE #define TRUE 1 #endif #ifndef OK #define OK 0 #endif #ifndef FALSE #define FALSE 0 #endif #define RETRYMAX 10 #define MAXBLOCK 8192 /* * Z M O D E M . H Manifest constants for ZMODEM * application to application file transfer protocol * 04-17-89 Chuck Forsberg Omen Technology Inc */ #define ZPAD '*' /* 052 Padding character begins frames */ #define ZDLE 030 /* Ctrl-X Zmodem escape - `ala BISYNC DLE */ #define ZDLEE (ZDLE^0100) /* Escaped ZDLE as transmitted */ #define ZBIN 'A' /* Binary frame indicator (CRC-16) */ #define ZHEX 'B' /* HEX frame indicator */ #define ZBIN32 'C' /* Binary frame with 32 bit FCS */ #define ZBINR32 'D' /* RLE packed Binary frame with 32 bit FCS */ #define ZVBIN 'a' /* Binary frame indicator (CRC-16) */ #define ZVHEX 'b' /* HEX frame indicator */ #define ZVBIN32 'c' /* Binary frame with 32 bit FCS */ #define ZVBINR32 'd' /* RLE packed Binary frame with 32 bit FCS */ #define ZRESC 0176 /* RLE flag/escape character */ #define ZMAXHLEN 16 /* Max header information length NEVER CHANGE */ #define ZMAXSPLEN 1024 /* Max subpacket length NEVER CHANGE */ /* Frame types (see array "frametypes" in zm.c) */ #define ZRQINIT 0 /* Request receive init */ #define ZRINIT 1 /* Receive init */ #define ZSINIT 2 /* Send init sequence (optional) */ #define ZACK 3 /* ACK to above */ #define ZFILE 4 /* File name from sender */ #define ZSKIP 5 /* To sender: skip this file */ #define ZNAK 6 /* Last packet was garbled */ #define ZABORT 7 /* Abort batch transfers */ #define ZFIN 8 /* Finish session */ #define ZRPOS 9 /* Resume data trans at this position */ #define ZDATA 10 /* Data packet(s) follow */ #define ZEOF 11 /* End of file */ #define ZFERR 12 /* Fatal Read or Write error Detected */ #define ZCRC 13 /* Request for file CRC and response */ #define ZCHALLENGE 14 /* Receiver's Challenge */ #define ZCOMPL 15 /* Request is complete */ #define ZCAN 16 /* Other end canned session with CAN*5 */ #define ZFREECNT 17 /* Request for free bytes on filesystem */ #define ZCOMMAND 18 /* Command from sending program */ #define ZSTDERR 19 /* Output to standard error, data follows */ /* ZDLE sequences */ #define ZCRCE 'h' /* CRC next, frame ends, header packet follows */ #define ZCRCG 'i' /* CRC next, frame continues nonstop */ #define ZCRCQ 'j' /* CRC next, frame continues, ZACK expected */ #define ZCRCW 'k' /* CRC next, ZACK expected, end of frame */ #define ZRUB0 'l' /* Translate to rubout 0177 */ #define ZRUB1 'm' /* Translate to rubout 0377 */ /* zdlread return values (internal) */ /* -1 is general error, -2 is timeout */ #define GOTOR 0400 #define GOTCRCE (ZCRCE|GOTOR) /* ZDLE-ZCRCE received */ #define GOTCRCG (ZCRCG|GOTOR) /* ZDLE-ZCRCG received */ #define GOTCRCQ (ZCRCQ|GOTOR) /* ZDLE-ZCRCQ received */ #define GOTCRCW (ZCRCW|GOTOR) /* ZDLE-ZCRCW received */ #define GOTCAN (GOTOR|030) /* CAN*5 seen */ /* Byte positions within header array */ #define ZF0 3 /* First flags byte */ #define ZF1 2 #define ZF2 1 #define ZF3 0 #define ZP0 0 /* Low order 8 bits of position */ #define ZP1 1 #define ZP2 2 #define ZP3 3 /* High order 8 bits of file position */ /* Bit Masks for ZRINIT flags byte ZF0 */ #define CANFDX 01 /* Rx can send and receive true FDX */ #define CANOVIO 02 /* Rx can receive data during disk I/O */ #define CANBRK 04 /* Rx can send a break signal */ #define CANRLE 010 /* Receiver can decode RLE */ #define CANLZW 020 /* Receiver can uncompress */ #define CANFC32 040 /* Receiver can use 32 bit Frame Check */ #define ESCCTL 0100 /* Receiver expects ctl chars to be escaped */ #define ESC8 0200 /* Receiver expects 8th bit to be escaped */ /* Bit Masks for ZRINIT flags byte ZF1 */ #define CANVHDR 01 /* Variable headers OK */ /* Parameters for ZSINIT frame */ #define ZATTNLEN 32 /* Max length of attention string */ #define ALTCOFF ZF1 /* Offset to alternate canit string, 0 if not used */ /* Bit Masks for ZSINIT flags byte ZF0 */ #define TESCCTL 0100 /* Transmitter expects ctl chars to be escaped */ #define TESC8 0200 /* Transmitter expects 8th bit to be escaped */ /* Parameters for ZFILE frame */ /* Conversion options one of these in ZF0 */ #define ZCBIN 1 /* Binary transfer - inhibit conversion */ #define ZCNL 2 /* Convert NL to local end of line convention */ #define ZCRESUM 3 /* Resume interrupted file transfer */ /* Management include options, one of these ored in ZF1 */ #define ZMSKNOLOC 0200 /* Skip file if not present at rx */ /* Management options, one of these ored in ZF1 */ #define ZMMASK 037 /* Mask for the choices below */ #define ZMNEWL 1 /* Transfer if source newer or longer */ #define ZMCRC 2 /* Transfer if different file CRC or length */ #define ZMAPND 3 /* Append contents to existing file (if any) */ #define ZMCLOB 4 /* Replace existing file */ #define ZMNEW 5 /* Transfer if source newer */ /* Number 5 is alive ... */ #define ZMDIFF 6 /* Transfer if dates or lengths different */ #define ZMPROT 7 /* Protect destination file */ /* Transport options, one of these in ZF2 */ #define ZTLZW 1 /* Lempel-Ziv compression */ #define ZTRLE 3 /* Run Length encoding */ /* Extended options for ZF3, bit encoded */ #define ZXSPARS 64 /* Encoding for sparse file operations */ #define ZCANVHDR 01 /* Variable headers OK */ /* Receiver window size override */ #define ZRWOVR 4 /* byte position for receive window override/256 */ /* Parameters for ZCOMMAND frame ZF0 (otherwise 0) */ #define ZCACK1 1 /* Acknowledge, then do command */ long rclhdr(); /* Globals used by ZMODEM functions */ extern int Rxframeind; /* ZBIN ZBIN32, or ZHEX type of frame */ extern int Rxtype; /* Type of header received */ extern int Rxcount; /* Count of data bytes received */ extern int long Rxpos; /* Received file position */ extern int long Txpos; /* Transmitted file position */ extern int Txfcs32; /* TURE means send binary frames with 32 bit FCS */ extern int Crc32t; /* Display flag indicating 32 bit CRC being sent */ extern int Crc32r; /* Display flag indicating 32 bit CRC being received */ extern int Crc32; /* Display flag indicating 32 bit CRC being received */ extern int Znulls; /* Number of nulls to send at beginning of ZDATA hdr */ extern char Rxhdr[]; extern char Txhdr[]; extern char Attn[ZATTNLEN+1]; /* Attention string rx sends to tx on err */ extern char *Altcan; /* Alternate canit string */ extern char *Zendnames[]; extern char *txbuf; extern char *rxbuf; /* End of ZMODEM.H */ extern int Zrwindow; extern int Effbaud; extern int Zmodem; extern int Zctlesc; extern int Filesleft; extern long Totalleft; extern char *frametypes[]; #define FTOFFSET 16 extern void zsbhdr(int,int,char*); extern void zshhdr(int,int,char*); extern int zgethdr(char*,int); extern void zsdata(char*,int,int); extern int zrdata(char*,int); extern void stohdr(long); extern void zsendline(int); extern void zsdar32(char*,int,int); extern int zrdatr32(char*,int); extern int zdlread(void); extern unsigned INT16 crc16tab[]; extern unsigned INT32 crc32tab[]; #define updcrc16(cp,crc) (crc16tab[(((int)crc >> 8) & 0xff)] ^ (crc << 8) ^ cp) /* #define updcrc16(cp,crc) (crc16tab[(((int)crc >> 8) & 0xff) ^ cp] ^ (crc << 8)) */ #define updcrc32(cp,crc) (crc32tab[((int)crc ^ cp) & 0xff] ^ ((crc >> 8) & 0x00ffffff)) #endif ifmail-2.14tx8.10.orig/ifcico/ftscprod.h100644 1751 50 172 6156477330 15372 0ustar mdsrc#ifndef FTSCPROD_H #define FTSCPROD_H extern struct _ftscprod { unsigned short code; char *name; } ftscprod[]; #endif ifmail-2.14tx8.10.orig/ifcico/nlindex.h100644 1751 50 1120 6463053353 15215 0ustar mdsrc#ifndef NLINDEX_H #define NLINDEX_H #include "nodelist.h" #define INDEX "index" #ifdef HAS_NDBM_H #include extern DBM *nldb; #else #include #endif extern int openstatus; extern struct _nodelist { char *domain; FILE *fp; } *nodevector; struct _ixentry { unsigned short zone; unsigned short net; unsigned short node; unsigned short point; }; struct _loc { off_t off; unsigned short nlnum; unsigned short hub; }; extern struct _pkey { char *key; unsigned char type; unsigned char pflag; } pkey[]; extern struct _fkey fkey[]; extern int initnl(void); #endif ifmail-2.14tx8.10.orig/ifcico/janus.h100644 1751 50 1217 6212727217 14702 0ustar mdsrc#ifndef JANUS_H #define JANUS_H #define JS_DONE 0 #define JS_SENDFNAME 1 #define JS_RCVFNACK 2 #define JS_SENDBLK 3 #define JS_RCVEOFACK 4 #define JS_SENDFREQNAK 5 #define JS_RCVFRNAKACK 6 #define JR_DONE 0 #define JR_RCVFNAME 1 #define JR_RCVBLK 2 #define JPKT_NONE 0 #define JPKT_BAD '@' #define JPKT_FNAME 'A' #define JPKT_FNACK 'B' #define JPKT_BLK 'C' #define JPKT_RPOS 'D' #define JPKT_EOFACK 'E' #define JPKT_HALT 'F' #define JPKT_HALTACK 'G' #define JPKT_FREQ 'H' #define JPKT_FREQNAK 'I' #define JPKT_FRNAKACK 'J' #define JDLM_START 'a' #define JDLM_END 'b' #define JDLM_START32 'c' #define JCAP_CRC32 0x80 #define JCAP_FREQ 0x40 #endif ifmail-2.14tx8.10.orig/ifcico/hydra.h100644 0 0 22027 6573551267 15361 0ustar rootroot/* As this file has been derived from the HydraCom source, here is the * original copyright information: * * Note that you can find the file LICENSE.DOC from HydraCom in * misc/HYDRACOM-LICENSE */ /*============================================================================= HydraCom Version 1.00 A sample implementation of the HYDRA Bi-Directional File Transfer Protocol HydraCom was written by Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED The HYDRA protocol was designed by Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT and Joaquim H. Homrighausen COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED Revision history: 06 Sep 1991 - (AGL) First tryout .. ... .... - Internal development 11 Jan 1993 - HydraCom version 1.00, Hydra revision 001 (01 Dec 1992) For complete details of the Hydra and HydraCom licensing restrictions, please refer to the license agreements which are published in their entirety in HYDRACOM.C and LICENSE.DOC, and also contained in the documentation file HYDRACOM.DOC Use of this file is subject to the restrictions contained in the Hydra and HydraCom licensing agreements. If you do not find the text of this agreement in any of the aforementioned files, or if you do not have these files, you should immediately contact LENTZ SOFTWARE-DEVELOPMENT and/or Joaquim Homrighausen at one of the addresses listed below. In no event should you proceed to use this file without having accepted the terms of the Hydra and HydraCom licensing agreements, or such other agreement as you are able to reach with LENTZ SOFTWARE-DEVELOMENT and Joaquim Homrighausen. Hydra protocol design and HydraCom driver: Hydra protocol design: Arjen G. Lentz Joaquim H. Homrighausen LENTZ SOFTWARE-DEVELOPMENT 389, route d'Arlon Langegracht 7B L-8011 Strassen 3811 BT Amersfoort Luxembourg The Netherlands FidoNet 2:283/512, AINEX-BBS +31-33-633916 FidoNet 2:270/17 arjen_lentz@f512.n283.z2.fidonet.org joho@ae.lu Please feel free to contact us at any time to share your comments about our software and/or licensing policies. =============================================================================*/ /* HYDRA Specification Revision/Timestamp ---------Revision------Date------- */ #define H_REVSTAMP 0x2b1aab00L /* 001 01 Dec 1992 */ #define H_REVISION 1 /* HYDRA Basic Values ------------------------------------------------------ */ #ifndef XON #define XON ('Q' - '@') /* Ctrl-Q (^Q) xmit-on character */ #define XOFF ('S' - '@') /* Ctrl-S (^S) xmit-off character */ #endif #define H_DLE ('X' - '@') /* Ctrl-X (^X) HYDRA DataLinkEscape */ #define H_MINBLKLEN 64 /* Min. length of a HYDRA data block */ #define H_MAXBLKLEN 2048 /* Max. length of a HYDRA data block */ #define H_OVERHEAD 8 /* Max. no. control bytes in a pkt */ #define H_MAXPKTLEN ((H_MAXBLKLEN + H_OVERHEAD + 5) * 3) /* Encoded pkt */ #define H_BUFLEN (H_MAXPKTLEN + 16) /* Buffer sizes: max.enc.pkt + slack */ #define H_PKTPREFIX 31 /* Max length of pkt prefix string */ #define H_FLAGLEN 3 /* Length of a flag field */ #define H_RETRIES 10 /* No. retries in case of an error */ #define H_MINTIMER 10 /* Minimum timeout period */ #define H_MAXTIMER 60 /* Maximum timeout period */ #define H_START 5 /* Timeout for re-sending startstuff */ #define H_IDLE 20 /* Idle? tx IDLE pkt every 20 secs */ #define H_BRAINDEAD 120 /* Braindead in 2 mins (120 secs) */ /* HYDRA Return codes ------------------------------------------------------ */ #define XFER_ABORT (-1) /* Failed on this file & abort xfer */ #define XFER_SKIP 0 /* Skip this file but continue xfer */ #define XFER_OK 1 /* File was sent, continue transfer */ /* HYDRA Transmitter States ------------------------------------------------ */ enum HyTxStates { HTX_DONE, /* All over and done */ HTX_START, /* Send start autostr + START pkt */ HTX_SWAIT, /* Wait for any pkt or timeout */ HTX_INIT, /* Send INIT pkt */ HTX_INITACK, /* Wait for INITACK pkt */ HTX_RINIT, /* Wait for HRX_INIT -> HRX_FINFO */ HTX_NextFile, HTX_ToFName, HTX_FINFO, /* Send FINFO pkt */ HTX_FINFOACK, /* Wait for FINFOACK pkt */ HTX_DATA, /* Send next packet with file data */ HTX_SkipFile, HTX_DATAACK, /* Wait for DATAACK packet */ HTX_XWAIT, /* Wait for HRX_END */ HTX_EOF, /* Send EOF pkt */ HTX_EOFACK, /* End of file, wait for EOFACK pkt */ HTX_REND, /* Wait for HRX_END && HTD_DONE */ HTX_END, /* Send END pkt (finish session) */ HTX_ENDACK, /* Wait for END pkt from other side */ HTX_Abort, }; /* HYDRA Receiver States --------------------------------------------------- */ enum HyRxStates { HRX_DONE, /* All over and done */ HRX_INIT, /* Wait for INIT pkt */ HRX_FINFO, /* Wait for FINFO pkt of next file */ HRX_ToData, HRX_DATA, /* Wait for next DATA pkt */ HRX_BadPos, HRX_Timer, HRX_HdxLink, HRX_Retries, HRX_RPos, HRX_OkEOF, }; /* HYDRA Packet Types ------------------------------------------------------ */ enum HyPktTypes { HPKT_START = 'A', /* Startup sequence */ HPKT_INIT = 'B', /* Session initialisation */ HPKT_INITACK = 'C', /* Response to INIT pkt */ HPKT_FINFO = 'D', /* File info (name, size, time) */ HPKT_FINFOACK = 'E', /* Response to FINFO pkt */ HPKT_DATA = 'F', /* File data packet */ HPKT_DATAACK = 'G', /* File data position ACK packet */ HPKT_RPOS = 'H', /* Transmitter reposition packet */ HPKT_EOF = 'I', /* End of file packet */ HPKT_EOFACK = 'J', /* Response to EOF packet */ HPKT_END = 'K', /* End of session */ HPKT_IDLE = 'L', /* Idle - just saying I'm alive */ HPKT_DEVDATA = 'M', /* Data to specified device */ HPKT_DEVDACK = 'N', /* Response to DEVDATA pkt */ HPKT_HIGHEST = 'N' /* Highest known pkttype in this imp */ }; /* HYDRA Internal Pseudo Packet Types -------------------------------------- */ #define H_NOPKT 0 /* No packet (yet) */ #define H_CANCEL (-1) /* Received cancel sequence 5*Ctrl-X */ #define H_CARRIER (-2) /* Lost carrier */ #define H_SYSABORT (-3) /* Aborted by operator on this side */ #define H_TXTIME (-4) /* Transmitter timeout */ #define H_DEVTXTIME (-5) /* Device transmitter timeout */ #define H_BRAINTIME (-6) /* Braindead timeout (quite fatal) */ /* HYDRA Packet Format: START[]END ------------------------ */ enum HyPktFormats { HCHR_PKTEND = 'a', /* End of packet (any format) */ HCHR_BINPKT = 'b', /* Start of binary packet */ HCHR_HEXPKT = 'c', /* Start of hex encoded packet */ HCHR_ASCPKT = 'd', /* Start of shifted 7bit encoded pkt */ HCHR_UUEPKT = 'e', /* Start of uuencoded packet */ }; /* HYDRA Local Storage of INIT Options (Bitmapped) ------------------------- */ #define HOPT_XONXOFF (0x00000001L) /* Escape XON/XOFF */ #define HOPT_TELENET (0x00000002L) /* Escape CR-'@'-CR (Telenet escape) */ #define HOPT_CTLCHRS (0x00000004L) /* Escape ASCII 0-31 and 127 */ #define HOPT_HIGHCTL (0x00000008L) /* Escape above 3 with 8th bit too */ #define HOPT_HIGHBIT (0x00000010L) /* Escape ASCII 128-255 + strip high */ #define HOPT_CANBRK (0x00000020L) /* Can transmit a break signal */ #define HOPT_CANASC (0x00000040L) /* Can transmit/handle ASC packets */ #define HOPT_CANUUE (0x00000080L) /* Can transmit/handle UUE packets */ #define HOPT_CRC32 (0x00000100L) /* Packets with CRC-32 allowed */ #define HOPT_DEVICE (0x00000200L) /* DEVICE packets allowed */ #define HOPT_FPT (0x00000400L) /* Can handle filenames with paths */ /* What we can do */ #define HCAN_OPTIONS (HOPT_XONXOFF | HOPT_TELENET | HOPT_CTLCHRS | HOPT_HIGHCTL | HOPT_HIGHBIT | HOPT_CRC32) /* Vital options if we ask for any; abort if other side doesn't support them */ #define HNEC_OPTIONS (HOPT_XONXOFF | HOPT_TELENET | HOPT_CTLCHRS | HOPT_HIGHCTL | HOPT_HIGHBIT | HOPT_CANBRK) /* Non-vital options; nice if other side supports them, but doesn't matter */ #define HUNN_OPTIONS (HOPT_CANASC | HOPT_CANUUE | HOPT_CRC32) /* Default options */ #define HDEF_OPTIONS (HOPT_CRC32) /* rxoptions during init (needs to handle ANY link yet unknown at that point */ #define HRXI_OPTIONS (HOPT_XONXOFF | HOPT_TELENET | HOPT_CTLCHRS | HOPT_HIGHCTL | HOPT_HIGHBIT) /* ditto, but this time txoptions */ #define HTXI_OPTIONS (HOPT_XONXOFF | HOPT_TELENET | HOPT_CTLCHRS | HOPT_HIGHCTL | HOPT_HIGHBIT) #define h_crc16test(crc) (((crc) == 0xf0b8 ) ? 1 : 0) #define h_crc32test(crc) (((crc) == 0xdebb20e3L) ? 1 : 0) /* end of hydra.h */ ifmail-2.14tx8.10.orig/ifcico/README100644 1751 50 15432 6310570577 14321 0ustar mdsrcCopyright (c) 1993-1997 Eugene G. Crosser ifcico is a FidoNet(r) compatible mailer for U*IX platforms. You may do virtually what you wish with this software, as long as the explicit reference to its original author is retained: Eugene G. Crosser , 2:5020/230@FidoNet THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE. This is a "production" version, it is more or less thoroughly tested. But that does not mean that it is error-free. If you think that you found a bug, contact the author at crosser@average.org. All programs show a small help message when run with "-h" flag. "ifcico" stands for "Internet - Fidonet Copy In / Copy Out", this is a FidoNet(r) compatible transport agent. Currently it supports FTS-0001, YooHoo/2U2 and EMSI handshake protocols, Xmodem (untested), Telink (untested), Modem7 (untested), SEAlink w/overdrive and crash recovery, Bark file and update requests, WaZOO protocols: DietIFNA, plain Zmodem (aka ZedZip, EMSI flag "ZMO") and ZedZap, WaZOO file and update requests (nodelist flag should be XA). Password protected requests are not implemented. There are plans to implement Janus (and maybe Hydra) protocols in the future. There is also a special protocol optimized to use over TCP/IP connection, contributed by Stanislav Voronyi , it is identified by EMSI proto code TCP (not registered). Outbound directory structure is BinkleyTerm compatible, with domains and point subdirectories (full 5d). There are separate "listed" and "protected" inbound directories for the incoming sessions with the nodes present in the nodelist(s) and with nodes that have a password assigned respectively. Files received during an outbound session are always put into the "protected" directory. (Only "protected" directory is looked up by ifunpack by default, see ifgate subdir). "Magic" file request processors are executable files placed in the "magic" directory. If request is made for a file with matching name, the executable from the "magic" directory is run, and its stdout sent to the requester. Full requester's address, in the form "John Smith of 1:234/56.7" is passed to the executable in the command line. See "misc/FILES" for an example of a magic request processor. Non- executable files in the "magic" directory are "references". If a request is made for a file with matching name, the file is read line by line, and request re-made for the name found in each line. Up to 5 levels of recursion are allowed. To run ifcico in master mode, you must make dialout devices read/writable for ifcico, _and_ do the same for the directory where your uucp locks are created (usually /usr/spool/uucp). To make ifcico work in answer mode, you need a hack in uugetty. Linux "standard" getty_ps 2.0.7d, Gert Doering's mgetty .17 (from the mgetty+sendfax package) and later versions, and FreeBSD standard uugetty have fidonet support built in. Getty must distinguish incoming FidoNet type calls, and start ifcico with one parameter: FTS-0001 call: "ifcico tsync" FTS-0006 call: "ifcico yoohoo" EMSI call: "ifcico **EMSI_....." (in the latter case the received EMSI packet should be passed without trailing CR). If you are using getty_ps, don't forget to (a) #define FIDO in tune.h, and (b) create the file /etc/default/uugetty with the contents similar to the following (case sensitive): FIDO=/usr/lib/ifmail/ifcico EMSI=yes It is also recommended to increase getty's input buffer size to 0.5 - 1 Kb (in tune.h). When called without parameters, ifcico runs in slave mode and determines the type of inbound session itself. This mode may be used when ifcico runs as an internet or ISDN daemon. To make ifcico scan for pending outbound mail and do appropriate calls, start it with "-r1" flag. To force polling of particular nodes, specify these nodes in the command line (addresses should be in domain notation, e.g. "ifcico f23.n5020 f155.n5020"). The latter implies master mode (-r1). Note that "hold" packets and files, as well as file requests, do not cause the node to be polled. Inbound directory is created automatically if it does not exist, along with the "tmp" subdir. The latter is used while receiving files. After being successfully received, the files are moved up to the "inbound" directory. "protinbound" and "listinbound" directories accept files received during password protected sessions and session with the nodes present in the nodelist(s) respectively. Almost all features are controlled by the configuration file. See "misc/config" file as an example, it contains a lot of comments. To use ifcico over TCP/IP, see "services" file with an example line for the service entry, and "initd.conf" file with an example how to make ifcico listen for incoming connects. To initiate outgoing TCP/IP connect, use "-a" flag. Ifcico can use text format nodelists in original (MS/DOS) form with 's as well as in UNIX form, with 's only. When you get a fresh nodelist, or change the "nodelist" statements in the config file, you must rebuild index with "ifindex" program. ifcico returns maximum return code for all calls made. Codes are as follows: 0 Successfull call 1 Dialout port unavailable 2 Dial failed (no "CONNECT" or TCP connection failed) 3 Could not reset the modem (no "OK") 4 System locked 5 Retry time not reached 6 Fatal error in nodelist lookup 7 Call prohibited by config options 8 Phone number unavailable 9 No matching ports defined 10 Unused >10 Session failures (not defined yet) 30 Could not establish session For outgoing calls, status files are created for nodes, with the extension ".sts". These are ascii files containg three decimal numbers in a single line: time retries code 'time' is the last call attempt time (attempts failing with "retry time not reached" do not count). It is unsigned long representing the number of seconds since the epoch. 'retries' is the number of consequtive call attempts made that returned "call failed" or "could not establish session". This field is zeroed when call succeeds. 'code' is the return code of the last attempt. ifroute program (not working yet - under development) can be used in a "queryprogram" driver with Smail. It accepts destination address on the command line and writes routing address to stdout, taking care of hub/host/zonegate routing. nlpatch program compiles a new version of the nodelist from the old nodelist and nodediff. Acknowledgements: Some ideas taken from FidoGate-RFmail package written by Teemu Torma and hacked by Martin Junius. Several source modules taken from INN 1.4 package. Zmodem source taken from sz/rz programs by Chuck Forsberg (I may rewrite it from scratch in future). Some TCP code contributed by Martin Junius and Stanislav Voronyi. ifmail-2.14tx8.10.orig/ifcico/README.mxlookup100644 1751 50 4353 6157415355 16157 0ustar mdsrcDate: Thu, 25 Jan 1996 14:47:34 MET From: Dmitry Kohmanyuk I use DNS for fidonet routing (Ruslan Belkin has credit for his ifroute.c and mxlookup.c, I have just ported them to 4.4BSD and fixed bug with point routing). I have local named running, and my named.boot has lines: ; FIDOnet pseudo-DNS for routing primary fido primary/fido my zone file is as follows: (oh well, it's 40 lines, I'd attach it later). I have my own fidonet mailer (ifmail.sh), which I include there: (it relies on my path config and DNS routing); here is goes: <<<< #!/bin/sh # usage: $0 first.last@fN.nN.zN logger -s -i -p mail.info -t ifmail.sh "FIDO mail sent to $*" 2> /var/log/ifmail/mailer IFHOME=/usr/local/libexec/ifmail ifroute=$IFHOME/ifroute ifmail=$IFHOME/ifmail fdomain=FIDO exec $ifmail -r`$ifroute -d$fdomain $1` $1 >>>> ATTACH zone file - it's all evident, "direct" is the magic word <<<< ; ; FIDO dns ; $ORIGIN FIDO. @ IN SOA relay1.farm.org. hostmaster.relay1.farm.org. 1995160904 ; serial number 14400 ; refresh - 4 h 1800 ; retry - 30 min. 604800 ; expire - 1 week 86400 ) ; default ttl - 24 h. IN NS ns.farm.org. ; my points (doesn't work - point's'not'a'human ;) ;*.f32.n463.z2 MX 100 direct ;p11.f32.n463.z2 MX 100 dog.farm.org. ;p12.f32.n463.z2 MX 100 pig.farm.org. ; direct links f23.n463.z2 MX 10 direct f68.n463.z2 MX 10 direct ;f586.n463.z2 MX 10 direct ; specific routing f62.n463.z2 MX 10 direct MX 20 f68.n463.z2 ; mail hub f690.n463.z2 MX 10 direct ; testing ifroute logic ;#*.n1.z2 MX 10 f1.n1.z2 ; external ;#*.n463.z2 MX 100 direct *.n463.z2 MX 100 f690.n463.z2 *.z2 MX 100 f690.n463.z2 * MX 100 f690.n463.z2 >>>> ifmail-2.14tx8.10.orig/ifcico/README.TELNET100644 1751 50 353 6210170643 15234 0ustar mdsrcifmail-2.8eTEL6.1 -- an unofficial telnet patch for ifmail 2.8e Known bugs Still unable to talk with PCBoard-based systems over TCP for some reason. VMP is not supported. Tsuneo Tanaka http://www.twics.com/~ttan/ ifmail-2.14tx8.10.orig/ifcico/Makefile100644 0 0 24240 6701151722 15521 0ustar rootroot# Makefile for ifcico FidoNet mailer # Copyright (c) 1993-1997 by Eugene G. Crosser INCDIR = ../iflib include ../CONFIG # Include -DNOISEDEBUG to emulate noisy line. If defined, -jNNN option # causes approximately every NNNth received character to be damaged. #DEFINES = ${OPTS} -DNOISEDEBUG DEFINES = -DCICOLOG=${CICOLOG} \ -DMAILLOG=${MAILLOG} \ ${OPTS} OBJCICO = version.o ifcico.o nodelist.o flagexp.o call.o callall.o answer.o \ modemstr.o openport.o opentcp.o dial.o session.o \ chat.o ttyio.o emsi.o ftsc.o yoohoo.o \ filelist.o xmsend.o xmrecv.o sendbark.o recvbark.o \ filetime.o m7recv.o m7send.o respfreq.o \ rdoptions.o emsidat.o wazoo.o janus.o hydra.o \ zmsend.o zmrecv.o zmmisc.o zmrle.o \ tcp.o tcpproto.o binkp.o \ openfile.o ftscprod.o dietifna.o \ nlindex.o openterm.o Txy.o OBJINDEX = version.o ifindex.o nodebld.o nlindex.o OBJINFO = version.o ifinfo.o nodelist.o nlindex.o OBJPATCH = version.o nlpatch.o OBJREQ = version.o ifreq.o #nodelist.o nlindex.o OBJROUTE = version.o ifroute.o mxlookup.o nodelist.o nlindex.o OBJLOOKUP= version.o nlookup.o nodelist.o nlindex.o SRCS = lastmtime.c ifcico.c nodelist.c call.c callall.c answer.c \ modemstr.c openport.c opentcp.c dial.c session.c \ chat.c ttyio.c emsi.c ftsc.c yoohoo.c \ filelist.c xmsend.c xmrecv.c sendbark.c recvbark.c \ filetime.c m7recv.c m7send.c respfreq.c \ rdoptions.c emsidat.c wazoo.c janus.c hydra.c \ zmsend.c zmrecv.c zmmisc.c zmrle.c \ tcp.c tcpproto.c binkp.c \ openfile.c dietifna.c openterm.c \ nlindex.c nodebld.c ifindex.c ifroute.c mxlookup.c \ nlpatch.c Txy.c nlookup.c ifinfo.c ifreq.c HDRS = nodelist.h statetbl.h session.h ttyio.h emsi.h zmodem.h \ ftscprod.h nlindex.h janus.h hydra.h binkp.h fsm.h Txy.h OTHER = README README.mxlookup README.TELNET Makefile \ flaglex.l flagexp.y fta-1005.txt hydra.LICENSE.DOC \ ftscprod.090 mkprod.awk \ ifcico.8 ifcico.8.fr ifindex.8 ifinfo.8 ifroute.8 nlpatch.8 \ ifreq.8 ALL = ifcico ifindex ifinfo ifreq ifroute nlpatch nlookup ifeq (yes,${SHARED}) UTLIB = OBJCICO += ../iflib/libifmail.so.${SHVER} OBJINDEX += ../iflib/libifmail.so.${SHVER} OBJROUTE += ../iflib/libifmail.so.${SHVER} OBJPATCH += ../iflib/libifmail.so.${SHVER} OBJLOOKUP += ../iflib/libifmail.so.${SHVER} LIBS += -L ../iflib -lifmail else UTLIB = ../iflib/utlib.a endif .c.o: ${CC} -c ${CFLAGS} ${INCLUDES} ${DEFINES} $< all: ${ALL} ftscprod.c: ftscprod.??? ${AWK} -F, -f mkprod.awk ftscprod.??? >ftscprod.c flagexp.c: flagexp.y ${YACC} flagexp.y mv y.tab.c flagexp.c flaglex.c: flaglex.l ${LEX} flaglex.l mv lex.yy.c flaglex.c zmvars.h: mkvars.c zmvars.def ${CPP} mkvars.c >zmvars.h zmvars.c: mkvars.c zmvars.def ${CPP} -DMAKE_C mkvars.c >zmvars.c flagexp.o: flaglex.c flagexp.c flaglex.o: flaglex.c flagexp.c install: all ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${SMODE} ifcico ${BINDIR}/ifcico ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifindex ${BINDIR}/ifindex ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifinfo ${BINDIR}/ifinfo ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifreq ${BINDIR}/ifreq ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} ifroute ${BINDIR}/ifroute ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} nlpatch ${BINDIR}/nlpatch ${INSTALL} -s -o ${OWNER} -g ${GROUP} -m ${MODE} nlookup ${BINDIR}/nlookup tryc: ifcico >/var/log/ifmail/ifdebug ./ifcico -xjnors -I../misc/config -alocalhost f230.n5020 tryp: nlpatch >/var/log/ifmail/ifdebug cd /var/spool/ifmail/nl.d;\ /usr/lib/ifmail/nlpatch -xtu z2-list.266 z2-diff.273 lc: wc -l ${SRCS} ${HDRS} ${OTHER} clean: rm -f *.o flaglex.c flagexp.c ftscprod.c core ${ALL} lastmtime \ iflog ifdebug filelist version.c Makefile.bak ifcico: ${OBJCICO} ${UTLIB} ${CC} ${LDFLAGS} ${OBJCICO} ${UTLIB} -o ifcico ${LIBS} ifindex: ${OBJINDEX} ${UTLIB} ${CC} ${LDFLAGS} ${OBJINDEX} ${UTLIB} -o ifindex ${LIBS} ifinfo: ${OBJINFO} ${UTLIB} ${CC} ${LDFLAGS} ${OBJINFO} ${UTLIB} -o ifinfo ${LIBS} ifreq: ${OBJREQ} ${UTLIB} ${CC} ${LDFLAGS} ${OBJREQ} ${UTLIB} -o ifreq ${LIBS} ifroute: ${OBJROUTE} ${UTLIB} ${CC} ${LDFLAGS} ${OBJROUTE} ${UTLIB} -o ifroute ${LIBS} nlpatch: ${OBJPATCH} ${UTLIB} ${CC} ${LDFLAGS} ${OBJPATCH} ${UTLIB} -o nlpatch ${LIBS} nlookup: ${OBJLOOKUP} ${UTLIB} ${CC} ${LDFLAGS} ${OBJLOOKUP} ${UTLIB} -o nlookup ${LIBS} lastmtime: lastmtime.c ${CC} ${CFLAGS} lastmtime.c -o lastmtime tar: ifcico.tar.z ifcico.tar.z: ${SRCS} ${HDRS} ${OTHER} ${TAR} cf - ${SRCS} ${HDRS} ${OTHER} | \ gzip >$@ filelist: Makefile BASE=`pwd`; \ BASE=`basename $${BASE}`; \ (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ifmail/$${BASE}/$$f; done) \ >filelist man: man.lang ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifcico.8 ${MANDIR}/man8/ifcico.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifindex.8 ${MANDIR}/man8/ifindex.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifinfo.8 ${MANDIR}/man8/ifinfo.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifreq.8 ${MANDIR}/man8/ifreq.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifroute.8 ${MANDIR}/man8/ifroute.8 ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} nlpatch.8 ${MANDIR}/man8/nlpatch.8 man.lang: if [ "${LANG}" != "" ]; then \ case "${LANG}" in \ fr*) ${INSTALL} -o ${MANOWNER} -g ${MANGROUP} -m ${MANMODE} ifcico.8.fr ${MANDIR}/fr/man8/ifcico.8 ;; \ esac ; fi config: test -f config version.c: ${SRCS} ${HDRS} flaglex.l flagexp.y lastmtime ../CONFIG echo 'char *version=${VERSION};' >version.c echo 'char *copyright=${COPYRIGHT};' >>version.c echo "char *reldate=\"`./lastmtime ${SRCS} ${HDRS} flaglex.l flagexp.y`\";" >>version.c depend: version.c @mv -f Makefile Makefile.bak; \ sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ >>Makefile; \ ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ for f in ${SRCS} version.c; \ do \ ${ECHO} "Dependencies for $$f:\c"; \ ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ for h in `sed -n -e \ 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ do \ ${ECHO} " $$h\c"; \ if [ -r $$h ]; \ then \ ${ECHO} " $$h\c" >>Makefile; \ else \ ${ECHO} " ${INCDIR}/$$h\c" >>Makefile; \ fi; \ done; \ ${ECHO} " done."; \ ${ECHO} "" >>Makefile; \ done; \ ${ECHO} '# End of generated dependencies' >>Makefile # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend lastmtime.o: ifcico.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/trap.h ../iflib/config.h ../iflib/version.h ../iflib/needed.h nodelist.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h ../iflib/needed.h call.o: ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h session.h ../iflib/callstat.h callall.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h ../iflib/scanout.h ../iflib/needed.h answer.o: ../iflib/lutil.h ../iflib/ftn.h nodelist.h session.h ../iflib/config.h modemstr.o: ../iflib/config.h nodelist.h openport.o: ../iflib/lutil.h ../iflib/xutil.h ../iflib/ulock.h ttyio.h opentcp.o: ../iflib/lutil.h ttyio.h dial.o: ../iflib/lutil.h nodelist.h ../iflib/config.h session.o: ttyio.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h statetbl.h session.h ../iflib/config.h emsi.h ../iflib/version.h chat.o: ../iflib/lutil.h ../iflib/xutil.h nodelist.h ../iflib/config.h ttyio.o: ttyio.h ../iflib/lutil.h emsi.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h nodelist.h ../iflib/version.h ftsc.o: ../iflib/ftn.h ../iflib/getheader.h ../iflib/xutil.h ../iflib/lutil.h session.h ttyio.h statetbl.h ../iflib/config.h yoohoo.o: statetbl.h ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h ftscprod.h ../iflib/config.h ../iflib/ftn.h emsi.h nodelist.h ../iflib/version.h filelist.o: ../iflib/config.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/bwrite.h session.h ../iflib/ftn.h xmsend.o: session.h ../iflib/lutil.h ttyio.h statetbl.h ../iflib/version.h xmrecv.o: session.h ttyio.h statetbl.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h sendbark.o: ../iflib/ftn.h ../iflib/lutil.h ttyio.h session.h statetbl.h recvbark.o: ../iflib/lutil.h ttyio.h session.h statetbl.h filetime.o: m7recv.o: statetbl.h ttyio.h ../iflib/lutil.h m7send.o: statetbl.h ttyio.h ../iflib/lutil.h respfreq.o: ../iflib/directory.h session.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h ../iflib/ftnmsg.h ../iflib/version.h rdoptions.o: session.h ../iflib/xutil.h ../iflib/lutil.h nodelist.h ../iflib/config.h ../iflib/needed.h emsidat.o: ../iflib/ftn.h ../iflib/xutil.h ../iflib/lutil.h emsi.h session.h ../iflib/config.h ../iflib/version.h ../iflib/falists.h wazoo.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h janus.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h hydra.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h hydra.h zmsend.o: ttyio.h ../iflib/xutil.h ../iflib/lutil.h session.h zmodem.h emsi.h zmrecv.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h zmodem.h session.h ../iflib/config.h emsi.h zmmisc.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h zmodem.h zmrle.o: ../iflib/lutil.h ttyio.h zmodem.h tcp.o: ../iflib/lutil.h ttyio.h session.h statetbl.h ../iflib/config.h emsi.h tcpproto.o: ../iflib/xutil.h ../iflib/lutil.h ttyio.h session.h ../iflib/config.h emsi.h openfile.o: ../iflib/xutil.h ../iflib/lutil.h ../iflib/config.h ../iflib/needed.h dietifna.o: ../iflib/lutil.h ttyio.h session.h emsi.h openterm.o: ../iflib/lutil.h nlindex.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h nodebld.o: ../iflib/directory.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/ftn.h ../iflib/config.h nodelist.h nlindex.h ../iflib/needed.h ifindex.o: ../iflib/getopt.h ../iflib/lutil.h nodelist.h nlindex.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h ifroute.o: ../iflib/getopt.h ../iflib/lutil.h ../iflib/xutil.h ../iflib/ftn.h nodelist.h ../iflib/config.h ../iflib/version.h ../iflib/trap.h mxlookup.o: nlpatch.o: ../iflib/getopt.h ../iflib/xutil.h ../iflib/lutil.h ../iflib/version.h ../iflib/config.h version.o: # End of generated dependencies ifmail-2.14tx8.10.orig/ifcico/flaglex.l100644 1751 50 12030 5726034522 15222 0ustar mdsrc%{ #include #include #include "ftn.h" #include "lutil.h" #include "nodelist.h" static char *yyPTR = NULL; static int yyBUFL; #ifndef yywrap #define yywrap() 1 #endif #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ((yyPTR == NULL) || (*yyPTR == '\0')) \ { \ debug(13,"YY_INPUT unavail, %d reqd",max_size); \ result=YY_NULL; \ } \ else \ { \ yyBUFL=strlen(yyPTR); \ debug(13,"YY_INPUT \"%s\" (%d) avail, %d reqd",\ yyPTR,yyBUFL,max_size); \ if (yyBUFL > max_size) yyBUFL=max_size; \ memcpy(buf,yyPTR,yyBUFL); \ yyPTR += yyBUFL; \ result=yyBUFL; \ } #else /* this is most probably native lex? */ #undef input #undef output #undef unput #define input() (((yyPTR == NULL) || (*yyPTR == '\0'))?NULL:*yyPTR++) #define output(c) #define unput(c) (*--yyPTR = (c)) #endif int flagfor(char *); int chkaddr(char*); int chktime(char*); int yylval; %} Blank [ \t\n]+ Speed [Ss][Pp][Ee][Ee][Dd] Phone [Pp][Hh][Oo][Nn][Ee] Time [Tt][Ii][Mm][Ee] Address [Aa][Dd][Dd][Rr][Ee][Ss][Ss] Sun [Ss][Uu][Nn] Mon [Mm][Oo][Nn] Tue [Tt][Uu][Ee] Wed [Ww][Ee][Dd] Thu [Tt][Hh][Uu] Fri [Ff][Rr][Ii] Sat [Ss][Aa][Tt] Any [Aa][Nn][Yy] Wk [Ww][Kk] We [Ww][Ee] Eq == Ne != Gt \> Ge \>= Lt \< Le \<= And \& Or \| Not \! Xor [Xx][Oo][Rr] Lb \( Rb \) Comma \, Asterisk \* Dow ({Sun}|{Mon}|{Tue}|{Wed}|{Thu}|{Fri}|{Sat}|{Any}|{Wk}|{We}) Hour (([0-1][0-9])|(2[0-3])) Minute [0-5][0-9] Decimal [1-9][0-9]* Numeric [0-9][0-9]* Phstr [0-9-]*-[0-9-]* Ident [A-Za-z][A-Za-z0-9]* Timestr {Dow}({Hour}{Minute}\-{Hour}{Minute})? Addrstr (({Decimal}|\*):)?({Decimal}|\*)\/({Numeric}|\*)(.({Numeric}|\*))?(@({Ident}|\*))? %% {Blank} ; {Decimal} {debug(13,"Decimal: \"%s\"",yytext);yylval=strtol(yytext,NULL,0);return(NUMBER);} {Timestr} {debug(13,"Timestr: \"%s\"",yytext);yylval=chktime(yytext);return(TIMESTR);} {Phstr} {debug(13,"Phstr: \"%s\"",yytext);yylval=PHSTR;return(PHSTR);} {Eq} {yylval=EQ;return(AROP);} {Ne} {yylval=NE;return(AROP);} {Gt} {yylval=GT;return(AROP);} {Ge} {yylval=GE;return(AROP);} {Lt} {yylval=LT;return(AROP);} {Le} {yylval=LE;return(AROP);} {And} {yylval=AND;return(LOGOP);} {Or} {yylval=OR;return(LOGOP);} {Not} {yylval=NOT;return(NOT);} {Xor} {yylval=XOR;return(LOGOP);} {Lb} {yylval=LB;return(LB);} {Rb} {yylval=RB;return(RB);} {Comma} {yylval=COMMA;return(COMMA);} {Asterisk} {yylval=ASTERISK;return(ASTERISK);} {Speed} {yylval=SPEED;return(SPEED);} {Phone} {yylval=PHONE;return(PHONE);} {Time} {yylval=TIME;return(TIME);} {Address} {yylval=ADDRESS;return(ADDRESS);} {Ident} {debug(13,"Ident: \"%s\"",yytext);yylval=flagfor(yytext);return(IDENT);} {Addrstr} {debug(13,"Addrstr: \"%s\"",yytext);yylval=chkaddr(yytext);return(ADDRSTR);} %% int flagfor(str) char *str; { int i; debug(13,"flagfor \"%s\"",str); for (i=0;fkey[i].key;i++) if (strcasecmp(str,fkey[i].key) == 0) return fkey[i].flag; return -1; } int chkaddr(str) char *str; { faddr *addr; int rc=1; if ((addr=parsefnode(str)) == NULL) { logerr("unparsable address \"%s\" in expression",str); return 0; } debug(13,"chkaddr: does spec %s match remote address ?", ascfnode(addr,0x1f)); if ((addr->domain) && (nodebuf->addr.domain) && (strcasecmp(addr->domain,nodebuf->addr.domain) != 0)) rc=0; if (((int)addr->zone != -1) &&(addr->zone != 0) && (addr->zone != nodebuf->addr.zone)) rc=0; if (((int)addr->net != -1) && (addr->net != nodebuf->addr.net)) rc=0; if (((int)addr->node != -1) && (addr->node != nodebuf->addr.node)) rc=0; if (((int)addr->point != -1) && (addr->point != nodebuf->addr.point)) rc=0; tidy_faddr(addr); return rc; } int chktime(str) char *str; { int h1,h2,m1,m2,beg,end,cur,dayok,day; if (strncasecmp(str,"Sun",3) == 0) day=0; else if (strncasecmp(str,"Mon",3) == 0) day=1; else if (strncasecmp(str,"Tue",3) == 0) day=2; else if (strncasecmp(str,"Wed",3) == 0) day=3; else if (strncasecmp(str,"Thu",3) == 0) day=4; else if (strncasecmp(str,"Fri",3) == 0) day=5; else if (strncasecmp(str,"Sat",3) == 0) day=6; else if (strncasecmp(str,"Any",3) == 0) day=-1; else if (strncasecmp(str,"Wk",2) == 0) day=-2; else if (strncasecmp(str,"We",2) == 0) day=-3; else day=-4; debug(13,"chkday: does day %d match spec %d ?",now->tm_wday,day); if (day >= 0) dayok=(now->tm_wday == day); else switch (day) { case -3: dayok=((now->tm_wday == 0) || (now->tm_wday == 6)); break; case -2: dayok=((now->tm_wday != 0) && (now->tm_wday != 6)); break; case -1: dayok=1; break; default: logerr("internal error: chkday got %d",day); dayok=0; break; } if (dayok == 0) return 0; while (*str && ((*str < '0') || (*str > '9'))) str++; if (*str == '\0') { return 1; } if (sscanf(str,"%02d%02d-%02d%02d",&h1,&m1,&h2,&m2) != 4) { logerr("invalid time string \"%s\" in expression",str); return 0; } debug(13,"chktime: is %02d:%02d between %02d:%02d and %02d:%02d ?", now->tm_hour,now->tm_min,h1,m1,h2,m2); cur=now->tm_hour*60+now->tm_min; beg=h1*60+m1; end=h2*60+m2; if (end > beg) { return ((cur >= beg) && (cur <= end)); } else { return ((cur >= beg) || (cur <= end)); } } ifmail-2.14tx8.10.orig/ifcico/flagexp.y100644 1751 50 6024 5647322266 15240 0ustar mdsrc%token NUMBER PHSTR TIMESTR ADDRSTR IDENT SPEED PHONE TIME ADDRESS DOW ANY WK WE SUN MON TUE WED THU FRI SAT EQ NE GT GE LT LE LB RB AND OR NOT XOR COMMA ASTERISK AROP LOGOP %{ #include #include #include #include "xutil.h" #include "lutil.h" #include "nodelist.h" node *nodebuf; int result; struct tm *now; %} %% fullline : expression {debug(13,"fulline: return %d",$1);result=$1;} ; expression : elemexp {debug(13,"elem.expr %d",$1);$$ = $1;} | NOT expression {debug(13,"not.expr %d",$2);$$ = !($2);} | expression LOGOP expression {debug(13,"log.expr %d %d %d",$1,$2,$3);$$ = logic($1,$2,$3);} | LB expression RB {debug(13,"backeted.expr %d",$2);$$ = $2;} ; elemexp : flag {debug(13,"flag %d",$1);$$ = match($1);} | SPEED AROP NUMBER {debug(13,"speed on num %d %d",$2,$3);$$ = checkspeed($2,$3);} | PHONE PHSTR {debug(13,"phone num %d",$2);$$ = checkphone();} | PHONE NUMBER {debug(13,"phone num %d",$2);$$ = checkphone();} | TIME timestring {debug(13,"time %d",$2);$$ = $2;} | ADDRESS ADDRSTR {debug(13,"address %d",$2);$$ = $2;} ; flag : IDENT {debug(13,"ident %d",$1);$$ = $1;} ; timestring : TIMESTR {debug(13,"timelem %d",$1);$$ = $1;} | TIMESTR COMMA timestring {debug(13,"log.expr %d %d %d",$1,OR,$3);$$ = logic($1,OR,$3);} %% #include "flaglex.c" int match(fl) int fl; { int i; debug(13,"match: %d",fl); if (fl == -1) { for (i=0;(iuflags[i]);i++) if (strcasecmp(yytext,nodebuf->uflags[i]) == 0) return 1; return 0; } else { return ((nodebuf->flags & fl) != 0); } } int logic(e1,op,e2) int e1,op,e2; { debug(13,"logic: %d %d %d",e1,op,e2); switch (op) { case AND: return(e1 && e2); case OR: return(e1 || e2); case XOR: return(e1 ^ e2); default: logerr("Parser: internal error: invalid logical operator"); return 0; } } int checkspeed(op,speed) int op,speed; { debug(13,"checkspeed: %d %d",op,speed); switch (op) { case EQ: return(nodebuf->speed == speed); case NE: return(nodebuf->speed != speed); case GT: return(nodebuf->speed > speed); case GE: return(nodebuf->speed >= speed); case LT: return(nodebuf->speed < speed); case LE: return(nodebuf->speed <= speed); default: logerr("Parser: internal error: invalid arithmetic operator"); return 0; } } int checkphone(void) { debug(13,"checkphone: \"%s\"",yytext); if (nodebuf->phone == NULL) return 0; if (strncasecmp(yytext,nodebuf->phone,strlen(yytext)) == 0) return 1; else return 0; } int flagexp(expr,nl) char *expr; node *nl; { time_t tt; char *p; debug(13,"check expression \"%s\"",expr); nodebuf=nl; (void)time(&tt); now=localtime(&tt); p=xstrcpy(expr); yyPTR=p; #ifdef FLEX_SCANNER /* flex requires reinitialization */ yy_init=1; #endif result=0; if ((yyparse())) { logerr("could not parse expression \"%s\", assume `false'",expr); free(p); return 0; } debug(13,"checking result is \"%s\"",result?"true":"false"); free(p); return result; } int yyerror(s) char *s; { logerr("parser error: %s",s); return 0; } ifmail-2.14tx8.10.orig/ifcico/ftscprod.090100644 1751 50 37055 6463053353 15521 0ustar mdsrc; FidoNet Product ID List ; ; code,name,os,type,contact,netaddr[,date assigned[,last update]] ; ; Product codes are in 4 digit hexadecimal notation ; Date format is YYYYMMDD, may be blank ; ; If you write software which is dependant on this format, please make it ; tolerant of additional fields after theses for upwards compatibility ; ; codes have been increased to 16-bit (4 digit hexadecimal) values ; New entries & update products after 31st May 1993 add: ; both fields in "YYMMDD" format ; ;8-bit product codes 0000,Fido,MS-DOS,Packer/mailer,Tom_Jennings,1:125/111 0001,Rover,MS-DOS,Packer/mailer,Bob_Hartman,1:104/501 0002,SEAdog,MS-DOS,Packer/mailer,Thom_Henderson,1:107/542.1 0003,WinDog,MS-DOS,Mailer,Solar_Wind_Computing,1:115/333 0004,Slick-150,HP-150,Packer/mailer,Jerry_Bain,???? 0005,Opus,MS-DOS,Packer/mailer,Doug_Boone,1:124/4227 0006,Dutchie,MS-DOS,Packer/mailer,Henk_Wevers,2:500/1 0007,WPL_Library,Amiga,Mailer,Russell_McOrmand,1:163/109 0008,Tabby,Macintosh,Packer/mailer,Michael_Connick,1:107/412 0009,SWMail,OS/2,Mailer,Solar_Wind_Computing,1:115/333 000A,Wolf-68k,CPM-68k,Packer/mailer,Robert_Heller,1:321/153 000B,QMM,QNX,Packer/mailer,Rick_Duff,1:167/201 000C,FrontDoor,MS-DOS,Packer/mailer,Joaquim_Homrighausen,2:270/17 000D,GOmail,MS-DOS,Packer,Scott_Green,???? 000E,FFGate,MS-DOS,Packer,Ruedi_Kneubuehler,2:301/580 000F,FileMgr,MS-DOS,Packer,Erik_van_Emmerik,2:281/611 0010,FIDZERCP,MS-DOS,Packer,Thorsten_Seidel,2:242/55 0011,MailMan,MS-DOS,Packer,Ron_Bemis,1:124/1113 0012,OOPS,MS-DOS,Packer,Tom_Kashuba,1:322/379 0013,GS-Point,Atari_ST,Packer/mailer,Harry_Lee,1:124/4230 0014,BGMail,????,????,Ray_Gwinn,1:265/104 0015,ComMotion/2,OS/2,Packer/mailer,Michael_Buenter,2:301/602 0016,OurBBS_Fidomailer,MS-DOS/Unix/Coherent,Packer/mailer,Brian_Keahl,1:133/524 0017,FidoPcb,MS-DOS,Packer,Matjaz_Koce,2:380/100 0018,WimpLink,Archimedes,Packer/mailer,Remco_de_Vreugd,2:283/307 0019,BinkScan,MS-DOS,Packer,Shawn_Stoddard,1:362/101 001A,D'Bridge,MS-DOS,Packer/mailer,Chris_Irwin,1:18/68 001B,BinkleyTerm,MS-DOS,Mailer,Vince_Perriello,1:343/491 001C,Yankee,MS-DOS,Packer,Randy_Edwards,???? 001D,uuGate,MS-DOS,Packer,Geoff_Watts,3:690/710 001E,Daisy,Apple_][,Packer/mailer,Raymond_&_Ken_Lo,3:700/1 001F,Polar_Bear,????,Packer/mailer,Kenneth_McLeod,1:101/190 0020,The-Box,MS-DOS/Atari_ST,Packer/mailer,Jac_Kersing/Arjen_Lentz,2:283/333 0021,STARgate/2,OS/2,Packer/mailer,Shawn_Stoddard,1:362/101 0022,TMail,MS-DOS,Packer,Larry_Lewis,3:713/600.1701 0023,TCOMMail,MS-DOS,Packer/mailer,Mike_Ratledge,1:372/888 0024,GIGO,MS-DOS,Packer,Jason_Fesler,1:203/7707,,940228 0025,RBBSMail,MS-DOS,Packer,Jan_Terpstra,2:512/10 0026,Apple-Netmail,Apple_][,Packer/mailer,Bill_Fenner,1:129/87 0027,Chameleon,Amiga,Mailer,Juergen_Hermann,2:241/2.12 0028,Majik_Board,MS-DOS,Packer/mailer,Dale_Barnes,1:3601/14.20 0029,QM,MS-DOS,Packer,George_Peace,1:270/101 002A,Point_And_Click,Amiga,Packer,Rob_Tillotson,1:201/40.302 002B,Aurora_Three_Bundler,MS-DOS,Packer,Oliver_McDonald,???? 002C,FourDog,MS-DOS,Packer,Shay_Walters,1:376/12 002D,MSG-PACK,MS-DOS,Packer,Tom_Hendricks,1:261/662 002E,AMAX,MS-DOS,Packer,Alan_Applegate,1:104/36 002F,Domain_Communication_System,????,????,Hal_Duprie,1:101/106 0030,LesRobot,????,Packer,Lennart_Svensonn,2:501/2 0031,Rose,MS-DOS,Packer/mailer,Glen_Jackson,1:100/617 0032,Paragon,Amiga,Packer/mailer,Jon_Radoff,1:322/545 0033,BinkleyTerm/oMMM/ST,Atari_ST,Packer/mailer,Peter_Glasmacher,1:143/9 0034,StarNet,Atari_ST,Mailer,Eric_Drewry,1:322/566 0035,ZzyZx,MS-DOS,Packer,Jason_Steck,1:124/424 0036,QEcho,MS-DOS,Packer,The_QuickBBS_Group,1:363/1701 0037,BOOM,MS-DOS,Packer,Andrew_Farmer,1:243/1 0038,PBBS,Amiga,Packer/mailer,Todd_Kover,1:261/1028 0039,TrapDoor,Amiga,Mailer,Maximilian_Hantsch,2:310/6 003A,Welmat,Amiga,Mailer,Russell_McOrmand,1:163/109 003B,NetGate,Unix-386,Packer,David_Nugent,3:632/348 003C,Odie,MS-DOS,Mailer,Matt_Farrenkopf,1:105/376 003D,Quick_Gimme,CPM-80/MS-DOS,Packer/mailer,Laeeth_Isaacs,2:254/18 003E,dbLink,MS-DOS,Packer/mailer,Chris_Irwin,1:18/68 003F,TosScan,MS-DOS,Packer,Joaquim_Homrighausen,2:270/17 0040,Beagle,MS-DOS,Mailer,Alexander_Holy,2:310/90 0041,Igor,MS-DOS,Mailer,Harry_Lee,1:124/4230 0042,TIMS,MS-DOS,Packer/mailer,Bit_Bucket_Software,1:104/501 0043,Phoenix,MS-DOS,Packer/mailer,International_Telecommunications,1:296/5,,930624 0044,FrontDoor_APX,MS-DOS,Packer/mailer,Joaquim_Homrighausen,2:270/17 0045,XRS,MS-DOS,Packer,Mike_Ratledge,1:372/888 0046,Juliet_Mail_System,Amiga,Packer,Gregory_Kritsch,1:163/109.30 0047,Jabberwocky,Macintosh,Packer,Eric_Larson,1:2605/620 0048,XST,MS-DOS,Packer,Wayne_Michaels,1:380/100 0049,MailStorm,Amiga,Packer,Russel_Miranda,1:268/106 004A,BIX-Mail,????,Mailer,Bob_Hartman,1:104/501 004B,IMAIL,MS-DOS,Packer,IMAIL_INC.,2:246/47 004C,FTNGate,MS-DOS,Packer,Jason_Steck,1:104/424 004D,RealMail,MS-DOS,Packer,Taine_Gilliam,1:372/42 004E,Lora-CBIS,MS-DOS,Mailer,Marco_Maccaferri,2:332/402 004F,TDCS,PDP-11,Packer/mailer,Terry_Ebdon,2:254/6 0050,InterMail,MS-DOS,Packer/mailer,Peter_Stewart,1:369/35 0051,RFD,MS-DOS,Packer,Doug_Belkofer,1:234/10 0052,Yuppie!,MS-DOS,Packer,Leo_Moll,2:242/2 0053,EMMA,MS-DOS,Packer,Johan_Zwiekhorst,2:292/100 0054,QBoxMail,QDOS,Packer/mailer,Jan_Bredenbeek,2:283/500 0055,Number_4,MS-DOS,Packer/mailer,Ola_Garstad,2:502/15 0056,Number_5,MS-DOS,Packer/mailer,Ola_Garstad,2:502/15 0057,GSBBS,MS-DOS,Packer,Michelangelo_Jones,1:260/244 0058,Merlin,MS-DOS,Packer/mailer,Mark_Lewis,2:258/25 0059,TPCS,MS-DOS,Packer,Mikael_Kjellstrom,2:201/211 005A,Raid,MS-DOS,Packer,George_Peace,1:270/101 005B,Outpost,MS-DOS,Packer/mailer,Mike_Dailor,???? 005C,Nizze,MS-DOS,Packer,Tomas_Nielsen,2:205/202 005D,Armadillo,Macintosh,Packer,Erik_Sea,1:221/109 005E,rfmail,Unix,Packer/mailer,Per_Lindqvist,2:201/332 005F,Msgtoss,MS-DOS,Packer,Mike_Zakharoff,1:343/36 0060,InfoTex,MS-DOS,Packer/mailer,Jan_Spooren,2:292/852 0061,GEcho,MS-DOS,Packer,Gerard_van_der_Land,2:283/555,951209 0062,CDEhost,MS-DOS,Packer,Dennis_D'Annunzio,1:379/28 0063,Pktize,MS-DOS,Packer,Joaquim_Homrighausen,2:270/17 0064,PC-RAIN,MS-DOS,Packer/mailer,Ray_Hyder,1:272/40 0065,Truffle,MS-DOS/OS2,Mailer,Mike_Rissa,2:504/59 0066,Foozle,Amiga,Packer,Peer_Hasselmeyer,2:247/4 0067,White_Pointer,Macintosh,Packer/mailer,Alastair_Rakine,3:680/820 0068,GateWorks,MS-DOS,Packer,Jamie_Penner,1:153/1025 0069,Portal_of_Power,MS-DOS,Mailer,Soren_Ager,2:230/12 006A,MacWoof,Macintosh,Packer/mailer,Craig_Vaughan,1:109/342 006B,Mosaic,MS-DOS,Packer,Christopher_King,1:103/315 006C,TPBEcho,MS-DOS,Packer,Gerd_Qualmann,2:242/1 006D,HandyMail,MS-DOS,Packer/mailer,jim_nutt,1:114/30 006E,EchoSmith,MS-DOS,Packer,Noel_Crow,1:170/409 006F,FileHost,MS-DOS,Packer,Mark_Cole,2:252/186 0070,SFTS,MS-DOS,Packer,Bruce_Anderson,1:3402/6 0071,Benjamin,MS-DOS,Packer/mailer,Stefan_Graf,2:245/4.5436 0072,RiBBS,OS9_(COCO),Packer/mailer,Ron_Bihler,1:104/54 0073,MP,MS-DOS,Packer,Ivan_Leong,6:600/28 0074,Ping,MS-DOS,Packer,David_Nugent,3:632/348 0075,Door2Europe,MS-DOS,Packer/mailer,Michaela_Schoebel,2:247/14 0076,SWIFT,MS-DOS,Packer/mailer,Hanno_van_der_Maas,2:500/2 0077,WMAIL,MS-DOS,Packer,Silvan_Calarco,2:334/100.2 0078,RATS,MS-DOS,Packer,Jason_DeCaro,1:260/205 0079,Harry_the_Dirty_Dog,OS2,Mailer/packer,George_Edwards,3:632/340.7 007A,Maximus-CBCS,MS-DOS/OS2,Packer,Scott_Dudley,1:249/106 007B,SwifEcho,MS-DOS,Packer,Dana_Bell,1:3801/8 007C,GCChost,Amiga,Packer,Davide_Massarenti,2:332/505.3 007D,RPX-Mail,MS-DOS,Packer,Joerg_Wirtgen,2:241/4034 007E,Tosser,MS-DOS,Packer,Albert_Ng,6:700/185 007F,TCL,MS-DOS,Packer,Ulf_Hedlund,2:201/602 0080,MsgTrack,MS-DOS,Packer,Andrew_Farmer,1:243/1 0081,FMail,MS-DOS,Packer,Folkert_Wijnstra,2:282/310 0082,Scantoss,MS-DOS,Packer,Michael_Matter,2:243/44.3443 0083,Point_Manager,Amiga,Packer,Pino_Aliberti,2:335/602.2,,931012 0084,IMBINK,MS-DOS,Packer,Mike_Hartmann,2:246/48 0085,Simplex,MS-DOS/OS2,Packer,Chris_Laforet,1:152/401 0086,UMTP,MS-DOS,Packer,Byron_Copeland,1:272/26 0087,Indaba,MS-DOS,Packer,Pieter_Muller,5:7102/11 0088,Echomail_Engine,MS-DOS,Packer,Joe_Jared,1:103/200 0089,DragonMail,OS2,Packer,Patrick_O'Riva,1:143/37 008A,Prox,MS-DOS,Packer,Gerhard_Hoogterp,2:283/1.2 008B,Tick,MS-DOS/OS2,Packer,Barry_Geller,1:266/12 008C,RA-Echo,MS-DOS,Packer,Roger_Kirchhoff,2:245/4 008D,TrapToss,Amiga,Packer,Maximilian_Hantsch,2:310/6 008E,Babel,MS-DOS/OS2,Packer,Jorgen_Abrahamsen,2:230/100.9 008F,UMS,Amiga,Packer,Martin_Horneffer,2:242/7.9 0090,RWMail,MS-DOS,Packer,Remko_Westrik,2:285/309.5 0091,WildMail,MS-DOS,Packer,Derek_Koopowitz,1:161/502 0092,AlMAIL,MS-DOS,Packer,Alan_Leung,1:348/207 0093,XCS,MS-DOS,Packer,Rudi_Kusters,2:512/34.4 0094,Fone-Link,MS-DOS,Packer/mailer,Chris_Sloyan,1:269/602 0095,Dogfight,MS-DOS,Packer,Chris_Tyson,2:256/36 0096,Ascan,MS-DOS,Packer,Arjen_van_Loon,2:281/1.397 0097,FastMail,MS-DOS,Packer,Jan_Berends,2:282/5 0098,DoorMan,MS-DOS,Mailer,Christopher_Dean,1:105/70 0099,PhaedoZap,Atari_ST,Packer,Jeff_Mitchell,1:229/422 009A,SCREAM,MS-DOS,Packer/mailer,Jem_Miller,1:147/33 009B,MoonMail,MS-DOS,Packer/mailer,Hasse_Wigdahl,2:206/101 009C,Backdoor,Sinclair_QL,Packer,Erik_Slagter,2:283/500.3 009D,MailLink,Archimedes,Packer/mailer,Jan-Jaap_v._d._Geer,2:500/133.1138 009E,Mail_Manager,MS-DOS,Packer,Andreas_Brodowski,2:241/4006 009F,Black_Star,Xenix_386,Packer/mailer,Jac_Kersing,2:283/333 00A0,Bermuda,Atari_ST/MS-DOS,Packer,Jac_Kersing,2:283/333 00A1,PT,MS-DOS,Packer/mailer,Jerry_Andrew,1:109/426 00A2,UltiMail,MS-DOS,Mailer,Brett_Floren,1:363/1000 00A3,GMD,MS-DOS,Packer,John_Souvestre,1:396/1 00A4,FreeMail,MS-DOS,Packer,Chad_Nelson,1:109/536 00A5,Meliora,MS-DOS,Packer,Erik_van_Riper,1:107/230 00A6,Foodo,CPM-80,Packer/mailer,Ron_Murray,3:690/640.7 00A7,MSBBS,CPM-80,Packer,Marc_Newman,1:106/601 00A8,Boston_BBS,MS-DOS,Packer/mailer,Tom_Bradford,1:101/625 00A9,XenoMail,MS-DOS,Packer/mailer,Noah_Wood,1:284/14 00AA,XenoLink,Amiga,Packer/mailer,Jonathan_Forbes,1:250/642 00AB,ObjectMatrix,MS-DOS,Packer,Roberto_Ceccarelli,2:332/305.1 00AC,Milquetoast,Win3/MS-DOS,Mailer,Vince_Perriello,1:343/491 00AD,PipBase,MS-DOS,Packer,Roberto_Piola,2:334/306 00AE,EzyMail,MS-DOS,Packer,Peter_Davies,3:636/204 00AF,FastEcho,MS-DOS,Packer,Tobias_Burchhardt,2:245/39 00B0,IOS,Atari_ST/TT,Packer,Rinaldo_Visscher,2:280/3.1 00B1,Communique,MS-DOS,Packer,Ian_Harris,3:620/251 00B2,PointMail,MS-DOS,Packer,Michele_Clinco,2:331/302.11 00B3,Harvey's_Robot,MS-DOS,Packer,Harvey_Parisien,1:249/114 00B4,2daPoint,MS-DOS,Packer,Ron_Pritchett,1:376/74 00B5,CommLink,MS-DOS,Mailer,Steve_Shapiro,1:382/35 00B6,fronttoss,MS-DOS,Packer,Dirk_Astrath,2:241/5603 00B7,SysopPoint,MS-DOS,Packer,Rudolf_Heeb,2:243/44 00B8,PTMAIL,MS-DOS,Packer,Arturo_Krogulski,2:341/27.7 00B9,MHS,MS-DOS/OS2/WINNT,Packer/mailer,Matthias_Hertzog,2:301/402,,940310 00BA,DLGMail,Amiga,Packer,Steve_Lewis,1:114/52 00BB,GatePrep,MS-DOS,Packer,Andrew_Allen,1:382/92 00BC,Spoint,MS-DOS,Packer,Conrad_Thompson,1:130/29.106 00BD,TurboMail,MS-DOS,Packer,B._J._Weschke,1:2606/403 00BE,FXMAIL,MS-DOS,Packer,Kenneth_Roach,1:208/401 00BF,NextBBS,MS-DOS,Packer/mailer,Tomas_Hood,1:352/777 00C0,EchoToss,MS-DOS,Packer,Mikel_Beck,1:107/218 00C1,SilverBox,Amiga,Packer,David_Lebel,1:240/516 00C2,MBMail,MS-DOS,Packer,Ruud_Uphoff,2:500/116.1928 00C3,SkyFreq,Amiga,Packer,Luca_Spada,2:331/106 00C4,ProMailer,Amiga,Mailer,Ivan_Pintori,2:335/311.21 00C5,Mega_Mail,MS-DOS,Packer/mailer,Mirko_Mucko,2:242/94 00C6,YaBom,MS-DOS,Packer,Berin_Lautenbach,3:620/248 00C7,TachEcho,MS-DOS,Packer,Tom_Zacios,1:107/376 00C8,XAP,MS-DOS,Packer,Jeroen_Smulders,2:512/1.8 00C9,EZMAIL,MS-DOS,Packer,Torben_Paving,2:234/41 00CA,Arc-Binkley,Archimedes,Mailer,Geoff_Riley,2:250/208 00CB,Roser,MS-DOS,Packer,Chan_Kafai,6:700/158 00CC,UU2,MS-DOS,Packer,Dmitri_Zavalishin,2:5020/32 00CD,NMS,MS-DOS,Packer/mailer,Michiel_de.Bruijn,2:285/505.2 00CE,BBCSCAN,Archimedes,Packer/mailer,E._G._Snel,2:512/222.17 00CF,XBBS,MS-DOS,Packer,Mark_Kimes,1:380/16 00D0,LoTek_Vzrul,Packer/mailer,Kevin_Gates,1:140/64 00D1,Private_Point_Project,MS-DOS,Packer,Oliver_von_Bueren,2:301/701 00D2,NoSnail,MS-DOS,Packer,Eddie_Rowe,1:19/124 00D3,SmlNet,MS-DOS,Packer,Steve_T._Gove,1:106/6 00D4,STIR,MS-DOS,Packer,Paul_Martin,2:250/107.3 00D5,RiscBBS,Archimedes,Packer,Carl_Declerck,2:292/500.10 00D6,Hercules,Amiga,Packer/mailer,Andrew_Gray,1:231/590 00D7,AMPRGATE,MS-DOS,Packer/mailer,Mike_Bilow,1:323/120.1 00D8,BinkEMSI,MS-DOS,Mailer,Tobias_Burchhardt,2:245/39 00D9,EditMsg,MS-DOS,Packer,G._K._Pace,1:374/26 00DA,Roof,Amiga,Packer,Robert_Williamson,1:167/104 00DB,QwkPkt,MS-DOS,Packer,Ross_West,1:250/412 00DC,MARISCAN,MS-DOS,Packer,Mario_Elkati,2:341/14.9 00DD,NewsFlash,MS-DOS,Packer,Chris_Lueders,2:241/5306 00DE,Paradise,MS-DOS,Packer/mailer,Kenneth_Wall,1:300/5 00DF,DogMatic-ACB,N/A,Packer/mailer,Martin_Allard,2:245/48 00E0,T-Mail,MS-DOS,Packer/mailer,Andy_Elkin,2:5030/15 00E1,JetMail,Atari_ST/STE/TT,Packer,Daniel_Roesen,2:243/93.8 00E2,MainDoor,MS-DOS,Packer/mailer,Francisco_Sedano,2:341/20 00E3,Starnet_Products,MS-DOS/OS2,Mailer/Packer,Starnet_Software_Development,1:102/925,,951209 00E4,BMB,Amiga,Packer,Dentato_Remo,2:335/311.33 00E5,BNP,MS-DOS,Packer,Nathan_Moschkin,1:109/427 00E6,MailMaster,MS-DOS,Packer/mailer,Gary_Murphy,1:130/85 00E7,Mail_Manager_+Plus+,MS-DOS,Packer,Chip_Morrow,1:226/1240 00E8,BloufGate,Atari_ST/Unix,Packer,Vincent_Pomey,2:320/100.2 00E9,CrossPoint,MS-DOS,Packer/mailer,Peter_Mandrella,2:243/97.80 00EA,DeltaEcho,MS-DOS,Packer,Mikael_Staldal,2:201/337 00EB,ALLFIX,MS-DOS,Packer,Harald_Harms,2:512/145 00EC,NetWay,Archimedes,Mailer,Steve_Haslam,2:250/116.3 00ED,MARSmail,Atari_ST,Packer,Folkert_val_Heusden,2:285/750.2,,940122 00EE,ITRACK,MS-DOS,Packer,Frank_Prade,2:246/55.1 00EF,GateUtil,MS-DOS,Packer,Michael_Skurka,1:397/2.1 00F0,Bert,MS-DOS,Packer/mailer,Arnim_Wiezer,2:241/2104.9 00F1,Techno,MS-DOS,Packer,Patrik_Holmsten,2:203/133 00F2,AutoMail,MS-DOS,Packer,Mats_Wallin,2:201/239 00F3,April,Amiga,Packer,Nick_de_Jong,2:282/309.3 00F4,Amanda,MS-DOS,Packer,David_Douthitt,1:121/99.14 00F5,NmFwd,MS-DOS,Packer,Alberto_Pasquale,2:332/504 00F6,FileScan,MS-DOS,Packer,Matthias_Duesterhoeft,2:241/4512.2 00F7,FredMail,MS-DOS,Packer,Michael_Butler,3:712/515 00F8,TP_Kom,MS-DOS,Packer/mailer,Per_Sten,2:201/124 00F9,FidoZerb,MS-DOS,Packer,Ulrich_Schlechte,2:241/3410.12 00FA,!!MessageBase,MS-DOS,Packer/mailer,Holger_Lembke,2:240/500.20 00FB,EMFido,Amiga,Packer,Gary_Glendown,2:249/3.999 00FC,GS-Toss,MS-DOS,Packer,Marco_Bungalski,2:241/2021 00FD,QWKDoor,Atari_ST,Packer,Christian_Limpach,2:270/20.1 00FE,No_product_id_allocated,Any,Packer,No_Author,3:3/20 00FF,16-bit_product_id,Any,Packer/Mailer,No_Author,3:3/20 ; 16-bit product codes 0100,Reservered,None,None,No_Author,3:3/20,951209 0101,The_Brake!,Mailer,John_Gladkih,2:5051/16,951209 0102,Zeus_BBS,Amiga,Mailer,Alex_May,2:441/58.0,951209 0103,XenoPhobe-Mailer,Msdos/Windows/OS2/Linux,Mailer,Peter_Kling,1:374/969.0,951209 0104,BinkleyTerm/ST,Atari_ST,Mailer,Bill_Scull,1:363/112,951209 0105,Terminate,Msdos/Os2/Windows,Mailer/Packer,SerWiz_Comm_&_Bo_Bendtsen,2:254/261,951209 0106,TeleMail,Msdos,Mailer/Packer,Juergen_Weigelt,2:2453/900,951209 0107,CMBBS,Msdos/Os2,Mailer/Packer,Christof_Engel,2:2490/5110,951209 0108,Shuttle,Windows,Mailer/PAcker,MCH_Development_&_Marvin_Hart,1:106/500,951209 0109,Quater,Amiga,Mailer,Felice_Murolo,2:335/206,951209 010A,Windo,Windows,Mailer,Alan_Chavis,1:147/55,951209 010B,Xenia,Msdos/Os2,Mailer,Arjen_Lentz,2:283/512,960601 010C,GMS,AmigaOS,Mailer,Mirko_Viviani,2:331/213,960601 010D,HNET,Msdos,Pedro_Jaramillo,1:102/160,960601 010E,Shotgun_Professional,Msdos,Brent_Shellenberg,1:140/146,960621 010F,SLIPgate,Msdos,Kieran_Morrissey,3:634/376,960723 ;; This is not on the official list, is only an empiric value - P.Saratxaga FF00,McMail,Msdos,Mailer,Not_Known,0:0/0,960830 ifmail-2.14tx8.10.orig/ifcico/mkprod.awk100644 1751 50 333 5476202600 15362 0ustar mdsrcBEGIN { print "#include \"ftscprod.h\"" print "" print "struct _ftscprod ftscprod[] = {" } /^[^;]/ { if ($2 != "DROPPED") print " {0x" $1 ",\"" $2 "\"}," } END { print " {0xff,(char*)0L}" print "};" } ifmail-2.14tx8.10.orig/ifcico/ifcico.8100644 0 0 20245 6701151722 15407 0ustar rootroot.\" Set up \*(lq, \*(rq if -man hasn't already set it up. .if @@\*(lq@ \{\ . ds lq " . if t .ds lq `` . if !@@\(lq@ .ds lq "\(lq .\} .if @@\*(rq@ \{\ . ds rq " . if t .ds rq '' . if !@@\(rq@ .ds rq "\(rq .\} .de Id .ds Rv \\$3 .ds Dt \\$4 .. .de Sp .if n .sp .if t .sp 0.4 .. .TH IFCICO 8 "September 24, 1998" "2.14" "FTN mailer" .UC 4 .SH NAME .B ifcico \- Establish connections with other FTN nodes. .PP .br .SH SYNOPSIS .B ifcico .RB [ -h ] .RB [ -x "]" .RB [ -I "]" .RB [ -r0 "|" 1 "]" .RB [ -n "]" .RB [ -l "]" .B node .PP .B ifcico .RB [ -h ] .RB [ -x "]" .RB [ -I "]" .RB [ -r0 "|" 1 "]" .RB [ -t0 "|" 1 "]" .RB "" -a "[:]" .B node .PP .B ifcico tsync | .B yoohoo | .B **EMSI_INQC816 .PP (this implies slave mode) .SH DESCRIPTION .B Ifcico stands for "Internet - Fidonet Copy In / Copy Out", this is a FidoNet(r) compatible transport agent. Currently it supports FTS-0001, YooHoo/2U2 and EMSI handshake protocols, Xmodem (untested), Telink (untested), Modem7 (untested), SEAlink w/overdrive and crash recovery, Bark file and update requests, WaZOO protocols: DietIFNA, plain Zmodem (aka ZedZip, EMSI flag "ZMO"), ZedZap and Hydra, WaZOO file and update requests (nodelist flag should be XA). Password protected requests are not implemented. There are plans to implement Janus protocol in the future. .PP There is also a special protocol optimized to use over TCP/IP connection, contributed by Stanislav Voronyi , it is identified by EMSI proto code TCP (not registered). .PP Outbound directory structure is BinkleyTerm compatible, with domains and point subdirectories (full 5d). There are separate "listed" and "protected" inbound directories for the incoming sessions with the nodes present in the nodelist(s) and with nodes that have a password assigned respectively. Files received during an outbound session are always put into the "protected" directory. (Only "protected" directory is looked up by ifunpack by default). .PP "Magic" file request processors are executable files placed in the "magic" directory. If request is made for a file with matching name, the executable from the "magic" directory is run, and its stdout sent to the requester. Full requester's address, in the form "John Smith of 1:234/56.7" is passed to the executable in the command line. See "misc/FILES" for an example of a magic request processor. Non- executable files in the "magic" directory are "references". If a request is made for a file with matching name, the file is read line by line, and request re-made for the name found in each line. Up to 5 levels of recursion are allowed. .PP To run .I ifcico in master mode, you must make dialout devices read/writable for .I ifcico, -B and do the same for the directory where your uucp locks are created (usually /var/lock/). .PP To make .I ifcico work in answer mode, you need an FTN-able getty. Linux "standard" .IR getty_ps , and Gert Doering's .I mgetty (from the .I mgetty+sendfax package) and later versions have fidonet support built-in. Getty must distinguish incoming FidoNet type calls, and start .I ifcico with one parameter: .PP .TS tab (@); l l. FTS-0001 call:@"ifcico tsync" FTS-0006 call:@"ifcico yoohoo" EMSI call:@"ifcico **EMSI_....." .TE .PP (in the latter case the received EMSI packet should be passed without trailing CR). .PP If you are using .IR getty_ps, don't forget to create the file /etc/default/uugetty with the contents similar to the following (case sensitive): .PP FIDO=/usr/local/lib/fnet/ifcico .br EMSI=yes .PP When called without parameters, .I ifcico runs in slave mode and determines the type of inbound session itself. This mode may be used when .I ifcico runs as an internet or ISDN daemon. .PP To make .I ifcico scan for pending outbound mail and do appropriate calls, start it with "-r1" flag. To force polling of particular nodes, specify these nodes in the command line (addresses should be in domain notation, e.g. "ifcico f23.n5020 f155.n5020"). The latter implies master mode (-r1). Note that "hold" packets and files, as well as file requests, do not cause the node to be polled. .PP Inbound directory is created automatically if it does not exist, along with the "tmp" subdir. The latter is used while receiving files. After being successfully received, the files are moved up to the "inbound" directory. "protinbound" and "listinbound" directories accept files received during password protected sessions and session with the nodes present in the nodelist(s) respectively. .PP .I Ifcico can use text format nodelists in original (MS/DOS) form with 's as well as in UNIX form, with 's only. When you get a fresh nodelist, or change the "nodelist" statements in the config file, you must rebuild index with .I ifindex program. .PP For outgoing calls, status files are created for nodes, with the extention ".sts". These are ascii files containg three decimal numbers in a single line: .PP .B time retries code .PP .B time is the last call attempt time (attempts failing with "retry time not reached" do not count). It is unsigned long representing the number of seconds since the epoch. .br .B retries is the number of consequitve call attempts made that returned "call failed" or "could not establish session". This field is zeroed when call succeeds. .br .B code is the return code of the last attempt. .PP .I nlpatch program compiles a new version of the nodelist from the old nodelist and nodediff. .PP .SH OPTIONS .B \-h Display a short help message. .PP .B \-x Verbosity Set the debug verbosity .B Verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .PP .B \-I File Use the alternate configuration file .B File. .PP .B \-r Role 1 - master, 0 - slave. default is 0 (slave mode) if no .B node is provided; else the default is 1 (master mode). .PP .B \-a Inetaddr Tell an internet address .B Inetaddr to make a connection by TCP/IP. A specific port can be given ( .B \-a Inetaddr:Port ). The default is the one given by .B fido in .B /etc/services. .PP .B \-t Mode 0 - TCP, 1 - Telnet-Vmodem. Tells the mode to use for TCP/IP connections, the default is TCP mode (-t0) .PP .B \-n Phone For modem conections, this overrides the phone number given in the nodelist .PP .B \-l TtyDevice For modem connections, this overrides the tty value give in the config file .PP .B Node This is the FTN addres of the node to call. The addres must be in the format "[pNN.]fNN.nNN[.zNN[.domain]]". .PP .B tsync | .B yoohoo | .B **EMSI_INQC816 Those values are typically given by an FTN-able getty ( .B mgetty or .B getty_ps ), they determine the type of FTN protocol to use. They imply slave mode. .PP .SH "RETURN CODES" .PP .I ifcico returns maximum return code for all calls made. Codes are as follows: .PP .TS tab (@); l l. 0@Successfull call 1@Dialout port unavailable 2@Dial failed (no "CONNECT" or TCP connection failed) 3@Could not reset the modem (no "OK") 4@System locked 5@Retry time not reached 6@Fatal error in nodelist lookup 7@Call prohibited by config options 8@Phone number unavailable 9@No matching ports defined 10@Unused >10@Session failures (not defined yet) 30@Could not establish session .TE .SH FILES .TP .B $IFLIBDIR/config Runtime configuration file. .TP .B /etc/services Determines the default port number for .B fido, the port used by ifcico for tcp connections. .TP .B nodelist.??? A list of nodes in an FTN network. .I ifcico uses it by compiling it with .B ifindex .TP .B $BINDIR/ifindex compiles a nodelist so .I ifcico can use it. .TP .B $BINDIR/ifstat show statistics of calls, etc. .SH SEE ALSO ifmail(8), ifindex(8), ifinfo(8), ifstat(8), ifpack(8), ifunpack(8), iftoss(8), mgetty(8), getty(1) .PP .SH ACKNOWLEDGEMENTS Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. .br Some tcp code taken from JE version, written by Tsuneo Tanaka .PP Hydra protocol support by Christof Meerwald .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage by Pablo Saratxaga ifmail-2.14tx8.10.orig/ifcico/ifcico.8.fr100644 0 0 23554 6701151722 16023 0ustar rootroot.\" Set up \*(lq, \*(rq if -man hasn't already set it up. .if @@\*(lq@ \{\ . ds lq " . if t .ds lq `` . if !@@\(lq@ .ds lq "\(lq .\} .if @@\*(rq@ \{\ . ds rq " . if t .ds rq '' . if !@@\(rq@ .ds rq "\(rq .\} .de Id .ds Rv \\$3 .ds Dt \\$4 .. .de Sp .if n .sp .if t .sp 0.4 .. .TH IFCICO 1 "24 septembre 1998" "2.14" "Agent FTN" .UC 4 .SH NOM .B ifcico \- Établit des connections avec d'autres noeuds FTN. .PP .br .SH SYNOPSIS .B ifcico .RB [ -h ] .RB [ -x "]" .RB [ -I "]" .RB [ -r0 "|" 1 "]" .RB [ -n "]" .RB [ -l "]" .B noeud .PP .B ifcico .RB [ -h ] .RB [ -x "]" .RB [ -I "]" .RB [ -r0 "|" 1 "]" .RB [ -t0 "|" 1 "]" .RB "" -a "[:]" .B noeud .PP .B ifcico tsync | .B yoohoo | .B **EMSI_INQC816 .br (ceci implique le mode esclave) .SH DESCRIPTION .B Ifcico signifie "Internet - Fidonet Copy In / Copy Out" (Internet - copies entrée/sortie pour Fidonet), c'est un agent de transport de courrier compatible avec FidoNet(r). Actuellement il supporte les protocoles FTS-0001, YooHoo/2U2 et EMSI, ainsi que Xmodem (non testé), Telink (non testé), Modem7 (non testé), SEAlink avec "overdrive" et reprise en cas d'erreurs, les requêtes et demandes de mise à jour de fichiers selon le protocole "Bark", et les protocoles "WaZOO" : DietIFNA, Zmodem pur (aussi nommé ZedZip, le flag EMSI "ZMO"), ZedZap et Hydra, les requêtes et demandes de mise à jour de fichiers WaZOO (il faut le flag XA dans la liste des noeuds). Les requêtes protégées par mot de passe ne sont pas implémentées. Il y a des plans pour l'implémentation du protocole Janus à l'avenir. .PP Il y a aussi un protocole particulier, optimisé pour l'utilisation sur une connection TCP/IP, qui est une contribution de Stanislav Voronyi . Ce protocole est identifié par le code EMSI "TCP" (qui n'est pas enregistré officiellement). .PP La structure du répertoire du courrier sortant est compatible avec BinkleyTerm, avec des sous-répertoires pour les domaines et les points (entièrement 5D). Il y a des répertoires entrants séparés pour les noeuds "listés" et "protégés", utilisés respectivement pour les appels entrants de noeuds présents dans les listes de noeuds d'une part, et de noeuds ayant un mot de passe assigné d'autre part. Les fichiers reçus pendant un appel sortant sont toujours placés dans le répertoire "protégé". (Seul le répertoire "protégé" est pris en considération par ifunpack, par défaut). .PP Les requêtes de fichier pour les noms "magiques" sont traitées par des fichiers exécutables dans le répertoire "magic". Si une requête arrive pour un fichier dont le nom correspond à un fichier de ce répertoire, le programme est exécuté et sont flot de sortie (stdout) est envoyé au demandeur. L'adresse complète de celui-ci, sous la forme "Jean Dupont of 2:345/67.89" est transmise au programme dans la ligne de commande. Voir "misc/FILES" pour un exemple de processeur de requêtes magiques. Les fichiers non exécutables dans le répertoire "magic" sont des "références". Si une requête arrive pour un fichier portant ce nom, le fichier est lu ligne par ligne, et la requête est réexécutée pour le nom de fichier trouvé dans chaque ligne. On autorise une récursivité jusqu'à 5 niveaux. .PP Pour lancer ifcico en mode "maître", vous devez régler les permissions des périphériques nécessaires à l'appel pour permettre à ifcico de les lire et d'y écrire, _et_ également le répertoire où sont créés vos sémaphores uucp (habituellement /var/lock/). .PP Pour faire travailler ifcico en mode réponse, vous aurez besoin d'un getty connaissant FTN. Le "standard" Linux getty_ps 2.0.7d, et le mgetty .17 de Gert Doering (du paquetage mgetty+sendfax) et les versions ultérieures supportent Fidonet. Le getty doit distinguer les appels entrant de type Fidonet, et démarrer ifcico avec un paramètre: .PP .TS tab (@); l l. FTS-0001 call:@"ifcico tsync" FTS-0006 call:@"ifcico yoohoo" EMSI call:@"ifcico **EMSI_....." .TE .PP (dans ce dernier cas le paquet EMSI reçu doit être passé sans le CR final). .PP Si vous utilisez getty_ps, n'oubliez pas de créer le fichier /etc/default/uugetty, avec un contenu similaire à ce qui suit (sensible à la casse) : .PP FIDO=/usr/local/lib/fnet/ifcico .br EMSI=yes .PP Lorsqu'on l'appelle sans paramètres, ifcico tourne en mode esclave et détermine le type de session entrante lui-même. Ce mode peut être utilisé quand ifcico tourne en démon internet ou ISDN. .PP Pour qu'ifcico parcoure le courrier en attente de sortie et qu'il fasse les appels nécessaires, démarrez-le avec l'option "-r1". Pour forcer le polling de noeuds spécifiques, indiquez ces noeuds dans la ligne de commande (les adresses doivent être dans la notation domaniale, par exemple "ifcico f23.n5020 f155.n5020"). Ceci implique le mode "maître" (-r1). Notez que les paquets et fichiers en "hold", ainsi que les requêtes de fichiers, ne provoquent pas le poll d'un noeud. .PP Le répertoire entrant est créé automatiquement s'il n'existe pas, ainsi que le sous-répertoire "tmp". Ce dernier est utilisé pendant la réception de fichiers. Après une réception sans erreur, les fichiers sont déplacés dans le répertoire d'entrée. Les répertoires "protinbound" et "listinbound" reçoivent respectivement les fichiers reçus pendant les sessions protégées par mot de passe et d'autre part ceux des sessions avec des noeuds présents dans les listes de noeuds. .PP Ifcico peut utiliser les listes de noeuds en format texte dans leur forme d'origine (MS/DOS) avec des , ainsi que dans la forme UNIX, avec seulement des . Quand vous recevez une nouvelle liste de noeuds, ou si vous modifiez les instructions "nodelist" dans le fichier de configuration, vous devez reconstruire l'index avec le programme "ifindex". .PP Pour les appels sortants, des fichiers d'état sont créés pour les noeuds, avec l'extension ".sts". Ces fichiers sont en format ASCII et contiennent trois nombres décimaux dans une seule ligne: .PP .B heure essais code .PP .B heure .br c'est l'heure de la dernière tentative d'appel (les tentatives avortées avec le message "retry time not reached" ne comptent pas). C'est un "unsigned long" représentant le nombre de secondes depuis l'"epoch". .PP .B essais .br c'est le nombre de tentatives d'appel consécutives qui se sont terminées par "call failed" ou "could not establish session". Ce champ est mis à zéro lorsque l'appel réussit. .PP .B code .br c'est le code retour du dernier appel. .PP le programme nlpatch compile une nouvelle version de la liste des noeuds à partir de l'ancienne liste et d'un fichier "nodediff". .PP .SH OPTIONS .B \-h .br Affiche un court message d'aide .PP .B \-x Verbosité .br Spécifie le niveau de messages de débogage. .B Verbosité peut être un nombre de 0 à 32 pour 'allumer' les bits de 1 à la valeur spécifiée, ou bien des lettres (avec 'a' = bit 1, 'b' = bit 2, etc. jusqu'à 'z' = bit 26. .PP .B \-I Fichier .br Utilise le fichier de configuration spécifique .B Fichier. .PP .B \-r Role .br 1 - maître, 0 - esclave. Le défaut est 0 (mode esclave) si on spécifie un .B noeud ; sinon le défaut est 1 (mode maître). .PP .B \-a Adresse_Internet .br Donne une adresse internet .B Adresse_Internet pour établir une connection via TCP/IP. Une porte spécifique peut être demandée ( .B \-a Adresse_Internet:Porte ). La valeur par défaut est celle donnée pour le service .B fido dans .B /etc/services. .PP .B \-t Mode .br 0 - TCP, 1 - Telnet-Vmodem. Indique le mode à utiliser pour les connections TCP/IP, le défaut étant le mode TCP (-t0). .PP .B \-n Numéro de téléphone .br Pour les connections par modem, ce paramètre remplace le numéro donné dans la nodelist. .PP .B \-l PériphériqueTTY .br Pour les connections par modem, ceci remplace la valeur du TTY spécifiée dans le fichier config. .PP .B Noeud .br Ceci est l'adresse FTN du noeud à appeller. Cette adresse doit être au format "[pNN.]fNN.nNN[.zNN[.domain]]". .PP .B tsync | .B yoohoo | .B **EMSI_INQC816 .br Ces valeurs sont typiquement données par un getty compatible FTN ( .B mgetty ou .B getty_ps ), elles déterminent le type de protocole FTN à utiliser. Elles impliquent le mode esclave. .PP .SH "CODES DE RETOUR" .PP ifcico renvoie le code retour maximal de tous les appels qu'il a tentés. Les codes sont les suivants: .PP .TS tab (@); l l. 0@Appel réussi 1@Port d'appel indisponible 2@Numérotation avortée (pas de "CONNECT" ou erreur lors de la connection TCP) 3@Impossible de réinitialiser le modem (pas de "OK") 4@Système bloqué 5@Temps de réaissai non atteint 6@Erreur fatale lors de la recherche dans la liste des noeuds 7@Appel interdit par des options de configuration 8@Numéro de téléphone non disponible 9@Pas de port convenable défini 10@Inutilisé >10@Erreurs lors des sessions (pas encore définies) 30@Impossible d'établir la session .TE .SH FICHIERS .TP .B $IFLIBDIR/config Fichier de configuration actif. .TP .B /etc/services Détermine le numéro de port par defaut pour .B fido, le port utilisé par .I ifcico pour les connections TCP. .TP .B nodelist.??? Une liste des noeuds dans un réseau FTN. .I ifcico l'utilise en la compilant avec .I ifindex .TP .B $BINDIR/ifindex compile une liste de noeuds afin que .I ifcico puisse l'utiliser. .TP .B $BINDIR/ifstat montre les statistiques concernant les appels, etc. .TP .SH VOIR AUSSI ifmail(8), ifpack(8), ifunpack(8), iftoss(8), mgetty(8), getty(1) .PP .SH REMERCIEMENTS Certaines idées ont été reprises au paquetage Fidogate/RFmail, écrit par Teemu Torma et hacké par Martin Junius. .br Une partie du code TCP a été repris de la version JE, écrite par Tsuneo Tanaka .br Support du protocole Hydra par Christof Meerwald .PP © 1993, 1994 Eugene Crosser. .PP Ceci est un logiciel libre. Vous pouvez en faire ce que vous voulez du moment que cette notice de copyright est laissée intacte. .PP Page de manuel écrite par Pablo Saratxaga .br Traduction française de la page de manuel par Luc Moreau ©1997. ifmail-2.14tx8.10.orig/ifcico/Txy.c100644 1751 50 5360 6463053352 14344 0ustar mdsrc/* * Copyright (c) 1995 Boris V. Tobotras * boris@xtalk.msk.su AKA 2:5020/20.7 AKA 2:5020/188.21 * * Created: Fri Feb 3 14:28:16 1995 * * Txy flag (FSC-0062) processing functions for ifcico * * Consider code below as freeware, please. * */ # include # include # include "lutil.h" # include "Txy.h" static int IsNodeCallable( char *xy ) { time_t GMTime = time( NULL ); struct tm *Now = gmtime( &GMTime ); int NowMin = Now->tm_hour * 60 + Now->tm_min; int WorkTimeStartMin = ( toupper( *xy ) - 'A' ) * 60, WorkTimeEndMin; if ( islower( *xy++ ) ) WorkTimeStartMin += 30; WorkTimeEndMin = ( toupper( *xy ) - 'A' ) * 60; if ( islower( *xy ) ) WorkTimeEndMin += 30; debug( 10, "Working time: %d:%d-%d:%d, now %d:%d GMT", WorkTimeStartMin / 60, WorkTimeStartMin % 60, WorkTimeEndMin / 60, WorkTimeEndMin % 60, NowMin / 60, NowMin % 60 ); if ( WorkTimeEndMin > WorkTimeStartMin ) if ( NowMin >= WorkTimeStartMin && NowMin < WorkTimeEndMin ) return 1; else return 0; else if ( NowMin >= WorkTimeStartMin || NowMin < WorkTimeEndMin ) return 1; else return 0; } /* Checks nodelist entry against U,Txy flag and determines whether node can be dialed. If one not present, assumes 'no'. If Txy found, checks it against current time. Returns: 1 if system should NOT be called, 0 otherwise. */ int not_work_time_now( nlent ) node *nlent; { int i; if ( nlent->flags & CM ) { debug( 10, "Calling CM node" ); return 0; } for ( i = 0; i < MAXUFLAGS; ++i ) { char *flag = nlent->uflags[ i ]; if ( flag ) { if ( flag[ 0 ] == 'T' && flag[ 3 ] == '\0' ) { debug( 10, "Found Txy flag: %s", flag++ ); return IsNodeCallable( flag ) ? 0 : 1; } else if ( flag[ 0 ] == 'U' && flag[ 1 ] == 'T' && flag[ 4 ] == '\0' ) { flag++; debug( 10, "Found Txy flag: %s", flag++ ); return IsNodeCallable( flag ) ? 0 : 1; } } else break; } debug( 10, "No Txy flag" ); /* No Txy flag... defaulting to ZMH */ /* points don't have to honour ZMH */ if (nlent->addr.point!=0) { if (nlent->addr.zone==1) { debug(10,"Using Z1MH"); return IsNodeCallable( "TJK" ) ? 0 : 1; } else if (nlent->addr.zone==2) { debug(10,"Using Z2MH"); return IsNodeCallable( "Tcd" ) ? 0 : 1; } else if (nlent->addr.zone==3) { debug(10,"Using Z3MH"); return IsNodeCallable( "TST" ) ? 0 : 1; } else if (nlent->addr.zone==4) { debug(10,"Using Z4MH"); return IsNodeCallable( "TIJ" ) ? 0 : 1; } else if (nlent->addr.zone==5) { debug(10,"Using Z5MH"); return IsNodeCallable( "TBC" ) ? 0 : 1; } else if (nlent->addr.zone==6) { debug(10,"Using Z6MH"); return IsNodeCallable( "TUV" ) ? 0 : 1; } else { debug( 10, "node to call is not on fidonet"); } } return 0; } ifmail-2.14tx8.10.orig/ifcico/Txy.h100644 1751 50 153 6463053352 14324 0ustar mdsrc#ifndef IFMAIL_TXY_H #define IFMAIL_TXY_H #include "nodelist.h" int not_work_time_now( node * ); #endif ifmail-2.14tx8.10.orig/ifcico/fta-1005.txt100644 1751 50 40606 6463053353 15335 0ustar mdsrc **************************************************************************** FTSC FIDONET TECHNICAL STANDARDS COMMITTEE **************************************************************************** Publication: FTA-1005 Title: FTSC Product ID List Revision Date: 07 April 1997 Expiry Date: 01 May 1999 ---------------------------------------------------------------------------- Contents: A. Format B. 8-bit product codes C. 16-bit product codes ---------------------------------------------------------------------------- A. Format ---------- code,name,os,type,contact,netaddr[,date assigned[,last update]] Product codes are in 4 digit hexadecimal notation Date format is YYYYMMDD, may be blank If you write software which is dependant on this format, please make it tolerant of additional fields after these for upwards compatibility Codes have been increased to 16-bit (4 digit hexadecimal) values New entries & update products after 31st May 1993 add: both fields in "YYMMDD" format B. 8-bit product codes ----------------------- 0000,Fido,MS-DOS,Packer/mailer,Tom_Jennings,1:125/111 0001,Rover,MS-DOS,Packer/mailer,Bob_Hartman,1:104/501 0002,SEAdog,MS-DOS,Packer/mailer,Thom_Henderson,1:107/542.1 0003,WinDog,MS-DOS,Mailer,Solar_Wind_Computing,1:115/333 0004,Slick-150,HP-150,Packer/mailer,Jerry_Bain,???? 0005,Opus,MS-DOS,Packer/mailer,Doug_Boone,1:124/4227 0006,Dutchie,MS-DOS,Packer/mailer,Henk_Wevers,2:500/1 0007,WPL_Library,Amiga,Mailer,Russell_McOrmand,1:163/109 0008,Tabby,Macintosh,Packer/mailer,Michael_Connick,1:107/412 0009,SWMail,OS/2,Mailer,Solar_Wind_Computing,1:115/333 000A,Wolf-68k,CPM-68k,Packer/mailer,Robert_Heller,1:321/153 000B,QMM,QNX,Packer/mailer,Rick_Duff,1:167/201 000C,FrontDoor,MS-DOS,Packer/mailer,Joaquim_Homrighausen,2:270/17 000D,GOmail,MS-DOS,Packer,Scott_Green,???? 000E,FFGate,MS-DOS,Packer,Ruedi_Kneubuehler,2:301/580 000F,FileMgr,MS-DOS,Packer,Erik_van_Emmerik,2:281/611 0010,FIDZERCP,MS-DOS,Packer,Thorsten_Seidel,2:242/55 0011,MailMan,MS-DOS,Packer,Ron_Bemis,1:124/1113 0012,OOPS,MS-DOS,Packer,Tom_Kashuba,1:322/379 0013,GS-Point,Atari_ST,Packer/mailer,Harry_Lee,1:124/4230 0014,BGMail,????,????,Ray_Gwinn,1:265/104 0015,ComMotion/2,OS/2,Packer/mailer,Michael_Buenter,2:301/602 0016,OurBBS_Fidomailer,MS-DOS/Unix/Coherent,Packer/mailer,Brian_Keahl,1:133/524 0017,FidoPcb,MS-DOS,Packer,Matjaz_Koce,2:380/100 0018,WimpLink,Archimedes,Packer/mailer,Remco_de_Vreugd,2:283/307 0019,BinkScan,MS-DOS,Packer,Shawn_Stoddard,1:362/101 001A,D'Bridge,MS-DOS,Packer/mailer,Chris_Irwin,1:18/68 001B,BinkleyTerm,MS-DOS,Mailer,Vince_Perriello,1:343/491 001C,Yankee,MS-DOS,Packer,Randy_Edwards,???? 001D,uuGate,MS-DOS,Packer,Geoff_Watts,3:690/710 001E,Daisy,Apple_][,Packer/mailer,Raymond_&_Ken_Lo,3:700/1 001F,Polar_Bear,????,Packer/mailer,Kenneth_McLeod,1:101/190 0020,The-Box,MS-DOS/Atari_ST,Packer/mailer,Jac_Kersing/Arjen_Lentz,2:283/333 0021,STARgate/2,OS/2,Packer/mailer,Shawn_Stoddard,1:362/101 0022,TMail,MS-DOS,Packer,Larry_Lewis,3:713/600.1701 0023,TCOMMail,MS-DOS,Packer/mailer,Mike_Ratledge,1:372/888 0024,GIGO,MS-DOS,Packer,Jason_Fesler,1:203/7707,,940228 0025,RBBSMail,MS-DOS,Packer,Jan_Terpstra,2:512/10 0026,Apple-Netmail,Apple_][,Packer/mailer,Bill_Fenner,1:129/87 0027,Chameleon,Amiga,Mailer,Juergen_Hermann,2:241/2.12 0028,Majik_Board,MS-DOS,Packer/mailer,Dale_Barnes,1:3601/14.20 0029,QM,MS-DOS,Packer,George_Peace,1:270/101 002A,Point_And_Click,Amiga,Packer,Rob_Tillotson,1:201/40.302 002B,Aurora_Three_Bundler,MS-DOS,Packer,Oliver_McDonald,???? 002C,FourDog,MS-DOS,Packer,Shay_Walters,1:376/12 002D,MSG-PACK,MS-DOS,Packer,Tom_Hendricks,1:261/662 002E,AMAX,MS-DOS,Packer,Alan_Applegate,1:104/36 002F,Domain_Communication_System,????,????,Hal_Duprie,1:101/106 0030,LesRobot,????,Packer,Lennart_Svensonn,2:501/2 0031,Rose,MS-DOS,Packer/mailer,Glen_Jackson,1:100/617 0032,Paragon,Amiga,Packer/mailer,Jon_Radoff,1:322/545 0033,BinkleyTerm/oMMM/ST,Atari_ST,Packer/mailer,Bill_Scull,1:363/112,,951209 0034,StarNet,Atari_ST,Mailer,Eric_Drewry,1:322/566 0035,ZzyZx,MS-DOS,Packer,Jason_Steck,1:124/424 0036,QEcho,MS-DOS,Packer,The_QuickBBS_Group,1:363/1701 0037,BOOM,MS-DOS,Packer,Andrew_Farmer,1:243/1 0038,PBBS,Amiga,Packer/mailer,Todd_Kover,1:261/1028 0039,TrapDoor,Amiga,Mailer,Maximilian_Hantsch,2:310/6 003A,Welmat,Amiga,Mailer,Russell_McOrmand,1:163/109 003B,NetGate,Unix-386,Packer,David_Nugent,3:632/348 003C,Odie,MS-DOS,Mailer,Matt_Farrenkopf,1:105/376 003D,Quick_Gimme,CPM-80/MS-DOS,Packer/mailer,Laeeth_Isaacs,2:254/18 003E,dbLink,MS-DOS,Packer/mailer,Chris_Irwin,1:18/68 003F,TosScan,MS-DOS,Packer,Joaquim_Homrighausen,2:270/17 0040,Beagle,MS-DOS,Mailer,Alexander_Holy,2:310/90 0041,Igor,MS-DOS,Mailer,Harry_Lee,1:124/4230 0042,TIMS,MS-DOS,Packer/mailer,Bit_Bucket_Software,1:104/501 0043,Phoenix,MS-DOS,Packer/mailer,International_Telecommunications,1:296/5,,930624 0044,FrontDoor_APX,MS-DOS,Packer/mailer,Joaquim_Homrighausen,2:270/17 0045,XRS,MS-DOS,Packer,Mike_Ratledge,1:372/888 0046,Juliet_Mail_System,Amiga,Packer,Gregory_Kritsch,1:163/109.30 0047,Jabberwocky,Macintosh,Packer,Eric_Larson,1:2605/620 0048,XST,MS-DOS,Packer,Wayne_Michaels,1:380/100 0049,MailStorm,Amiga,Packer,Russel_Miranda,1:268/106 004A,BIX-Mail,????,Mailer,Bob_Hartman,1:104/501 004B,IMAIL,MS-DOS,Packer,IMAIL_INC.,2:246/47 004C,FTNGate,MS-DOS,Packer,Jason_Steck,1:104/424 004D,RealMail,MS-DOS,Packer,Taine_Gilliam,1:372/42 004E,Lora-CBIS,MS-DOS,Mailer,Marco_Maccaferri,2:332/402 004F,TDCS,PDP-11,Packer/mailer,Terry_Ebdon,2:254/6 0050,InterMail,MS-DOS,Packer/mailer,Peter_Stewart,1:369/35 0051,RFD,MS-DOS,Packer,Doug_Belkofer,1:234/10 0052,Yuppie!,MS-DOS,Packer,Leo_Moll,2:242/2 0053,EMMA,MS-DOS,Packer,Johan_Zwiekhorst,2:292/100 0054,QBoxMail,QDOS,Packer/mailer,Jan_Bredenbeek,2:283/500 0055,Number_4,MS-DOS,Packer/mailer,Ola_Garstad,2:502/15 0056,Number_5,MS-DOS,Packer/mailer,Ola_Garstad,2:502/15 0057,GSBBS,MS-DOS,Packer,Michelangelo_Jones,1:260/244 0058,Merlin,MS-DOS,Packer/mailer,Mark_Lewis,2:258/25 0059,TPCS,MS-DOS,Packer,Mikael_Kjellstrom,2:201/211 005A,Raid,MS-DOS,Packer,George_Peace,1:270/101 005B,Outpost,MS-DOS,Packer/mailer,Mike_Dailor,???? 005C,Nizze,MS-DOS,Packer,Tomas_Nielsen,2:205/202 005D,Armadillo,Macintosh,Packer,Erik_Sea,1:221/109 005E,rfmail,Unix,Packer/mailer,Per_Lindqvist,2:201/332 005F,Msgtoss,MS-DOS,Packer,Mike_Zakharoff,1:343/36 0060,InfoTex,MS-DOS,Packer/mailer,Jan_Spooren,2:292/852 0061,GEcho,MS-DOS,Packer,Gerard_van_der_Land,2:283/555,951209 0062,CDEhost,MS-DOS,Packer,Dennis_D'Annunzio,1:379/28 0063,Pktize,MS-DOS,Packer,Joaquim_Homrighausen,2:270/17 0064,PC-RAIN,MS-DOS,Packer/mailer,Ray_Hyder,1:272/40 0065,Truffle,MS-DOS/OS2,Mailer,Mike_Rissa,2:504/59 0066,Foozle,Amiga,Packer,Peer_Hasselmeyer,2:247/4 0067,White_Pointer,Macintosh,Packer/mailer,Alastair_Rakine,3:680/820 0068,GateWorks,MS-DOS,Packer,Jamie_Penner,1:153/1025 0069,Portal_of_Power,MS-DOS,Mailer,Soren_Ager,2:230/12 006A,MacWoof,Macintosh,Packer/mailer,Craig_Vaughan,1:109/342 006B,Mosaic,MS-DOS,Packer,Christopher_King,1:103/315 006C,TPBEcho,MS-DOS,Packer,Gerd_Qualmann,2:242/1 006D,HandyMail,MS-DOS,Packer/mailer,jim_nutt,1:114/30 006E,EchoSmith,MS-DOS,Packer,Noel_Crow,1:170/409 006F,FileHost,MS-DOS,Packer,Mark_Cole,2:252/186 0070,SFTS,MS-DOS,Packer,Bruce_Anderson,1:3402/6 0071,Benjamin,MS-DOS,Packer/mailer,Stefan_Graf,2:245/4.5436 0072,RiBBS,OS9_(COCO),Packer/mailer,Ron_Bihler,1:104/54 0073,MP,MS-DOS,Packer,Ivan_Leong,6:600/28 0074,Ping,MS-DOS,Packer,David_Nugent,3:632/348 0075,Door2Europe,MS-DOS,Packer/mailer,Michaela_Schoebel,2:247/14 0076,SWIFT,MS-DOS,Packer/mailer,Hanno_van_der_Maas,2:500/2 0077,WMAIL,MS-DOS,Packer,Silvan_Calarco,2:334/100.2 0078,RATS,MS-DOS,Packer,Jason_DeCaro,1:260/205 0079,Harry_the_Dirty_Dog,OS2,Mailer/packer,George_Edwards,3:632/340.7 007A,Maximus-CBCS,MS-DOS/OS2,Packer,Scott_Dudley,1:249/106 007B,SwifEcho,MS-DOS,Packer,Dana_Bell,1:3801/8 007C,GCChost,Amiga,Packer,Davide_Massarenti,2:332/505.3 007D,RPX-Mail,MS-DOS,Packer,Joerg_Wirtgen,2:241/4034 007E,Tosser,MS-DOS,Packer,Albert_Ng,6:700/185 007F,TCL,MS-DOS,Packer,Ulf_Hedlund,2:201/602 0080,MsgTrack,MS-DOS,Packer,Andrew_Farmer,1:243/1 0081,FMail,MS-DOS,Packer,Folkert_Wijnstra,2:282/310 0082,Scantoss,MS-DOS,Packer,Michael_Matter,2:243/44.3443 0083,Point_Manager,Amiga,Packer,Pino_Aliberti,2:335/602.2,,931012 0084,IMBINK,MS-DOS,Packer,Mike_Hartmann,2:246/48 0085,Simplex,MS-DOS/OS2,Packer,Chris_Laforet,1:152/401 0086,UMTP,MS-DOS,Packer,Byron_Copeland,1:272/26 0087,Indaba,MS-DOS,Packer,Pieter_Muller,5:7102/11 0088,Echomail_Engine,MS-DOS,Packer,Joe_Jared,1:103/200 0089,DragonMail,OS2,Packer,Patrick_O'Riva,1:143/37 008A,Prox,MS-DOS,Packer,Gerhard_Hoogterp,2:283/1.2 008B,Tick,MS-DOS/OS2,Packer,Barry_Geller,1:266/12 008C,RA-Echo,MS-DOS,Packer,Roger_Kirchhoff,2:245/4 008D,TrapToss,Amiga,Packer,Maximilian_Hantsch,2:310/6 008E,Babel,MS-DOS/OS2,Packer,Jorgen_Abrahamsen,2:230/100.9 008F,UMS,Amiga,Packer,Martin_Horneffer,2:242/7.9 0090,RWMail,MS-DOS,Packer,Remko_Westrik,2:285/309.5 0091,WildMail,MS-DOS,Packer,Derek_Koopowitz,1:161/502 0092,AlMAIL,MS-DOS,Packer,Alan_Leung,1:348/207 0093,XCS,MS-DOS,Packer,Rudi_Kusters,2:512/34.4 0094,Fone-Link,MS-DOS,Packer/mailer,Chris_Sloyan,1:269/602 0095,Dogfight,MS-DOS,Packer,Chris_Tyson,2:256/36 0096,Ascan,MS-DOS,Packer,Arjen_van_Loon,2:281/1.397 0097,FastMail,MS-DOS,Packer,Jan_Berends,2:282/5 0098,DoorMan,MS-DOS,Mailer,Christopher_Dean,1:105/70 0099,PhaedoZap,Atari_ST,Packer,Jeff_Mitchell,1:229/422 009A,SCREAM,MS-DOS,Packer/mailer,Jem_Miller,1:147/33 009B,MoonMail,MS-DOS,Packer/mailer,Hasse_Wigdahl,2:206/101 009C,Backdoor,Sinclair_QL,Packer,Erik_Slagter,2:283/500.3 009D,MailLink,Archimedes,Packer/mailer,Jan-Jaap_v._d._Geer,2:500/133.1138 009E,Mail_Manager,MS-DOS,Packer,Andreas_Brodowski,2:241/4006 009F,Black_Star,Xenix_386,Packer/mailer,Jac_Kersing,2:283/333 00A0,Bermuda,Atari_ST/MS-DOS,Packer,Jac_Kersing,2:283/333 00A1,PT,MS-DOS,Packer/mailer,Jerry_Andrew,1:109/426 00A2,UltiMail,MS-DOS,Mailer,Brett_Floren,1:363/1000 00A3,GMD,MS-DOS,Packer,John_Souvestre,1:396/1 00A4,FreeMail,MS-DOS,Packer,Chad_Nelson,1:109/536 00A5,Meliora,MS-DOS,Packer,Erik_van_Riper,1:107/230 00A6,Foodo,CPM-80,Packer/mailer,Ron_Murray,3:690/640.7 00A7,MSBBS,CPM-80,Packer,Marc_Newman,1:106/601 00A8,Boston_BBS,MS-DOS,Packer/mailer,Tom_Bradford,1:101/625 00A9,XenoMail,MS-DOS,Packer/mailer,Noah_Wood,1:284/14 00AA,XenoLink,Amiga,Packer/mailer,Jonathan_Forbes,1:250/642 00AB,ObjectMatrix,MS-DOS,Packer,Roberto_Ceccarelli,2:332/305.1 00AC,Milquetoast,Win3/MS-DOS,Mailer,Vince_Perriello,1:343/491 00AD,PipBase,MS-DOS,Packer,Roberto_Piola,2:334/306 00AE,EzyMail,MS-DOS,Packer,Peter_Davies,3:636/204 00AF,FastEcho,MS-DOS,Packer,Tobias_Burchhardt,2:245/39 00B0,IOS,Atari_ST/TT,Packer,Rinaldo_Visscher,2:280/3.1 00B1,Communique,MS-DOS,Packer,Ian_Harris,3:620/251 00B2,PointMail,MS-DOS,Packer,Michele_Clinco,2:331/302.11 00B3,Harvey's_Robot,MS-DOS,Packer,Harvey_Parisien,1:249/114 00B4,2daPoint,MS-DOS,Packer,Ron_Pritchett,1:376/74 00B5,CommLink,MS-DOS,Mailer,Steve_Shapiro,1:382/35 00B6,fronttoss,MS-DOS,Packer,Dirk_Astrath,2:241/5603 00B7,SysopPoint,MS-DOS,Packer,Rudolf_Heeb,2:243/44 00B8,PTMAIL,MS-DOS,Packer,Arturo_Krogulski,2:341/27.7 00B9,MHS,MS-DOS/OS2/WINNT,Packer/mailer,Matthias_Hertzog,2:301/402,,940310 00BA,DLGMail,Amiga,Packer,Steve_Lewis,1:114/52 00BB,GatePrep,MS-DOS,Packer,Andrew_Allen,1:382/92 00BC,Spoint,MS-DOS,Packer,Conrad_Thompson,1:130/29.106 00BD,TurboMail,MS-DOS,Packer,B._J._Weschke,1:2606/403 00BE,FXMAIL,MS-DOS,Packer,Kenneth_Roach,1:208/401 00BF,NextBBS,MS-DOS,Packer/mailer,Tomas_Hood,1:352/777 00C0,EchoToss,MS-DOS,Packer,Mikel_Beck,1:107/218 00C1,SilverBox,Amiga,Packer,David_Lebel,1:240/516 00C2,MBMail,MS-DOS,Packer,Ruud_Uphoff,2:500/116.1928 00C3,SkyFreq,Amiga,Packer,Luca_Spada,2:331/106 00C4,ProMailer,Amiga,Mailer,Ivan_Pintori,2:335/311.21 00C5,Mega_Mail,MS-DOS,Packer/mailer,Mirko_Mucko,2:242/94 00C6,YaBom,MS-DOS,Packer,Berin_Lautenbach,3:620/248 00C7,TachEcho,MS-DOS,Packer,Tom_Zacios,1:107/376 00C8,XAP,MS-DOS,Packer,Jeroen_Smulders,2:512/1.8 00C9,EZMAIL,MS-DOS,Packer,Torben_Paving,2:234/41 00CA,Arc-Binkley,Archimedes,Mailer,Geoff_Riley,2:250/208 00CB,Roser,MS-DOS,Packer,Chan_Kafai,6:700/158 00CC,UU2,MS-DOS,Packer,Dmitri_Zavalishin,2:5020/32 00CD,NMS,MS-DOS,Packer/mailer,Michiel_de.Bruijn,2:285/505.2 00CE,BBCSCAN,Archimedes,Packer/mailer,E._G._Snel,2:512/222.17 00CF,XBBS,MS-DOS,Packer,Mark_Kimes,1:380/16 00D0,LoTek_Vzrul,Packer/mailer,Kevin_Gates,gates@sasknet.sk.ca,,951229 00D1,Private_Point_Project,MS-DOS,Packer,Oliver_von_Bueren,2:301/701 00D2,NoSnail,MS-DOS,Packer,Eddie_Rowe,1:19/124 00D3,SmlNet,MS-DOS,Packer,Steve_T._Gove,1:106/6 00D4,STIR,MS-DOS,Packer,Paul_Martin,2:250/107.3 00D5,RiscBBS,Archimedes,Packer,Carl_Declerck,2:292/500.10 00D6,Hercules,Amiga,Packer/mailer,Andrew_Gray,1:231/590 00D7,AMPRGATE,MS-DOS,Packer/mailer,Mike_Bilow,1:323/120.1 00D8,BinkEMSI,MS-DOS,Mailer,Tobias_Burchhardt,2:245/39 00D9,EditMsg,MS-DOS,Packer,G._K._Pace,1:374/26 00DA,Roof,Amiga,Packer,Robert_Williamson,1:167/104 00DB,QwkPkt,MS-DOS,Packer,Ross_West,1:250/412 00DC,MARISCAN,MS-DOS,Packer,Mario_Elkati,2:341/14.9 00DD,NewsFlash,MS-DOS,Packer,Chris_Lueders,2:241/5306 00DE,Paradise,MS-DOS,Packer/mailer,Kenneth_Wall,1:300/5 00DF,DogMatic-ACB,N/A,Packer/mailer,Martin_Allard,2:245/48 00E0,T-Mail,MS-DOS,Packer/mailer,Andy_Elkin,2:5030/15 00E1,JetMail,Atari_ST/STE/TT,Packer,Daniel_Roesen,2:243/93.8 00E2,MainDoor,MS-DOS,Packer/mailer,Francisco_Sedano,2:341/20 00E3,Starnet_Products,MS-DOS/OS2,Mailer/Packer,Starnet_Software_Development,1:102/925,,951209 00E4,BMB,Amiga,Packer,Dentato_Remo,2:335/311.33 00E5,BNP,MS-DOS,Packer,Nathan_Moschkin,1:109/427 00E6,MailMaster,MS-DOS,Packer/mailer,Gary_Murphy,1:130/85 00E7,Mail_Manager_+Plus+,MS-DOS,Packer,Chip_Morrow,1:226/1240 00E8,BloufGate,Atari_ST/Unix,Packer,Vincent_Pomey,2:320/100.2 00E9,CrossPoint,MS-DOS,Packer/mailer,Peter_Mandrella,2:2454/97.80,920713,960601 00EA,DeltaEcho,MS-DOS,Packer,Mikael_Staldal,2:201/337 00EB,ALLFIX,MS-DOS,Packer,Harald_Harms,2:512/145 00EC,NetWay,Archimedes,Mailer,Steve_Haslam,2:250/116.3 00ED,MARSmail,Atari_ST,Packer,Folkert_val_Heusden,2:285/750.2,,940122 00EE,ITRACK,MS-DOS,Packer,Frank_Prade,2:246/55.1 00EF,GateUtil,MS-DOS,Packer,Michael_Skurka,1:397/2.1 00F0,Bert,MS-DOS,Packer/mailer,Arnim_Wiezer,2:241/2104.9 00F1,Techno,MS-DOS,Packer,Patrik_Holmsten,2:203/133 00F2,AutoMail,MS-DOS,Packer,Mats_Wallin,2:201/239 00F3,April,Amiga,Packer,Nick_de_Jong,2:282/309.3 00F4,Amanda,MS-DOS,Packer,David_Douthitt,1:121/99.14 00F5,NmFwd,MS-DOS,Packer,Alberto_Pasquale,2:332/504 00F6,FileScan,MS-DOS,Packer,Matthias_Duesterhoeft,2:241/4512.2 00F7,FredMail,MS-DOS,Packer,Michael_Butler,3:712/515 00F8,TP_Kom,MS-DOS,Packer/mailer,Per_Sten,2:201/124 00F9,FidoZerb,MS-DOS,Packer,Ulrich_Schlechte,2:241/3410.12 00FA,!!MessageBase,MS-DOS,Packer/mailer,Holger_Lembke,2:240/500.20 00FB,EMFido,Amiga,Packer,Gary_Glendown,2:249/3.999 00FC,GS-Toss,MS-DOS,Packer,Marco_Bungalski,2:241/2021 00FD,QWKDoor,Atari_ST,Packer,Christian_Limpach,2:270/20.1 00FE,No_product_id_allocated,Any,Packer,No_Author,3:3/20 00FF,16-bit_product_id,Any,Packer/Mailer,No_Author,3:3/20 C. 16-bit product codes ------------------------ 0100,Reserved,None,None,No_Author,3:3/20,951209 0101,The_Brake!,Mailer,John_Gladkih,2:5051/16,951209 0102,Zeus_BBS,Amiga,Mailer,Alex_May,2:441/58.0,951209 0103,XenoPhobe-Mailer,Msdos/Windows/OS2/Linux,Mailer,Peter_Kling,1:374/969.0,951209 0104,None,None,None,None,0:0/0, 0105,Terminate,Msdos/Os2/Windows,Mailer/Packer,SerWiz_Comm_&_Bo_Bendtsen,2:254/261,951209 0106,TeleMail,Msdos,Mailer/Packer,Juergen_Weigelt,2:2453/900,951209 0107,CMBBS,Msdos/Os2,Mailer/Packer,Christof_Engel,2:2490/5110,951209 0108,Shuttle,Windows,Mailer/PAcker,MCH_Development_&_Marvin_Hart,1:106/500,951209 0109,Quater,Amiga,Mailer,Felice_Murolo,2:335/206,951209 010A,Windo,Windows,Mailer,Alan_Chavis,1:147/55,951209 010B,Xenia,Msdos/Os2,Mailer,Arjen_Lentz,2:283/512,960601 010C,GMS,AmigaOS,Mailer,Mirko_Viviani,2:331/213,960601 010D,HNET,Msdos,Pedro_Jaramillo,1:102/160,960601 010E,Shotgun_Professional,Msdos,Brent_Shellenberg,1:140/146,960621 010F,SLIPgate,Msdos,Kieran_Morrissey,3:634/376,960723 **************************************************************************** See FTA-1003.TXT for names of the FTSC Administrator and Standing Members **************************************************************************** ifmail-2.14tx8.10.orig/ifcico/nlookup.c100644 1751 50 14240 6463053353 15265 0ustar mdsrc# include # include # include # include # include # ifdef HAS_SYSLOG # include # endif # include # include "getopt.h" # include "lutil.h" # include "nodelist.h" # include "nlindex.h" # include "config.h" # include "version.h" # include "trap.h" #ifndef BLANK_SUBS #define BLANK_SUBS '.' #endif static int Verbose = 0; void usage(void) { confusage(" -v ADDR\n" "\n" " Copyright (c) 1995 by Boris Tobotras, 2:5020/510\n" "\n" "-v returns full information from nodelist entry\n" "\n" "ADDR can be incompete. Syntax is following:\n" "\n" " [[[ZZZ:]NNNN/]FFF][.PPP]\n" ); } void Lookup( char *Address ) { faddr addr; char *p; node *nlent; static char space = '\0'; if ( space ) putchar( Verbose ? '\n' : ' ' ); else space = ' '; addr.name = NULL; addr.domain = whoami->addr->domain; p = Address; { char *eol = Address + strlen( Address ) - 1; while ( eol > Address + 1 && isspace( eol[ -1 ] ) ) --eol; eol[ 1 ] = '\0'; } if ( isdigit( *p ) ) { int n = strtol( p, &p, 10 ); switch ( *p ) { case '\0': addr.zone = whoami->addr->zone; addr.net = whoami->addr->net; addr.node = n; addr.point= 0; break; case ':': addr.zone = n; ++p; addr.net = strtol( p, &p, 10 ); if ( *p++ != '/' ) { Syntax: printf( Address ); return; } ParseNodeAndPoint: addr.node = strtol( p, &p, 10 ); addr.point = 0; if ( *p ) { if ( *p++ != '.' ) goto Syntax; addr.point = atoi( p ); } break; case '.': addr.zone = whoami->addr->zone; addr.net = whoami->addr->net; addr.node = n; addr.point = atoi( ++p ); break; case '/': addr.zone = whoami->addr->zone; addr.net = n; ++p; goto ParseNodeAndPoint; } } else { if ( *p++ != '.' ) goto Syntax; addr.zone = whoami->addr->zone; addr.net = whoami->addr->net; addr.node = whoami->addr->node; addr.point= atoi( p ); } nlent = getnlent( &addr ); if ( !nlent ) puts( Address ); else { char *period, *name; dom_trans *trans; char *p, buf[128]; if ( Verbose ) printf( "Internet address: " ); name = strdup( nlent->sysop ); while ( ( period = strchr( name, ' ' ) ) ) *period = BLANK_SUBS; printf( "%s@", name ); free( name ); buf[0]='\0'; if ( nlent->addr.point ) sprintf( buf, "p%u.f%u.n%u.z%u", nlent->addr.point, nlent->addr.node, nlent->addr.net, nlent->addr.zone ); else sprintf( buf , "f%u.n%u.z%u", nlent->addr.node, nlent->addr.net, nlent->addr.zone ); if ( !nlent->addr.domain ) nlent->addr.domain = whoami->addr->domain; sprintf( buf, "%s.%s", buf, nlent->addr.domain ); for ( trans = domtrans; trans; trans = trans->next ) { if ((p=strstr(buf,trans->ftndom))) { *p='\0'; break; } } strcat( buf, trans ? trans->intdom : "" ); printf( "%s", buf ); if ( Verbose ) { unsigned long mask; int firstFlag = 1; printf( "\nFidoNet address: %u:%u/%u", nlent->addr.zone, nlent->addr.net, nlent->addr.node ); if ( nlent->addr.point > 0 ) printf( ".%u", nlent->addr.point ); printf( "@%s", nlent->addr.domain ); if ( nlent->pflag & NL_DOWN ) printf( ", DOWN" ); if ( nlent->pflag & NL_HOLD ) printf( ", HOLD" ); if ( nlent->pflag & NL_PVT ) printf( ", PVT" ); printf( "\nName: %s\n", nlent->name ); printf( "Location: %s\n", nlent->location ); printf( "SysOp: %s\n", nlent->sysop ); printf( "Phone: %s\n", nlent->phone ); printf( "Speed: %u\nFlags: ", nlent->speed ); for ( mask = 1L; mask; mask <<= 1 ) if ( nlent->flags & ~RQMODE & mask ) { switch ( mask ) { case CM: p = "CM"; break; case MO: p = "MO"; break; case LO: p = "LO"; break; case V21: p = "V21"; break; case V22: p = "V22"; break; case V29: p = "V29"; break; case V32: p = "V32"; break; case V32B: p = "V32B"; break; case V33: p = "V33"; break; case V34: p = "V34"; break; case V42: p = "V42"; break; case V42B: p = "V42B"; break; case MNP: p = "MNP"; break; case H96: p = "H96"; break; case HST: p = "HST"; break; case H14: p = "H14"; break; case H16: p = "H16"; break; case NL_MAX: p = "MAX"; break; case PEP: p = "PEP"; break; case CSP: p = "CSP"; break; case ZYX: p = "ZYX"; break; case MN: p = "MN"; break; default: { static char bug[ 30 ]; sprintf( bug, "%08lx", mask ); p = bug; break; } } if ( firstFlag ) firstFlag = 0; else printf( ", " ); printf( p ); } if ( nlent->flags & RQMODE ) { switch ( nlent->flags & RQMODE ) { case XA: p = "XA"; break; case XB: p = "XB"; break; case XC: p = "XC"; break; case XP: p = "XP"; break; case XR: p = "XR"; break; case XW: p = "XW"; break; case XX: p = "XX"; break; default: { static char bug[ 30 ]; sprintf( bug, "%08lx", nlent->flags & RQMODE ); p = bug; break; } } if ( firstFlag ) firstFlag = 0; else printf( ", " ); printf( p ); } { int i; for ( i = 0; i < MAXUFLAGS && nlent->uflags[ i ]; ++i ) { if ( firstFlag ) firstFlag = 0; else printf( ", " ); printf( nlent->uflags[ i ] ); } } putchar( '\n' ); } } } int main( int argc, char *argv[] ) { int c, rc; #if defined( HAS_SYSLOG ) && defined( MAILLOG ) logfacility = MAILLOG; #endif setmyname( argv[ 0 ] ); catch( myname ); while ( ( c = getopt( argc, argv, "x:I:hv" ) ) != -1 ) if ( confopt( c, optarg ) ) switch ( c ) { case 'v': Verbose = 1; break; default: usage(); exit(1); } if ( optind == argc ) { usage(); exit( 1 ); } if ( ( rc = readconfig() ) ) { fprintf( stderr, "Error getting configuration, aborting\n" ); return rc; } while ( optind < argc ) Lookup( argv[ optind++ ] ); putchar( '\n' ); return 0; } ifmail-2.14tx8.10.orig/ifcico/hydra.LICENSE.DOC100644 1751 50 11351 6540753002 16143 0ustar mdsrc HydraCom Version 1.00 A sample implementation of the HYDRA Bi-Directional File Transfer Protocol HydraCom was written by Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED The HYDRA protocol was designed by Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT and Joaquim H. Homrighausen COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED DISCLAIMER This program is provided "as is" and comes with no warranties of any kind, either expressed or implied. In no event shall the authors be liable to you or anyone else for any damages, including any lost profits, lost savings or other incidental or consequential damages arising out of the use or inability to use this software. HYDRACOM / SOURCE LICENSE HydraCom, its associated utilities (HydraCfg) and the HydraCom sourcecode may be freely distributed, copied and used, no fee charged. All files, executables and sourcecode remain the copyrighted property of Arjen G. Lentz and LENTZ SOFTWARE-DEVELOPMENT. The distribution archives should remain intact with no files removed or modified. For special purposes, it is allowed to repack the archives using a different compression system. HydraCom may be bundled up with for instance terminal or BBS packages, even commercial ones, provided the buyer/user is clearly informed about the fact that Hydra and HydraCom are free, not owned by the distributor/retailer in question, and is not included in any possible charge regarding the rest of the package. This documentation must also be present so the user can inform himself about Hydra and HydraCom. The same rules apply to inclusion in shareware and CD-ROM libraries. In all cases, the author of HydraCom must be given credit in any informational screens and literature that contain such information. The Hydra/HydraCom sourcecode may also be freely used and integrated into other software or library, provided this is clearly stated in any informational screens and literature pertaining to this program, and credit is given to the original author. If the sourcecode of that program or library is released or otherwise published, the notices present at the top of every Hydra/HydraCom source file must be retained in their original unmodified form. In addition to the above license, everyone using any part of the sourcecode, programs or files is fully bound by the general license of the Hydra protocol as present in the Hydra protocol description document. For easy reference, the paragraph in question is reprinted below. Any use of, or operation on (including copying/distributing) any of the above mentioned files implies full and unconditional acceptance of this license and disclaimer. HYDRA PROTOCOL LICENSE You are granted a license to implement the HYDRA file transfer protocol, HYDRA hereafter, in your own programs and/or use the sample source code and adapt these to your particular situation and needs; subject to the following conditions: - You must refer to it as the HYDRA file transfer protocol, and you must give credit to the authors of HYDRA in any information screens or literature pertaining to your programs that contains other such information (credits, your own copyrights, etc.). - HYDRA will always remain backwards compatible with previous revisions. HYDRA allows for expansion of its features without interfering with previous revisions. It is, however, important that different people do not expand the protocol in different directions. We therefore ask you to contact us if you have any needs/ideas regarding HYDRA, so development can be synchronized and beneficial to all. - If your implementation cannot converse with past or future revisions as supplied by us, then you must refer to it as "HYDRA derived", or as "a variation of HYDRA", or words to that effect. Hydra protocol design and HydraCom driver: Hydra protocol design: Arjen G. Lentz Joaquim H. Homrighausen LENTZ SOFTWARE-DEVELOPMENT 389, route d'Arlon Langegracht 7B L-8011 Strassen 3811 BT Amersfoort Luxembourg The Netherlands FidoNet 2:283/512, AINEX-BBS +31-33-633916 FidoNet 2:270/17 arjen_lentz@f512.n283.z2.fidonet.org joho@ae.lu Please feel free to contact us at any time to share your comments about our software and/or licensing policies. --- end of "license.doc" --- ifmail-2.14tx8.10.orig/ifcico/binkp.c100644 0 0 3646 6573551267 15336 0ustar rootroot#include #include #include #include #include #include #include #include #include #include #include #include "lutil.h" #include "xutil.h" #include "ttyio.h" #include "session.h" #include "statetbl.h" #include "binkp.h" #include "config.h" #include "version.h" extern void rdoptions(node *); extern int nodelock(faddr*); extern FILE *openfile(char*,time_t,off_t,off_t*,int(*)(off_t)); extern int closefile(int); extern file_list *respond_wazoo(char*); void binkp_send_control(int id,...); static int resync(off_t off); /* static char *mon[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; file_list *tosend=NULL; static FILE *infile=NULL,*outfile=NULL; long infilesize,infiletime,infileoffset; long outfilesize,outfiletime,outfileoffset; char *infilename,*outfilename; static long instartime,outstartime,endtime,rxbytes,sbytes; */ int binkp(int mode) { int rc=0; if (mode == 1) { loginf("start outbound BINKP session"); loginf("Not implemented yet"); } else { loginf("start inbound BINKP session"); loginf("Not implemented yet"); } binkp_send_control(M_ERR,"Binkp protocol not yet available"); rc=15; rc=abs(rc); return rc; } void binkp_send_control(int id,...) { va_list args; char *fmt, *s; binkp_frame frame; static char buf[1024]; int i,sz; va_start(args,id); fmt=va_arg(args, char*); if (fmt) { vsprintf(buf,fmt,args); sz=((1+strlen(buf)) & 0x7fff); } else { buf[0]='\0'; sz=1; } frame.header=((BINKP_CONTROL_BLOCK + sz) & 0xffff); frame.id=(char)id; frame.data=buf; s=(unsigned char *)malloc(sz+2+1); s[sz+2]='\0'; s[0]=((frame.header >> 8)&0xff); s[1]=(frame.header & 0xff); s[2]=frame.id; if (frame.data[0]) strncpy(s+3,frame.data,sz-1); for (i=0; i .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage and dbz-nodelist-index support by Christof Meerwald .PP Many thanks to the institute of computer science in Salzburg/Austria and especially to Anton Hofmann who made further work possible during his lecture. ifmail-2.14tx8.10.orig/ifcico/ifinfo.8100644 0 0 3673 6573551267 15432 0ustar rootroot'\" t .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" .TH ifinfo 8 "July 1998" "3.0.cm.alpha" "FTN mailer" .SH NAME .B ifinfo \- Query node information .SH SYNOPSIS .B ifinfo .RB [ -h ] .RB [ -x .IR verbosity ] .RB [ -I .IR file ] .I node .PP .SH DESCRIPTION .I Ifinfo displays various information (system name, Sysop, Location, PhoneNo, Speed, NL-Flags and PFlag) about the specified node from the nodelist (using the nodelist index for lookup). .SH OPTIONS .TP .B \-h Display a short help message. .TP .B \-x Verbosity Set the debug verbosity. .B Verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .TP .B \-I File Use the alternate configuration file .B File. .SH "RETURN CODES" .PP .TS tab (@); l l. 0@Successfull 64@command line usage error 65@error reading config file .TE .SH "DEBUG VERBOSITY" .TS tab (@); l l. d@lock files f@aka matching g@outbound directories h@call j@session handshake k@file transfer l@filelist m@nodelist flags r@modem t@nodelist index z@hydra protocol .TE .SH FILES .TP .B $IFLIBDIR/config Runtime configuration file. .TP .B nodelist.??? A list of nodes in an FTN network. .SH SEE ALSO ifcico(8), ifindex(8) .SH ACKNOWLEDGEMENTS Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. .br Some tcp code taken from JE version, written by Tsuneo Tanaka .PP .if t \(co 1993, 1994 Eugene Crosser .br .if t \(co 1997, 1998 Christof Meerwald .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage and dbz-nodelist-index support by Christof Meerwald .PP Many thanks to the institute of computer science in Salzburg/Austria and especially to Anton Hofmann who made further work possible during his lecture in 1997. ifmail-2.14tx8.10.orig/ifcico/ifinfo.c100644 0 0 5032 6573551267 15474 0ustar rootroot#include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include #include #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "nodelist.h" #include "nlindex.h" #include "config.h" #include "version.h" #include "trap.h" void usage(void) { confusage("\n"); } int main(int argc, char *argv[]) { int c, i, rc; faddr *addr = NULL; node *nlent; char flagbuf[256]; #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); catch(myname); while ((c = getopt(argc, argv, "hx:I:")) != -1) { if (confopt(c,optarg)) { switch (c) { default: usage(); exit(EX_USAGE); } } } if (readconfig()) { fprintf(stderr, "Error getting configuration, aborting\n"); exit(EX_DATAERR); } rc = 1; if (argv[optind] == NULL) { usage(); rc = EX_USAGE; } else if ((addr = parsefaddr(argv[optind])) == NULL) { logerr("unrecognizable address \"%s\"", argv[optind]); rc = EX_USAGE; } if (rc == 1) { nlent = getnlent(addr); if (nlent->pflag != NL_DUMMY) { addr->name=nlent->sysop; if (addr->domain == NULL) addr->domain = xstrcpy("fidonet"); printf("System: %s\n", nlent->name); printf("Sysop: %s\n", ascinode(addr, 0x7f)); if (nlent->location) printf("Location: %s\n", nlent->location); if (nlent->phone) printf("PhoneNo: %s\n", nlent->phone); printf("Speed: %d\n", nlent->speed); /* get nodelist flags */ flagbuf[0] = 0; for (i = 0; fkey[i].flag != 0; i++) { if ((nlent->flags & fkey[i].flag) == fkey[i].flag) { sprintf(flagbuf + strlen(flagbuf), "%s,", fkey[i].key); } } if (strlen(flagbuf)) flagbuf[strlen(flagbuf) - 1] = 0; printf("NL-Flags: %s\n", flagbuf); /* get user nodelist flags */ flagbuf[0] = 0; for (i = 0; nlent->uflags[i]; i++) { sprintf(flagbuf + strlen(flagbuf), "%s,", nlent->uflags[i]); } if (strlen(flagbuf)) { flagbuf[strlen(flagbuf) - 1] = 0; printf("NL-UFlags: %s\n", flagbuf); } /* get pflags */ flagbuf[0] = 0; for (i = 0; pkey[i].type != 0; i++) { if (nlent->pflag == pkey[i].pflag) { strcpy(flagbuf, pkey[i].key); break; } } printf("PFlag: %s\n", flagbuf); if (nlent->hub) printf("HubSystem: %d\n", nlent->hub); rc = 0; } } return rc; } ifmail-2.14tx8.10.orig/ifcico/ifreq.c100644 0 0 4551 6573551267 15335 0ustar rootroot#include #include #include #include #include #ifdef HAS_SYSLOG #include #endif #include #include #include #include #include "getopt.h" #include "lutil.h" #include "xutil.h" #include "ftn.h" #include "config.h" #include "version.h" #include "trap.h" char *reqname(faddr *,char); void mkdirs(char *name); void usage(void) { confusage(" filename\n"); } int main(int argc, char *argv[]) { int c, i, rc; int reqind = 1; faddr *addr = NULL; char *reqfname = NULL; FILE *reqfile; struct flock fl; #if defined(HAS_SYSLOG) && defined(CICOLOG) logfacility=CICOLOG; #endif setmyname(argv[0]); catch(myname); while ((c = getopt(argc, argv, "hx:I:")) != -1) { if (confopt(c,optarg)) { switch (c) { default: usage(); exit(EX_USAGE); } } } if (readconfig()) { fprintf(stderr, "Error getting configuration, aborting\n"); exit(EX_DATAERR); } rc = 1; if (argv[optind] == NULL) { usage(); rc = EX_USAGE; } else { if ((addr = parsefaddr(argv[optind++])) == NULL) { logerr("unrecognizable address \"%s\"", argv[optind]); rc = EX_USAGE; } else if (argv[optind] == NULL) { usage(); rc = EX_USAGE; } else { reqind = optind; } } if (rc == 1) { /* set file umask */ umask(066); reqfname = reqname(addr, 'o'); mkdirs(reqfname); if ((reqfile = fopen(reqfname, "a")) == NULL) { logerr("$Unable to open request file %s", S(reqfname)); } else { /* try to lock file for writing */ fl.l_type = F_WRLCK; fl.l_whence = 0; fl.l_start = 0L; fl.l_len = 0L; if (fcntl(fileno(reqfile), F_SETLKW, &fl) < 0) { logerr("$Unable to lock request file %s", S(reqfname)); } else { /* append entries to end of file */ if (fseek(reqfile, 0L, SEEK_END)) { logerr("$Unable to seek in request file %s", S(reqfname)); } else { for (i = reqind; argv[i]; i++) { /* output with DOS newlines */ fprintf(reqfile, "%s\r\n", argv[i]); } if (!ferror(reqfile)) { rc = 0; } else { logerr("$error writing to request file %s", S(reqfname)); } } } fclose(reqfile); } } return rc; } ifmail-2.14tx8.10.orig/ifcico/ifroute.8100644 0 0 3225 6573551267 15626 0ustar rootroot'\" t .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" .TH ifroute 8 "May 29, 1997" "3.0.cm.alpha-2" "FTN mailer" .SH NAME .B ifroute \- ??? .SH SYNOPSIS .B ifroute .RB [ -h ] .RB [ -x .IR verbosity ] .RB [ -I .IR file ] .PP .SH DESCRIPTION .I ??? .SH OPTIONS .TP .B \-h Display a short help message. .TP .B \-x Verbosity Set the debug verbosity. .B Verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .TP .B \-I File Use the alternate configuration file .B File. .SH "RETURN CODES" .PP .TS tab (@); l l. 0@Successfull .TE .SH "DEBUG VERBOSITY" .TS tab (@); l l. d@lock files f@aka matching g@outbound directories h@call j@session handshake k@file transfer l@filelist m@nodelist flags r@modem t@nodelist index z@hydra protocol .TE .SH FILES .TP .B $IFLIBDIR/config Runtime configuration file. .TP .B nodelist.??? A list of nodes in an FTN network. .SH SEE ALSO ifmail(8), ifinfo(8), ifstat(8) .SH ACKNOWLEDGEMENTS Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. .br Some tcp code taken from JE version, written by Tsuneo Tanaka .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage and dbz-nodelist-index support by Christof Meerwald .PP Many thanks to the institute of computer science in Salzburg/Austria and especially to Anton Hofmann who made further work possible during his lecture. ifmail-2.14tx8.10.orig/ifcico/nlpatch.8100644 0 0 3605 6573551267 15604 0ustar rootroot'\" t .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" .TH nlpatch 8 "May 29, 1997" "3.0.cm.alpha-2" "FTN mailer" .SH NAME .B nlpatch \- Patches a nodelist .SH SYNOPSIS .B nlpatch .RB [ -h ] .RB [ -x .IR verbosity ] .RB [ -I .IR file ] .I nodelist nodediff .PP .SH DESCRIPTION .I Nlpatch patches a nodelist. .SH OPTIONS .TP .B \-h Display a short help message. .TP .B \-x Verbosity Set the debug verbosity. .B Verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .TP .B \-I File Use the alternate configuration file .B File. .SH "RETURN CODES" .PP .TS tab (@); l l. 0@Successfull 1@command line usage error 2@cannot open some files 3@could not read some files 4@CRC error 5@unknown command line 6@diff does not match old list .TE .SH "DEBUG VERBOSITY" .TS tab (@); l l. d@lock files f@aka matching g@outbound directories h@call j@session handshake k@file transfer l@filelist m@nodelist flags r@modem t@nodelist index z@hydra protocol .TE .SH FILES .TP .B $IFLIBDIR/config Runtime configuration file. .TP .B nodelist.??? A list of nodes in an FTN network. .SH SEE ALSO ifmail(8), ifpack(8), ifunpack(8), iftoss(8), mgetty(8), getty(1) .SH ACKNOWLEDGEMENTS Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. .br Some tcp code taken from JE version, written by Tsuneo Tanaka .PP .if t \(co 1993, 1994 Eugene Crosser .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage and dbz-nodelist-index support by Christof Meerwald .PP Many thanks to the institute of computer science in Salzburg/Austria and especially to Anton Hofmann who made further work possible during his lecture. ifmail-2.14tx8.10.orig/ifcico/fsm.h100644 0 0 1771 6701151722 15003 0ustar rootroot#ifndef FSM_H #define FSM_H /* Finite State Machine. Replace oldish "statetbl.h", use '#' preprocessor feature, detach state machine from function definition. Although, multi-machine (with more than one state variable) not implemented, so bidirectional protos will not use this. */ #define SM_STATES(name) \ int sm_success=0;\ char *sm_name=name; enum #define SM_START(x) \ sm_state=x;\ debug(14,"statemachine %s start %s (%d)",sm_name,#x,x);\ while (!sm_success) switch (sm_state)\ {\ default: logerr("statemachine %s error: state=%d",sm_name,sm_state);\ sm_success=-1; #define SM_STATE(x) \ break;\ case x: debug(15,"statemachine %s entering %s (%d)",\ sm_name,#x,x); #define SM_END \ }\ debug(14,"statemachine %s exit %s (%d)",\ sm_name,(sm_success == -1)?"error":"success",sm_success); #define SM_RETURN \ return (sm_success != 1);\ } #define SM_PROCEED(x) \ sm_state=x; break; #define SM_SUCCESS \ sm_success=1; break; #define SM_ERROR \ sm_success=-1; break; #endif ifmail-2.14tx8.10.orig/ifcico/ifreq.8100644 0 0 3423 6701151722 15240 0ustar rootroot'\" t .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" .TH ifreq 8 "May 29, 1997" "3.0.cm.alpha" "FTN mailer" .SH NAME .B ifreq \- request file .SH SYNOPSIS .B ifreq .RB [ -h ] .RB [ -x .IR verbosity ] .RB [ -I .IR file ] .I node .I file... .PP .SH DESCRIPTION .I Ifreq requests a file from a given FTN system .SH OPTIONS .TP .B \-h Display a short help message. .TP .B \-x Verbosity Set the debug verbosity. .B Verbosity may be a number from 0 to 32 to set 'on' bits from 1 to number, or a string of letters where 'a' = bit 1, 'b' = bit 2, etc. up to bit 26. .TP .B \-I File Use the alternate configuration file .B File. .SH "RETURN CODES" .PP .TS tab (@); l l. 0@Successfull 1@error generating file request 64@command line usage error 65@error reading config file .TE .SH "DEBUG VERBOSITY" .TS tab (@); l l. d@lock files f@aka matching g@outbound directories h@call j@session handshake k@file transfer l@filelist m@nodelist flags r@modem t@nodelist index z@hydra protocol .TE .SH FILES .TP .B $IFLIBDIR/config Runtime configuration file. .SH SEE ALSO ifcico(8), ifstat(8) .SH ACKNOWLEDGEMENTS Some ideas taken from Fidogate/RFmail package, written by Teemu Torma and hacked by Martin Junius. .br Some tcp code taken from JE version, written by Tsuneo Tanaka .PP .if t \(co 1993, 1994 Eugene Crosser .br .if t \(co 1998 Christof Meerwald .PP This is free software. You can do what you wish with it as long as this copyright notice is preserved. .PP Manpage and dbz-nodelist-index support by Christof Meerwald .PP Many thanks to the institute of computer science in Salzburg/Austria and especially to Anton Hofmann who made further work possible during his lecture in 1997. ifmail-2.14tx8.10.orig/po/ 40755 1751 50 0 6573551267 12507 5ustar mdsrcifmail-2.14tx8.10.orig/po/es.po100644 0 0 13055 6573551267 14233 0ustar rootroot# Spanish file for ifmail-tx # msgid "" msgstr "" "Date: 1997-07-24 21:53:47+0200\n" "Project-Id-Version: ifmail 2.13-tx\n" "PO-Revision-Date: 1997-07-24 21:53:47+0200\n" "From: root \n" "Last-Translator: Pablo Saratxaga \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" "Xgettext-Options: --default-domain=ifmail --add-comments --keyword=_ --keyword=N_\n" "Files: /usr/src/ifmail/iflib/rdconfig.c ../ifstat.c ../iftoss.c\n" #: ../iflib/rdconfig.c:471 msgid "%s ver. %s of %s; (c) %s\n" msgstr "%s ver. %s del %s; (c) %s\n" #: ../iflib/rdconfig.c:473 msgid "" " This is free software. You can do what you wish with it\n" " as long as this copyright notice is preserved.\n" "\n" msgstr "" " Este es un software libre. Puedes hacer lo que quieras\n" " con él mientras se conserve esta noticia de copyright.\n" "\n" #: ../iflib/rdconfig.c:475 msgid "usage: %s -h -x -I %s\n" msgstr "uso: %s -h -x -I %s\n" #: ../iflib/rdconfig.c:476 msgid "-h\t\tget this help\n" msgstr "-h\t\tmuestra la ayuda\n" #: ../iflib/rdconfig.c:477 msgid "-x\t\tset debug level \t[%08lx]\n" msgstr "-x\t\tpone el nivel de debug a \t[%08lx]\n" #: ../iflib/rdconfig.c:479 msgid "\t\t may be a number from 0 to 32 to set `on'\n" msgstr "\t\t siendo un número de 0 a 32 para activar\n" #: ../iflib/rdconfig.c:480 msgid "\t\tbits from 1 to number, or a string of letters\n" msgstr "\t\tlos bits del 1 hasta el número, o una cadena de letras\n" #: ../iflib/rdconfig.c:481 msgid "\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n" msgstr "\t\t('a' - bit 1, 'b' - bit 2, etc. hasta el 26º bit)\n" #: ../iflib/rdconfig.c:482 msgid "-I\tuse config file\t\t[%s]\n" msgstr "" "-I\tindica el fichero\t\t[%s]\n" "\t\tcomo fichero de configuración\n" #: ../ifgate/iftoss.c:53 ../ifgate/iftoss.c:56 msgid "-N\t\tput messages to %s directory\n" msgstr "-N\t\tpone los mensajes en el directório %s\n" #: ../ifgate/iftoss.c:57 msgid "-f\t\tforce tossing of packets addressed to other nodes\n" msgstr "-f\t\tfuerza el tossing de paquetes para otros nodos\n" #: ../ifgate/ifmail.c:81 msgid "-N\t\tput packets to %s directory\n" msgstr "-N\t\tpone los paquetes en el directório %s\n" #: ../ifgate/ifmail.c:82 msgid "-o\tforce `out' mode for these flavors\n" msgstr "-o\tfuerza el modo «out» para esos flavours\n" #: ../ifgate/ifmail.c:83 msgid "-o+\t\tforce `out' mode for all flavors\n" msgstr "-o+\t\tfuerza el modo «out» para todos los flavours\n" #: ../ifgate/ifmail.c:84 msgid "-o-\t\treset `out' mode for all flavors\n" msgstr "-o-\t\treseteo del modo «out» para todos los flavours\n" #: ../ifgate/ifmail.c:85 msgid "-n\t\tset news mode\n" msgstr "-n\t\tmodo «news»\n" #: ../ifgate/ifmail.c:86 msgid "-s\t\trun in secure mode (check nodelist)\n" msgstr "-s\t\tmodo «secure» (chequea con la nodelist)\n" #: ../ifgate/ifmail.c:87 msgid "-r\taddress to route packet\n" msgstr "-r\tdirección por la cual rutear el paquete\n" #: ../ifgate/ifmail.c:88 msgid "-g\t[ n | c | h ] \"flavor\" of packet\n" msgstr "-g\t[ n | c | h ] «flavour» del paquete\n" #: ../ifgate/ifmail.c:90 msgid "-c\tforce the given charset\n" msgstr "-c\tfuerza el charset dado\n" #: ../ifgate/ifmail.c:92 msgid "-l\tforce the given level (default=%d)\n" msgstr "-l\tfuerza el nivel dado (defecto==%d)\n" #: ../ifgate/ifmail.c:93 msgid "-b\t\tdon't split the messages\n" msgstr "-b\t\tno cortar los mensajes en trozos de 12KB\n" #: ../ifgate/ifmail.c:94 msgid "\t\tlist of receipient addresses\n" msgstr "\t\tlista de direcciones de destino\n" #: ../ifgate/ifpack.c:57 msgid "-N\t\tprocess %s directory\n" msgstr "-N\t\tprocesa el directório %s\n" #: ../ifgate/ifpack.c:58 msgid "-f\t\tpack *.?ut files too\n" msgstr "-f\t\tcomprime también los ficheros *.?ut\n" #: ../ifcico/ifcico.c:56 msgid "-j\t\tdamage every byte\t[%d]\n" msgstr "" #: ../ifcico/ifcico.c:65 msgid "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:66 msgid "-n\tforced phone number\n" msgstr "-n\tfuerza un número de teléfono\n" #: ../ifcico/ifcico.c:67 msgid "-l\tforced tty device\n" msgstr "-l\tfuerza un device tty\n" #: ../ifcico/ifcico.c:69 msgid "-a\tuse TCP/IP instead of modem\n" msgstr "-a\tutiliza TCP/IP en vez del modem\n" #: ../ifcico/ifcico.c:70 msgid "-t\t0 - IFC, 1 - telnet\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:72 msgid " \tshould be in domain form, e.g. f11.n22.z3\n" msgstr " \ttiene que estar en formato rfc, ej: f11.n22.z3\n" #: ../ifcico/ifcico.c:73 msgid "\t\t(this implies master mode)\n" msgstr "\t\t(esto implica el modo master)\n" #: ../ifcico/ifcico.c:74 msgid "" "\n" " or: %s tsync|yoohoo|**EMSI_INQC816\n" msgstr "" "\n" " o: %s tsync|yoohoo|**EMSI_INQC816\n" #: ../ifcico/ifcico.c:75 msgid "\t\t(this implies slave mode)\n" msgstr "\t\t(esto implica el modo slave)\n" #: ../ifcico/ifroute.c:27 msgid "-d\tspecify top level domain for routing\n" msgstr "-d\tindica el dominio para el ruteo\n" #: ../ifcico/ifroute.c:28 msgid "-f\tspecify fallback node\n" msgstr "-f\tindica el uplink por defecto\n" #: ../ifcico/ifroute.c:29 msgid "-n\t\tdo not use nodelist when MX ok\n" msgstr "-n\t\tno usa la nodelist si los MX están correctos\n" #: ../ifcico/ifroute.c:30 msgid " \tin domain form, e.g. f11.n22.z3\n" msgstr " \ttiene que estar en formato rfc, ej: f11.n22.z3\n" ifmail-2.14tx8.10.orig/po/fr.po100644 0 0 13232 6573551267 14230 0ustar rootroot# French file for ifmail-tx msgid "" msgstr "" "Date: 1997-07-24 21:53:47+0200\n" "Project-Id-Version: ifmail 2.13-tx\n" "PO-Revision-Date: 1997-07-24 21:53:47+0200\n" "From: root \n" "Last-Translator: Pablo Saratxaga \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" "Xgettext-Options: --default-domain=ifmail --add-comments --keyword=_ --keyword=N_\n" "Files: ../iflib/rdconfig.c ../ifgate/iftoss.c ../ifgate/ifmail.c ../ifgate/ifpack.c ../ifcico/ifcico.c ../ifcico/ifroute.c\n" #: ../iflib/rdconfig.c:471 msgid "%s ver. %s of %s; (c) %s\n" msgstr "%s ver. %s du %s; (c) %s\n" #: ../iflib/rdconfig.c:473 msgid "" " This is free software. You can do what you wish with it\n" " as long as this copyright notice is preserved.\n" "\n" msgstr "" " Ceci est un logiciel libre. Vous pouvez en faire ce que\n" " vous voulez tant que cette notice de copyright\n" " est conservée.\n" #: ../iflib/rdconfig.c:475 msgid "usage: %s -h -x -I %s\n" msgstr "" #: ../iflib/rdconfig.c:476 msgid "-h\t\tget this help\n" msgstr "-h\t\taffiche cette aide\n" #: ../iflib/rdconfig.c:477 msgid "-x\t\tset debug level \t[%08lx]\n" msgstr "-x\t\tplace le niveau de debug à \t[%08lx]\n" #: ../iflib/rdconfig.c:479 msgid "\t\t may be a number from 0 to 32 to set `on'\n" msgstr "\t\t peut être un nombre entre 0 et 32 pour activer\n" #: ../iflib/rdconfig.c:480 msgid "\t\tbits from 1 to number, or a string of letters\n" msgstr "\t\tles bits 1 jusqu'au nombre, ou une chaîne de lettres\n" #: ../iflib/rdconfig.c:481 msgid "\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n" msgstr "\t\t('a' - 1er bit, 'b' - 2e bit, etc. jusqu'au 26e bit)\n" #: ../iflib/rdconfig.c:482 msgid "-I\tuse config file\t\t[%s]\n" msgstr "" "-I\tspécifier le fichier\t\t[%s]\n" "\t\tcomme fichier de configuration à utiliser\n" #: ../ifgate/iftoss.c:53 ../ifgate/iftoss.c:56 msgid "-N\t\tput messages to %s directory\n" msgstr "-N\t\tcrée les messages dans le répertoire %s\n" #: ../ifgate/iftoss.c:57 msgid "-f\t\tforce tossing of packets addressed to other nodes\n" msgstr "-f\t\tforce le tossage des paquets addressés à d'autres noeuds\n" #: ../ifgate/ifmail.c:81 msgid "-N\t\tput packets to %s directory\n" msgstr "-N\t\tcrée les paquets dans le répertoire %s\n" #: ../ifgate/ifmail.c:82 msgid "-o\tforce `out' mode for these flavors\n" msgstr "-o\tforce le mode «out» pour ces saveurs\n" #: ../ifgate/ifmail.c:83 msgid "-o+\t\tforce `out' mode for all flavors\n" msgstr "-o+\t\tforce le mode «out» pour toutes les saveurs\n" #: ../ifgate/ifmail.c:84 msgid "-o-\t\treset `out' mode for all flavors\n" msgstr "-o-\t\treset du mode «out» pour toutes les saveurs\n" #: ../ifgate/ifmail.c:85 msgid "-n\t\tset news mode\n" msgstr "-n\t\tmode «news»\n" #: ../ifgate/ifmail.c:86 msgid "-s\t\trun in secure mode (check nodelist)\n" msgstr "-s\t\tmode sécurisé (verification dans la nodeliste)\n" #: ../ifgate/ifmail.c:87 msgid "-r\taddress to route packet\n" msgstr "-r\tadresse par où router le paquet\n" #: ../ifgate/ifmail.c:88 msgid "-g\t[ n | c | h ] \"flavor\" of packet\n" msgstr "-g\t[ n | c | h ] «saveur» du paquet\n" #: ../ifgate/ifmail.c:90 msgid "-c\tforce the given charset\n" msgstr "-c\tforce le charset spécifié\n" #: ../ifgate/ifmail.c:92 msgid "-l\tforce the given level (default=%d)\n" msgstr "-l\tforce le niveau spécifié (défaut==%d)\n" #: ../ifgate/ifmail.c:93 msgid "-b\t\tdon't split the messages\n" msgstr "-b\t\tne pas saucissoner les messages\n" #: ../ifgate/ifmail.c:94 msgid "\t\tlist of receipient addresses\n" msgstr "\t\tliste des adresses des destinataires\n" #: ../ifgate/ifpack.c:57 msgid "-N\t\tprocess %s directory\n" msgstr "-N\t\tscane l'outbound %s\n" #: ../ifgate/ifpack.c:58 msgid "-f\t\tpack *.?ut files too\n" msgstr "-f\t\tcompresse les fichiers *.?ut aussi\n" #: ../ifcico/ifcico.c:56 msgid "-j\t\tdamage every byte\t[%d]\n" msgstr "" #: ../ifcico/ifcico.c:65 msgid "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" msgstr "-r 0|1\t\t1 - maître, 0 - esclave\t[0]\n" #: ../ifcico/ifcico.c:66 msgid "-n\tforced phone number\n" msgstr "-n\tforce un numéro de téléphone\n" #: ../ifcico/ifcico.c:67 msgid "-l\tforced tty device\n" msgstr "-l\tforce un device tty\n" #: ../ifcico/ifcico.c:69 msgid "-a\tuse TCP/IP instead of modem\n" msgstr "-a\tutilise TCP/IP au lieu du modem\n" #: ../ifcico/ifcico.c:70 msgid "-t\t0 - IFC, 1 - telnet\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:72 msgid " \tshould be in domain form, e.g. f11.n22.z3\n" msgstr " \tdoit être en format rfc, ex: f11.n22.z3\n" #: ../ifcico/ifcico.c:73 msgid "\t\t(this implies master mode)\n" msgstr "\t\t(ceci implique le mode «maître»)\n" #: ../ifcico/ifcico.c:74 msgid "" "\n" " or: %s tsync|yoohoo|**EMSI_INQC816\n" msgstr "\n ou: %s tsync|yoohoo|**EMSI_INQC816\n" #: ../ifcico/ifcico.c:75 msgid "\t\t(this implies slave mode)\n" msgstr "\t\t((ceci implique le mode «esclave»)\n" #: ../ifcico/ifroute.c:27 msgid "-d\tspecify top level domain for routing\n" msgstr "-d\tspécifie le domaine à utiliser pour le routage\n" #: ../ifcico/ifroute.c:28 msgid "-f\tspecify fallback node\n" msgstr "-f\tspécifie l'uplink par défaut\n" #: ../ifcico/ifroute.c:29 msgid "-n\t\tdo not use nodelist when MX ok\n" msgstr "-n\t\tne pas utiliser la nodeliste si les MX sont ok.\n" #: ../ifcico/ifroute.c:30 msgid " \tin domain form, e.g. f11.n22.z3\n" msgstr " \tdoit être en format rfc, ex: f11.n22.z3\n" ifmail-2.14tx8.10.orig/po/it.po100600 0 0 12655 6573551267 14235 0ustar rootroot# Italian messages for ifmail-tx # Copyright (C) 1997 Marco d'Itri # msgid "" msgstr "" "Date: 1997-07-26 21:53:47+0200\n" "Project-Id-Version: ifmail 2.13-tx\n" "PO-Revision-Date: 1997-07-26 21:53:47+0200\n" "Last-Translator: Marco d'Itri \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" #: ../iflib/rdconfig.c:471 msgid "%s ver. %s of %s; (c) %s\n" msgstr "%s ver. %s di %s; (c) %s\n" #: ../iflib/rdconfig.c:473 msgid "" " This is free software. You can do what you wish with it\n" " as long as this copyright notice is preserved.\n" "\n" msgstr "" " Questo è software libero. Potete farne quello che volete purchè\n" " sia mantenuto questo messaggio di copyright.\n" #: ../iflib/rdconfig.c:475 msgid "usage: %s -h -x -I %s\n" msgstr "uso: %s -h -x -I %s\n" #: ../iflib/rdconfig.c:476 msgid "-h\t\tget this help\n" msgstr "-h\t\tstampa questo aiuto\n" #: ../iflib/rdconfig.c:477 msgid "-x\t\tset debug level \t[%08lx]\n" msgstr "-x\t\timposta il livello di debug a \t[%08lx]\n" #: ../iflib/rdconfig.c:479 msgid "\t\t may be a number from 0 to 32 to set `on'\n" msgstr "\t\t può essere un numero da 0 a 32 per attivare\n" #: ../iflib/rdconfig.c:480 msgid "\t\tbits from 1 to number, or a string of letters\n" msgstr "\t\ti bit da 1 fino al numero, o un elenco di lettere\n" #: ../iflib/rdconfig.c:481 msgid "\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n" msgstr "\t\t('a' - 1o bit, 'b' - 2o bit, ecc. fino al 26o bit)\n" #: ../iflib/rdconfig.c:482 msgid "-I\tuse config file\t\t[%s]\n" msgstr "-I\tusa il file di configurazione \t[%s]\n" #: ../ifgate/iftoss.c:53 ../ifgate/iftoss.c:56 msgid "-N\t\tput messages to %s directory\n" msgstr "-N\t\tmette i messaggi nella directory %s\n" #: ../ifgate/iftoss.c:57 msgid "-f\t\tforce tossing of packets addressed to other nodes\n" msgstr "-f\t\tforza il tossing di pacchetti indirizzati ad altri nodi\n" #: ../ifgate/ifmail.c:81 msgid "-N\t\tput packets to %s directory\n" msgstr "-N\t\tmette i pacchetti nella directory %s\n" #: ../ifgate/ifmail.c:82 msgid "-o\tforce `out' mode for these flavors\n" msgstr "-o\tforza il modo `out' per questi tipi\n" #: ../ifgate/ifmail.c:83 msgid "-o+\t\tforce `out' mode for all flavors\n" msgstr "-o+\t\tforza il modo `out' per tutti i tipi\n" #: ../ifgate/ifmail.c:84 msgid "-o-\t\treset `out' mode for all flavors\n" msgstr "-o-\t\tannulla il modo `out' per tutti i tipi\n" #: ../ifgate/ifmail.c:85 msgid "-n\t\tset news mode\n" msgstr "-n\t\timposta il modo `news'\n" #: ../ifgate/ifmail.c:86 msgid "-s\t\trun in secure mode (check nodelist)\n" msgstr "-s\t\tmodalità sicura (controlla la nodelist)\n" #: ../ifgate/ifmail.c:87 msgid "-r\taddress to route packet\n" msgstr "-r\tindirizzo dove instradare i pacchetti\n" #: ../ifgate/ifmail.c:88 msgid "-g\t[ n | c | h ] \"flavor\" of packet\n" msgstr "-g\t[ n | c | h ] tipo del pacchetto\n" #: ../ifgate/ifmail.c:90 msgid "-c\tforce the given charset\n" msgstr "-c\tforza il set di caratteri specificato\n" #: ../ifgate/ifmail.c:92 msgid "-l\tforce the given level (default=%d)\n" msgstr "-l\tforza il livello specificato (predefinito: %d)\n" #: ../ifgate/ifmail.c:93 msgid "-b\t\tdon't split the messages\n" msgstr "-b\t\tnon spezza i messaggi\n" #: ../ifgate/ifmail.c:94 msgid "\t\tlist of receipient addresses\n" msgstr "\t\tlista degli indirizzi dei destinatari\n" #: ../ifgate/ifpack.c:57 msgid "-N\t\tprocess %s directory\n" msgstr "-N\t\tprocessa l'outbound %s\n" #: ../ifgate/ifpack.c:58 msgid "-f\t\tpack *.?ut files too\n" msgstr "-f\t\tcomprime anche i file *.?ut\n" #: ../ifcico/ifcico.c:56 msgid "-j\t\tdamage every byte\t[%d]\n" msgstr "-j\t\tdanneggia ogni byte\t[%d]\n" #: ../ifcico/ifcico.c:65 msgid "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" msgstr "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" #: ../ifcico/ifcico.c:66 msgid "-n\tforced phone number\n" msgstr "-n\tforza un numero di telefono\n" #: ../ifcico/ifcico.c:67 msgid "-l\tforced tty device\n" msgstr "-l\tforza un device tty\n" #: ../ifcico/ifcico.c:69 msgid "-a\tuse TCP/IP instead of modem\n" msgstr "-a\tusa TCP/IP al posto del modem\n" #: ../ifcico/ifcico.c:70 msgid "-t\t0 - IFC, 1 - telnet\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:72 msgid " \tshould be in domain form, e.g. f11.n22.z3\n" msgstr " \tdeve essere in formato rfc, es: f11.n22.z3\n" #: ../ifcico/ifcico.c:73 msgid "\t\t(this implies master mode)\n" msgstr "\t\t(questo implica il modo master)\n" #: ../ifcico/ifcico.c:74 msgid "" "\n" " or: %s tsync|yoohoo|**EMSI_INQC816\n" msgstr "\n o: %s tsync|yoohoo|**EMSI_INQC816\n" #: ../ifcico/ifcico.c:75 msgid "\t\t(this implies slave mode)\n" msgstr "\t\t(questo implica il modo slave)\n" #: ../ifcico/ifroute.c:27 msgid "-d\tspecify top level domain for routing\n" msgstr "-d\tspecifica il domain da utilizzare per il routing\n" #: ../ifcico/ifroute.c:28 msgid "-f\tspecify fallback node\n" msgstr "-f\tspécifica il nodo di default\n" #: ../ifcico/ifroute.c:29 msgid "-n\t\tdo not use nodelist when MX ok\n" msgstr "-n\t\tnon utilizzare la nodelist se i MX sono ok.\n" #: ../ifcico/ifroute.c:30 msgid " \tin domain form, e.g. f11.n22.z3\n" msgstr " \tdeve essere in formato rfc, es: f11.n22.z3\n" ifmail-2.14tx8.10.orig/po/Makefile100644 0 0 3260 6573551267 14701 0ustar rootroot# Generated automatically from Makefile.in by configure. include ../CONFIG MSGMERGE = msgmerge PO_FILES = da.po de.po es.po fr.po it.po CATALOGS = da.mo de.mo es.mo fr.mo it.mo POTFILES = ../iflib/rdconfig.c ../ifgate/iftoss.c \ ../ifgate/ifmail.c ../ifgate/ifpack.c \ ../ifcico/ifcico.c ../ifcico/ifroute.c OTHERS = Makefile ############################################################################# all: ${NLSPACKAGE}.pot ${CATALOGS} ${NLSPACKAGE}.pot: ${POTFILES} xgettext --default-domain=${NLSPACKAGE} \ --add-comments --keyword=_ --keyword=N_ ${POTFILES} if cmp -s ${NLSPACKAGE}.po ${NLSPACKAGE}.pot; then \ rm -f ${NLSPACKAGE}.po; \ else \ mv ${NLSPACKAGE}.po ${NLSPACKAGE}.pot; \ fi update-po: Makefile ${MAKE} ${NLSPACKAGE}.pot catalogs='${CATALOGS}'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/.mo//'`; \ mv $$lang.po $$lang.old.po ; \ echo -n "$$lang:"; \ if tupdate $(NLSPACKAGE).pot $$lang.old.po > $$lang.po ; \ then \ echo "tupdate of $$lang succeeded" ; \ rm -f $$lang.old.po; \ else \ echo "tupdate of $$lang failed!"; \ rm -f $$lang.po; \ mv $$lang.old.po $$lang.po; \ fi; \ done clean: rm -f *mo ${NLSPACKAGE}.pot filelist filelist: Makefile BASE=`pwd`; \ BASE=`basename $${BASE}`; \ (for f in ${PO_FILES} ${OTHERS} ;do echo ifmail/$${BASE}/$$f; done) \ >filelist install: all for n in ${CATALOGS}; do \ l=`basename $$n .mo`; \ ${INSTALL} -m 755 -d ${DESTDIR}/${NLSDIR}/$$l; \ ${INSTALL} -m 755 -d ${DESTDIR}/${NLSDIR}/$$l/LC_MESSAGES; \ ${INSTALL} -m 644 $$n ${DESTDIR}/${NLSDIR}/$$l/LC_MESSAGES/${NLSPACKAGE}.mo; \ done %.mo: %.po msgfmt -o $@ $< depend: man: ifmail-2.14tx8.10.orig/po/da.po100644 0 0 12605 6573551267 14210 0ustar rootroot# Danish file for ifmail-tx # msgid "" msgstr "" "Date: 1997-08-07 20:50:50+0200\n" "Project-Id-Version: ifmail 2.13-tx\n" "PO-Revision-Date: 1997-08-07 20:50:50+0200\n" "From: guylhem \n" "Last-Translator: guylhem \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" "Xgettext-Options: --standard-domæne=ifmail --tilføj-comments --ord=_ --ord=N_\n" "Files: ../iflib/rdconfig.c ../ifgate/iftoss.c ../ifgate/ifmail.c ../ifgate/ifpack.c ../ifcico/ifcico.c ../ifcico/ifroute.c\n" #: ../iflib/rdconfig.c:471 msgid "%s ver. %s of %s; (c) %s\n" msgstr "%s ver. %s fra %s; (c) %s\n" #: ../iflib/rdconfig.c:473 msgid "" " This is free software. You can do what you wish with it\n" " as long as this copyright notice is preserved.\n" "\n" msgstr "" " Ifmail er fri. Du kan gør hvad du begære med det,\n" " hvis denne copyright står der.\n" "\n" #: ../iflib/rdconfig.c:475 msgid "usage: %s -h -x -I %s\n" msgstr "hjælp: %s -h -x -I %s\n" #: ../iflib/rdconfig.c:476 msgid "-h\t\tget this help\n" msgstr "-h\t\tfor at se denne hjælp\n" #: ../iflib/rdconfig.c:477 msgid "-x\t\tset debug level \t[%08lx]\n" msgstr "-x\tdebug (0 : lille ; 9 : stor) \t[%08lx]\n" #: ../iflib/rdconfig.c:479 msgid "\t\t may be a number from 0 to 32 to set `on'\n" msgstr "\t\t nummer fra 0 til 32\n" #: ../iflib/rdconfig.c:480 msgid "\t\tbits from 1 to number, or a string of letters\n" msgstr "\t\tbits : nummer eller ord\n" #: ../iflib/rdconfig.c:481 msgid "\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n" msgstr "\t\t('a' - bit 1, 'b' - bit 2, osv. til bit 26)\n" #: ../iflib/rdconfig.c:482 msgid "-I\tuse config file\t\t[%s]\n" msgstr "-I\tconfig filer\t\t[%s]\n" #: ../ifgate/iftoss.c:53 ../ifgate/iftoss.c:56 msgid "-N\t\tput messages to %s directory\n" msgstr "-N\t\ttar e-post og nyheder til %s biblioteket\n" #: ../ifgate/iftoss.c:57 msgid "-f\t\tforce tossing of packets addressed to other nodes\n" msgstr "-f\t\talligevel »toss packets« adresseret til andre »nodes«\n" #: ../ifgate/ifmail.c:81 msgid "-N\t\tput packets to %s directory\n" msgstr "-N\t\ttar »packet« til %s biblioteket\n" #: ../ifgate/ifmail.c:82 msgid "-o\tforce `out' mode for these flavors\n" msgstr "-o\tforce »out« mode fra hele denne »flavors«\n" #: ../ifgate/ifmail.c:83 msgid "-o+\t\tforce `out' mode for all flavors\n" msgstr "-o+\t\tforce »out« mode fra hele »flavors«\n" #: ../ifgate/ifmail.c:84 msgid "-o-\t\treset `out' mode for all flavors\n" msgstr "-o-\t\tgenstarte »out« mode fra hele »flavors«\n" #: ../ifgate/ifmail.c:85 msgid "-n\t\tset news mode\n" msgstr "-n\t\tnyheder mode\n" #: ../ifgate/ifmail.c:86 msgid "-s\t\trun in secure mode (check nodelist)\n" msgstr "-s\t\tkør på »secure mode« (prøv nodelist)\n" #: ../ifgate/ifmail.c:87 msgid "-r\taddress to route packet\n" msgstr "-r\tadressen til »route packet«\n" #: ../ifgate/ifmail.c:88 msgid "-g\t[ n | c | h ] \"flavor\" of packet\n" msgstr "-g\t[ n | c | h ] »flavor« af »packet«\n" #: ../ifgate/ifmail.c:90 msgid "-c\tforce the given charset\n" msgstr "-c\tstandard skrifttype\n" #: ../ifgate/ifmail.c:92 msgid "-l\tforce the given level (default=%d)\n" msgstr "-l\ttar denne level (default=%d)\n" #: ../ifgate/ifmail.c:93 msgid "-b\t\tdon't split the messages\n" msgstr "-b\t\tklip ikke meddelelse\n" #: ../ifgate/ifmail.c:94 msgid "\t\tlist of receipient addresses\n" msgstr "\t\tlist af modtager adressen\n" #: ../ifgate/ifpack.c:57 msgid "-N\t\tprocess %s directory\n" msgstr "-N\t\tudføre %s biblioteket\n" #: ../ifgate/ifpack.c:58 msgid "-f\t\tpack *.?ut files too\n" msgstr "-f\t\ttar *.?ut filer også\n" #: ../ifcico/ifcico.c:56 msgid "-j\t\tdamage every byte\t[%d]\n" msgstr "-j\t\tmister hvilken byte\t[%d]\n" #: ../ifcico/ifcico.c:65 msgid "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" msgstr "-r 0|1\t\t1 - server, 0 - kundet\t[0]\n" #: ../ifcico/ifcico.c:66 msgid "-n\tforced phone number\n" msgstr "-n\tudføre med denne telefonnummer\n" #: ../ifcico/ifcico.c:67 msgid "-l\tforced tty device\n" msgstr "-l\tudføre med denne tty\n" #: ../ifcico/ifcico.c:69 msgid "-a\tuse TCP/IP instead of modem\n" msgstr "-a\tudføre med TCP/IP\n" #: ../ifcico/ifcico.c:70 msgid "-t\t0 - IFC, 1 - telnet\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:72 msgid " \tshould be in domain form, e.g. f11.n22.z3\n" msgstr " \tsom en domæne, f.eks. f11.n22.z3\n" #: ../ifcico/ifcico.c:73 msgid "\t\t(this implies master mode)\n" msgstr "\t\tkøre som server\n" #: ../ifcico/ifcico.c:74 msgid "" "\n" " or: %s tsync|yoohoo|**EMSI_INQC816\n" msgstr "" #: ../ifcico/ifcico.c:75 msgid "\t\t(this implies slave mode)\n" msgstr "\t\tkøre som kundet\n" #: ../ifcico/ifroute.c:27 msgid "-d\tspecify top level domain for routing\n" msgstr "-d\thoveddomæne fra routing\n" #: ../ifcico/ifroute.c:28 msgid "-f\tspecify fallback node\n" msgstr "-f\tstandard >>fallback node<<\n" #: ../ifcico/ifroute.c:29 msgid "-n\t\tdo not use nodelist when MX ok\n" msgstr "-n\t\tikke udføre med nodelist hvis MX er ok\n" #: ../ifcico/ifroute.c:30 msgid " \tin domain form, e.g. f11.n22.z3\n" msgstr " \tsom en domæne, f.eks. f11.n22.z3\n" ifmail-2.14tx8.10.orig/po/de.po100644 0 0 12641 6573551267 14214 0ustar rootroot# German messages for ifmail-tx # by Michael Holzt # msgid "" msgstr "" "Date: 1997-09-05 21:40:00+0200\n" "Project-Id-Version: ifmail 2.13-tx\n" "PO-Revision-Date: 1997-09-05 21:40:00+0200\n" "Last-Translator: Michael Holzt \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" #: ../iflib/rdconfig.c:471 msgid "%s ver. %s of %s; (c) %s\n" msgstr "%s ver. %s erstellt am %s\n Copyright (c) %s\n\n" #: ../iflib/rdconfig.c:473 msgid "" " This is free software. You can do what you wish with it\n" " as long as this copyright notice is preserved.\n" "\n" msgstr "" " Dies ist 'freie Software'. Du kannst hiermit machen was Du\n" " willst, solange diese Copyright-Meldung erhalten bleibt.\n" "\n" #: ../iflib/rdconfig.c:475 msgid "usage: %s -h -x -I %s\n" msgstr "Syntax: %s -h -x -I %s\n" #: ../iflib/rdconfig.c:476 msgid "-h\t\tget this help\n" msgstr "-h\t\tgibt diese Hilfe aus\n" #: ../iflib/rdconfig.c:477 msgid "-x\t\tset debug level \t[%08lx]\n" msgstr "-x\t\tsetzt Debug-Level \t[%08lx]\n" #: ../iflib/rdconfig.c:479 msgid "\t\t may be a number from 0 to 32 to set `on'\n" msgstr "\t\t kann eine Zahl von 0 bis 32 sein, um die Bits von\n" #: ../iflib/rdconfig.c:480 msgid "\t\tbits from 1 to number, or a string of letters\n" msgstr "\t\t1 bis zu dieser Zahl zu setzen, oder eine Zeichenkette:\n" #: ../iflib/rdconfig.c:481 msgid "\t\t('a' - bit 1, 'b' - bit 2, e.t.c. up to bit 26)\n" msgstr "\t\t('a' - Bit 1, 'b' - Bit 2, usw. bis Bit 26)\n" #: ../iflib/rdconfig.c:482 msgid "-I\tuse config file\t\t[%s]\n" msgstr "-I\tangegebenes Config-File verwenden\n\t\t[%s]\n" #: ../ifgate/iftoss.c:53 ../ifgate/iftoss.c:56 msgid "-N\t\tput messages to %s directory\n" msgstr "-N\t\tMeldungen in Verzeichnis %s schreiben\n" #: ../ifgate/iftoss.c:57 msgid "-f\t\tforce tossing of packets addressed to other nodes\n" msgstr "-f\t\tTossing von 'fremden' Paketen (nicht für uns) erzwingen\n" #: ../ifgate/ifmail.c:81 msgid "-N\t\tput packets to %s directory\n" msgstr "-N\t\tPakete in Verzeichnis %s schreiben\n" #: ../ifgate/ifmail.c:82 msgid "-o\tforce `out' mode for these flavors\n" msgstr "-o\t'out'-Modus für diese Typen erzwingen\n" #: ../ifgate/ifmail.c:83 msgid "-o+\t\tforce `out' mode for all flavors\n" msgstr "-o+\t\t'out'-Modus für alle Typen erzwingen\n" #: ../ifgate/ifmail.c:84 msgid "-o-\t\treset `out' mode for all flavors\n" msgstr "-o-\t\t'out'-Modus für alle Typen zurücksetzen\n" #: ../ifgate/ifmail.c:85 msgid "-n\t\tset news mode\n" msgstr "-n\t\t'News'-Modus einstellen\n" #: ../ifgate/ifmail.c:86 msgid "-s\t\trun in secure mode (check nodelist)\n" msgstr "-s\t\tin sicheren Modus starten (Nodeliste prüfen)\n" #: ../ifgate/ifmail.c:87 msgid "-r\taddress to route packet\n" msgstr "-r\tRouting-Adresse für Pakete vorgeben\n" #: ../ifgate/ifmail.c:88 msgid "-g\t[ n | c | h ] \"flavor\" of packet\n" msgstr "-g\t[ n | c | h ] Pakettyp vorgeben\n" #: ../ifgate/ifmail.c:90 msgid "-c\tforce the given charset\n" msgstr "-c\terzwingt den angegebenen Zeichensatz\n" #: ../ifgate/ifmail.c:92 msgid "-l\tforce the given level (default=%d)\n" msgstr "-l\terzwingt den angegebenen Level (Vorgabe: %d)\n" #: ../ifgate/ifmail.c:93 msgid "-b\t\tdon't split the messages\n" msgstr "-b\t\tNachrichten nicht splitten\n" #: ../ifgate/ifmail.c:94 msgid "\t\tlist of receipient addresses\n" msgstr "\t\tListe der Empfänger-Adressen\n" #: ../ifgate/ifpack.c:57 msgid "-N\t\tprocess %s directory\n" msgstr "-N\t\tVerzeichnis %s bearbeiten\n" #: ../ifgate/ifpack.c:58 msgid "-f\t\tpack *.?ut files too\n" msgstr "-f\t\t*.?ut auch packen\n" #: ../ifcico/ifcico.c:56 msgid "-j\t\tdamage every byte\t[%d]\n" msgstr "-j\t\tjedes .te Byte zerstören\t[%d]\n" #: ../ifcico/ifcico.c:65 msgid "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" msgstr "-r 0|1\t\t1 - master, 0 - slave\t[0]\n" #: ../ifcico/ifcico.c:66 msgid "-n\tforced phone number\n" msgstr "-n\tTelefonnummer vorgeben\n" #: ../ifcico/ifcico.c:67 msgid "-l\tforced tty device\n" msgstr "-l\tTTY-Device vorgeben\n" #: ../ifcico/ifcico.c:69 msgid "-a\tuse TCP/IP instead of modem\n" msgstr "-a\tTCP/IP statt Modem verwenden\n" #: ../ifcico/ifcico.c:70 msgid "-t\t0 - IFC, 1 - telnet\t[0]\n" msgstr "" #: ../ifcico/ifcico.c:72 msgid " \tshould be in domain form, e.g. f11.n22.z3\n" msgstr " \tmuss in Domain-Form sein, z.B. f11.n22.z3\n" #: ../ifcico/ifcico.c:73 msgid "\t\t(this implies master mode)\n" msgstr "\t\t(dies impliziert Master-Modus)\n" #: ../ifcico/ifcico.c:74 msgid "" "\n" " or: %s tsync|yoohoo|**EMSI_INQC816\n" msgstr "\n oder: %s tsync|yoohoo|**EMSI_INQC816\n" #: ../ifcico/ifcico.c:75 msgid "\t\t(this implies slave mode)\n" msgstr "\t\t(dies impliziert Slave-Modus)\n" #: ../ifcico/ifroute.c:27 msgid "-d\tspecify top level domain for routing\n" msgstr "-d\tTop-Level-Domain für Routing vorgeben\n" #: ../ifcico/ifroute.c:28 msgid "-f\tspecify fallback node\n" msgstr "-f\tFallback-Node vorgeben\n" #: ../ifcico/ifroute.c:29 msgid "-n\t\tdo not use nodelist when MX ok\n" msgstr "-n\t\tNodeliste nicht verwenden wenn MX ok ist\n" #: ../ifcico/ifroute.c:30 msgid " \tin domain form, e.g. f11.n22.z3\n" msgstr " \tin Domain-Form, z.B. f11.n22.z3\n"