|
From: Bill A. <wa...@pr...> - 2025-03-26 14:25:55
|
On 3/26/25 5:25 AM, Mehrdad Ravanbod wrote:
>
> Hi guys
>
> I am trying to set up the messaging part of bacula to send alerts and
> using the built in bsmtp, but running into problems
>
> The SMTP server that we are using needs authentication for the senders
> adress, and it seems like bsmtp does not handle this, i.e there is no
> way to send a password for the sender to the smtp-server, am i correct
> or did i miss something??
You are correct. bsmtp is a simple one-shot SMTP client with no authentication mechanisms.
> And if this is the case, what is the alernative aside from using another program instead of bsmtp??
One alternative is to use another SMTP client like `mailx` or whatever you are comfortable with.
Also, something to recognize is that the `mailcommand` setting in Messages{} resources can be used to call any command or
script you like. And, said script can do whatever you want to happen when Bacula sends an email - ie: send custom stat
us
messages to slack, or to other monitoring tools, etc. The `mailcommand` does not have to just send email. :)
And, since bsmtp is a "one-shot" SMTP client, if the mail server is unreachable in the moment Bacula is trying to send an
email, the message will be lost.
Due to this, I always recommend setting up a simple Postfix (a real MTA) installation on the Bacula Director system that will
store and forward the email messages from Bacula - retying as necessary in the case of networking issues or mail server being
temporarily offline - so your Bacula email messages do not get lost.
You can then safely have your `mailcommand` still call `bsmtp` to send emails to `-h localhost` on whatever port you
configure the local Postfix to listen on. Then simply configure Postfix to accept messages from localhost with no
authentication/encryption, and then relay the email messages to your mail server using any necessary SMTP authentication
required by your email server.
H
ope this helps,
Bill
--
Bill Arlofski
wa...@pr...
|