E-mail is one of the mostly used technologies for both social as well as official communication purposes in the modern world. Most of the time email users face lots of problems regarding email accounts. One of the main problems is the spam mail coming into mail inbox. It fills up the mail inbox unnecessarily thus, it reduces efficiency. The main problem addressed through this project is e-mail addresses getting into the hands of spammers. Meanwhile it will reduce the spam mail coming into email inbox.
The main concept used throughout the project is the disposable email addresses. Currently, Gmail and Yahoo use this concept of disposable email address within their services. But it has not been successful as it has certain limitations. Some other mail services like Guerillamail and 10minutemail provides disposable addresses for a certain time period. Further there are some services Mailinator which provide a separate email inbox with a separate address without a proper authentication, for these spam purposes. Further, currently there are no open source email clients which provide a good spam filtering mechanism. This becomes one of the motivation factors to undertake this project.
The solution is an open source web mail system which provides better spam controlling mechanisms via disposable email addresses. It uses Horde webmail edition as the platform, PHP as the programming language and MySQL as the database technology.
There are two main modules in the system namely, Mail Address Handling Unit and the Main Message Handling Unit. Currently the design of the system has been completed and implementation of the mail address handler is partially done.
Table of Contents
List of Figures/Tables
Chapter 01
Introduction
1.1. Introduction
E-mail or electronic mail with its rich functionalities has become one of the most popular methods of communication in the present world. Currently there are lots of email service providers available. Gmail, Yahoo like services are popular among those services because of their user friendliness and available functionalities. [10] Besides of its advantages, Spam mail has become one of the major problems faced with any email services. Although service providers have provided various anti-spam mechanisms to overcome these problems, they have not always being successful. They have certain tradeoffs between incorrectly rejecting legitimate emails and not rejecting all the spam.
Therefore through this project, 'Multiple e-mail addresses for spam control', it was suggested to develop a web based email system where users are provided with a better spam handling mechanism.
Chapter 1 presents a detailed introduction to the project, providing an explanation on the motivation factors to undertake this project, the background, and the aims and the objectives which the system expects to attain. Further this chapter provides a brief description on the solution for the identified problem. The structure of this dissertation will be explained at the end of this chapter.
1.2. Background and motivation
In current world, email has become one of the main communication mechanisms between people who are geographically dispersed. Moreover communication via internet has become most vital in present business environment and email is one of the commonly accepted protocol. Among the email systems web based email clients provide an anytime anywhere access to send and receive mail providing advantages over desktop email clients. [21] On the contrary, as a common factor, any email system faces the problem of spam mail. Once the email address is released, no one can guarantee that email will not be used for spam purposes. Eventually, inbox will be filled up with unnecessary mails.
Spam mail or junk mail refers to identical electronic mails sent to numerous recipients via email. [14] When inbox get filled with unnecessary emails it will be annoying to filter up necessary things. Because of this most of the email service providers serves its users with filtering mechanism. There users can define certain conditions where emails can be categorized based on sender, subjects, etc. Currently this is a widely used mechanism in filtering mails rather than managing spam mail.
Spammers usually collect email addresses from chat rooms, websites, and newsgroups like repositories where email addresses are maintained. Therefore, once email address is given to one of the websites we cannot guarantee that it is safe from spammers. Therefore the concept of disposable email address came into play where a point to point connection is made between sender and receiver providing a unique address to each user or a user group. [15] If any address gets compromised with email abuse, owner can disable the email address without affecting others.
Currently, Gmail and Yahoo use this concept of disposable email address within their services. But it has not been successful as it has certain limitations. Gmail creates disposable addresses based on actual email address appending some text into it using '+' sign. But those addresses are not accepted as valid email addresses from web sites. Therefore it turned to be fairly worthless creating addresses like that. Yahoo continues to offer disposable email addresses, but they come only with a yearly subscription fee ($19.99) to their "Premium" service called "Mail Plus". They only offer this facility free for only yahoo.co.uk users. [5] Some other mail services like Guerillamail[6] and 10minutemail[1] provides disposable addresses for a certain time period. Further there are some services which provide a separate email inbox with a separate address without a proper authentication, for these spam purposes. Mailinator[19] is an email service which provides an anonymous and temporary email address and a separate inbox(which can be viewed at their site) for the users reducing their spam inbox. The messages in the inbox will be deleted after few hours. It has the capacity of 10 messages. Older messages will be deleted for make space for new messages. Currently there are no open source email clients which provide a good spam filtering mechanism. This becomes one of the motivation factors to undertake this project.
1.3. Aims and Objectives
Aim:
The aim of this project is to develop an open source web based email system which provides better anti-spam mechanisms with the use of web servers, web technologies and database technologies.
Objectives:
Find out an easy way to define multiple e-mail addresses, all coming to one account, and to keep track of all the addresses.
Direct mail from each address to one or more mailboxes
Find out an easy way to set up filters for each address, based on incoming mail, etc.
Research on technologies and Horde platform.
Learn related technologies.
Design and develop the spam free email system.
Test and evaluate the system.
Prepare the documentation for the system.
1.4. Solution
The proposed solution is to develop a webmail system which uses multiple email addresses to handle emails efficiently. One of the main advantages of this system is, our original email address is kept confidential while separate addresses are used for different purposes. It will reduce the vulnerability of getting our email address into the hands of the spammers.
Architecture
The system will consume services from 'email address handling unit' and will use the database to map the senders with the email address. Basically this will provide the facility to handle multiple email addresses under one domain as per required. That is one of the main advantages of this system. Further "Mail handling unit" will be responsible for handling incoming mails. Sending them into appropriate folders, identifying spam will be done by this unit.
Top Level Architecture of the system can be viewed as this.
Main Email Database
Email address handling unit
User
Web Front end
(User Interface)
Mail message handling unit
Figure 1.1: Top Level Architecture of the system
Features
One username and password to log in to the system
Ability to handle a large number of email addresses
View available email addresses
Create new addresses
Map email addresses with contacts
Delete mail addresses
Adding filter rules
Ability to send emails from any email addresses generated
Ability to block the users
Technologies
PHP will be used with, JavaScript and other web technologies used in Horde framework.
MySQL database will be used as storage of this system
System requirements
A computer with 128MB or higher RAM.
Any operating system.
Internet Connectivity
1.5. Structure of the dissertation
In Chapter 2 full details about the system background are included. Further the developments of similar kinds of systems are discussed. Identifiable features of those systems with its limitations. Then Chapter 3 states the technologies adopted to solve the problem with reference to why those technologies are appropriate. The approach to solve the problem by identifying users, inputs, processes and outputs will be discussed in Chapter 4. Then in Chapter 5 the design of the system will be described with a top level design of the system. Implementation details of the each module in the top level design are discussed in Chapter 6. Finally Chapter 7 gives a summary about what had been discussed and the further works of the system for the project completion.
1.6. Conclusion
Chapter 1 of dissertation contains an introduction to the system "Multiple e-mail addresses for spam control" providing a brief description of the background and motivation of the system. Further it mentions the aims and objectives together with a summarized description of the solution implementing.
Chapter 2
Prevailing Email systems facilitating Disposable Email Addresses
2.1. Introduction
As email has become a popular communication mechanism in present world, most of the email service providers have provided rich functionalities to their customers to make their service user friendly and secure. Handling spam mail is one of the aspects they address through these mechanisms. Most of the time they provide their users with filters in order to detect spam mail. But with certain tradeoffs these filters will not be always successful. Moreover, disposable mail addresses will also be used as a mechanism to handling spam nowadays.
Considering todays' email systems there are systems which address these issues regarding controlling spam using disposable email addresses. "Guerillamail" and "Mailinator" are some of the mail inboxes which are providing disposable email addresses for controlling spam. This chapter contains the details of some of those prevailing systems and the uniqueness of my solution.
2.2. Disposable email addresses
Disposable email addresses is another way of handling and sharing email addresses. When using this concept, new email addresses are created for each and every contact or a group of contacts and create a point to point connection between the sender and the recipient. Once the addresses get compromised with email abuse the owner can disable the email address without affecting other users and the original email address. This concept of using disposable email addresses is currently used by most of the email service providers. [15]
2.3. Existing Email systems with the facility of disposable email addresses
2.3.1. Gmail
Gmail is a free web based email service provided by Google. It was launched as a beta version on April 1, 2004 and was available for general public from February 7, 2007 onwards. It has become the most popular webmail service nowadays with over 350 active users worldwide as of January 2012.
Gmail provides a free disposable email address service. But it turns to be fairly worthless as it uses a '+' sign when creating these addresses. After obtaining an ordinary Gmail address user can create any number of email addresses with the use of some additional strings and '+' sign.
The problem with this email addresses created by Gmail is most of the web applications reject the email addresses containing '+' sign. Although it is acceptable to use '+' sign at the left side of the email address according to the internet standards, it is no accepted in the URLs. Therefore many websites misinterpret this symbol in the email address and throw error messages. Further spammers can easily get the original Gmail address through these addresses by removing the '+' sign. [4, 5, 17]
2.3.2. Yahoo mail
Yahoo! Mail is a free email service provided by American Search Engine Company. It was started in 1997 and it was the second largest web based email service with 310 million users as October 2001.
Yahoo! Mail plus let its users to create disposable email addresses whenever needed. When you don't need to share your primary email address with others, a disposable address can be created and given to untrusted parties. The mails coming from those addresses can be organized according to your choice as you wish. Yahoo disposable email addresses, come only with a yearly subscription fee ($19.99) to their "Premium" service called "Mail Plus". They only offer this facility free for only yahoo.co.uk users. When creating the email addresses yahoo use '-' sign to create new address with another string together with base name.
Using '-' with email addresses is far better than using '+' sign. It is misinterpreted by only 2 or 3 websites from 300 websites. Therefore yahoo disposable email addresses are better than Gmail addresses. Further Yahoo allows users to send emails using created disposables email addresses. [5]
2.3.3. Mailinator
Mailinator is an free email service which provides an anonymous and temporary email address and a separate inbox(which can be viewed at their site) for the users reducing their spam inbox created by Paul Tyma.
The messages in the Mailinator inbox will be deleted after few hours whether they are read or not. It has the capacity of 10 messages. Older messages will be deleted for make space for new messages. It will accept any email for mailinator.com domain and allow anyone to read them. They don't have a proper authentication mechanism and anyone can read the emails through their website if recipient name is known. When email comes with a specific recipient name an account will be created on the fly. It doesn't need to have an account created before. [10,19]
2.3.4. Guerillamail
Guerillamail is another temporary email address service which provides temporary addresses for receiving unimportant emails such as when signing up at a throwaway web site or when it is a risk to publish your own email address at a site.
Guerillamail address has a brief life span of 60 minutes but it can be reactivated by entering the same address. There is no authentication mechanism. As soon as you open the web site, you get a temporary account with a random address and you can use it. The inbox can be viewed by going to the site. Once you get subscribed to email service you will be able to forward emails and set a password. Since you get subscribed anyone can use your email address and view your email. [6, 8]
2.3.5. 10minutemail
10minutemail is another temporary email address service which can be used to prevent spam mail from building up in the primary email accounts. It can be used, when registering with other sites. If regular email address is used for signing up with those sites, that can also be used for send spam nails also. As name implies, the mail address will be last for 10 minutes and mail will be lost after 10 minutes. Therefore that could be no longer useful. Any email sent to that address will be displayed in the web site automatically. Anyone can read it and also reply to it within the life time of the email address. [1,2]
2.4. My solution
The solution described throughout this dissertation has several features which makes it unique from the prevailing systems.
One of the key advantages of this system is that it is an open source product. All the other solutions are not open source projects. Therefore this code can be further developed with the requirements of the others and develop new solutions based on this.
Considering the features of these solutions, most of the time they provide only the mail inbox. It can be viewed via web browser and anyone can view the emails if the address is known. They do not use a proper authentication mechanism. Only few services have the ability to send emails using the disposable email addresses. Having both inbox and outbox together with a proper authentication mechanism will make this solution unique.
Further most of the limitations of these systems are addressed by this solution described throughout the dissertation.
2.5. Comparison
My system
Gmail
Yahoo
Mailinator
GuerillaMail
10minutemail
Disposable addresses
Yes
Yes
Yes
Yes
Yes
Yes
Open Source Product
Yes
No
No
No
No
No
Free service
Yes
Yes
No
Yes
Yes
Some features
Proper Authentication
Yes
Yes
Yes
No
No
No
Provides Inbox
Yes
Yes
Yes
Yes
Yes
Yes
Provides Outbox
Yes
Yes
Yes
No
No
Yes (proprietary)
Table 2.1: Comparison table of existing systems
2.6. Conclusion
Second chapter is about the prevailing systems. Identifiable features of those systems with its limitations are discussed within this chapter. The uniqueness of this solution is described with related to other solutions. Finally it contains a comparison table. Next chapter will be on technologies adapted.
Chapter 3
Technologies Adapted
3.1. Introduction
In the previous chapter information related to prevailing systems and the uniqueness of the implementing system is mentioned. Chapter 3 contains the details on the technologies used when implementing.
'Multiple e-mail addresses for spam control', is to develop an email server where users are provided with a better spam handling mechanism. For this solution following technologies will be used.
Web technologies including PHP.
Database Technologies.
3.2. Horde Groupware Webmail Edition
Horde is a web based groupware rest on the horde framework. The Horde Project is about creating high quality Open Source applications, based on PHP and the Horde Framework. PHP based horde framework provides elements required for web application development. Horde framework has a large number of standalone libraries that can be used in PHP application development.
Horde Groupware webmail edition is a free, enterprise ready, browser based communication suite. Using Horde users can read, send and organize email messages and manage and share calendars, contacts, tasks and notes with standard components of Horde project as it can be used as an IMAP/POP3 web mail client. The Horde groupware webmail edition is bundle with other applications like IMP, Turba, Ingo, Kronolith, Nag and Mnemo. In this project once a user get registered and confirmed in the system, he can log into Horde with the Dovecot (IMAP/POP3 server) credentials and check his/her email. Horde is a PHP based platform. Therefore PHP has been used as the server side development language through this project. Other than Horde's usage as a webmail platform, in this project solution Horde is being customized. In other words solution will be developed as part of Horde and some other supporting features outside Horde. [11]
3.3. PostFix SMTP server
The PostFix Mail Transfer Agent (MTA) is a high performance open source e-mail server system. When user creates a mail message it will be sent to the user's MTA with the use of SMTP protocol. Moving the email from one host or network to other is done by using MTA. In other words, MTAs are like the mail trucks that move mail between post offices. This MTA will query its DNS servers find the recipient MTA of the mail and send to that MTA. Also as a SMPT server, PostFix accepts network connection requests and performs zero or more SMTP transactions per second. Each received message is piped through the cleanup daemon and placed in to the incoming queue as one single queue file. For this type of operation, the program expects to be run from the master process manager. [7]
3.4. IMAP/POP3 server- Dovecot
Dovecot is an open source IMAP/POP3 server for Linux/Unix systems. It offers both an IMAP server component and a POP3 server. The main goals of the dovecot server are security and reliability. Dovecot server is like Mail Delivery Agent which move mail within a system (from an MTA to a local user's mailbox or from a mailbox to a file or directory). Mail Delivery Agents are like the letter-carriers who distribute the mail to their destination mail boxes.
At the time where MTA become responsible for delivering the mail to recipient, MTA pass the message to a Mail Delivery Agent (MDA). Then MDA saves the mail in the server disk. Now the recipient checks the mail through a Mail User Agent (MUA), using one of the standard protocols IMAP and POP3. The MUA will query the mail server. Mail server confirms the identity of the users and retrieves the list of mails from the server space and returns to the MUA. So Dovecot is just handing over the mails to the users. As an IMAP and POP3 server, Dovecot provides a way for Mail User Agents to access their mail. As such, Dovecot is NOT responsible for receiving mail from other servers. Dovecot presents mail already stored on the system to MUA's. [3]
3.5. PHP and JavaScript
PHP is a general purpose server side scripting language designed for web development to produce dynamic web pages. PHP stands for PHP: Hypertext Preprocessor. As open source software PHP is freely available. Further PHP supports large number of databases such as MySQL, Oracle and postgreSQL.
System will be available to the users as a web application and we have used PHP as the server side scripting language because Horde Groupware webmail edition is PHP based platform. We used JavaScript for the client side validations. Also we will be using AJAX to perform faster callings to the server as it allows web pages to asynchronously exchange data with the server without a page reload. [13, 20]
3.6. MySQL
MySQL is a database server which is suitable for small and large software. Same as PHP, MySQL is also freely available and compiles on number of platforms. MySQL together with PHP are cross platform.
MySQL is used as the database server throughout this project. MySQL had been selected as the database management system considering the PHP support to easily work with MySQL.
3.7. Conclusion
This chapter contains the details regarding the technologies adapted throughout the project. The suitability of the technology together with a brief introduction to the technology is included in chapter 3. Next chapter focuses on the approach taken to solve the problem addressed by this project.
Chapter 4
My Approach
4.1. Introduction
The main problem addressed through this project is e-mail addresses getting into the hands of spammers. Currently email spam is handled using mail filters and they don't have a proper mechanism to make the mail address safe in a way which it doesn't' get into hands of spammers. 'Multiple e-mail addresses for spam control' will provide a solution to this problem using above technologies. In this chapter the solution will be discussed in terms of users, inputs, outputs, processes and technologies.
4.2. Users
This product is developed for the use of general community. Therefore it does not target a specific group of users. Thus users of this system can be any person who has a valid account on main email service provider.
4.3. Input and output
Inputs of this system are the username, password and the email messages composed by the user. Output will be the email messages come to user from various sources. Further there are system generated messages come when spam messages are delivered to a particular mail address.
4.4. Process
In the solution there are two main parts. Email address handling unit and the mail message handling unit. For the whole system user will have one username and a password to log in.
Within the email address handling unit, user can handle a large number of email addresses. Once the user log into the system, user can associate with available email addresses and create new addresses as required. Those are disposable email addresses which can be distributed among friends individually or group wise and once it get compromised with email abuse it can be discarded without affecting others or if the address is associated with a group identified sender can be blocked.
Associating with the mail message handling unit, user can also send emails using a particular email address rather than receiving mails. There is an option which user can select what the 'From' address should be. The mails coming to those DEAs will be forwarded into a mailbox where mails are checked for certain conditions (sender, content, etc.) rather than directly sent in to inbox. If the mails are considered as legitimate, mail will be then sent to inbox. Other mails will be sent into a separate folder with a notification to the user.
In this system, our original email address is kept confidential while separate addresses are used for different purposes. Instead of giving our real email address for others new email addresses can be given for different users. For an example, most of the time when we are registering with a site, they ask for our email address. Most probably, it is for the verification purpose and afterwards that is not used by that site. Further, when registering with a newsletter or a social network it will be annoying when it starts sending emails directly to our inbox. In such scenarios, giving our original email address will be a risk because that can be easily traced by spammers. Therefore, we can generate a new address for that purpose and make that address usable only for that site. If someone else try to contact us through that email that will not be accepted and that sender will be blocked. Moreover one email address can be allocated to number of users. We can define an email address for a group of people. That email address will accept only the emails coming from those members. Furthermore, this system will use a filtering mechanism together with disposable email addresses. There user can direct incoming messages to folders based on the 'from' and 'to' addresses, content, etc.
4.5. Conclusion
In this chapter how the technologies have been adopted to derive the project solution had been discussed with respect to the users in the system, inputs to the system, processes and output of the system. In the next section the system solution design will be discussed by describing each module in the system design.
Chapter 5
Analysis and Design
5.1. Introduction
As the previous chapter illustrated the approach which was taken to solve the problem with the technologies, this chapter will describe about the analysis and design of the project solution. Moreover the chapter contains top level design of the solution system and details of what each module in the design does and what are the interactions of each between other modules.
5.2. Top Level Architecture of the system
Main Email Database
Email address handling unit
User
Web Front end
(User Interface)
Mail message handling unit
Figure 5.1: Top Level Architecture of the system
'Multiple e-mail addresses for spam control' contains two main modules within the system namely, email address handling unit and the mail message handling unit.
Email address handling unit is the module which deals with the email addresses within the system. As the main functions of this module, it can be taken creating, viewing and deleting mail addresses, mapping email addresses with contacts, adding filtering rules and updating PostFix alias database.
Management of the email messages is done through mail message handling unit. User can send emails using a particular email address which are created rather than receiving emails. Further authentication process is also done.
5.3. Detailed level Architecture
Outgoing mail
Incoming mail
Mail addresses handler
Mail message handler
Delete email address
Block the contact
Database
Send email
Filter
Inbox
Notification email
Contact List
Mail addresses
Check for Authentication
(Mapping with contacts)
Select the 'from' mail address
Sign up
Sign in
Username
Password
Web Frontend
(Email System)
Create mail Addresses
View mail Addresses
Map email addresses with contacts
Delete email addresses
Add filter rules
Update PostFix Alias database
Inbox
Outbox
Figure 5.2: Detailed level Architecture of the system
'Multiple e-mail addresses for spam control' has two main modules. Mail Addresses Handler and the Mail Message Handler. One of the main advantages of this system is the ability to handle multiple email addresses through one login. Thus, original email address will be secure without going into the hands of spammers.
The main system has one login. Users will be identified using username and they will be authenticated via password. Then they will be allowed to use the functions available in the email system.
In the system one user has multiple email addresses. All these addresses are handled through Mail Address Handling Unit. There user can create new mail addresses and view created email addresses. Those email addresses can be allocated to a specific person or a group. Thus, if the address gets cooperated with spam mail, the address can be easily removed without affecting others. If the address is associated with a group and the specific member who deals with spam mail can be identified that user can be removed from the group. Moreover, each email address can be specified by adding filtering rules. At the same time PostFix alias database should be updated.
In the Mail Message Handling Unit, it associates with the incoming and the outgoing emails. Incoming emails are checked for the authentication, they are checked with the contacts for verify whether the email address is mapped with correct contact. Then filtering rules will be applied. If the email is a valid one it will be directed to relevant mailbox, while invalid mails are sent to a separate mailbox (as defined by user) and the recipient will be notified via an email. Then the user can delete the email address or block the contact and it will not affect others because separate people have separate email addresses to communicate with.
5.3. Use case diagram
Following is the use case for this system. Basically this email system is targeted for general use of the public and therefore there are no specific user groups.
Log in to the system
Create mail Addresses
View mail Addresses
Map mail addresses with contacts
Delete email Addresses
Add filter rules
View mailboxes
Send emails
Select 'from' address
Figure 5.3: Use case diagram
5.4. Conclusion
In this chapter the top level design of the system together with a detailed architecture was discussed by stating the purpose of each module and interactions between them in detail. Also the top level use case diagram of the system is there with actors and their use cases. The next chapter will be discussing on implementation of each module included in the top level design.
Chapter 6
Implementation
6.1. Introduction
So far the problem which is being addressed through the project, the technologies adopted the approach to address the problem by adopting technologies and the analysis & design of the problem solution have been discussed. In this chapter the implementation details will be described.
6.2. Mail Server
As a mail service provider this platform should a mail server as its backend. As the SMTP server Postfix is used and as the POP3/IMAP server Dovecot server is used. They will receive and store emails for the users, let the users retrieve email through IMAP and POP3 even with SSL to encrypt to connection and receive and forward (relay) email for your users if they are authenticated.
Three components are needed in order to configure the email server. (Appendix A)
Postfix for receiving incoming emails from the internet and storing them to the users' mailboxes on the hard disk. And for receiving emails from your users that are sent out to the internet (relaying).
Dovecot to allow your users to get their emails into their email client through POP3 and IMAP.
MySQL as the database system that stores information about your domains, the user accounts and email forwarding.
6.3. Webmail Interface
As the webmail interface for the email system, Horde Webmail Edition is used. For that, Horde framework had been added with a new module. (Appendix A) Horde webmail edition is similar to an email client who facilitates users to work on emails by allowing view mails, send mails, create new mails, forward mails, etc through its IMAP module. Other than that it provides some in built modules as address book module, calendar module, etc which makes life easier of an email user.
6.4. SignUp Function
Sign Up functionality for the email client is not coming default with Horde. Further using this system, users should be able to register their own domain. Therfore they should be able to communicate with server and give the domain details to communicate with. That is done via the sign up form. (Appendix B)
6.3. Mail Address Handler
Mail Address Handler is the place where all the email addresses are maintained. Disposable addresses module with its name as 'adressen' added as a new Horde module by customizing the skeleton module provided by horde. So using disposable addresses is part of email client and users can easily select that option from side menu. Skeleton is template for new Horde applications. It can be got via cloning GIT repository and configured as required.
Cloning of the GIT skeleton module is done as follows.
git clone --depth 1 git://github.com/horde/horde.git
cd horde
cp -R skeleton/ /install path to horde
Figure 6.1: Cloning of GIT Skeleton Module
Or else it can be downloaded from the horde website and placed inside the horde directory. Then following code should be added to the horde/config/registry.php file.
(modulename=adressen)
$this->applications['adressen'] = array(
'fileroot' => dirname(__FILE__) . '/../ adressen',
'webroot' => $this->applications['horde']['webroot'] . '/ adressen,
'name' => _(" Adressen "),
'icon' => $this->applications['horde']['webroot'] . '/reputation/themes/graphics/rep.png',
'status' => 'active',
'menu_parent' => 'myaccount'
);
Figure 6.2: Add Adressen module to Horde
After cloning the module, it can be developed as required by using the Horde libraries and PHP codes. As Horde framework is developed using PHP it can be used together with Horde libraries.
As the name implies all the email addresses are handled via this module. Disposable email addresses can be created when needed and also they can be deleted without disturbing others.
6.3.1. Managing email addresses
Email addresses can be created in four criteria. Email addresses can be created for individual person mapping with single contact. Thus, that person will be able to communicate the user via that email address. Apart from that, email addresses can be created for a group of people. When creating the email address user can select the people who can be included for that group. Further email addresses can be created for a specific domain where parties having email addresses of that domain can communicate with the user. Main two situations are considered in this system where domain name can be considered of a website or a company.
User can create email address at 'My Addresses' module under 'Organization' in side menu. (Appendix B) From the available tabs, 'create addresses' allow users to create email addresses. When creating email addresses, those are created like a separate account. As a user has his own domain (domain should be unique one), in the server he will get a seperate folder for his own accounts. This is managed at the server.
User can delete the created email addresses if the address is no longer usable from the tab 'view addresses'. If it is noted as an abused one he will be given the chance for delete it as one of the options.
Edit email includes the ability for user to change the attached contact to the email address and change the mailbox used with that address.
6.3.4. View disposable email addresses
All the created email addresses can be viewed via 'My addresses'. It will retrieve the email data from database and render them under three categories. From that view user can delete and edit them.
6.4. Mail Message Handler
Mail message handler is regarding the management of the email messages. It is developed by customizing the IMP module in Horde together with postfix and Dovecot servers.
Horde IMP module is their Webmail client. It provides the access to POP3 and IMAP mailboxes available. They have provided its users with functions to manage emails through their interface. Among the Horde applications IMP is the first application developed.
6.4.1. Incoming email
No
Yes
Incoming mail
Check for authentication
Valid User
Check with filtering rules
Send to mailbox
Mark as spam
Send notification email
Delete email address or
Block the relevant sender
Figure 6.3: Flowchart for incoming mail
Incoming email will be managed by the filtering rules applied for the email addresses when creating them. All the emails coming to the created email addresses will be directed to the main email address by the email server. A folder dedicated for each email address will be created under inbox at the creation of the email. That happens only if that folder is not exists.
if($mailbox == "new"){
_imp_createFolder(imap_utf7_encode($email));
$mailbox = $emailwdom;
}
Figure 6.4: Creating a folder
$imaptree = &IMP_Tree::singleton();
$elt = $imaptree->get($folder);
if ($elt && !$imaptree->isContainer($elt)) {
return true;
}
$imp_imap = &IMP_IMAP::singleton();
$ret = @imap_getmailboxes($imp_imap->stream(), IMP::serverString(), $folder);
return !empty($ret);
Figure 6.5 : Checking the existence of a folder
If user needs the emails to be directed inbox as well as to these folders user is able to do it via fetch mail function. Apart from that, users have to define the mailbox which the email should be directed at the creation of the email address. Emails coming to that address will be behaved according to that specified mailbox (server folder) preferences. This is a kind of filter applied at the server level.
Add filter thing
6.4.2. Outgoing email
As the system uses multiple email addresses, user should be able to send emails using those email addresses. That ability is provided at the composing of emails. User can select the email address that can be used as the from email address. Sent emails will be saved in 'sent' folder as default. That also can be changed when composing the email. It can be saved in a separate folder. (Appendix B)
Changing the 'from' address is done via changing the horde preferences to use multiple identities at the email composition. User can select the 'from' address from the given list of addresses when these preferences are changed. Preferences should be changed at the creation of each and every email address.
$addr_obj=new IMP_LoadAdressen();
$userd=$addr_obj->getDomain();
$emailwdom = $email_address.'@'.$userd[$domain];
$pref_val = _horde_getPreference($app, 'identities');
$add_num = substr($pref_val,2,1);
$num = intval($add_num);
$data = explode("{",$pref_val,2);
$arr1 = "a:".($num+1).":{";
$arr2 = substr($data[1],0,(strlen($data[1])-1));
$arr3 = 'i:'.$num.';a:13:{s:16:"default_identity";s:1:"0";s:2:"id";s:'.strlen($email_address).':"'.$email_address.'";s:8:"fullname";s:'.strlen($emailwdom).':"'.$emailwdom.'";s:9:"from_addr";s:'.strlen($emailwdom).':"'.$emailwdom.'";s:12:"replyto_addr";s:'.strlen($emailwdom).':"'.$emailwdom.'";s:10:"alias_addr";a:1:{i:0;s:'.strlen($userd[$domain]).':"'.$userd[$domain].'";}s:10:"tieto_addr";a:0:{}s:8:"bcc_addr";a:0:{}s:9:"signature";s:0:"";s:10:"sig_dashes";i:0;s:9:"sig_first";i:0;s:14:"save_sent_mail";i:1;s:16:"sent_mail_folder";s:5:"john1";}}';
$arr = $arr1.$arr2.$arr3;
_horde_setPreference($app, 'identities', $arr);
Figure 6.6: Changing the preferences for use multiple identities
6.5. Disposable email address Database ('adressen')
This database consists of four tables which store details on disposable email addresses created by the user. Table dis_addresses holds the email addresses created for individual contacts and domain_table is used to hold addresses created for domains while tables group and group_dis_addresses holds details regarding disposable addresses created for groups.
Field Name
Description
object_id
Primary key
owner
Prefix of the main email address
d_add
Disposable address
contact_name
Contact linked with the disposable address
Email address of the contact
Table 6.1: Field structure for table dis_addresses
Field Name
Description
record_id
Primary Key
owner
Prefix of the mail email address
domain
Domain name
Disposable address
Table 6.2: field structure for table domain_table
Field Name
Description
group_id
Primay key
group_name
Name given to the group created
owner
Prefix of the main email address
dis_add
Disposable address
Table 6.3: field structure for table groups
Field Name
Description
group_id
ID of the group
members
Group members
Table 6.4: field structure for table group_dis_addresses
6.4. Conclusion
This chapter stated the implementation details of each module separately which composed the top level design of the system. In the next chapter the evaluation methodologies of the project will be discussed.
Chapter 7
Evaluation
7.1 Introduction
A system should be better checked in order to make sure whether the objectives have been met. This chapter contains the methodologies taken at evaluating the solution of this project. Those methodologies are included with testing and evaluation by supervisor.
7.2. Testing
In the software development life cycle testing and validation plays an important role. In the implementation of the system in different modules each unit of the system already tested several times individually. Reliability of each function has been tested in order to verify the specified requirements are achieved successfully and correctly with functionality testing. Then after integrating separate modules together integration testing was done and clarified the issues with integration. After completing that whole system was checked as a single service.
7.3. Evaluation by project supervisor
From the very beginning of the project meetings with the project supervisor Prof. Gihan Dias was taken place frequently. At those meetings project progress was discussed and the changes, improvements required were given by supervisor. As a result project had been reached to its completion in the correct track by meeting all its objectives as decided at the beginning.
7.4. Conclusion
This chapter states how the evaluation took place in order to check whether the objectives have been met. In the next chapter a discussion of the project will be provided with a good summary on what had been discussed from the beginning.
Chapter 8
Conclusion & Further Work
8.1. Introduction
In the previous chapters the introduction to the project problem, aim & objectives of the project solution, the design of the solution and the implementation details of the solution had been illustrated. Also the evaluation approaches taken at checking whether the objectives had been met were discussed in last chapter. Now this chapter is going to discuss overall achievement of the project, the achievement of each objective and the problems encountered as the project conclusion. Moreover the further work of the project will be discussed with the limitations of the implemented solution.
8.2. Overall and Objective achievement
The aim of this project was to develop an open source web based email system which provides better anti-spam mechanisms using the concept of disposable email addresses. Through this project a new definition for the 'spam' is given. In this system contacts in the address book is given a separate email address. User can communicate with that particular contact via his allocated email address. Although multiple email addresses are used all those addresses are maintained through one email account. Since horde has no spam controlling mechanism, this contact mapping mechanism is used as the spam detecting mechanism. Spams are the emails which are coming to one of the email addresses from outsiders other than the allocated user. Overall achievement of this project is this mechanism of handling emails using disposable email addresses and this system which provides an easy way to handle multiple email addresses.
Find out an easy way to define multiple e-mail addresses, all coming to one account, and to keep track of all the addresses.
Defining email addresses had been one of the main objectives of the system. This is done through the help of postfix and horde. Email addresses are created as a separate email account, but all the maintenance is done through the main email account.
Direct email from each address to one or more mailboxes
At the creation of email address a separate storage structure will be created for each and every email address in the server. By the server emails will be directed to the inbox of the main email account and the other specified mailboxes. Directing emails to the main email inbox happens default. Apart from that user can define other mailboxes which emails should be directed at the creation of the address.
Find out an easy way to set up filters for each address, based on incoming mail, etc.
Test and evaluate the system.
The next objective had been to perform proper evaluation to check the objective meeting of the project which was discussed in the last chapter in detail. The evaluation methodologies used there were testing and supervisor feedback. Those methodologies helped to determine that the project had been met with its objectives.
8.3. Problems encountered
There encountered problems at project design and implementation. The biggest problem encountered was to get knowledge on Horde customization as it was lack with necessary documentations about doing the task. This problem was overcome by myself by going through Horde framework code for several days which had been a tough task at the beginning, but later it became simpler.
The platform which we had to be used when developing with Postfix, Dovecot and Horde was also problematic. Since we were familiar with the Windows environment at the beginning I was trying to work on Windows. It took time to realize the inability to develop together with these platforms using Windows environment. Fedora (Linux) platform was the solution for this problem.
At the implementation, other problem which I went through was creating criteria of disposable email addresses. After having some discussions with project supervisor, it was decided to use four criteria in address creation as single person, droup, website and company.
8.4. Further Work
With the identified limitations of implemented solution of this project further work had been determined. Therefore first the limitations of the current solution will be discussed.
One of the limitations of this solution is the method of filtering. Currently system uses horde internal filters and postfix filters when directing emails. Some of the Horde filters are not working properly. Therefore system can be enhanced with its own filtering mechanism.
Further as this is a web based system, it can be enhanced as a plugin for the web browsers. Using multiple email addresses can be enabled in browser level by developing a plugin for the browsers which can be used with other web applications also.