apache james

Post on 12-May-2015

2.468 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Apache James

The complete email application platform

Danny Angus

What is James?

• Modular– An SMTP Server– A POP3 Server– An email application server– An IMAP server– An NNTP Server– Mail Storage manager

• Version: 2.3.1

Apache James - The complete email application platform

Standards Standards Standards

Apache James - The complete email application platform

RFC 2087: IMAP4 QUOTA extensionRFC 2088: IMAP4 non-synchronizing literalsRFC 2177: IMAP4 IDLE commandRFC 2180: IMAP4 Multi-accessed Mailbox PracticeRFC 2192: IMAP URL SchemeRFC 2193: IMAP4 Mailbox ReferralsRFC 2195: IMAP/POP AUTHorize Extension for Simple Challenge/ResponseRFC 2221: IMAP4 Login ReferralsRFC 2342: IMAP4 Namespace (elective)RFC 2359: IMAP4 UIDPLUS extension (elective)RFC 2595: Using TLS with IMAP, POP and ACAPRFC 2683: IMAP4 Implementation RecommendationsRFC 977 : NNTP ProtocolRFC 1036: Format of News MessagesRFC 2980: Common NNTP ExtensionsRFC 3377 : Lightweight Directory Access Protocol (v3): Technical SpecificationRFC 2251 : Lightweight Directory Access Protocol (v3)RFC 2252 : Lightweight Directory Access Protocol (v3): Attribute Syntax DefinitionsRFC 2253 : Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished NamesRFC 2254 : The String Representation of LDAP Search FiltersRFC 2255 : The LDAP URL FormatRFC 2256 : A Summary of the X.500(96) User Schema for use with LDAPv3RFC 2829 : Authentication Methods for LDAPRFC 2830 : Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security

Don’t try to read this list!RFC 822: Mail Message FormatRFC 1123: Requirements for Internet Hosts -- Application and Support (updated by RFC 2821)RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message BodiesRFC 2822: Internet Message FormatRFC 821: SMTP ProtocolRFC 974: Mail Routing and the Domain SystemRFC 1652: SMTP Service Extension for 8bit-MIMEtransport (elective, but widely adopted)RFC 1830: SMTP Service Extensions for Transmission of Large and Binary MIME Messages (experimental, but cool idea)RFC 1869: SMTP Service ExtensionsRFC 1870: SMTP Service Extension for Message Size DeclarationRFC 1891: SMTP Service Extension for Delivery Status Notifications (elective)RFC 1893: Enhanced Mail System Status Codes (experimental)RFC 1985: SMTP Service Extension for Remote Message Queue Starting (elective)RFC 2034: SMTP Service Extension for Returning Enhanced Error Codes (elective)RFC 2142: Mailbox Names For Common Services, Roles And FunctionsRFC 2197: SMTP Service Extension for Command Pipelining (elective)RFC 2554: SMTP Service Extension for AuthenticationRFC 2821: Simple Mail Transfer Protocol (obsoletes RFC 821)RFC 1725: POP3 ProtocolRFC 1734: POP3 AUTHentication commandRFC 1939: POP3 Protocol (obsoletes RFC 1725)RFC 1731: IMAP4 Authentication MechanismsRFC 2060: IMAP Version 4rev1RFC 2086: IMAP4 ACL extension

What do you get?

Container

Configuration

SMTPHANDLER CHAIN

HELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

SPOOLPROCESSOR

MAILET

MAILET

MAILET

F

PROCESSOR

MAILET

MAILET

MAILET

STORERepository

DB

Repository

DB/File

Repository

MBOX

FETCH

IMAP

POP3

NNTP

Apache James - The complete email application platform

Container

•Distribution•Embedding•Modular•Flexible•Options

Container

Apache James - The complete email application platform

Server

•Ready to use•Easy to configure•Flexible•Scaleable•High Uptimes

Container

Configuration

Apache James - The complete email application platform

SMTP

•Handler Chain•Command handlers•Extend - ESMTP•Modify – R&D•Fast Fail – Don’t waste time on Spam•TLS•SMTP AUTH•Bind to IP

SMTPHANDLER CHAIN

HELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

Apache James - The complete email application platform

Mailet

•Email applications•JavaMail•Provided Mailets•Remote & local delivery•Mailing lists•AV/A-Spam•Gateway to other transports•And Loads More

SPOOLPROCESSOR

MAILET

MAILET

MAILET

PROCESSOR

MAILET

MAILET

MAILET

Apache James - The complete email application platform

Persistence

•Derby – by default•File•Mbox – for archives•Maildir•Dbfile•Rdbms syntax-

–SQL Server–Oracle–Mysql–Postgres–DB2–…and more… add your favourite.

STORERepository

DB

Repository

DB/File

Repository

MBOX

Apache James - The complete email application platform

POP3

•Host v Vhost•TLS•Bind

POP3

Apache James - The complete email application platform

IMAP

•At Last we’re getting there•Not bullet proof … yet•Module•TLS•Bind IMAP

Apache James - The complete email application platform

NNTP

•Independent•Great for Workgroups•Auth•No mail->news

NNTP

Apache James - The complete email application platform

Fetch Mail

•Blend Your Channels•Java Mail•IMAP•POP3 •Schedule•Fetched mail is 1st class citizen•Re-route mail from logical accounts to actual users or lists•Manage virtual domains

