Friday, March 11, 2011

How to use NRPC to sent mail to other Domain

ใน Domino ถ้ามีการส่ง Mail ระหว่างกันใน Domain เดียวกัน ตัว domino จะใช้ port NRPC ในการรับส่งแมลล์ระหว่างกัน(หมายถึงคนละ Server ที่อยู๋ใน domain เดียวกัน or Server เดียวกันใน domain เดียวกัน)

สิ่งที่ต้องทำมี 3 อย่าง
1 Cross certify
2 Direstory assisntant
3 Connection document


1 Cross certify
ในการจะทำ Cross เราต้องมี cert.id(ตัว Qrganization.ID) ของอีกฝั่งก่อน ซึ่งสามารถทำได้โดยการไป Copy มาหรือ จะส่ง เมลล์มาให้กันก็ได้















ไปที่ tab configuraion แล้วเลือก ตามรูปภาพ
















จากนั้นให้ Browse ไปที่ cert.id ของฝั่งเราแล้วมันจะ promtp ถาม password ของเรา

















จากนั้นให้ใส่ Cert.id ของใงตรงข้ามเพื่อทำการ Cross certify


















จากนั้นมันจะแสดงลายละเอียดของ Certify ของServer อีกฝั่ง

















จากนั้นเราจะได้ Certify ของฝั่งตรงข้ามมา



Directory Assisntant
เราต้องมี names.nsf ของใงตรงข้ามก่อน ทำไดโดยการ Coppy nsmes.nsf ของฝั่งตรงข้ามมา
ไว้ที่ server ของฝั่งเร
















เริ่มจากการ สร้าง DA.nsf(database)

















จากนั้นเป็นการ Add names.nsf ของฝั่งตรงข้ามเข้าไปใน Da.nsf


















ตั่งชื่ออะไรก็ได้ แต่ห้ามซ้ำกับ ของฝั่งเรา

















coppy link ของ Database names.nsf ของใงตรงข้ามทำได้ด้วยการ เปิด Database ของ names.nsf ของฝั่ง serverอื่นขึ้นมาแล้วไปที่ Menu Edit เลือก Copy as link -> application link

















จากนั้นไป ที่ tab configuration เลือก ชื่อ Server ของฝั่งเราเพื่อเข้าไปทการ Add Da.nsf เข้าไปที่ document

















Conection Document
เป้นการสร้างการเชื่อมต่อเพื่อ Connec ไปยังServer อีกตัวผ่านทาง port Nrpc
















ไปที่ tab configuration แล้ว ทางด้านซ้ายเลือก Ceonnection

















Source server และ Source ใส่ server แล้ว doman ฝั่งเรา เลือก port เป็น TCPIP
Destination Server แล้ว Destination Domainใส่ server แล้ว domain ของฝั่งตรงข้ามเข้าไป

Thursday, March 10, 2011

How to configure additionnal server in Domino

Additionnal server เป้นวิธีการสร้าง Server ภายใน domainเดียวกัน







Tuesday, March 8, 2011

How to config domino to sent mail from smtp

ในการจะทำการส่งเมลล์ ระหว่าง Domain ต้องทำการส่งเมล ผ่าน Protocal SMTP ซึ่งต้องมาทำการ Enable Protocal SMTP ใน DominoAdmin ก่อน














Sunday, August 8, 2010

Basic Python Server Page

Basic Python Server page
1.install appserve-win32-2.5.9 and download appserv program from http://www.appservnetwork.com
how to Install appserve Click
2.install Python2.5 and download form Click
3.install mod_python for python2.5 and apache2.2
Download mod_python program Click
Edit httpd.comf value from C:\AppServ\Apache2.2\conf ,then add code in line 156 like this.



#Python
LoadModule python_module modules/mod_python.so
AddHandler mod_python .psp .psp_
PythonHandler mod_python.psp
PythonDebug On
AddType application/x-httpd-psp .psp

Restart your computer for restart your Apaceh

4.Extract MySQL for Python to C:\AppServ\Apache2.2. for connect database. Download MySQL for Python Click

PSP has Two types
1. <%
#code python
%>
Code represents the Python source code that drives the logic of how the final output is produced. It's enclosed in markers.
2. <%
#code python
%>
An expression is Python code whose resulting string representation becomes part of the final output. They are enclosed in markers.


Basic Source Code


html:
<form name="form1" method="post" action="">
Name :
<input name="fname" type="text" >
<input type="submit" name="Submit" value="OK">
</form>
Python:
<%
#ค้นหาkey ที่ตรวจสอบ
if form.has_key('fname')and form['fname'].value !="":
 greet = "Hello Mr." + form['fname'].value
else:
 greet = 'Plz input'
#ต้องเว้นไว้1บรรทัดเพราะอะไรก็ไม่รู้ไม่งั้นไม่เช้า If else
%>
<h1><%= greet %></h1>

เขียนผ่าน Text editer แล้วเซ็ฟเป็นนามสกุล .PSP เช่น Test.psp เซ็ฟใน .....
ทดสอบการใช้งานโดยเรียกผ่าน http://localhost/test.psp



Example Sendding information between form and database.

create a database python
create a table python
this table is having fields accout,password,email
user id "root" and password "Qwerty07" are set to access to python

Create form.html for insert data,then forward data to pushpop.psp

Source code form.html


<HTML>
<BODY>
<table>
<form method = "post" action ="pushpop.psp">
<tr> <td>Accout </td><td><INPUT TYPE="text" NAME="accout"></td></tr>
<tr><td>Password </td><td><INPUT TYPE="password" NAME="password"></tr>
<tr><td>Email </td><td><INPUT TYPE="text" NAME="email"></tr>
<tr><td></td><td><INPUT TYPE="submit" name = "submit" value ="submit"></td></tr>
</form>
</BODY>
</HTML>


Source code pushpop.psp



<%
import mod_python,MySQLdb

def insert(accout,password,email):
 conn = MySQLdb.connect("localhost","root","Qwerty07","python")
 cursor = conn.cursor()
 sql = "insert into python Value('%s','%s','%s')"%(accout,password,email)
 resultExe = cursor.execute(sql)
 cursor.close()
 return resultExe

if form['accout'].value != "":
 insert(form['accout'].value,form['password'].value,form['email'].value)
 greet = 'Insert complete User '+form['accout'].value
else:
 greet = "Plase insert information to complete"

%>
<%= greet %>