Files
archie/scripts/process-email
Mario Fetka 1e4baef047 Port Archie 3.5 to Linux/CMake, add Debian packaging and CI
- Replace autoconf/make build system with CMake (installs to /opt/archie)
- Add CPack DEB packaging for Debian Trixie (non-free/net, postinst creates
  archie user, extracts DB skeleton, sets setuid bits, enables systemd units)
- Add Gitea Actions workflow building .deb + binary/source tarballs on tag push
- Add portable archie_init.py for non-Debian post-install setup
- Port all scripts to Linux: getent passwd, systemctl, tail -n +N, gzip
- Add SFTP (libssh2) and FTPS (OpenSSL) scrapers alongside anonftp
- Add Flask web frontend (archie-web.service)
- Fix filter scripts (exec cat replaces broken sed s///g)
- Update all manpages: paths, contacts, add SFTP/FTPS section
- Update etc/: enable gzip, add webindex catalog, fix localhost refs
- Remove: AIX-2/SunOS-4.1.4/SunOS-5.4 dirs, tcl7.6/, tcl-dp/, tk4.2/,
  berkdb/, old Makefile.in/pre/post fragments, build.sh, unwrap scripts
- Add .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 23:05:12 +02:00

58 lines
920 B
Bash
Executable File

#!/bin/sh
#
# process-email (c) Copyright Bunyip Information Systems, Inc. 1994
#
# This routine can be used to batch incoming email requests for later
# processing
#
# Modified by Lee McLoughlin for Solaris 2.3 <lmjm@doc.ic.ac.uk>
#
PATH=/bin:/usr/bin:/usr/local/bin
if p=$(getent passwd archie) ; then
archiehome=$(echo "$p" | awk -F: '{print $6}')
else
echo "Cannot find home directory for user archie" >&2; exit 1
fi
ch_tmp()
{
cd $archiehome/db/tmp
}
usage() {
echo "Usage: batch-email -t <tmp dir>"
exit 1
}
tdir="notset"
while [ $# -gt 1 ] ; do
case $1 in
#temp directory
-t) if [ $# -gt 1 ] ; then shift ; tdir=$1; else usage; fi;;
esac
shift
done
if [ $tdir = "notset" ]; then
ch_tmp
else
cd $tdir
fi
for i in aremail.*; do
# $archiehome/bin/email-client -i $i $*
if ($archiehome/bin/email-client < $i) ; then
/bin/rm -f $i
else
/bin/mv -f $i FAILED_$i
fi
done