Domino 9 und frühere Versionen > Administration & Userprobleme
Internetdomaine ändern
(1/1)
FRIGO:
Hallo zusammen,
wir haben einen Kunden der seine Internetdomain von müller.de auf schmitz.de geändert hat. Jetzt stehen natürlich alle User mit der Mailadresse @müller.de im Lotus. Gibt es einen einfachen Weg dies zu ändern? Oder brauche ich "nur" im Personendokument die Mailadresse
ändern?
Driri:
Da gibt es meines Wissens drei Punkte, das hängt ein wenig von der Konfiguration ab :
1) Globale Domäne auf dem SMTP - Konvertierungen
2) Personendokumente - Internetadresse
3) Arbeitsumgebung - Internetadresse
Das wird je nach Konfig von unten nach oben abgearbeitet. D.h. es wird erstmal die Adresse aus der AU gezogen, gibt es dort keine die aus dem Personendokument, gibt es dort auch keine, wird eine anhand der Einstellungen in der globalen Domäne erzeugt.
eknori:
Ich bin gerade dabei, das in unserem Unternehmen durchzuführen.
Um mir die Arbeit ein wenig zu erleichtern, habe ich mir Scripte geschrieben, die die Arbeit quasi automatisch erledigen.
Das folgende Script kommt in das datenbankscript des Mailtemplates; die Funktion wird im PostOpen aufgerufen.
Die Funktion zieht sich u.a. die neue InternetMailAdresse des Users und aktualisiert das AU.
--- Code: ---Function UpdateUsersLocationDocument()
Dim session As New NotesSession
Dim dbCurrent As NotesDatabase
Set dbCurrent = session.CurrentDatabase
Dim viewLocations As NotesView
Dim viewPeople As NotesView
Dim docLocation As NotesDocument
Dim docPerson As NotesDocument
Dim dbNAB As NotesDatabase
Dim dbPAB As NotesDatabase
Dim LocationDocument As String
Dim nnUserName As NotesName
Dim PersonalAddressBook As String
Dim MailFile As String
Dim MailFilePerson As String
Dim success As Variant
'Get the personal address book from the notes.ini and remove any cascaded local address books
PersonalAddressBook = Trim(session.GetEnvironmentString("Names",True))
If Instr(PersonalAddressBook, ",") > 0 Then
PersonalAddressBook = Left$(PersonalAddressBook, Instr(PersonalAddressBook, ",") -1)
Else
If Instr(PersonalAddressBook, ";") > 0 Then
PersonalAddressBook = Left$(PersonalAddressBook, Instr(PersonalAddressBook, ";") -1)
End If
End If
'Get the personal address book, exit if cannot be opened
Set dbPAB = session.GetDatabase("", PersonalAddressBook)
If dbPAB.IsOpen = False Then Goto FinishFunction
'Get the current location document in use, exit if any errors
Set viewLocations = dbPAB.GetView("Locations")
If viewLocations Is Nothing Then Goto FinishFunction
LocationDocument = Trim(session.GetEnvironmentString("Location",True))
If LocationDocument = "" Then Goto FinishFunction
LocationDocument = Left$(LocationDocument, Instr(LocationDocument, ",") -1)
If LocationDocument = "" Then Goto FinishFunction
Set docLocation = viewLocations.GetDocumentByKey(LocationDocument)
If docLocation Is Nothing Then Goto FinishFunction
'Get the Public Address Book from the current server
Set dbNAB = session.GetDatabase(dbCurrent.Server, "names.nsf")
If dbNAB.IsOpen = False Then Goto FinishFunction
'Get the current users person document. Exit if user not in address book
Set viewPeople = dbNAB.GetView("($VIMPeople)")
Set nnUserName = New NotesName(session.UserName)
Set docPerson = viewPeople.GetDocumentByKey(nnUserName.Abbreviated)
If docPerson Is Nothing Then Goto FinishFunction
'Get the name of the mail file from the person document and current database
%REM
MailFile = dbCurrent.FilePath
MailFilePerson = docPerson.MailFile(0)
If Lcase(Right$(MailFilePerson, 4)) <> ".nsf" Then
MailFilePerson = MailFilePerson & ".nsf"
End If
%END REM
' Update the Location Document
docLocation.MailFile = Lcase(docPerson.MailFile(0))
docLocation.MailServer = docPerson.MailServer(0)
docLocation.DirectoryServer = docPerson.MailServer(0)
docLocation.CatalogServer = docPerson.MailServer(0)
docLocation.Domain = docPerson.MailDomain(0)
docLocation.IMailAddress = Lcase(docPerson.InternetAddress(0))
docLocation.WebRetriever = "2"
success = docLocation.ComputeWithForm( False, False )
Call docLocation.Save(True, False)
FinishFunction:
End Function
--- Ende Code ---
Der folgende Agent aktualisiert die Einträge im DominoDirectory. Die "alte" Adresse wird an das Feld FullName angehängt; danach wird die InternetAddress entsprechend geändert.
Erweitertes Script mit Ausschlussmöglichkeiten ( Pröpper, Krosta )
--- Code: ---_oldSuffix:="witte-velbert.de";
_newSuffix:="witte-automotive.de";
@If(!@Contains(@LowerCase(InternetAddress);"proepper":"krosta":"witte-automotive");
@Do(
tmp:= @Implode(FullName;"#");
tmp:= tmp + "#"+ @LowerCase(InternetAddress);
@SetField("FullName";@Explode(tmp;"#"));
@SetField("InternetAddress";@ReplaceSubstring( @LowerCase(InternetAddress) ;_oldSuffix ; _newSuffix))
);
"")
--- Ende Code ---
Folgende "Probleme" sind bei uns aufgetreten:
- die neue Mailadresse wird erst nach dem Neustart des Client wirksam. Beim ersten Öffnen der Maildatei wird die AU angepasst, die Änderungen sind aber erst nach erneutem Öffnen der Mailkachel wirksam.
- die Cache.DSK sollte gelöscht werden. Obwohl das Script im Design der Maildatei vorhanden war, wurde es nicht ausgeführt. Nach dem Löschen der CACHE funktionierte Alles wie vorgesehen.
Wenn du die Scripte so einsetzt, dann sei bitte dem Kunden gegenüber so ehrlich zu erwähnen, wo du dein Wissen her hast ...
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln