http://knowledgewithoutlimitation.blogspot.com 2014-12-28 ~ Ilmu Tanpa Sempadan

Open Source, Delay Tolerant Network, Internet of Things

The Most Popular Traffic Exchange
EasyHits4U.com - Your Free Traffic Exchange - 1:1 Exchange Ratio, FREE Advertising!

Share Your Web Link Here

Saturday, January 3, 2015

6.1.2 Expected Outcome

Expected outcome from this test as per below:
i)              Registration page accessibility: Email account registration page can be access from online mail server local area network and from the internet.
ii)             User registration: New email account which is offlineA, offlineB successfully created from online mail server local area network and onlineC and onlineD successfully created from the internet.

iii)              Email account access: All email accounts which are offlineA, offlineB, onlineC and onlineD can be access from the online mail server local area network, from the internet and from the offline mail server local area network after database synchronization.

Friday, January 2, 2015

6.1 New Account Registration Test

            New account registration test carried out at online mail server and internet. Sample user offlineA and user offlineB new account registration performed at the local online mail server while sample user onlineC and user onlineD new account registration performed through the internet which is outside of the local network as shown in Figure 6.1. Then account synchronization test carried out to ensure all the account can be accessed at the offline mail server, online mail server and through the internet.
New Email User Registration
New Email User Registration

Figure 6.1: New Email User Registration

6. SYSTEM TEST

6.     SYSTEM TEST

     In this chapter, the offline email system is tested and the result is discussed. The system test started with new account registration test, connectivity test, delay test, limitation of infomediary device movement speed while passing by the server computer, the size of data test, types of data test, multiple of senders and receivers test and multiple of communications test.

Thursday, January 1, 2015

Happy New Year 2015

Happy new years visitors. Thanks for coming and keep on posting comments. With very best wishes to you all, good luck in the future and have a happy days. Here is a very nice brief technologies stories of last 2014 from Amanz.


Monday, December 29, 2014

5.5 Summary


            In this offline email system, server computer is responsible holding the mail server, webmail client which is running on a Web server application and the database synchronization application. External IP address access with a dynamic IP problem was solved with DtDNS and an automatic Cron job scheduler. Database synchronization approach is implemented to enable email data flow through infomediary device and bridging the no end-to-end network of offline server computer and online server computer. The GUI is implemented for an easy access and control of the respective applications in this offline email system. System test is discussed in the next chapter.

5.4.9 System Control Graphical User Interface (GUI)

            There are three main system controls identified for this thesis project offline email system which are a server computer, mail server and database synchronize as shown in Figure 5.7. Server computer status can be viewed through Uniform Server system tray menu. The server computer Status button is an additional option as an alternative to view the networking status of the server computer. Exit button is to close the System Control Graphical User Interface and did not affect server computer, mail server and database synchronize operation. Server computer system control was executed through a batch file. Server computer application script configured and placed in a Uniform Server folder.
Pemail system control Graphical User Interface (GUI)
Pemail system control Graphical User Interface (GUI)
Figure 5.7: Pemail system control Graphical User Interface (GUI)
            There is a single central control architecture for Uniform Server which is located in folder UniServer\unicon\main. All server control requests such as Unitray, batch files and Apanel are passed to this core for processing. The advantage of this core control is to reduce external scripts complexity. These core controls consist of four Command-line interface (CLI) scripts. CLI is a mean of interaction in the form of lines of text (command line) to issue a command to the program. These CLI scripts are split into two parts which are standard program and service. Standard program part has files for start-stop while service part has files install-uninstall service respectively. Apache and MySQL are a tracker file controlling the interaction between standard program part and service part as shown in Figure 5.8. 
Uniform Server Core Control
Uniform Server Core Control
Figure 5.8: Uniform Server Core Control
Start batch script (Start_Server.bat) implemented as shown in Table 5.15 and Stop batch script (Stop_Server.bat) as shown in Table 5.16.
@echo off
cls
COLOR B0
mode con:cols=65 lines=20
TITLE UNIFORM SERVER - Start

rem ###################################################
rem # Name: Server_Start.bat
rem # Created By: The Uniform Server Development Team
rem # Edited Last By: Mike Gleaves (ric)
rem # V 1.0 28-6-2009
rem ###################################################

rem ### working directory current folder
pushd %~dp0

usr\local\php\php.exe -n  unicon\main\start_servers.php 19

Start.exe
rem ..\unicon\program\unidelay.exe 10
rem pause

rem ### restore original working directory
popd

exit
Table 5.15: Offline Server Computer Start script (Start_Server.bat)
            Both script parameters for start_servers.php and stop_servers.php line configured with binary code 19 which include the control server for Apache, Mysql and Cron as reference to Uniform Server Binary Codes shown in Figure 5.1. "Start.exe" line is to start the UniTray while "unicon\program\unidelay.exe 10" line gives a ten second delay to allow text to be read [21].
