Files
archie/scripts/mail_inform
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

75 lines
929 B
Bash
Executable File

#!/bin/sh -u
#
# We handle the output, from the telnet and e-mail clients, that is to
# be mailed to the user.
#
prog=`basename $0`
REPLY_ADDR='archie-group@bunyip.com'
usage()
{
cat - <<EOC
Usage: $0 email-addr filename
EOC
exit 1
}
fatal()
{
echo ""
echo "${prog}: $1"
exit 1
}
if [ $# -ne 2 ] ; then
usage
fi
do_trap ()
{
echo "${prog}: caught trap!" 1>&2
failure
}
failure ()
{
echo "${prog}: cleaning up and exiting." 1>&2
rm -f $info $mhead $data $part.*
exit 1
}
# ----------------- Configure ----------------------
#
# The path must include:
#
# - your mailer ($mailcmd) (e.g. /usr/lib/sendmail)
# - cat
# - echo
# - wc
# - grep
# - rm
PATH=/usr/bin:/usr/lib:bin
tmp=/tmp
# Must use quotes
mailcmd="sendmail -t -f$REPLY_ADDR"
# --------------- End Configure --------------------
umask 077
trap do_trap 1 2 3 15
if [ -r $2 ] ; then
cat $2| $mailcmd $1
fi
exit 0