- '2a01:3f0:0:28::25'
# bacula
#
-bacula::operator_email: 'bacula-reports@admin.debian.org'
+bacula::email_all: 'bacula-reports@admin.debian.org'
bacula::ssl_ca_path: '/etc/ssl/debian/certs/ca.crt'
bacula::ssl_client_cert: '/etc/ssl/debian/certs/thishost.crt'
bacula::ssl_client_key: '/etc/ssl/private/thishost.key'
# @param ssl_client_key path to TLS client certificate key
# @param ssl_server_cert path to TLS server certificate
# @param ssl_server_key path to TLS server certificate key
-# @param operator_email email address for reports
+# @param email_all email address for all reports
+# @param email_error email address for errors
+# @param email_operator email address for the operator (to mount tapes etc)
+# @param email_daemon email address for messages from the daemon
# @param public_addresses this host's public IP addresses. The ones it connects out from and is reachable from outsite.
# @param has_ipv4 daemons should listen on ipv4
# @param has_ipv6 daemons should listen on ipv6
String $ssl_server_cert,
String $ssl_server_key,
- String $operator_email = 'root@localhost',
+ Optional[String] $email_all = undef,
+ String $email_error = $email_all ? { true => $email_all, default => 'root@localhost' },
+ String $email_operator = $email_error,
+ String $email_daemon = $email_error,
Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses,
Boolean $has_ipv4 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V4 },
Boolean $has_ipv6 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V6 },
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
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