From: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>
To: Rushdhi Mohamed <zmrushdhi AT gmail DOT com>
Cc: bacula-users <bacula-users AT lists.sourceforge DOT net>
Sent: Wednesday, March 7, 2012 4:37 AM
Subject: Re: [Bacula-users] How to send a bulk mail for backup success and filiers
On Wed, 7 Mar 2012 00:17:41 +0530
Rushdhi Mohamed <
zmrushdhi AT gmail DOT com> wrote:
>> Bacula reporting problem (too many emails for a day , I need one mail
>> for success ( including backup details) & one email for failures.
>>
>> how can i configure bacula to send a bulk mail for at least backup
>> success messages.
>You'll need to do a bit of programming.
>The Message resource allows you to do rather flexible delivery of the
>messages Bacula generates: they can be delivered to files or passed to
>external programs. So with an appropriate Message resource, a set of
>shell scripts and a cron job you can arrange to do what you want.
>
>-----------------------------------------------------------------------------
You can pipe commands directly into bconsole, and capture the
results. For example, a simple perl script:
===
#!/usr/bin/perl
@messagesCommand=`echo "messages" | bconsole`;
===
Once you have the array, you can parse it out and email it.