Proxy program under Domino9 implements email notification for Email users' internet password expiration emails

Source: Internet
Author: User

Proxy program under Domino9 implements email notification for Email users' internet password expiration emails

Proxy program under Domino9 implements email notification for Email users' internet password expiration emails

We all know that there are two user passwords in Domino, one is the notes client password) and the other is the internet password inotes). The difference between the two passwords is not described in detail here, today, we will mainly introduce how long it takes to use a proxy program and set a scheduled proxy to run once a day to determine whether or not your internet password has expired, then, the user will be reminded to change the internet password by email;

Previously, I wrote a domain Password Expiration email reminder in this document. This feature is executed through the vbs script and then executed by defining scheduled tasks.

My server policy can be modified to a maximum of 180 days.

650) this. width = 650; "title =" clip_image002 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/140207/214G25K8-0.jpg "height =" 364 "/>

Environment Introduction:

I. Environment Introduction:

Hostname: iio-dc.iiosoft.com

Ip: 10.1.1.254

Domain: iiosoft.com

Roles: DC, dns, dhcp

Hostname: iio-mail01.iiosoft.com

Ip: 10.1.1.11

Roles: Domino9 server

Hostname: iio-mail02. iiosoft.com

Ip: 10.1.1.12

Roles: Domino9 server

Two Domino servers

To ensure the consistency of the current architecture, we recommend that you create blank databases and add programs here .), Then create a new proxy program. Because I have created a new blank database and the Chgupwd. nsf database, I will create a new proxy on this database-determine whether the user's internet has expired;

2. Our idea is to create a separate database, and then create a proxy and form on the database. Of course, you can also directly go to names. the nsf database is operated directly, but this is not safe. Therefore, we recommend that you operate it on a separate database;

Here we use desinger to create a new database. For details, see:

Use the desinger console ---- file --- application --- New

This operation can also be created through the names. nsf console in the same way. After creation, you only need to open it through desinger;

650) this. width = 650; "title =" clip_image003 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image003 "src =" http://www.bkjia.com/uploads/allimg/140207/214G2M58-1.png "height =" 278 "/>

Create a database named ChgUpwd. nsf with an empty type

650) this. width = 650; "title =" clip_image004 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/140207/214G22c7-2.png "height =" 319 "/>

650) this. width = 650; "title =" clip_image005 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image005 "src =" http://www.bkjia.com/uploads/allimg/140207/214G24054-3.png "height =" 353 "/>

Alias: TimeSendMainAgent

Note: regularly determines the password expiration time to send emails

650) this. width = 650; "title =" clip_image007 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image007 "src =" http://www.bkjia.com/uploads/allimg/140207/214G2N52-4.jpg "height =" 303 "/>

Dim session As NotesSessionDim db As NotesDatabaseDim doc As NotesDocumentDim namesdb As NotesDatabaseDim namesdoc As NotesDocumentDim namesview As NotesViewDim username AsString

650) this. width = 650; "title =" clip_image009 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image009 "src =" http://www.bkjia.com/uploads/allimg/140207/214G260P-5.jpg "height =" 355 "/>

