Transcript Remote mailbox access gateway - Main | Networked Software
Remote mailbox access gateway
Software lab project
Introduction
In our days email is one of the most popular ways of communication. There are thousands of e-mail service providers over the world and millions of e mail users. And the numbers are constantly growing. Such a popularity encourages development of a large variety of e-mail clients.
Today two main approaches for accessing e-mail accounts by users are in use. Let’s take a look at them:
The classical approach
E-Mail Client software
Client computer E-Mail Server
This is the most straight-forward approach. The server is a pure
server and in order to communicate with it the user needs some special e-mail client software (MS Outlook, The Bat, Mozilla, etc.)
The classical approach cont.
In a case, when the user reads his mail from only one, secure computer (at home or at work), this approach is the best one, but...
The classical approach problem
Problem appears when the user want to read his mail when he is away from his own computer, but has access to a public computer:
• Using the mail client software on such
computers may be unsafe for the user’s privacy (account information is saved on the computer).
• User may have to set up a lot of settings
before he can actually read his mail.
The HTTP-Mail approach
Web Browser
Client E-Mail computer Server The partial solution to the public computers problem, is provided by some e-mail services by adding to their server some web interface, that can be accessed using only the web browser, installed on every internet-connected computer.
The HTTP-Mail approach cont.
Advantages of such approach: • No need for user to save any account information on the public computer.
• User should only navigate to the mail service web page, login and read his mail.
• User gets friendly user interface that can be easily changed and upgraded by the developers
The HTTP-Mail approach problem
The solution is good, but it’s implemented only by few mail providers (The classic examples are Hotmail, Yahoo etc..). But… What to do when the user has a mail account from some other providers, who does not have web interface ?
The proposed solution
Web Browser
E-Mail Client
Web Interface
Client computer
Gateway E-Mail Server The proposed solution is some kind of mix between the previous approaches it is achieved by the following ideas: Place between the e-mail server and the client computer some kind of gateway, capable of communicating with the
protocols, and with the client computer, by building a web interface for the mailbox.
The proposed solution cont.
This way we get a lot of benefits: • The server does not have to implement any web interface( classical approach benefit) • Easy way to check multiply mail accounts( classical approach benefit ) • The client needs only the web browser to access his mailbox, can access remotely to his account with no need to save any account info on the computer he uses( HTTP mail approach benefit )
The basic structure of the gateway
Reading mail
parser
Client To client Web Interface To mail server Sending mail Mail Composer
Client Reading mail: • POP3 client – module, capable of connecting and exchanging data with POP3 server.
• MIME parser – module for decoding and translating to readable form of the data received from the mail server (decoding messages, extracting attached files, etc.)
The basic structure of the gateway cont.
Sending mail: • Mail composer – interface, enabling the user to create, edit and send e-mail messages (Writing from scratch, replying, forwarding and attaching files).
• SMTP Client – module, capable of communicating with the SMTP server (mainly – for sending the composed message) The Web Interface – the application generated web pages, that the user sees in his browser.
Tools and technologies used
The project implemented using ASP.NET technology. Programming language used is C#.NET
The application can be hosted on Microsoft IIS web server, running on MS Windows 2000/XP/2003 server.
The application uses SQL database server to host saved user account information (for some additional features, like an address book, mail server list per user, etc.)
Challenges we met
Learning new technology and programming language Learning and implementing
POP3 client (there is no built-in POP3
support in .NET Framework.
• Logging on/off the mail server • Retrieving the list of messages • Retrieving the wanted message from the server • Deleting messages
Challenges we met cont.
Learning and implementing
specifications for internet mail message format) parser.
Challenges we met cont.
• Headers parsing Parse the message headers and extract all required information about the message
Challenges we met cont.
• Decoding the message body Identifying different message parts Decoding the data, if encoded: • • From “Quoted-printable” encoding From “Base64” encoding
Challenges we met cont.
• Multiply languages handling Recognition of the message language Representing the message with correct characters set
Challenges we met cont.
• Attached files extraction Identifying the attachments within the message body Extracting and decoding the attachment
Appendix A: Block diagram of the application
Message list To POP3 server POP3 Client POP3 commands Downloaded message Message parser Main ASP.NET
Application Parsed and processed message To SMTP server SMTP client Composed message to send User Interface (Response Sent to user) User accounts database
Appendix B: Glossary
POP3
– Post Office Protocol, version 3 – the main protocol, used to allow a workstation (client) to retrieve mail that the server is holding for it .
SMTP
– Simple Mail Transfer Protocol – the main protocol for e-mail transfer and relay across transport service environments
HTTP
– Hypertext Transfer Protocol – the main WWW protocol, used, mainly, for transferring the web content in a form of web pages.
MIME
– Multipurpose Internet Mail Extensions – a set of standards, used for internet message formatting.
RFC
etc..
– “Request for comments” – a document, describing standards and specifications for some format, technology,