Skip to content

Instantly share code, notes, and snippets.

@skarllot
Last active March 28, 2024 23:35
Show Gist options
  • Save skarllot/7604849 to your computer and use it in GitHub Desktop.
Save skarllot/7604849 to your computer and use it in GitHub Desktop.
Bacula configuration to use sendEmail
. . .
Messages {
Name = Standard
mailcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] %t %e of %n %l\" \"%r\""
operatorcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] Intervention needed for %j\" \"%r\""
mail = [email protected] = all, !skipped
operator = [email protected] = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
}
Messages {
Name = Daemon
mailcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] Alert message\" \"%r\""
mail = [email protected] = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
}
. . .
#!/bin/bash
SMTP_SERVER=smtp.example.com
USER=smtpuser
PASSWORD=smtppassword
[email protected]
SUBJECT=$1
RECIPIENTS=$2
/usr/local/bin/sendEmail -q -s $SMTP_SERVER -xu $USER -xp $PASSWORD -f $SENDER -u $SUBJECT -t $RECIPIENTS
@Coolby-19
Copy link

Salut, je suis nouveau et je fais présentement des tests avec Bacula et tout marche bien jusque là.
Je veux que Bacula me transfère directement les emails dans ma boite de messagerie Gmail, et c'est là que ça coince.
Je n'y parvient.
Aidez moi s'il vous plait.

@skarllot
Copy link
Author

You a SMTP server to send yours emails or you enable it from Gmail configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment