View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001408||bareos-core||director||public||2021-12-18 20:32||2021-12-28 09:44|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Status||resolved||Resolution||no change required|
|Summary||0001408: "Backup OK" email message subject line no longer displays the job name|
|Description||In bareos 18, backups which concluded successfully would be followed up by an email with a subject line indicating the name of the specific job that ran. However, in bareos 20, the subject line now only indicates the name of the client for which the job ran.|
This is a minor nuisance, but I found the more distinguishing subject line to be more useful. In a case where there are multiple backup jobs for a single client where one but not all jobs fail, it is not immediately obvious -- as it was in bareos 18 -- as to which job for that client failed.
|Steps To Reproduce||Run two jobs on a host which has more than 1 backup job associated with it. |
The email subject lines will be identical even though they are for 2 different jobs.
|Tags||No tags attached.|
Maybe some configuration file example used would help
From code we can see that the line was not changed since 2016
67ad14188a src/defaultconfigs/bareos-dir.d/messages/Standard.conf.in (Joerg Steffens 2016-08-01 14:03:06 +0200 5) mailcommand = "@bindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
Here is what my configs look like:
# grep mailcommand *
Daemon.conf: mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
Standard.conf: mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
All references to message resources are for Standard, except for the director which uses Daemon. I copied most of my config files from the old director (bareos 18) to the setup for the new director (bareos 20); I did not make any changes to messages, afair. I'll take a deeper look at this and see what I can figure out. Maybe bsmtp semantics have changed?
OK, it appears that in bareos 20, as per doc, the %c stands for the client, not the jobname (which should be %n). However, in bareos 18 and prior, this same setup seems to be generating the jobname, not the clientname. So it appears that the semantics have changed to properly implement the documented purpose of the %c macro (and perhaps others; I haven't tested those).
Changing the macro to %n works as desired.
|Adapting configuration following documentation|
|2021-12-18 20:32||embareossed||New Issue|
|2021-12-21 16:05||bruno-at-bareos||Note Added: 0004401|
|2021-12-24 17:58||embareossed||Note Added: 0004415|
|2021-12-24 18:12||embareossed||Note Added: 0004416|
|2021-12-28 09:44||bruno-at-bareos||Assigned To||=> bruno-at-bareos|
|2021-12-28 09:44||bruno-at-bareos||Status||new => resolved|
|2021-12-28 09:44||bruno-at-bareos||Resolution||open => no change required|
|2021-12-28 09:44||bruno-at-bareos||Note Added: 0004428|