mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1 a1433add-5e2c-0410-b055-b7f2511e0802
18 lines
407 B
Bash
18 lines
407 B
Bash
#!/bin/sh
|
|
FILTER_DIR=/home/vacation
|
|
SENDMAIL="/usr/sbin/sendmail -i"
|
|
EX_TEMPFAIL=75
|
|
EX_UNAVAILABLE=69
|
|
|
|
trap "rm -f in.$$" 0 1 2 3 15
|
|
|
|
cd $FILTER_DIR || { echo $FILTER_DIR does not exist; exit $EX_TEMPFAIL; }
|
|
|
|
cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
|
|
|
|
/home/vacation/vacation.pl < in.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }
|
|
|
|
$SENDMAIL "$@" < in.$$
|
|
|
|
exit $?
|