Jump to content

Emailing backup reports


Recommended Posts

I have tried and succeded with one instance but the second pulls up "E-mail notification failed: error -541 (backup client not installed or running)... the second install mirroring the details entered into the first.

 

If I can figure out why the hell it's doing this I'll let you know. - Unless of course someone else has the answer to this problem?

Link to comment
Share on other sites

This is the error that I get:

 

Cannot send message using the server(null)

Use the pop-up menu below to try a different outgoing mail server.

All message will use this server until you quit Mail or change your

network settings.

Message from: CF <admin>

Send message using: smtp.1and1.com

 

I was trying to configure Mail using our mail service from 1and1.com. Is this the correct way? I was trying to use my 1and1.com account but if seems retrospect sends email from the current logged user in this case admin. Is there a way to change this?? thanks

Link to comment
Share on other sites

Quote:

When you say both parts what do you mean??

 


Retrospect Event Handler (python)

 

There is also an enhancement in these forums for the event handler if you use email addresses of the form "Some Name <name@your.server.com>" rather than just "name@your.server.com", which works fine. That thread is here:

Python event handler

(scroll down to Simon Hobson's post of 12/29/05). Earlier bugs discussed in that thread have been fixed in the Python script.

 

Russ

Link to comment
Share on other sites

Quote:

Is there anything that I need to enable in my server?

 


Not quite sure what you are asking here.

 

I assume that you have edited the parameters at the start of the Retrospect Event Handler as indicated (the release notes aren't quite clear). Here's the drill:

 

(1) Using Apple's Script Editor, edit the email recipient (kMainGroup, kSuccessGroup, kErrorGroup, kMediaRequestGroup - as desired, for your needs), the SMTP server (kMailServer), the sender (kFrom), and other parameters if you want. It's all explained in the Retrospect Event Handler file.

 

(2) save the edited script (save as application, stay open, never show startup screen)

 

(3) rename the saved "Retrospect Event Handler.app" file to "Retrospect Event Handler" (without the .app extension) because Retrospect expects the file to be named EXACTLY "Retrospect Event Handler". (sigh).

 

(4) move the saved renamed compiled script to /Library/Preferences/Retrospect

(you should also have macmail.py in that same folder unless you change the default location in the Retrospect Event Handler)

 

(5) make sure you have a working user that can send email that is the same one you put in the kFrom parameter in the AppleScript (I added a special user, Retrospect). Test that you can send email from that special user to the recipient email address you edited.

 

That's it.

 

Hope this helps,

 

Russ

Link to comment
Share on other sites

  • 7 months later...

Hi

 

I am quite new to macs and I am trying to set this up.

 

2 questions.

 

1. Do you need to install python ffor this to work ?

 

2. I cant find the folder listed in the script.

 

/usr/bin/python/Library/Preferences/Retrospect/macmail.py

 

but I can find :- usr/Library/Preferences/Retrospect/macmail.py is this the right one ?

 

Cheers

 

Dan

Link to comment
Share on other sites

Quote:

1. Do you need to install python ffor this to work ?

 


No. Python is a part of the standard install for Mac OS X.

Quote:

2. I cant find the folder listed in the script.

 

/usr/bin/python/Library/Preferences/Retrospect/macmail.py

 

but I can find :- usr/Library/Preferences/Retrospect/macmail.py is this the right one ?

 


macmail.py from the Retrospect utilities goes in /Library/Preferences/Retrospect

 

There is no folder /usr/bin/python/Library/Preferences

There is no folder /usr/Library/Preferences/Retrospect (unless you have created one)

 

If you have difficulties after installing, repost and we'll help you. macmail.py doesn't need to be changed. Just some simple changes to the script.

 

Russ

Link to comment
Share on other sites

I had put it in the wrong folder, but now its the right one.

 

So my next problem is that it gives me the followig error message.

 

sh: line1:test@yahoo.co.uk: command not found

 

Any ideas ?I have tried using a few emails addresses both internal and external as shown in the above error.

 

Cheers

 

Dan

Link to comment
Share on other sites

Quote:

So my next problem is that it gives me the followig error message.

 

sh: line1:test@yahoo.co.uk: command not found

 


What is "it" that gives you this message? There are no shell scripts involved in the process, and none of the scripts in the process have such a line as line 1.

 

Could you post the first few lines of the file that is giving this error?

 

Russ

Link to comment
Share on other sites

Hi

 

Thanks for your help. I have set the script to run for all events. I then start the laptop backup process and that is when it is gnerating the error.

 

Here is the first lines of my script.

 

-------

property kMainGroup : {"dan@galtec.co.uk", "email2@somewhere.domain"} --will get mail for all events .

property kSuccessGroup : {} --will get mail only if no errors occurred

property kErrorGroup : {} --will get mail only when Retrospect reports an error

property kMediaRequestGroup : {} --will get mail when Retrospect needs new media

property kMailServer : "192.168.250.3" -- the smtp server to use for sending mail

property kFrom : "greg@galtec.co.uk" -- the from address for the mails that Retrospect sends

 

--SMTP Authentication

--if your mail server uses SMTP authentication, enter the username and password here

property kUsername : ""

property kPassword : "/Library/Preferences/Retrospect/macmail.py"

 

-- the full path to the script that sends mail

property kScriptCommand : ""

 

-- This constant defines the interval (in hours) between Backup Server report emails.

property kSendBackupServerReport : 1

 

-- Set this property to false if you don't want the main group to receive mail on script or Backup Server starts.

property sendMailOnStart : true

-----------

 

When I get the error message posted above it gives me the options of EDIT and OK if I press EDIT it brings up this script.

 

Hope you can help.

 

Cheers

 

Dan

Link to comment
Share on other sites

I note that you have multiple recipients for event recipients, which is something that I have never tried.

 

Do you have a valid email recipient at both email addresses you list?

In other words, using your email program, are you able to send email to dan@galtec.co.uk and email2.somewhere.domain ?

Point being, I note that the "email2@somewhere.domain" is an example given in the template script. If you do not have a valid recipient for that second email address, then things will fail. If you only have a single recipient, then delete the comma, the space following the comma, and the second recipient. And then follow the instructions I gave above in my post of April 18, 2007. EXACTLY.

 

Additionally, I'm a bit concerned that the unix Bourne shell ("sh") is giving you the error message, that "it" is giving you the option to edit the script, and you have never reported where you are getting that error message, only that "it' is generating the error. Is "it" your dog? Your mother? What is "it"? EXACTLY what steps are you doing to get this message?

 

Finally, the template script has a number of earlier lines in it that are Applescript comments. I cannot believe that the lines you posted are the "first few lines" of the Retrospect Event Handler as I requested unless you have done some serious editing. I'm trying to find out the cause of the error message, which is reporting an error on line 1.

 

I think that you have done something that is causing the script to be launched by the Bourne shell (sh). The script should be launched by the AppleScript system, not the shell.

 

When you do a "get info" on this AppleScript (the Retrospect Event Handler), what is the "Kind" shown?

 

Did you exactly follow my instructions above in post #96237 of April 18, 2007?

 

Russ

Link to comment
Share on other sites

Hi Russ

 

Thanks for your patience, I took on board what you were saying, and thought I may have messed up the script in some way so I redownloaded it and started again. This time though it has given me a new error message :-

 

Retrospect Event Handler

The command exite with a non zero status.

 

I again get the option to edit or press ok.

 

I have included below the full script I have edited.

 

This error message occurs about 20 seconds after i choose Run -> Start Backup Server

 

When I do the "get info" kind = Application(power pc)

 

I am running version 6.0.204 if that makes any difference.

 

Here is the script copied directly-->

 

-- Retrospect Event Handler for Mail.app for OSX

 

-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

-- You _must_ edit these email address property definitions. Insert the desired recipients

-- into each group using quote marks, commas to separate multiple recipients, or

-- leave curly brackets empty to not receive any mail for a group. Addresses must be

-- in the form of one of the examples below, and a mix of the two types can be used.

-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

 

property kMainGroup : {"dan@galtec.co.uk"} --will get mail for all events .

property kSuccessGroup : {} --will get mail only if no errors occurred

property kErrorGroup : {} --will get mail only when Retrospect reports an error

property kMediaRequestGroup : {} --will get mail when Retrospect needs new media

property kMailServer : "192.168.250.3" -- the smtp server to use for sending mail

property kFrom : "greg@galtec.co.uk" -- the from address for the mails that Retrospect sends

 

--SMTP Authentication

--if your mail server uses SMTP authentication, enter the username and password here

property kUsername : ""

property kPassword : ""

 

-- the full path to the script that sends mail

property kScriptCommand : "/Library/Preferences/Retrospect/macmail.py"

 

-- This constant defines the interval (in hours) between Backup Server report emails.

property kSendBackupServerReport : 1

 

-- Set this property to false if you don't want the main group to receive mail on script or Backup Server starts.

property sendMailOnStart : true

 

-- Nothing below this line needs to be edited.

Link to comment
Share on other sites

While I appreciate the additional information, you still have not answered the questions that I asked, and you seem to be changing the problem without answering those questions.

 

(1) have you tried sending email to all email addresses in the kMainGroup property list from an account on the machine that is running Retrospect? (I note that you have changed this property list from what you originally posted, yet you have not mentioned that you did this change).

 

(2) have you installed macmail.py in /Library/Preferences/Retrospect ?

 

(3) did you exactly follow my instructions in my post #96237 of April 18, 2007?

 

(4) EXACTLY what error messages are you getting? in your initial posts, you reported that "it" (?) was giving an error of: "sh: line1:test@yahoo.co.uk: command not found". Are you getting this same error or a different one?

 

Perhaps you need to

 

(1) detail exactly what you are doing

(2) post a listing from Terminal of the output of the following command:

Code:


ls -al /Library/Preferences/Retrospect

Copy that line and paste it into Terminal, provide us with the output.

(3) post a screen shot of the error message if you aren't able to provide us with its exact wording.

(4) consider upgrading to Retrospect 6.1.138 - it's a free update. The version you have is old, and bugs have been fixed.

(5) tell us some information about your configuration - we have none. Version of Mac OS X, type of computer, version of Retrospect Driver Update (RDU). The Retrospect versions are printed in the Retrospect log on each launch.

(6) tell us what errors / messages are being seen in the Retrospect logs.

 

Russ

Link to comment
Share on other sites

I'm sure I added a post here last week, it doesnt seem to have worked.

 

Anyway i got it sorted in the end, it was my fault, I had the wrong ip address for the mai server. Thanks for the help.

 

Is there anyway to get it to mail the error reports (log) so you can see what the errors are, rather than just emailing me to tell me it has errors ?

 

Cheers

 

Dan

Link to comment
Share on other sites

Quote:

Is there anyway to get it to mail the error reports (log) so you can see what the errors are, rather than just emailing me to tell me it has errors ?

 


What you see is what you get. If you study the "Retrospect Event Handler" AppleScript, you see that only certain information is passed to the script in the Apple Events.

 

You could, of course, write a shell script to parse the Retrospect log and email that to you. Problem is, the Retrospect log is circular, so it's a bit hard to know where it stops and starts.

 

Put in a feature request to include this feature for a future version of Retrospect, if that ever happens. Good luck. I've never seen a feature request implemented.

 

Russ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...