$HOST doesn't work for part of from: in mail-format configuration

Issue #749 resolved
Christian Hack created an issue

This works correctly substituting the host name in the from: email address

set mail-format {
        from: monit <device@$HOST.domain.com>
        subject: monit alert -- $SERVICE $EVENT
        message: $SERVICE $EVENT
        Date:        $DATE
        Action:      $ACTION
        Host:        $HOST
        Description: $DESCRIPTION
}

This does not work and the email from name appears as $HOST

set mail-format {
        from: $HOST <device@$HOST.domain.com>
        subject: monit alert -- $SERVICE $EVENT
        message: $SERVICE $EVENT
        Date:        $DATE
        Action:      $ACTION
        Host:        $HOST
        Description: $DESCRIPTION
}

Comments (2)

  1. Log in to comment