Bacula-users

Re: [Bacula-users] Getting email notifications to work in Bacula 5.2.13

2013-06-19 17:31:02
Subject: Re: [Bacula-users] Getting email notifications to work in Bacula 5.2.13
From: Phil Stracchino <alaric AT metrocast DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 19 Jun 2013 17:27:27 -0400
On 06/19/13 15:47, Mohd Shukri wrote:
> Hi,
> 
>  I am not able to get the email notifications to work. I can't use bsmtp
> as I want to use my gmail account to send it so I have decided to use
> sendmail.
> 
>  I am able to send emails using sendmail from the command line and as
> the user 'bacula'. I have tried the suggestions in the Problem
> Resolution Guide
> <http://www.bacula.org/5.2.x-manuals/en/problems/problems/index.html> but 
> nothing
> seems to work. Also, I tried using sendEmail by following this guide
> <http://www.fairtec.at/en/it-blog-mainmenu-16/153> and that too dd not work.
> 
>  So, either I am missing something obvious or the mailcommand directive
> in the Message resource does not work. My message Resource is as follows:
> 
>   Messages {
>   Name = Standard
>   mailcommand = "echo hello | sendmail %r"
>   operatorcommand = "echo hello | sendmail %r"
>   mail = myaddr AT hotmail DOT com <mailto:myaddr AT hotmail DOT com> = all, 
> !skipped
>            
>   operator = myaddr AT hotmail DOT com <mailto:myaddr AT hotmail DOT com> = 
> mount
>   console = all, !skipped, !saved
>   append = "/var/lib/bacula/bacula.log" = all, !skipped
>   catalog = all
> }
> 
> 
>  My system info is as follows:
> 
>   1. OS : Gentoo Linux
> 
>   2. Bacula version: 5.2.13
> 
>     Please advise.


My advice?  Try something like this:

  mailcommand = "/usr/bin/mutt -F /root/.muttrc-bacula -s \"\(Bacula\)
\<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/bin/mutt -F /root/.muttrc-bacula -s
\"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"

where .muttrc-bacula looks something like this:

#
# Mutt configuration file for Bacula (we hardly need anything)
#
set alias_file="~/aliases"
set from="Bacula <bacula AT babcom DOT com>"
set realname="Bacula Storage Management System"
set use_8bitmime=yes


I don't know what MTA you have installed (my server, which also runs
Gentoo, uses Postfix), but a direct pipe to sendmail is seldom the best
way to deliver mail, and in fact, on Gentoo it is almost certain that a
direct unformatted pipe to /usr/sbin/sendmail without additional options
will not work as you probably intend.

(Note that /usr/sbin/sendmail is almost certainly NOT going to be the
Sendmail MTA, mail-mta/sendmail, unless you manually chose to replace
the system MTA with Sendmail yourself, and if you knew enough Sendmail
to make that decision, you probably wouldn't be asking this question in
the first place.)



-- 
  Phil Stracchino, CDK#2     DoD#299792458     ICBM: 43.5607, -71.355
  alaric AT caerllewys DOT net   alaric AT metrocast DOT net   phil AT 
co.ordinate DOT org
  Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater
                 It's not the years, it's the mileage.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users