Bacula-users

Re: [Bacula-users] Rif: Re: Rif: Re: Email Command

2008-04-30 02:47:16
Subject: Re: [Bacula-users] Rif: Re: Rif: Re: Email Command
From: pichi <p.boynton AT fbsa DOT es>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 29 Apr 2008 23:47:10 -0700 (PDT)

Ferdinando Pasqualetti-3 wrote:
> 
> Hello PICHI,
> My suggestion of taking out backslashes was valid only from the command 
> line. In bacula-dir.conf you need " at the beginning and at the and, in 
> order to set the mailcommand, and so you MUST include \ before ", in order 
> to set them in message.
> You can change /usr/lib/bacula/bsmtp with a shell script, say /tmp/bsmtp 
> like that:
> #!/bin/sh
> echo "'$0' '$1' '$2' '$3' '$4' '$5' $6' $7' '$8' > /tmp/bsmtp.log
> 
> so you can see esactly what it is passed to the BSMTP program.
> 
> Ferdinando,
> 
> I really appreciate you trying to help. But I still cant seem to get email
> notifications to work. I did the changes to bacula-dir.conf as you said:
> 
> mailcommand = "/usr/lib/bacula/bsmtp -h mail.dobbs.es -f
> bacula AT backup.dobbs DOT es -s \"Bacula: %e %t %n" pete AT dobbs DOT es"
> 
> And this is the error in bconcole:
> 
> 25-abr 09:43 bacula-dir: message.c:454 Mail prog: bsmtp: bsmtp.c:213 Fatal
> error: no recipient given.
> 25-abr 09:43 bacula-dir: Bacula_daily.2008-04-25_09.42.19 Error:
> message.c:465 Mail program terminated in error.
> CMD=/usr/lib/bacula/bsmtp -h mail.dobbs.es -f bacula AT backup.dobbs DOT es -s
> "Bacula: Canceled Backup Bacula_daily
> ERR=Child exited with code 1
> 
> At least now I can see the variables for subject line are getting passed
> out correctly but it still does not see the recipient that is tacked on to
> the end of the command. And believe me I have tried all sorts of
> variations of the command with quotes, without quotes, without recipient,
> the order of subject, mailhost and I am burned out on this problem to tell
> you the truth.  
> 
> I am just gonna check everything by hand from now on.
> 
> But I thank you for taking the time to help,
> 
> P.
> 
> 
> 
> 
> 
> 
> 
> P.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Ferdinando Pasqualetti-3 wrote:
>> 
>> Hi,
>> I think you should not mask " with backslash. " serve to set all the 
>> phrase a a single argument linked to -s (subject).
>> 
>> 
>> Ferdinando,
>> 
>> Thanks for help. I appreciate it very much.
>> 
>> OK, this is officially driving me nuts.
>> 
>> Again more info:
>> 
>> From the commandline I run:
>> 
>> /usr/lib/bacula/bsmtp -h mail.dobbs.es -f bacula AT backup.dobbs DOT es -s
>> "Bacula: %e %t %n" pete AT dobbs DOT es
>> 
>> Please notice I took out the backslash as you sudgest. Ok, then I write 
> a
>> small message, start a new line, Control+d
>> and in a few seconds I get the mail with subject line of Bacula: %e %t 
> %n
>> and the message I just wrote in the body of the mail.
>> 
>> In my bacula-dir.conf I have this:
>> 
>> mailcommand = /usr/lib/bacula/bsmtp -h mail.dobbs.es -f
>> bacula AT backup.dobbs DOT es -s "Bacula: %e %t %n" pete AT dobbs DOT es
>> mail = pete AT dobbs DOT es = all, !skipped
>> 
>> And then this error in the log:
>> 
>> bacula-dir: message.c:454 Mail prog: bsmtp: bsmtp.c:213 Fatal error: no
>> recipient given.
>> bacula-dir: Bacula_daily.2008-04-23_10.27.20 Error: message.c:465 Mail
>> program terminated in error.
>> 
>> I have read the manuals and played this for two days and I have not 
> gotten
>> it to work yet.  I know its me, but even idiots need email notifications
>> dont they?
>> 
>> Thanks again,
>> 
>> P.
>> 
>> 
>> 
>> pichi <pboynton AT fbsa DOT es> 
>> Inviato da: bacula-users-bounces AT lists.sourceforge DOT net
>> 22/04/2008 08.44
>> 
>> Per
>> bacula-users AT lists.sourceforge DOT net
>> CC
>> 
>> Oggetto
>> Re: [Bacula-users] Email Command
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>>>Look after %r... you got an extra "
>> 
>> 
>> OK, so I take out the extra " and here is the output:
>> 
>> backup:~# /usr/lib/bacula/bsmtp -h mail.dobbs.es -s \"Bacula: %t %e of 
> %c
>> %l\" %r -f bacula AT backup.dobbs DOT es pete AT dobbs DOT es
>> bsmtp: bsmtp.c:85 Fatal malformed reply from mail.dobbs.es: 550 5.1.1 
>> <of>:
>> Recipient address rejected: User unknown in local recipient table
>> 
>> And as you can see it thinks "of" from : %t %e of %c %l\" %r is the mail
>> recipient. 
>> 
>> What up?
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Email-Command-tp16807719p16822707.html
>> Sent from the Bacula - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save $100. 
>> Use priority code J8TL2D2. 
>> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
>> 
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users AT lists.sourceforge DOT net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>> 
>> 
>> 
>> 
> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save $100. 
>> Use priority code J8TL2D2. 
>> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users AT lists.sourceforge DOT net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>> 
>> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Email-Command-tp16807719p16833358.html
> Sent from the Bacula - Users mailing list archive at Nabble.com.
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Email-Command-tp16807719p16892864.html
Sent from the Bacula - Users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] Rif: Re: Rif: Re: Email Command, pichi <=