6/15/2006
今天在找 Domino ND6 的 server mail rules 的相關文章時發現了一個粉棒的網站
記載了很多關於 Anti-SPAM 的文章
- Making sure your mail server isn't used by spammers to relay spam mail
- Using third party maintained DNS blacklists that can filter out spam
- Using several techniques to verify various aspects of mail in an attempt to identify and filter out spam
- Using mail rules and other types of restrictions to combat spam
還有一個網站 Chris Linfoot 的 blog http://chris-linfoot.net/
裡面記載了很多 Domino Administration 的 Tips
多逛逛, 不錯的
4/17/2006
今天在 developerWorks 技術專刊中有一篇名為 "Notes 和 Domino 的歷史" 的文章
介紹了 Notes 誕生與發展的過程, 並提到了下一世代的 Domino ("Hannover")
可以好好給他懷舊一番
Notes 和 Domino 源自 Ray Ozzie、Tim Halvorsen 和 Len Kawell 的研究工作,最初是伊利諾斯州立大學的 PLATO Notes,後來是 DECNotes。Lotus 的締造者 Mitch Kapor 認識到了 Ozzie 的群組工作專案的巨大潛力,其開發歷史就開始了。
3/29/2006
通常我們在維護 Notes 資料庫時, 最常遇到的問題就是 User 要求修改表單所填的內容
(不管是你的無心造成他的粗心, 或是它的粗心讓你非常擔心)
這時候我們就要找出來他填值的欄位, 然後把正確的資料塞回去, 再給他 save 起來
這樣一個動作 可能就要花您 3~5 分鐘的時間
救星來啦!!
在 SearchDomino 上最近來了一篇文章, 就是來解決這個問題的 
他的作法是將文件上的欄位透過 @DocFields 把它取出來放到 List 當中
再透過選取欄位與設定欄位型態的方式
將該欄位的值取出來, 然後再進行修改
整個過程用不到 1 分鐘!!
雖說原文講是給 6.5 使用的, 那廣大的 R5 愛用者怎麼辦
其實只要將 REM {}; 的部份改成 REM ""; 就可以在 R5.09 使用了!!
最好是將它放在 Agent 中透過動作功能表來使用, 記得要設定為 "執行一次可能會用到 @Command".
FORMULAModifying document item valuesBlessan V Philip
03.28.2006
Rating: -4.33- (out of 5)

|
This tip was submitted to the SearchDomino.com tip library by member Blessan P. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.
This Formula Language code can be incorporated into a toolbar button for Lotus Notes client 6.5. When a database document is selected and the button is clicked, all item values will be displayed in a pop-up.
Follow these steps to change selected item values: REM {Get a listing of all the fields on the current document};
List := @DocFields;REM {Possible data types to choose from.};
DataTypes := "Text" : "Date" : "Integer" : "Password" :
"Name" : "Common Name" : "Remove Field" :
"Text Multi Value" : "Date Multi Value" : "Integer Multi Value"
: "Name Multi Value" : "Common Name Multi Value";REM {Prompt for which field needs to be updated.};
EditField := @Prompt( [OkCancelList] ; "Select a field to alter" ;
"Select the field you wish to alter:" ; "CustomerReply" ; List );REM {Prompt for which data type you would like the data to be};
REM {This needs to be done before value prompt to
determine if the Picklist or any prompting needs to be used.};
DataType := @Prompt( [OkCancelList] : [NoSort] ;
"data type or action for field: " + EditField ;
"Please Select the correct data type or action for field:
" + EditField ; "Text" ; DataTypes );REM {Based on what type of data is being entered
different prompts will happen if any at all.};
RawValue := @If( @Contains( DataType ; "Name Multi Value" );
@PickList( [Name] ); @Contains( DataType ; "Name" ) ;
@PickList( [Name] : [Single] ); DataType = "Remove Field" ; "" ;
@Contains( DataType ; "Multi Value" ); @Prompt( [OkCancelEdit] ;
"New Value for field: " + EditField ; "Please enter the new desired value for:
" + EditField + " seperated with : for each value." ; @Abstract([TextOnly] ; 254 ;
"" ; @Text( EditField ) ) ); @Prompt( [OkCancelEdit] ;
"New Value for field: " + EditField ; "Please enter the new desired value for: "
+ EditField + "." ; @Abstract([TextOnly] ; 254 ; "" ; @Text( EditField) ) ) );REM {If data conversion doesn't work then don't set field.};
@If( DataType = "Date" ; @If( @SetField( EditField ;
@TextToTime( RawValue ) ) ); DataType = "Integer" ;
@If( @IsError( @TextToNumber( RawValue ) ) ; "" ;
@SetField( EditField ; @TextToNumber( RawValue ) ) ) ;
DataType = "Common Name" ; @SetField( EditField ;
@Name( [CN]; RawValue ) ) ; DataType = "Password" ;
@SetField( EditField ; @Password( RawValue ) ) ;
DataType = "Remove Field" ; @SetField( EditField ; @DeleteField ) ;
DataType = "Text Multi Value" ; @SetField( EditField ;
@Explode( RawValue ; ":" ) ) ; DataType = "Date Multi Value" ;
@SetField( EditField ; @TextToTime( @Explode( RawValue ; ":" ) ) ) ;
DataType = "Integer Multi Value" ; @If( @IsError
( @TextToNumber( @Explode( RawValue ; ":" ) ) ) ; "" ;
@SetField( EditField ; @TextToNumber(@Explode( RawValue ; ":" ) ) ) ) ;
DataType = "Name Multi Value" ; @SetField( EditField ;
@Explode( RawValue ; ":" ) ) ; DataType = "Common Name Multi Value" ;
@SetField( EditField ; @Name( [CN]; @Explode( RawValue ; ":" ) ) );
@SetField( EditField ; RawValue ) ); ""
Do you have comments on this tip? Let us know.
Related information from SearchDomino.com:
Formula Language Learning Guide
Tip: Formula lookup for large domains
Reference Center: More Formula tips and resources |
1/11/2006
這一篇文章蠻具啟發性的, 在每支執行完後去記錄執行的時間
然後再安排一支 Agent 每 12 小時檢查一次看 Agent Log 所記錄的執行狀況
來判斷該 Agent 是否執行正常
這可以讓一些重要的 Agent 不會因為不正常的因素沒有執行
而導致系統發生錯誤
蠻值得參考
但有個問題是若檢查的 Agent 本身也沒有執行呢?
Domino Tips: |
 |
