Link to home
Start Free TrialLog in
Avatar of dmwynne
dmwynneFlag for United States of America

asked on

Bacula - setup to relay through Exchange 2010 server


I have been trying to get Bacula setup to send notices on backup jobs.  I have been trying various configs in the bacula-dir.conf file but can't get it to work.  

This is the Messages section of the bacula-dir.conf currently with email and relay changed to generic:

# Reasonable message delivery -- send most everything to
#   the email address and to the console
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h my exchange relay -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h my exchange relay -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = myemail = all, !skipped !terminate
  console = all, !skipped, !saved
  append = "/var/log/bacula.log" = all, !skipped !terminate
  operator = my email = mount
  catalog = all, !skipped, !saved

Open in new window

I have added the bacula host to be allowed to relay.   No email is coming to "my email".  not sure where to check on the Centos server for logs.  Anyone have a similar setup that could help, maybe post there config for Messages.
Avatar of ArneLovius
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dmwynne


Sorry I did not see your reply until now.

When I ran both of the commands I get:

bsmtp: bsmtp.c:145 Fatal malformed reply from 501 5.1.7 Invalid address
did you change it back from the generic to the actual ?

if you had the error with the actual, then at a guess, you are trying to use "bacula" instead of "bacula@server.domain".
Avatar of dmwynne


I hadn't changed it, missed that.

I tried changing it to bacula@myemaildomain and got the same error.

I then tried this /usr/sbin/bsmtp -h -f \"\<Bacula@.myemaildomain>\ %r\" -s \"Bacula: %t %e of %c %l\" %r

I added the <> around email and while I did not get the error I did not receive an email, so not sure what happened.
I would hope that your Exchange server logged it ?

Are you running any 3rd party filtering software on your Exchange server ?
Avatar of dmwynne


It never made it to exchange.  No 3rd party filtering.
Avatar of dmwynne


Is it possible to use another program than bstmp to send the mail?
Avatar of dmwynne


Figured this out by using the debug option for bsmtp.  My synatax for the command was not correct.