mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Revert "set correct utf8 email subject headers (RFC1342)"
This reverts commit 415552f355fd46e7f26a211af6a7da2c288691cd.
This commit is contained in:
parent
98f656c266
commit
c783448395
@ -103,7 +103,6 @@ done
|
|||||||
|
|
||||||
## Build the message's subject
|
## Build the message's subject
|
||||||
SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
|
SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
|
||||||
ENCODED_SUBJECT="=?utf-8?B?$(base64 --wrap=0 <<< "$SUBJECT")?="
|
|
||||||
|
|
||||||
## Build the notification message
|
## Build the notification message
|
||||||
NOTIFICATION_MESSAGE=`cat << EOF
|
NOTIFICATION_MESSAGE=`cat << EOF
|
||||||
@ -158,15 +157,13 @@ if [ -n "$MAILFROM" ] ; then
|
|||||||
|
|
||||||
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||||
| $MAILBIN -a "From: $MAILFROM" -s "$ENCODED_SUBJECT" $USEREMAIL
|
|
||||||
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
||||||
else
|
else
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||||
| $MAILBIN -r "$MAILFROM" -s "$ENCODED_SUBJECT" $USEREMAIL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
|
||||||
| $MAILBIN -s "$ENCODED_SUBJECT" $USEREMAIL
|
| $MAILBIN -s "$SUBJECT" $USEREMAIL
|
||||||
fi
|
fi
|
||||||
|
@ -107,7 +107,6 @@ done
|
|||||||
|
|
||||||
## Build the message's subject
|
## Build the message's subject
|
||||||
SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!"
|
SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!"
|
||||||
ENCODED_SUBJECT="=?utf-8?B?$(base64 --wrap=0 <<< "$SUBJECT")?="
|
|
||||||
|
|
||||||
## Build the notification message
|
## Build the notification message
|
||||||
NOTIFICATION_MESSAGE=`cat << EOF
|
NOTIFICATION_MESSAGE=`cat << EOF
|
||||||
@ -163,15 +162,13 @@ if [ -n "$MAILFROM" ] ; then
|
|||||||
|
|
||||||
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||||
| $MAILBIN -a "From: $MAILFROM" -s "$ENCODED_SUBJECT" $USEREMAIL
|
|
||||||
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
||||||
else
|
else
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||||
| $MAILBIN -r "$MAILFROM" -s "$ENCODED_SUBJECT" $USEREMAIL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" \
|
||||||
| $MAILBIN -s "$ENCODED_SUBJECT" $USEREMAIL
|
| $MAILBIN -s "$SUBJECT" $USEREMAIL
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user