Bacula-users

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

2015-05-14 09:16:11
Subject: Re: [Bacula-users] Unable to send mail with mutt as mailcommand
From: Bill Arlofski <waa-bacula AT revpol DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 14 May 2015 09:11:10 -0400
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

-- 
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
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