26
1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

Embed Size (px)

Citation preview

Page 1: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

1

E-mail over low bandwidth networks

Indika Wasala

Sasanka Usgoda Arachchi

Dr. Gihan Dias

Page 2: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

2

Contents

Objective

Research Problem

Previous Work at UoM

Other Related work

Current Project

Future Work

References

Page 3: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

3

Objective

To optimize email communication over Low Bandwidth networks.

Page 4: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

4

Problem

Dialup internet connections in rural areas.

ADSL connections with shared bandwidth.

Expensive Leased Lines.

CDMA/GPRS connections.

Download delays Large attachments

Page 5: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

5

Previous work at UoM

On-the-fly Inter-proxy Data Compression for Web Access - Pradeepa Gurusinghe, Gihan Dias, Vishaka Nanayakkara

A Market-Based Approach to Control Web Bandwidth Usage - Chamara Dissanayake, Gihan Dias

Dynamic Bandwidth Negotiation among Web Proxies - Sumith Gamage, Gihan Dias

Page 6: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

6

Other Related Work

draft-ietf-lemonade-compress-04 COMPRESS extension IMAP Connection is compressed effectively

and efficiently.• to reduce the bandwidth usage of IMAP

Commands• CAPABILITY

– Response COMPRESS=DEFLATE

• COMPRESS DEFLATE– Response OK DEFLATE active

Page 7: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

7

Current Project

E-mail over low bandwidth networks

Page 8: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

8

Solution

IMAP proxy server

IMAP Proxyclient

Legacy emailclient

email client

IMAP ServerIMAP Proxy

server

email server

Low bandwidth network

and proxy clientoptimize email communication over low bandwidth connection.

to

Page 9: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

9

Scope

IMAP Proxy client functions Defining filter rule set Assignment of priorities to emails. Compression of IMAP requests Decompression of IMAP responses Sending decompressed responses to client Sending compressed requests to server

IMAP Proxyclient

Legacy emailclient

email client

Page 10: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

10

Scope cont..

IMAP Proxy Server functions Email filtering Selecting a pre-fetch model Compression of IMAP responses

• Different compressors for different content-types

Decompression of IMAP requests and sending to IMAP server.

Spam filtering

IMAP ServerIMAP Proxy

server

email server

Page 11: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

11

Solution Components

Mail server : qmail (www.qmail.org)

IMAP Server : binc imap (www.bincimap.org)

IMAP proxy : imapproxy (www.imapproxy.org)

All are open source components.

Page 12: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

12

Proxy Client Configuration

Filtering Rules Configured in proxy client Using a simple UI Using config file <header field:”matching string”> <priority>

<image compression on/off>• from:”[email protected]” 1 0

Page 13: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

13

Proxy Client Configuration contd..

Priorities and Pre-fetching Priority 1 : Pre-fetch whole message Priority 2 : Pre-fetch first 1 KB of the message Priority 3 : Pre-fetch only the header

information including attachment type if there are any.

Priority 4 : Delete messages

Page 14: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

14

Pre-fetching

Static Pre-fetch at night or when the link is idle

Dynamic While previous message / first part of

message is being read

Page 15: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

15

IMAP Proxy server Operation

Client Connects

Is Link idle ?

Get All unseen UIDs and put them into a

list

Process Client Requests

NO

YES

Page 16: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

16

NO

IMAP Proxy server Operation Contd..

Download user rule configuration into

proxy server

For each UID in list get header and check whether any match is found in rules

config.

Assign default priority = 3

# Format of a ruleFrom:[email protected] 1 0

Check Priority

YES

Page 17: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

17

IMAP Proxy server Operation Contd..

Priority = 1 Check for compression bit for images Compress or leave image in original form Compress text/html part Send whole email to proxy client

Page 18: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

18

IMAP Proxy server Operation Contd..

Priority = 2 Check for compression bit for images Compress or leave image in original form Store attachments Generate a URLs for attachments Append URLs to the end of email Get 1st KB of the email Append a URL to next KB Compress and send to proxy client

Page 19: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

19

IMAP Proxy server Operation Contd..

Priority = 3 Check for compression bit for images Compress or leave image in original form Leave any other attachment in original form Compress email header Send header to proxy client

Page 20: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

20

IMAP Proxy server Operation Contd..

Priority = 4 Delete email Remove UID from the list

Page 21: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

21

IMAP Proxy client operationClient Connects

to proxy client

Email box will be populated with the

headers of pre-fetched emails

Client fetches an email

Checks the priority of the requested

email

uncompreses prefetched email headers

Page 22: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

22

IMAP Proxy client operation contd..

Priority = 1 Uncompress and Send pre-fetched mail to

email client Check priority of next email If 3 start fetching next email from server If priority is 1 or 2 check priority of next email

Page 23: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

23

IMAP Proxy client operation contd..

Priority = 2 Uncompress and Send pre-fetched part to

email client Start fetching next part from the server If end of mail check priority of next email If 3 start fetching next email from server If priority is 1 or 2 check priority of next email

Page 24: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

24

IMAP Proxy client operation contd..

Priority = 3 If it was pre-fetched, uncompress and send to

email client If not fetch from server, uncompress and send

to email client Check priority of next email If 3 start fetching next email from server If priority is 1 or 2 check priority of next email

Page 25: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

25

Future Work

Caching of attachments For future reuse

Different compression algorithms for different content types

Page 26: 1 E-mail over low bandwidth networks Indika Wasala Sasanka Usgoda Arachchi Dr. Gihan Dias

26

References

RFC 3501 - Internet Message Access Protocol - Version 4rev1RFC 2683 - IMAP4 Implementation RecommendationsRFC 3516 - IMAP4 Binary Content ExtensionArnt Gulbrandsen, draft-ietf-lemonade-compress-04Bruce Zenel, A general purpose proxy filtering mechanism applied to the mobile environmentPradeepa Gurusinghe, Vishaka Nanayakkara, Gihan Dias, On-the-fly Inter-proxy Data Compression for Web AccessChamara Disanayake & Gihan Dias, A Market-Based Approach to Control Web Bandwidth UsageQmail manual, www.lifewithqmail.org/lwq.htmlBinc IMAP, www.bincimap.org8bitMIME - http://en.wikipedia.org/wiki/8BITMIMEMIME - http://en.wikipedia.org/wiki/MIMEZlib - http://www.zlib.net/manual.html