Add wrapper script for read-mail.pl

Drop procmail, use Exim filter as .forward.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-01-31 22:25:28 +01:00
parent 6032e3984a
commit 8db4fa83e0
2 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,7 @@ huhu 0.11.0 (unreleased)
* Re-order and add metadata files (TODO, ChangeLog, ...).
* Update to current Debian version.
* Add shell to new huhu mod users.
* Add wrapper script for read-mail.pl
huhu 0.10 (unknown)
* huhu reports version 0.09 (from MOD/Displaylib.pm), but has code

17
bin/read-mail-wrapper.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# This script is a wrapper for read-mail.pl to set up the environment.
#
# Usage: ${HUHU_DIR}/bin/read-mail-wrapper.sh de.alt.test.moderated
export "LANG=C"
export "LC_CTYPE=C"
set -o nounset
set -o errexit
export HUHU_DIR="/home/huhu"
export PERL5LIB="${PERL5LIB:+$PERL5LIB:}${HUHU_DIR}"
USER_DIR=$( echo "$1" | sed 's#[-.]#/#g' )
CONFIG="/home/${USER_DIR}/etc/public.conf"
cat - | "${HUHU_DIR}/bin/read-mail.pl" "-config=${CONFIG}" -stdin