org.apache.james.transport.mailets

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » james 2.3.1 » org.apache.james.transport.mailets 
org.apache.james.transport.mailets
Java Source File NameTypeComment
AbstractAddFooter.javaClass
AbstractNotify.javaClass

Abstract mailet providing configurable notification services.
This mailet can be subclassed to make authoring notification mailets simple.

Provides the following functionalities to all notification subclasses:

  • A common notification message layout.
  • A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.
  • A notice text can be specified, and in such case will be inserted into the notification inline text.
  • If the notified message has an "error message" set, it will be inserted into the notification inline text.
AbstractRedirect.javaClass

Abstract mailet providing configurable redirection services.
This mailet can be subclassed to make authoring redirection mailets simple.
By extending it and overriding one or more of these methods new behaviour can be quickly created without the author having to address any other issue than the relevant one:

  • attachError() , should error messages be appended to the message
  • getAttachmentType(), what should be attached to the message
  • getInLineType(), what should be included in the message
  • getMessage(), The text of the message itself
  • getRecipients(), the recipients the mail is sent to
  • getReplyTo(), where replies to this message will be sent
  • getReversePath(), what to set the reverse-path to
  • getSender(), who the mail is from
  • getSubject(), a string to replace the message subject
  • getSubjectPrefix(), a prefix to be added to the message subject, possibly already replaced by a new subject
  • getTo(), a list of people to whom the mail is *apparently* sent
  • isReply(), should this mailet set the IN_REPLY_TO header to the id of the current message
  • getPassThrough(), should this mailet allow the original message to continue processing or GHOST it.
  • getFakeDomainCheck(), should this mailet check if the sender domain address is valid.
  • isStatic(), should this mailet run the get methods for every mail, or just once.

For each of the methods above (generically called "getX()" methods in this class and its subclasses), there is an associated "getX(Mail)" method and most times a "setX(Mail, Tx, Mail)" method.
The roles are the following:

  • a "getX()" method returns the correspondent "X" value that can be evaluated "statically" once at init time and then stored in a variable and made available for later use by a "getX(Mail)" method;
  • a "getX(Mail)" method is the one called to return the correspondent "X" value that can be evaluated "dynamically", tipically based on the currently serviced mail; the default behaviour is to return the value of getX();
  • a "setX(Mail, Tx, Mail)" method is called to change the correspondent "X" value of the redirected Mail object, using the value returned by "gexX(Mail)"; if such value is null, it does nothing.

Here follows the typical pattern of those methods:


 ...
AbstractVirtualUserTable.javaClass Provides an abstraction of common functionality needed for implementing a Virtual User Table.
AddFooter.javaClass This mailet will attach text to the end of the message (like a footer).
AddFooterTest.javaClass
AddHabeasWarrantMark.javaClass
AddHeader.javaClass
AvalonListserv.javaClass MailingListServer capability.

Requires a configuration element in the config.xml file of the form:
<mailet match="RecipientIs=LIST-ADDRESS" class="AvalonListserv">
<repositoryName>LIST-NAME</repositoryName>
<membersonly>[true|false]</membersonly>
<attachmentsallowed>[true|false]</attachmentsallowed>
<replytolist>[true|false]</replytolist>
<autobracket>[true|false]</autobracket>
<subjectprefix [xml:space="preserve"]>SUBJECT-PREFIX</subjectprefix>
</mailet>

repositoryName - the name of a user repository configured in the UsersStore block, e.g.,
<repository name="list-name" class="org.apache.james.userrepository.ListUsersJdbcRepository" destinationURL="db://maildb/lists/list-name">
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</repository>

or
<repository name="list-name" class="org.apache.james.userrepository.UsersFileRepository">
<destination URL="file://var/lists/list-name/"/>
</repository>

membersonly - if true only members can post to the list

attachmentsallowed - if false attachments are not allowed

replytolist - if true, replies go back to the list address; if false they go to the sender.

subjectprefix - a prefix that will be inserted at the front of the subject.

AvalonListservManager.javaClass Adds or removes an email address to a listserv.
BayesianAnalysis.javaClass