|
|
|
|
 |
 AGENT Monitoring scheduled agents by e-mail Andrew Broxholme 01.03.2006 Rating: -3.50- (out of 5)

|
This tip was submitted to the SearchDomino.com tip library by member Andrew Broxholme. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.
In one of our larger applications, there are a number of critical scheduled agents that update data in the application from a back-end relational database. If the connection is lost, or the Lotus Notes database is down, the agents don't run to completion. Agent logs report all activity, but you have to open the logs to check for problems.
Recently the data server failed for an extended period and the logs weren't checked. This led to no updates for 48 hours, until the users noticed and reported the problem to our help desk.
It wasn't a problem to fix the connection and get everything running. But the situation prompted me to write some basic code to e-mail me if the Notes/Domino agents I was most interested in had not run for more than 12 hours.
Monitoring scheduled agents by e-mail involves a procedure that you insert at the end of each agent you want to monitor. This updates a keyword document in the application. You then add another scheduled agent, which runs every 12 hours/every day ,and checks when the agents last ran. If the agents haven't run, then an e-mail is sent to the administrator advising them to check the application and activity logs to see what is going on.
I have included the code for the subroutine which used the existing application keyword form, and a simple agent to check that at least one of the agents have run in the last 12 hours.
Sub logAgentCompletion(agentName As String)
Dim s As New notesSession
Dim db As notesDatabase
Dim view As notesView
Dim doc As notesDocument
Dim item As NotesItem
Set db = s.currentdatabase
Set view = db.getView("vAllKeywords")
Set doc = view.getDocumentByKey("Last Run of " & agentName, True)
If Not doc Is Nothing Then
' Update the last agent run date and the comments field with the agent name
doc.values = Now
doc.save True, False
Else ' If the document can't be found, create another
Set doc = db.createDocument
doc.form = "Keyword"
' Have to use ReplaceItemValue because doc.Key is dissallowed (reserved word)
Set item = doc.ReplaceItemValue( "Key", "Last Run of " & agentName)
doc.values = Now
doc.save True, False
End If
End Sub
The Agent that scans the agent keyword records:
Sub Initialize
Dim s As New notesSession
Dim db As notesDatabase
Dim view As notesView
Dim collection As notesDocumentCollection
Dim doc As notesDocument, mailDoc As notesDocument
Dim checkDate As New notesDateTime(Now)
Dim lastRunDate As notesDateTime, docDate As notesDateTime
Dim msgStr As String
Call checkDate.AdjustHour(-12)
Set db = s.currentDatabase
Set view = db.getView("vAllKeywords")
Set collection = view.getAllDocumentsByKey("Last Run of")
If collection.count > 0 Then
Set doc = collection.getFirstDocument
While Not doc Is Nothing
If Isdate(doc.values(0)) Then
Set docDate = New notesDateTime(doc.values(0))
' Find the most recent date that the tracked agents ran
If Not lastRunDate Is Nothing Then
If docDate.lsLocalTime > lastRunDate.lsLocalTime Then
Set lastRunDate = New notesDateTime(doc.values(0))
End If
Else
Set lastRunDate = New notesDateTime(doc.values(0))
End If
End If
Set doc = collection.getNextDocument(doc)
Wend
' Send message to system administrator if no activity in last 12 hours
If lastRunDate.lsLocalTime < checkDate.lsLocalTime Then
Set mailDoc = New NotesDocument(db)
mailDoc.Form = "Memo"
mailDoc.SendTo = "Andrew Broxholme/Sutton/Security/UK/Corporate"
mailDoc.Subject = "Alert - OMS Agent's are not running"
mailDoc.body = "The last time that one of the tracked OMS agents ran was " & lastRunDate.lsLocalTime
mailDoc.SaveMessageOnSend = False
Call mailDoc.Send(False)
Else ' Temporary code, can be commented out once we know tracking is working OK
Set mailDoc = New NotesDocument(db)
mailDoc.Form = "Memo"
mailDoc.SendTo = "Andrew Broxholme/Sutton/Security/UK/Corporate"
mailDoc.Subject = "OMS Agent's running are OK"
mailDoc.body = "The last run time for the tracked OMS agents ran was " & lastRunDate.lsLocalTime
mailDoc.SaveMessageOnSend = False
Call mailDoc.Send(False)
End If
Else ' If no keyword tracking documents then send alert
Set mailDoc = New NotesDocument(db)
mailDoc.Form = "Memo"
mailDoc.SendTo = "Andrew Broxholme/Sutton/Security/UK/Corporate"
mailDoc.Subject = "Alert - OMS Agent's are not running"
mailDoc.body = "No agent activity keywords detected in " & db.title
mailDoc.SaveMessageOnSend = False
Call mailDoc.Send(False)
End If
End Sub
| |