#1776 Issue closed: Specify what to send by mail independent of RESULT_FILES

Labels: enhancement, won't fix / can't fix / obsolete

jsmeix opened issue at 2018-04-16 07:29:

Current ReaR master code.

For the reason behind see
https://github.com/rear/rear/issues/1711#issuecomment-381416646

Currently it is neither possible to use RESULT_MAILTO
to mail only some of the RESULT_FILES (e.g. only the log file)
nor is it possible to mail files not in RESULT_FILES.

The current RESULT_* config variables in default.conf

RESULT_FILES=()
RESULT_MAILTO=()
RESULT_MAILFROM=root
RESULT_MAILSUBJECT=
RESULT_SENDMAIL="$( type -p sendmail || echo /usr/lib/sendmail )"
RESULT_SENDMAIL_OPTIONS=( -oi -t )

are meant only what to do with the RESULT_FILES.

The way out are a new set of config variables
that are meant only about what to send by mail like

MAIL_FILES=( "${RESULT_FILES[@]}" )
MAIL_TO=( "${RESULT_MAILTO[@]}" )
MAIL_FROM="$RESULT_MAILFROM"
MAILSUBJECT="$PRODUCT $WORKFLOW"
SENDMAIL_PATH="$RESULT_SENDMAIL"
SENDMAIL_OPTIONS="$RESULT_SENDMAIL_OPTIONS"

so that the user can specify what to send by mail
independent of the RESULT_FILES array content.

jsmeix commented at 2020-03-06 13:55:

Because there is zero user request for such a functionality
I won't implement it.


[Export of Github issue for rear/rear.]