Spam detection mailet using bayesian analysis techniques.

Sets an email message header indicating the probability that an email message is SPAM.

Based upon the principals described in: A Plan For Spam by Paul Graham.

BayesianAnalysisFeeder.javaClass

Feeds ham OR spam messages to train the BayesianAnalysis mailet.

The new token frequencies will be stored in a JDBC database.

Sample configuration:


 <processor name="root">
 <mailet match="RecipientIs=not.spam@thisdomain.com" class="BayesianAnalysisFeeder">
 <repositoryPath> db://maildb </repositoryPath>
 <feedType>ham</feedType>
 <!--
 Set this to the maximum message size (in bytes) that a message may have
 to be analyzed (default is 100000).
Bounce.javaClass

Generates a response to the reverse-path address. Note that this is different than a mail-client's reply, which would use the Reply-To or From header.

Bounced messages are attached in their entirety (headers and content) and the resulting MIME part type is "message/rfc822".
The reverse-path and the Return-Path header of the response is set to "null" ("<>"), meaning that no reply should be sent.

A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.
A notice text can be specified, and in such case will be inserted into the notification inline text.
If the notified message has an "error message" set, it will be inserted into the notification inline text.

ClamAVScan.javaClass

Does an antivirus scan check using a ClamAV daemon (CLAMD)

Interacts directly with the daemon using the "stream" method, which should have the lowest possible overhead.

The CLAMD daemon will typically reside on localhost, but could reside on a different host. It may also consist on a set of multiple daemons, each residing on a different server and on different IP number. In such case a DNS host name with multiple IP addresses (round-robin load sharing) is supported by the mailet (but on the same port number).

Handles the following init parameters:

  • <debug>.
  • <host>: the host name of the server where CLAMD runs.
CommandListservFooter.javaClass CommandListservFooter is based on the AddFooter mailet.
CommandListservManager.javaClass CommandListservManager is the default implementation of ICommandListservManager .
CommandListservProcessor.javaClass CommandListservProcessor processes messages intended for the list serv mailing list.
DSNBounce.javaClass

Generates a Delivery Status Notification (DSN) Note that this is different than a mail-client's reply, which would use the Reply-To or From header.

Bounced messages are attached in their entirety (headers and content) and the resulting MIME part type is "message/rfc822".
The reverse-path and the Return-Path header of the response is set to "null" ("<>"), meaning that no reply should be sent.

A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.

Supports the passThrough init parameter (true if missing).

Sample configuration:


 <mailet match="All" class="DSNBounce">
 <sender>an address or postmaster or sender or unaltered, 
 default=postmaster</sender>
 <prefix>optional subject prefix prepended to the original 
 message</prefix>
 <attachment>message, heads or none, default=message</attachment>
 <messageString>the message sent in the bounce, the first occurrence of the pattern [machine] is replaced with the name of the executing machine, default=Hi.
Forward.javaClass

Replaces incoming recipients with those specified, and resends the message unaltered.

Can be totally replaced by an equivalent usage of Resend (see below), simply replacing <forwardto> with <recipients>.

FromRepository.javaClass Re-spools Mail found in the specified Repository.
GenericListserv.javaClass An abstract implementation of a listserv.
GenericListservManager.javaClass An abstract implementation of a listserv manager.
ICommandListservManager.javaInterface ICommandListservManager is the interface that describes the functionality of any command based list serv managers.
JDBCAlias.javaClass Rewrites recipient addresses based on a database table.
JDBCListserv.javaClass Rewrites recipient addresses based on a database table.
JDBCVirtualUserTable.javaClass Implements a Virtual User Table for JAMES.
LocalDelivery.javaClass Receives a Mail from JamesSpoolManager and takes care of delivery of the message to local inboxes.
LogMessage.javaClass Logs Message Headers and/or Body. If the "passThrough" in confs is true the mail will be left untouched in the pipe.
MailetLoaderTestMailet.javaClass
NotifyPostmaster.javaClass

Sends a notification message to the Postmaster.