FETCH

Apache James - The complete email application platform

What Else We Have

•Mail related Sub projects• (What did you expect?)

Apache James - The complete email application platform

JSPF

• 100% Java implementation of SPF

• Passes the Open SPF Tests (openspf testsuite-2007.01)

• Fully RFC4480 compliant

• Apr/2008 - jSPF-0.9.6

Apache James - The complete email application platform

Mime4j• Mime Parser

– Mime is complex due to its open-ended nature

– Mime is powerful due to its open-ended nature

– Multipart Mime is recursive

• Independent of JavaMail• Performance• Mime4J 0.5

Apache James - The complete email application platform

JSieve

•Sieve is a language that can be used to create filters for electronic mail.•Apache JSieve 0.2

PROCESSOR

SIEVE MAILET

SCRIPT

Apache James - The complete email application platform

100% Java implementation of Sieve RFC3028Can be used to script James-Server.

Apache James - The complete email application platform

if header :contains ["X-Spam"] "high" { discard; stop;}if header :contains ["X-Spam-Flag"] "HIGH" { discard; stop;}if header :contains ["X-Spam"] "spam" { fileinto "INBOX.spam";# some emails get SA tagged like this stop;}if header :contains ["X-Spam-Flag"] "YES" { fileinto "INBOX.spam"; stop;}

(http://wiki.fastmail.fm/index.php/MoreSieveExamples)

Sieve Script

Postage

• Soak/Stress test mainly for James

• Provides comprehensive metrics and benchmarks.

• Compare: – Configurations– Deployment strategies– Hardware/environments

Apache James - The complete email application platform

How can this all be used?

• Easily

• Quickly

• To great effect

• At low cost

• (I would say that wouldn’t I)

Apache James - The complete email application platform

Stand Alone

•Out of the box, set some parameters•All you need for straightforward email•It Works™ - yes it does!

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

SPOOLPROCESS

ORMAILET

MAILET

MAILET

F

PROCESSORMAILET

MAILET

MAILET

STORERepository

DB

RepositoryDB/File

RepositoryMBOX IMAP

POP3

NNTP

DERBY

FETCH

Apache James - The complete email application platform

Distributed

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Apache James - The complete email application platform

Container

Configuration

SPOOLPROCESS

ORMAILET

MAILET

MAILET

PROCESSORMAILET

MAILET

MAILET

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

POP3

IMAP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

100% is possible.RDBMS for shared storageResponsibilities can be separated

Use MX Priorities to manage high availability.

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

SPOOLPROCESS

ORMAILET

MAILET

MAILET

PROCESSORMAILET

MAILET

MAILET

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

SPOOLPROCESS

ORMAILET

MAILET

MAILET

PROCESSORMAILET

MAILET

MAILET

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Performant

•Scale Horizontally

•Divide and Protect

•Integrate with your business systems

Apache James - The complete email application platform

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

SMTPHANDLER

CHAINHELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

POP3

IMAP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

Container

Configuration

POP3

IMAP

STORERepository

DB

RepositoryDB/File

RepositoryMBOX

J2EE

Throughput depends on message sizeAdministration – James doesn’t provide toolingJames Can be made Highly Available

Integrated

•Integrate•Use another container

–JCA–OSGi–Spring–Geronimo

Container

Configuration

SMTPHANDLER CHAIN

HELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

SPOOLPROCESSOR

MAILET

MAILET

MAILET

F

PROCESSOR

MAILET

MAILET

MAILET

STORERepository

DB

Repository

DB/File

Repository

MBOX IMAP

POP3

NNTP

J2EE

FETCH

Apache James - The complete email application platform

Extended

Container

Configuration

SMTPHANDLER CHAIN

HELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

SPOOLPROCESSOR

MAILET

MAILET

MAILET

F

STORERepository

DB

Repository

DB/File

IMAP

POP3

NNTP

Proto-X

FETCH

Repository

X-File

Repository

MBOX

PROCESSOR

X-Handler

PROCESSOR

MAILET

MAILET

X-Filter

MAILET

VERB-X

VRFY

QUIT

RSET

NOOP

Apache James - The complete email application platform

AddReplaceEnhanceRemove•Protocols•Storage types•Configuration•Mailets•SMTP commands

Embeded

Programme - X

SPOOLPROCESSOR

MAILET

MAILET

X-Filter

MAILET

Derby

STORERepository

DB

Apache James - The complete email application platform

Use James modulesAs much or as little as you want toExtend everything

BSF (See Felix next in this room!)

Reuse Mailetssieve scripts

Embeded

PROCESSOR

MAILET

MAILET

MAILET

HANDLER CHAIN

HELO/EHLO

AUTH

DATA

EXPN

MAIL

RCPT

HELP

VRFY

QUIT

RSET

NOOP

Apache James - The complete email application platform

Lower levelUse our API’s

Independent ModulesJust what you need

Test bedBe radical!

ReuseBe modular!

What Next?

• Mailet++– 100% independent 100% useful– Annotations– JNDI

• IMAP – the end in sight?

• Alternative Distributions– Make your own!

• JavaMail re-implement or re-write?

Apache James - The complete email application platform

Questions?Danny Angus

danny@apache.org

http://james.apache.org

http://www.google.com/search?q=danny+angus

top related