check_logfiles: 3.7.5.1
[omd.git] / packages / omd / ADMIN_MAIL.hook
blob4d032317fcca69ac39aa0573af3d31f4a4943214
1 #!/bin/bash
3 # Alias: Administrative Mail Address
4 # Menu: Basic
5 # Description:
6 # Mails sent to the sites user (e.g. by crontab) are forwarded
7 # to this mail address. If you configure none, the mail is
8 # handled normally by the mailer config.
10 case "$1" in
11 default)
12 if [ -e $OMD_ROOT/.forward ]; then
13 head -n1 $OMD_ROOT/.forward
14 else
15 echo ""
18 choices)
19 echo "^([-a-zäöüÄÖÜA-Z0-9_.+%]+@[-a-zäöüÄÖÜA-Z0-9]+(\.[-a-zäöüÄÖÜA-Z0-9]+)*)?$"
21 set)
22 if [ -n "$2" ]; then
23 echo $2 > $OMD_ROOT/.forward
24 else
25 rm -f $OMD_ROOT/.forward
28 esac