A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.
The "To:" header of the notification message can be set to "unaltered"; if missing will be set to the postmaster.
A notice text can be specified, and in such case will be inserted into the notification inline text.
If the notified message has an "error message" set, it will be inserted into the notification inline text.

NotifySender.javaClass

Sends a notification message to the sender of a message.

A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.
The "To:" header of the notification message can be set to "unaltered"; if missing will be set to the sender of the notified message.
A notice text can be specified, and in such case will be inserted into the notification inline text.
If the notified message has an "error message" set, it will be inserted into the notification inline text.

Null.javaClass Simplest Mailet which destroys any incoming messages.
PostmasterAlias.javaClass Rewrites recipient addresses to make sure email for the postmaster is always handled.
Redirect.javaClass

A mailet providing configurable redirection services.

Can produce listserver, forward and notify behaviour, with the original message intact, attached, appended or left out altogether.

It differs from Resend because (i) some defaults are different, notably for the following parameters: <recipients>, <to>, <reversePath> and <inline>; (ii) because it allows the use of the <static> parameter;.
Use Resend if you need full control, Redirect if the more automatic behaviour of some parameters is appropriate.

This built in functionality is controlled by the configuration as laid out below. In the table please note that the parameters controlling message headers accept the "unaltered" value, whose meaning is to keep the associated header unchanged and, unless stated differently, corresponds to the assumed default if the parameter is missing.

The configuration parameters are:

<recipients> A comma delimited list of addresses for recipients of this message; it will use the "to" list if not specified, and "unaltered" if none of the lists is specified.
These addresses will only appear in the To: header if no "to" list is supplied.
Such addresses can contain "full names", like Mr.
RemoteDelivery.javaClass Receives a MessageContainer from JamesSpoolManager and takes care of delivery the message to remote hosts.
RemoteDeliverySocketFactory.javaClass It is used by RemoteDelivery in order to make possible to bind the client socket to a specific ip address. This is not a nice solution because the ip address must be shared by all RemoteDelivery instances.
RemoveAllMailAttributes.javaClass
RemoveMailAttribute.javaClass This mailet sets attributes on the Mail.
Resend.javaClass

A mailet providing configurable redirection services.

Can produce listserver, forward and notify behaviour, with the original message intact, attached, appended or left out altogether. Can be used as a replacement to Redirect , having more consistent defaults, and new options available.
Use Resend if you need full control, Redirect if the more automatic behaviour of some parameters is appropriate.

This built in functionality is controlled by the configuration as laid out below. In the table please note that the parameters controlling message headers accept the "unaltered" value, whose meaning is to keep the associated header unchanged and, unless stated differently, corresponds to the assumed default if the parameter is missing.

The configuration parameters are:

<recipients> A comma delimited list of addresses for recipients of this message.
Such addresses can contain "full names", like Mr.
ServerTime.javaClass Returns the current time for the mail server.
SetMailAttribute.javaClass This mailet sets attributes on the Mail.
SetMimeHeader.javaClass Adds a specified header and value to the message.
SetMimeHeaderTest.javaClass
ToMultiRepository.javaClass Receives a Mail from JamesSpoolManager and takes care of delivery of the message to local inboxes or a specific repository.
ToProcessor.javaClass
ToProcessorTest.javaClass
ToRepository.javaClass Stores incoming Mail in the specified Repository. If the "passThrough" in confs is true the mail will be returned untouched in the pipe.
UseHeaderRecipients.javaClass

Mailet designed to process the recipients from the mail headers rather than the recipients specified in the SMTP message header.

UsersRepositoryAliasingForwarding.javaClass Receives a Mail from JamesSpoolManager and takes care of delivery of the message to local inboxes. Available configurations are: true: specify wether the user aliases should be looked up or not.
WhiteListManager.javaClass

Manages for each local user a "white list" of remote addresses whose messages should never be blocked as spam.

The normal behaviour is to check, for a local sender, if a remote recipient is already in the list: if not, it will be automatically inserted.

XMLVirtualUserTable.javaClass Implements a Virtual User Table to translate virtual users to real users.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.