Solved

Restrict attachment in Lotus Notes

Posted on 2010-11-07
5
602 Views
Last Modified: 2013-12-18
I need to restrict the ability to attach files to a group of Lotus Notes users.  I would prefer a  notes.ini solution if possible.  Maybe a rule? Validation script?  Pls help.  
0
Comment
Question by:royrubio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 34082378
The only solution that I have seen was based on computed subforms, containing a variant of the same richtext lite field: one with, one without attachments enabled.
That should work for you if you need it for a single custom application. It may not be a good idea if you also need it for mail, document libraries, team room etc. as well.
0
 
LVL 5

Accepted Solution

by:
RonaldZaal earned 500 total points
ID: 34082600
Maybe you can use this < I use a function in the send action or query save or somthing:
Call checkFileExtensions(doc,lang) , this is to check what the user has attached.
You can update the code to check the user / group and or the sort of attachments he/she may send out.

Sub checkFileExtensions(doc As NotesDocument, lang As String)
	Dim i As Integer
	Dim ext As String
	Dim extString As String
	
	Dim profile As NotesDocument
	Set profile = doc.ParentDatabase.GetProfileDocument("nApplicationProfile")
	
	Dim AllowedExtensionsList List As String

' HERE you could use a Notes.INI setting

	Forall e In profile.AllowedExtensions
		AllowedExtensionsList(e) = "1"
		If extString = "" Then
			extString = e
		Else
			extString = extString + ", " + e
		End If
	End Forall
	
	' Fichier à exclure de l'impression	
	Dim filesToExclude List As String
	Forall file In doc.filesToExclude
		filesToExclude(file) = "1"
	End Forall
	
	Dim fileList List As String
	
	i = 0
	
	Forall RTItem In doc.Items
		If RTItem.Type = RICHTEXT Then
			If Isarray(RTItem.EmbeddedObjects) Then
				Forall Object In RTItem.EmbeddedObjects
					If  Object.Type = EMBED_ATTACHMENT Then
						If Not Iselement (filesToExclude(Object.Source)) Then
							
							' Test si l'extension fait partie des extensions autorisées
							ext = Lcase(Strrightback(Object.Source,"."))
							If Not Iselement (AllowedExtensionsList(ext)) Then
								i = i + 1
								fileList(Cstr(i)) = Object.Source
							End If
						End If
					End If
				End Forall
			End If
		End If
	End Forall
	
	' constitue le texte du message
	Dim msgString As String
	Dim msgString_En As String
	msgString = "Le fichier attaché : " + Chr(13)  + Chr(13)
	msgString_En = "The file attached : " + Chr(13)  + Chr(13)
	Forall f In fileList
		msgString = msgString + " - " + f  + Chr(13)
		msgString_En = msgString_En + " - " + f  + Chr(13)
	End Forall
	msgString = msgString + Chr(13) + "n'a pas une extension supportée pour l'impression du dossier CIM"  + Chr(13) + Chr(13)
	msgString = msgString + "Seules les extensions : " + extString + " sont supportées" + Chr(13)
	msgString = msgString + "Vous pouvez remplacer le fichier par un format supporté, par exemple :" + Chr(13)
	msgString = msgString + " - En l'incluant dans un fichier Word" + Chr(13)
	msgString = msgString + " - En le transformant en fichier pdf" + Chr(13) + Chr(13)
	msgString = msgString + "Pour gérer l'exclusion du fichier de l'impression, utiliser le bouton [Outils\Impression dossier CIM ... ] " + Chr(13)
	
	msgString_En = msgString_En + Chr(13) + "is not a supported extension to be printed in the CIM file"  + Chr(13) + Chr(13)
	msgString_En = msgString_En + "Only the file extensions : " + extString + " are supported" + Chr(13)
	msgString_En = msgString_En + "You can change the file by a supported file extension, for example :" + Chr(13)
	msgString_En = msgString_En + " - To include it in a Word document" + Chr(13)
	msgString_En = msgString_En + " - By transforming it into a PDF file" + Chr(13) + Chr(13)
	msgString_En = msgString_En + "To exclude the file from printing, use the button [Tools\Print CIM file ... ] " + Chr(13)
	
	If lang = "En" Then msgString = msgString_En
	
	If i > 0 Then
		Msgbox  msgString , 48 , "Attention" 
	End If
End Sub

Open in new window

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34082612
You might try with TriggerHappy (http://www.openntf.org/projects/pmt.nsf/ProjectLookup/Trigger Happy) to intercept a mail, but I don't know what the possibilities are to modify or even block the mail.

You could also try to develop "the real thing", i.e. an Extension Manager DLL that attaches itself to the mail.box database(s) on your server. It can intercept and alter all mails... but it's not an easy project (read: several months maybe).
0
 

Author Comment

by:royrubio
ID: 34104428
Any more ideas please?
0
 

Author Closing Comment

by:royrubio
ID: 34158068
Not exactly the solution I wanted to know.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question