Bacula-users

Re: [Bacula-users] Unable to send mail with mutt as mailcommand

2015-05-14 13:45:21
Subject: Re: [Bacula-users] Unable to send mail with mutt as mailcommand
From: Kelvin Minter <kb.minter AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 14 May 2015 12:40:02 -0500
I am now seeing logs within the maillog after following Bill's advice.

Thank you for your replys and happy coding!

On Thu, May 14, 2015 at 9:04 AM, Richard <lists-bacula AT listmail.innovate DOT net> wrote:


------------ Original Message ------------
> Date: Thursday, May 14, 2015 09:11:10 AM -0400
> From: Bill Arlofski <waa-bacula AT revpol DOT com>
>
> On 05/14/2015 01:33 AM, Kelvin Minter wrote:
>> Hello I am running bacula 5.2.13 on CentOS 6.6.
>>
>> I have the following configuration for my messages in
>> /etc/bacula/bacula-dir.conf
>>
>> Messages {
>>   Name = Standard
>>   mailcommand = "/usr/bin/mutt -F /root/.muttrc-bacula -s
>>   \"Bacula: %t %e of %c %l\" %r"
>>   operatorcommand = "/usr/bin/mutt -F /root/.muttrc-bacula -s
>>   \"Bacula: Intervention needed for %j\" %r"
>>
>>   mail = myemail AT domain DOT com <mailto:myemail AT domain DOT com> = all,
>>   !skipped operator = myemail AT domain DOT com
>>   <mailto:myemail AT domain DOT com> = mount console = all, !skipped,
>>   !saved
>>
>>   append = "/var/log/bacula/bacula.log" = all, !skipped
>>   catalog = all
>> }
>>
>> When I run mutt on the command line it proceeds and I am able to
>> receive the mail at my destination address.
>> However, when running a job I receive no email upon completion of
>> the job and no log is created within bacula or maillog.
>>
>> I am using tls for postfix but this should be no issue as I can
>> run the above mailcommand from the command line and receive an
>> email.
>>
>> Using bsmtp (Unable to send because I need to run through tls)
>> will produce an erroneous entry in the maillog file.
>>
>> I am stumped on how to debug further to determine where the mail
>> is being caught up at. It seems to have to be something on
>> bacula's end.
>>
>> Any help would be appreciated.
>
> Hi Kelvin,
>
> I would first check to see what user that the bacula-dir daemon is
> running as:
>
># ps axuf | grep bacula-dir
>
> On some distributions, the director runs as user "bacula", on
> others (like Gentoo) it runs as user "root". The director does not
> need to run as root, but some distributions package Bacula so that
> it does.
>
> You are pointing mutt to a config file in the root user's home
> directory, perhaps mutt, running as "bacula" when called by the
> director simply can not read the config file and exits?
>
>
> Bill

>From your slightly obscured configuration, I'm assuming that you're
trying to deliver the mail directly from bacula to your remote mail
server, not localhost, which is why you have the bsmtp/TLS issue. I
believe that if you use the default Bacula bsmtp setup to deliver to
localhost and then alias the recipient off (with an entry in
/etc/aliases) you should be ok. That approach will invoke the
(postfix) MTA -- which will handle TLS just fine. [and avoids the
issue of trying to configure a different mailer.] E.g.,

  mailcommand = "/usr/sbin/bsmtp -h localhost -f ...

  mail = <user>@localhost = all, !skipped
  operator = <user>@localhost = mount

which is the default Bacula configuration and what I use on my
centos box.


   - Richard



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users