Sendmail Wrapper

Aus Triopsi Wiki
Wechseln zu: Navigation, Suche

Folgender Code in /tmp/ erstellen

sendmail-wrapper

#!/bin/sh
TODAY=`date -Iseconds`
echo $TODAY sendmail-wrapper called $USER from $PWD >>/tmp/mail.send
(echo X-Additional-Header: $(dirname $PWD);cat) | /usr/sbin/sendmail-real "$@"

Aktivieren:

chmod +x sendmail-wrapper
mv /usr/sbin/sendmail /usr/sbin/sendmail-real
mv sendmail-wrapper /usr/sbin/sendmail

Deaktivieren:

mv /usr/sbin/sendmail-real /usr/sbin/sendmail