Split up mail roles
[mirror/dsa-puppet.git] / modules / bacula / templates / bacula-dir.conf.erb
index f714ea2..b2a2093 100644 (file)
@@ -105,8 +105,13 @@ Messages {
   Name = <%= @messages_name %>
   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
   operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
-  mail = <%= @operator_email %> = all
-  operator = <%= @operator_email %> = mount
+<% if @email_all %>
+  mail = <%= @email_all %> = all
+<% end %>
+<% if @email_error != @email_all %>
+  mail on error = <%= @email_error %> = all
+<% end %>
+  operator = <%= @email_operator %> = mount
   console = all, !skipped, !saved
   syslog = all
   append = "/var/lib/bacula/log" = all
@@ -117,7 +122,7 @@ Messages {
 Messages {
   Name = Daemon
   mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
-  mail = <%= @operator_email %> = all
+  mail = <%= @email_daemon %> = all
   console = all, !skipped, !saved
   syslog = all
   append = "/var/lib/bacula/log" = all