On 2022-11-21 13:16, Gina Costa wrote:
Hi,

I’m using bacula 9 over CentOS. I need receive notifications about job
failures but this notifications doesn’t work.
The configuration file bacula-dir.conf has the followup Messages directive:

*******************************************************************************
Messages {
Name = Standard
mailcommand = "/usr/sbin/bsmtp -h 192.168.0.66 -f "(Bacula) <%r>" -s
"Bacula: %t %e of %c %l" %r"
operatorcommand = "/usr/sbin/bsmtp -h 192.168.0.66 -f "(Bacula) <%r>"
-s "Bacula: Intervention needed for %j" %r"
mail = gina.co...@uc.pt = all, !skipped
operator = gina.co...@uc.pt = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
}
*******************************************************************************

To test whether the mail sending is working as it should, I do the
following command, and this works fine, I receive the test message :

        echo "This is test message." | /opt/bacula/bin/bsmtp -h 192.168.0.66
-f bac...@uc.pt -s "Test" gina.co...@uc.pt -d 50


Can anyone help me?


Maybe you need to escape special characters like quotes.
For example:

mailcommand = "/usr/sbin/bsmtp -h 192.168.0.66 -f \"\(Bacula\) <%r>\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/usr/sbin/bsmtp -h 192.168.0.66 -f \"\(Bacula\) <%r>\" -s \"Bacula: Intervention needed for %j\" %r"


Regards!

--
Josip Deanovic


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to