Avatar of dmwynne
dmwynne
Flag for United States of America asked on

Bacula - setup to relay through Exchange 2010 server

Hi,

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.
Storage SoftwareLinuxEmail Servers

Avatar of undefined
Last Comment
dmwynne

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ArneLovius

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
dmwynne

ASKER
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 my.exchange.relay: 501 5.1.7 Invalid address
ArneLovius

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".
dmwynne

ASKER
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 relay.plasan-nab.com -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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ArneLovius

I would hope that your Exchange server logged it ?

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

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

ASKER
Is it possible to use another program than bstmp to send the mail?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
dmwynne

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