Sub Initialize On Error GoTo err_handle Dim flag As Boolean Dim mstring As String Dim arr As Variant Dim maildoc As NotesDocument Dim dt As NotesDateTime Dim dtnow As NotesDateTime Dim dfdaystime As Long Dim ritem As scheduled session = New NotesSession Set db = session. currentdatabase Set doc = session. documentcontext Set namesdb = New NotesDatabase ("", "names. nsf ") If Not namesdb. isopen Then MsgBox "You do not have permission to modify. Please contact the Administrator" Exit sub End If Set namesview = namesdb. getview ("People") Set namesdoc = namesview. getfirstdocument () While Not namesdoc Is Nothing 'namesdoc. HTTPPasswordChangeDate = Now Set dtnow = session. createdatetime (now) dtnow. setnow If namesdoc. HTTPPasswordChangeDate (0) <> "Then Set dt = session. createdatetime (namesdoc. HTTPPasswordChangeDate (0) username = namesdoc. shortName (0) MsgBox "username =" + username dfdaystime = dt. timedifference (dtnow) MsgBox dfdaystime/86000 If dfdaystime/86000 <30 Then If Trim (namesdoc. internetAddress (0) <> "Then Set maildoc = New NotesDocument (db) maildoc. form = "Memo" maildoc. subject = "Email Password Expiration reminder" maildoc. sendto = namesdoc. internetAddress (0) maildoc. principal = "is@iiosoft.com" Set ritem = New NotesRichTextItem (maildoc, "body") Call ritem. appendtext (username + "your password will expire in" + CStr (cint (dfdaystime/86000) + "Days Later") Call ritem. addnewline (1) Call ritem. appendtext ("change as follows") Call ritem. addnewline (2) Call ritem. appendtext ("changed password will take effect in 5 minutes") Call ritem. addnewline (2) Call ritem. appendtext ("if you have any questions, please contact is") Call ritem. addnewline (2) 'maildoc. body = "your email password will expire in 30 days. Please use http://changepass.beyondsoft.com.iiosoft.com . Well, "Call maildoc. send (false) End if End If % REM is Set to 180 days, if the current time minus 30 days, and the password change time % end rem Set namesdoc = namesview. getnextdocument (namesdoc) Wend Exit Suberr_handle: MsgBox session. currentdatabase. filepath + session. currentagent. name MsgBox Error MsgBox Erl End Sub

650) this. width = 650; "title =" clip_image011 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image011 "src =" http://www.bkjia.com/uploads/allimg/140207/214G22409-6.jpg "height =" 355 "/>

The most important thing is the reminder content. Theme:

Maildoc. subject = "Email Password Expiration reminder" maildoc. sendto = namesdoc. internetAddress (0) maildoc. principal = "is@iiosoft.com" Set ritem = New NotesRichTextItem (maildoc, "body") Call ritem. appendtext (username + "your password will expire in" + CStr (cint (dfdaystime/86000) + "Days Later") Call ritem. addnewline (1) Call ritem. appendtext ("change as follows") Call ritem. addnewline (2) Call ritem. appendtext ("changed password will take effect in 5 minutes") Call ritem. addnewline (2) Call ritem. appendtext ("if you have any questions, please contact is") Call ritem. addnewline (2)

Define proxy attributes and execute them regularly

650) this. width = 650; "title =" clip_image013 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image013 "src =" http://www.bkjia.com/uploads/allimg/140207/214G260P-7.jpg "height =" 366 "/>

I set the timing and execute it once a day based on my actual environment), and execute it once at every day.

650) this. width = 650; "title =" clip_image015 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image015 "src =" http://www.bkjia.com/uploads/allimg/140207/214G224J-8.jpg "height =" 356 "/>

After the setting is successful, we can check the agent running status on the console, run successfully, and determine that three user passwords are about to pass, and send the email reminder content to the corresponding user, next, let's check the information after the user receives the email.

650) this. width = 650; "title =" clip_image017 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image017 "src =" http://www.bkjia.com/uploads/allimg/140207/214G2IO-9.jpg "height =" 353 "/>

We opened gavin's mailbox and found that we received an email,

650) this. width = 650; "title =" clip_image019 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image019 "src =" http://www.bkjia.com/uploads/allimg/140207/214G21I6-10.jpg "height =" 201 "/>

The email says that the gavin password will expire in 30 days. Modify the password. You can deploy the modified content based on your actual environment.

650) this. width = 650; "title =" clip_image021 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image021 "src =" http://www.bkjia.com/uploads/allimg/140207/214G25J5-11.jpg "height =" 206 "/>

650) this. width = 650; "title =" image "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/140207/214G21603-12.png "height =" 212 "/>

This article from "Gao Wenlong" blog, please be sure to keep this source http://gaowenlong.blog.51cto.com/451336/1355292

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.