@echo off
cls
COLOR B0
mode con:cols=65 lines=20
TITLE UNIFORM SERVER - Stop

rem ###################################################
rem # Name: Stop_Server.bat
rem # Created By: The Uniform Server Development Team
rem # Edited Last By: Mike Gleaves (ric)
rem # V 1.0 28-6-2009
rem ##################################################

rem ### working directory current folder
pushd %~dp0

usr\local\php\php.exe -n  unicon\main\stop_servers.php 19

rem ..\unicon\program\unidelay.exe 10
rem pause

rem ### restore original working directory
popd

exit
Table 5.16: Offline Server Computer Stop script (Stop_Server.bat)
Mail server application script implemented as shown in Table 5.17. Both scripts which are “start_hmailserver.bat” and “stop_hmailserver.bat” placed in a mail server folder such as “…PEmailOffline\hMailServer\Bin”.
CLI script
Script filename
net start hmailserver
exit
start_hmailserver.bat
net stop hmailserver
exit
stop_hmailserver.bat
Table 5.17: Mail Server Start and Stop script

“Database Synchronize” start button will execute real-time synchronization application, “RealtimeSync.exe” which is located in a database synchronization application folder such as “…PEmailOffline\FreeFileSync”.

5.4.8 Database Synchronization Application

            There are two database storage devices involve in each synchronization process which are between server computer and infomediary device. The process of the database synchronization is the same on both offline server computer and online server computer. Infomediary device acted as a data mule where later on, the database storage being synchronized with the server computer. Both side synchronization performed by the database synchronization application. FreeFilesync version 4.6 used as a database synchronization application and running on a server computer. Samba File sharing application bridged the data flow between server computers and infomediary device. Server computer synchronization discussed in Part A and infomediary device discussed in Part B.

Part A: Server Computer Synchronization           
            Offline server computer and online server computer configured identically for the database synchronization purpose. FreeFilesync installed as “Portable” to respective location such as “C:\PEmailOffline\FreeFileSync” to enable the application mobility features where it can be transfer and use on other machine. These options remove dependencies on a dedicated computer and enable the portable database synchronization.
Following the configuration in Part B, infomediary device can be accessed by opening “Windows Explorer” and entering location path such as “\\data mule”. Accessing this path for the first time will require the username and password as per configuration on infomediary device.  Windows XP automatically store logon information for network locations. This stored username and password can be edited later from the user accounts menu in windows control panel. When infomediary device is connected to the server computer network, the server computer automatically have access to the infomediary device network sharing path. New folders to stored email data for database synchronization created in infomediary device network sharing path such as “\\data mule\share2\”. Two email data path for storing mail server data and web server data which are required for database synchronization created in infomediary device storage as the example shown in Table 5.12.

\\data mule\share2\pemailsync\UniServer\pemail
\\data mule\share2\pemailsync\hMailServer\Data
Table 5.12: Infomediary Device Data Synchronization Folder

Mail data will be stored in this location in infomediary device each time database synchronization process occurs. Email data path for storing mail server data and web server data which are required for database synchronization at the server computer configured in the FreeFilesync application as the example shown in Table 5.13.

C:\PEmailOffline\UniServer\usr\local\mysql\data\pemail
C:\PEmailOffline\hMailServer\Data
Table 5.13: Mail Server Data Synchronization Folder

Email data paths in the server computer configured in the left side of FreeFilesync while email data path for the infomediary device configured in the right side of FreeFilesync as shown in Figure 5.4.

FreeFileSync Database Synchronization Path
FreeFileSync Database Synchronization Path

Figure 5.4: Database Synchronization Path
Comparison settings for “compare” is configured to “File Content” and “synchronize” is configured to “Automatic”. File data comparisons can be performed manually by using the “Compare” button and file data synchronization can be performed manually by using the “Synchronize…” and “Start” button. Both files data comparison and synchronization function can be executed with a particular setting by using a batch job. A batch job is a set of programs processed with a sequence of commands to be executed listed in a file which often called a batch file. This sequence of commands executes as a single unit job. A batch job is useful for automatic file synchronization. Batch job created with the same configuration where the “Compare” configured to “File Content” and “Synchronize…” configured to “Automatic”. Batch Settings configured with “Show progress log” enable and “Error handling” configured to “Ignore errors”.
Batch job saved as “SyncJobOffline.ffs_batch” in C:\PEmailOffline\FreeFileSync. Mail server data and web server data paths that need to be monitor configured in RealtimeSync as the example shown in Figure 5.5.
FreeFileSync Realtime Synchronize Setting
FreeFileSync Realtime Synchronize Setting

