|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.mailet.GenericMailet | +--org.apache.james.transport.mailets.GenericListserv | +--org.apache.james.transport.mailets.JDBCListserv
Rewrites recipient addresses based on a database table. The connection is configured by passing the URL to a conn definition. You need to set the table name to check (or view) along with the source and target columns to use. For example, <mailet match="All" class="JDBCAlias"> <data_source>maildb</datasource> <listserv_id>mylistserv</listserv_id> <listserv_table>source_email_address</listserv_table> <members_table>target_email_address</members_table> </mailet> This mailet will cache the settings available when first initialized. If you wish it to reload for each message, add the init parameter <cache_settings>false</cache_settings>
Field Summary | |
protected boolean |
attachmentsAllowed
|
protected boolean |
cacheSettings
|
protected org.apache.avalon.excalibur.datasource.DataSourceComponent |
datasource
|
protected MailAddress |
listservAddress
|
protected java.lang.String |
listservID
|
protected java.lang.String |
listservQuery
|
protected java.lang.String |
listservTable
|
protected java.util.Collection |
members
|
protected boolean |
membersOnly
|
protected java.lang.String |
membersQuery
|
protected java.lang.String |
membersTable
|
protected boolean |
replyToList
|
protected java.lang.String |
subjectPrefix
|
Constructor Summary | |
JDBCListserv()
|
Method Summary | |
MailAddress |
getListservAddress()
The email address that this listserv processes on. |
java.lang.String |
getMailetInfo()
Returns information about the mailet, such as author, version, and copyright. |
java.util.Collection |
getMembers()
Returns a Collection of MailAddress objects of members to receive this email |
java.lang.String |
getSubjectPrefix()
An optional subject prefix which will be surrounded by []. |
void |
init()
A convenience method which can be overridden so that there's no need to call super.init(config). |
boolean |
isAttachmentsAllowed()
Returns whether this listserv allow attachments |
boolean |
isMembersOnly()
Returns whether this list should restrict to senders only |
boolean |
isReplyToList()
Returns whether listserv should add reply-to header |
protected void |
loadSettings()
|
Methods inherited from class org.apache.james.transport.mailets.GenericListserv |
service |
Methods inherited from class org.apache.mailet.GenericMailet |
destroy, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.avalon.excalibur.datasource.DataSourceComponent datasource
protected java.lang.String listservID
protected java.lang.String listservTable
protected java.lang.String membersTable
protected boolean cacheSettings
protected java.util.Collection members
protected boolean membersOnly
protected boolean attachmentsAllowed
protected boolean replyToList
protected MailAddress listservAddress
protected java.lang.String subjectPrefix
protected java.lang.String listservQuery
protected java.lang.String membersQuery
Constructor Detail |
public JDBCListserv()
Method Detail |
public void init() throws javax.mail.MessagingException
GenericMailet
init
in class GenericMailet
javax.mail.MessagingException
- if an exception occurs that interrupts the mailet's normal operationpublic java.util.Collection getMembers() throws javax.mail.MessagingException
getMembers
in class GenericListserv
javax.mail.MessagingException
public boolean isMembersOnly() throws javax.mail.MessagingException
isMembersOnly
in class GenericListserv
javax.mail.MessagingException
public boolean isAttachmentsAllowed() throws javax.mail.MessagingException
isAttachmentsAllowed
in class GenericListserv
javax.mail.MessagingException
public boolean isReplyToList() throws javax.mail.MessagingException
isReplyToList
in class GenericListserv
javax.mail.MessagingException
public MailAddress getListservAddress() throws javax.mail.MessagingException
getListservAddress
in class GenericListserv
javax.mail.MessagingException
public java.lang.String getSubjectPrefix() throws javax.mail.MessagingException
getSubjectPrefix
in class GenericListserv
javax.mail.MessagingException
protected void loadSettings() throws javax.mail.MessagingException
javax.mail.MessagingException
public java.lang.String getMailetInfo()
GenericMailet
getMailetInfo
in interface Mailet
getMailetInfo
in class GenericMailet
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |