I have configured bareos on windows server 2016 R2 and its working properly but while backup completed unable to send mail to me on mentioned email id bereos configuration file and also if backup got failed same unable to send mail.
I have already installed send mail on this server and tested from Power shell and CMD,Its working properly but bereos unable to send mail to me.
See below configuration file.
C:\ProgramData\Bareos\bareos-dir.d\messages
1. Daemon.conf
Messages {
Name = Daemon
Description = "Message delivery for daemon messages (no job)."
mailcommand = "C:/Program Files/Bareos/bsmtp -h xxx.xxx.com -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r"
mail = dubeyu...@gmail.com = all, !skipped, !audit # (#02)
console = all, !skipped, !saved, !audit
append = "C:/ProgramData/Bareos/logs/bareos.log" = all, !skipped, !audit
append = "C:/ProgramData/Bareos/logs/bareos-audit.log" = audit
}
Here --> xxx.xxx.com (my mail server name)
2.Standard.conf
Messages {
Name = Standard
Description = "Reasonable message delivery -- send most everything to email address and to the console."
operatorcommand = "C:/Program Files/Bareos/bsmtp -h xxx.xxx.com -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r"
mailcommand = "C:/Program Files/Bareos/bsmtp -h xxx.xxx.com -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r"
operator = dubeyu...@gmail.com = mount # (#03)
mail = dubeyu...@gmail.com = all, !skipped, !saved, !audit # (#02)
console = all, !skipped, !saved, !audit
append = "C:/ProgramData/Bareos/logs/bareos.log" = all, !skipped, !saved, !audit
catalog = all, !skipped, !saved, !audit
}
Here xxx.xxx.com ----> My mail server
Can you please help for this issue ?
Regards,
Umesh Dubey
Hi Bruno,
Thanks for reply.
I have tested from Power shell and cmd,mails are successfully delivering from
Windows server (Where has installed Bareos backup installed ) but Bareos unable to send mail.
Ran the mail sent by another command from both PowerShell and CMD as
PowerShell= Send-MailMessage -From "bar...@shipco.com" -To "udu...@shipco.com" -SmtpServer "smtp.shipco.com" -Subject "Test3" -Body "Backup"
CMD= C:/Windows/System32/WindowsPowerShell/v1.0>powershell.exe Send-MailMessage -From "bar...@shipco.com" -To "udu...@shipco.com" -SmtpServer "smtp.shipco.com" -Subject "Test3" -Body "Backup"
HI,
I have checked Event logs and found below but not sure where is problems..
Bareos ERROR:
26-Dec 21:14 Message delivery ERROR: Mail program terminated in error.