summaryrefslogtreecommitdiff
path: root/sendmailadvanced.conf
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-19 09:18:08 +0200
committerErich Eckner <git@eckner.net>2016-04-19 09:29:39 +0200
commit4ce14217822ee0927b007753198250e494191b52 (patch)
tree503462de3d5c68745941ebba8b39e981de7069ea /sendmailadvanced.conf
parent7eebdef03cc9eee7aec5ded3fe1e45eb1234d2a1 (diff)
downloadsendmailadvanced-4ce14217822ee0927b007753198250e494191b52.tar.xz
mehr Optionen, Hooks umstrukturiertv1.0.4
Diffstat (limited to 'sendmailadvanced.conf')
-rwxr-xr-xsendmailadvanced.conf32
1 files changed, 13 insertions, 19 deletions
diff --git a/sendmailadvanced.conf b/sendmailadvanced.conf
index 7b37bfc..cf7932d 100755
--- a/sendmailadvanced.conf
+++ b/sendmailadvanced.conf
@@ -11,28 +11,22 @@ hashcash_bits=22
# things to put into head of (body of) email
body_header_hook()
{
- true
+ [ "$(whoami)" == "root" ] && [ "$1" == "last-backups" ] && return 0
+ echo "Unkonwn header-hook: '$1'"
}
# things to put into foot of email
body_footer_hook()
{
- while [ $# -gt 0 ]
- do
- if [ "$1" == "-t" ]
- then
- true
- elif [ "$(whoami)" == "root" ] && [ "$1" == "-wb" ]
- then
- echo "----------------------- Last Backups Begin -------------------------"
- echo
- lastBackups
- echo
- echo "------------------------ Last Backups End --------------------------"
- echo
- else
- echo "Unknown option: '$1'"
- fi
- shift
- done
+ if [ "$(whoami)" == "root" ] && [ "$1" == "last-backups" ]
+ then
+ echo "----------------------- Last Backups Begin -------------------------"
+ echo
+ lastBackups
+ echo
+ echo "------------------------ Last Backups End --------------------------"
+ echo
+ else
+ echo "Unknown footer-hook: '$1'"
+ fi
}