Figure 5.5: Realtime Synchronize Setting
“StartFFS.bat” configured in “command line” section. The program will run when “Start” button clicked, and remain idle in the system tray. Whenever any changes made on these respective paths or when all paths are available will trigger data synchronization process command line script, “StartFFS.bat”. Table 5.14 shows the batch script for “StartFFS.bat”. "FreeFileSync.exe SyncJobOffline.ffs_batch" line will execute File Synchronization application, FreeFileSync with a batch job setting "SyncJobOffline.ffs_batch".
"start C:\PEmailOffline\hMailServer\DataDirectorySynchronizer.exe" will execute hMailServer Data Directory Synchronizer. This tool checks all message files in the data folder and search files with extension .eml. HMailServer will insert the message into user account if any .eml file found in the user directory and  the message will be inserted into the delivery queue if the .eml file found in the Data root directory [30]. “C:\PEmailOffline\UniServer\unicon\program\unidelay.exe 20" line gives a twenty second delay to allow text to be read. Both hmailserver and Uniserver need to be restarted for the mail database synchronization update. "start C:\PEmailOffline\hMailServer\Bin\stop_hmailserver.bat" line will stop the hmailserver service and "start C:\PEmailOffline\UniServer\Stop_Server.bat" line will stop Uniserver service. "start C:\PEmailOffline\UniServer\Start_Server.bat" line and "start C:\PEmailOffline\hMailServer\Bin\start_hmailserver.bat" line will start the hmailserver service and Uniserver service.
FreeFileSync.exe SyncJobOffline.ffs_batch
start C:\PEmailOffline\hMailServer\DataDirectorySynchronizer.exe
C:\PEmailOffline\UniServer\unicon\program\unidelay.exe 20
start C:\PEmailOffline\hMailServer\Bin\stop_hmailserver.bat
start C:\PEmailOffline\UniServer\Stop_Server.bat
C:\PEmailOffline\UniServer\unicon\program\unidelay.exe 10
start C:\PEmailOffline\UniServer\Start_Server.bat
start C:\PEmailOffline\hMailServer\Bin\start_hmailserver.bat
Table 5.14: StartFFS.bat Script
Part B: Infomediary Device
            Samba File sharing used for data receiving applications from the server computer. Infomediary device which is an android phone connected to the Wi-Fi access point of offline server computer or online server computer to perform mail database synchronization. When a network connection is established, Samba File sharing application will show “network fileshare” status as “disabled-not running” for the first time running. Samba File sharing application preference configuration for password, username, Workgroup name, NetBIOS name configured accordingly as the example shown in Figure 5.6. Second Shared Folder selected under “Other File share Settings” since the database will be stored in the external SD card. External SD card is used because it offers larger storage size up to 32GB.
Android Samba File Sharing
Android Samba File Sharing

Password:
Username: SDCARD
Workgroup: SDKCH (Should be the same as server computer Workgroup)
NETBIOS Name: data mule
Figure 5.6: Samba File sharing application configuration
Samba File sharing application can be configured to stay connected mode. This mode available under “Wake Locks” menu with the available option which is “Screen Wake Lock”, “Wi-Fi Wake Lock” and “Multicast Lock”. This is useful to ensure the Wi-Fi stay active and connected as soon as the respective Wi-Fi access point (AP) available the in infomediary device networking range. New folder such as “pemailsync” created in “\\data mule\share2\” to store mail server data and web server data.

Sunday, December 28, 2014

5.4.7 Related Data for Synchronization

5.4.7 Related Data for Synchronization


             Related data that need to be synchronized is mail server data and web server data. Mail server data contain the pending email data that need to be synchronized. This email data consists of a folder named with the email domain name, folders named based on email username and email messages in a ".eml" format. This email message contains the full message headers, DomainKeys Identified Mail (DKIM) Signature and full Multipurpose Internet Mail Extensions (MIME) encoded message content. Email message consists of three main components which is message envelope, message header and the message body. Full message headers formed by message envelope header and message header. The message envelope header contains a delivery parameter such as sender and receiver email address. This data used by SMTP for transporting email messages. Message header structured into fields such as From, To, CC, Subject, Date, and other information about the email [19]. DomainKeys Identified Mail (DKIM) Signature provides a method for validating a domain name identity that is associated with a message through cryptographic authentication [29]. Message body uses a MIME version 1.0 format. MIME redefines the format of messages to allow textual message bodies in character sets other than US-ASCII, an extensible set of different formats for non-textual message bodies, multi-part message bodies and textual header information in character sets other than US-ASCII [25].

            Web server data contain the webmail client MySQL database. This MySQL database stores the user login details, email messages and email settings. Whenever new user was registered, the new complete transaction of email messages and new updated email settings will be stored in this MySQL database.