|
Re: Email notifications: msg#00247sysutils.backup.backuppc.general
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 : ------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | Re: Child exited prematurely: 00247, Justin Guenther |
|---|---|
| Next by Date: | Re: Bare Metal Restore?: 00247, Josh Marshall |
| Previous by Thread: | Re: Email notificationsi: 00247, Doug Lytle |
| Next by Thread: | multiple backupusers on 1 pc: 00247, ciccio ch |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |