Sorry for the lengthy detail but want to make sure you know the whole environment.
We have four Lotus Notes Domino R5.0.13 servers, 3 of which handle mail files. One that is setup to handle the main mail routing (call this one Main) and then pass it on to the other two servers if their mail file resides there. (call them Remote and Field)
We created a shared agent to run on the server copy of one of our user’s mail files. The agent was created with the Admin ID. We then went into Notes Administrator and signed the agent with the Field server’s ID. The agent is set up to forward a copy of all mail to the user’s blackberry device via an external internet address. (Call this address firstname.lastname@example.org) Here is copy of the code for reference.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim col As NotesDocumentCollection
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Set db = s.currentdatabase
Set col = db.unprocesseddocuments
Set doc = col.getfirstdocument
While Not (doc Is Nothing)
Set maildoc = db.createdocument
maildoc.From = doc.From
maildoc.ReplyTo = doc.From
maildoc.SendTo = "email@example.com"
maildoc.CopyTo = "firstname.lastname@example.org"
maildoc.Subject = doc.Subject
maildoc.Body = doc.Body
maildoc.Form = "Memo"
maildoc.Principal = doc.From
Call s.UpdateProcessedDoc( doc )
Set doc = col.getnextdocument( doc )
This agent works perfectly for someone we had created this for a few months ago that resides on the Main server. This user in question resides on the Field server. We cut the code directly out of the working agent and created a new agent from scratch in the user’s mail file and pasted this code into the Lotus Script section of the agent and updated the address only.
In the log.nsf for the Field server we see the following error:
AMgr: Agent 'Blackberry' will not run. It is intended to run on 'MAIN' not ‘Field’
In troubleshooting this issue I have read in several instances to check the $MachineName and verify the name is correct. IT IS NOT! Since the schedule button is greyed out when the choice ‘After New Mail Has Arrived’ is selected, how do I update this field? I have tried changing to ‘On Schedule…’ and then changing the server that way. It updates fine shows Fields as the server to run on. I then save the changes. I check the $MachineName and it properly is set to Field. I then go back into the agent and change the when to run back to ‘After New Mail Has Arrived’ and save those changes. When I check the value of $MachineName it has reverted back incorrectly to Main.
I have checked the server document and the mail server for Field properly reads the hierarchial name of Field. Can someone please give me some direction on how to resolve this? Where else might this information keep resetting itself from? How can I force the agent to run on Field?