logo       

Re: Email notifications: msg#00247

sysutils.backup.backuppc.general

Subject: Re: Email notifications

Ok, here is my setup:

I use a program called postie for command line sending of notifications, I'm sure sendmail would do just fine.

It can be obtained from http://www.infradig.com/download.shtml

Add this to the config.pl

$Conf{DumpPostUserCmd} = '/usr/local/bin/sendmailend.sh $user $xferOK $host
$type';

Here is a sample of my sendmailend.sh

#!/bin/sh

#########################################################################################

### Possible exit codes. 0 = Failure, 1 = Success, BLANK = Non-Critical
failure

#########################################################################################

<>

if [ $2 = 1 ]

then

###########################################################################################

### HTML layout for SUCCESS message to end user, $1 = Email, $2 = Exit
Code, $3 = Asset Tag, $4= Type of Backup

###########################################################################################


/bin/echo 'some HTML code here' > /backupdata/conf/success/$1.html
## Only 1 Greater then sign here, to over write the previous
notification.
/bin/echo 'some more HTML code here' >> /backupdata/conf/success/$1.html ## Two Greater then signs here to append the rest of the HTML message
/bin/echo 'more of the same' >>/backupdata/conf/success/$1.html
## NOTE: Does not have to be HTML, can be anything.


###########################################################################################

### E-Mail handling routine. If success, email end user and log. If
fail, note in log.txt

###########################################################################################

/usr/local/bin/postie -gmt -host:smtp.mail.com -to:$1
-from:BackupPC@xxxxxxxxxxxxxx -s:'Asset Tag: '$3
-a:/backupdata/conf/success/$1.html -nomsg

/bin/echo `date` 'Exit code:(' $2 ') Completion E-Mail sent to:(' $1'
)' >>/backupdata/conf/log.txt

else

/bin/echo `date` 'Exit code:(' $2 ') Asset Tag:(' $3') E-Mail:(' $1' )' >>/backupdata/conf/log.txt

fi



zorg wrote:

Austin Wilson a écrit :

I would like to receive an email if the backup is successful the
night before. Does anyone know how I would do this?



Austin Wilson





sorry I'm looking for the same feature and ask on this list one week
before but still got no anwer so if someone can help us

cyril


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
BackupPC-users mailing list
BackupPC-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/







-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
BackupPC-users mailing list
BackupPC-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise