| java.lang.Object org.apache.mailet.GenericMailet org.apache.james.transport.mailets.CommandListservProcessor
CommandListservProcessor | public class CommandListservProcessor extends GenericMailet (Code) | | CommandListservProcessor processes messages intended for the list serv mailing list.
For command handling, see
CommandListservManager
This class is based on the existing list serv processor shipped with James.
To configure the CommandListservProcessor place this configuratin in the root processor:
<mailet match="RecipientIs=announce@localhost" class="CommandListservProcessor">
<membersonly>false</membersonly>
<attachmentsallowed>true</attachmentsallowed>
<replytolist>true</replytolist>
<repositoryName>list-announce</repositoryName>
<subjectprefix>Announce</subjectprefix>
<autobracket>true</autobracket>
<listOwner>owner@localhost</listOwner>
<listName>announce</listName>
</mailet>
version: CVS $Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $ since: 2.2.0 |
attachmentsAllowed | protected boolean attachmentsAllowed(Code) | | Whether attachments can be sent to the list specified by the config param: 'attachmentsallowed'.
eg: <attachmentsallowed>true</attachmentsallowed>
Defaults to true
|
autoBracket | protected boolean autoBracket(Code) | | Whether the subject prefix should be bracketed with '[' and ']'
specified by the config param: 'autoBracket'.
eg: <autoBracket>true</autoBracket>
Defaults to true
|
listName | protected String listName(Code) | | Name of the mailing list
specified by the config param: 'listName'.
eg: <listName>announce</listName>
|
listOwner | protected MailAddress listOwner(Code) | | The list owner
specified by the config param: 'listOwner'.
eg: <listOwner>owner@localhost</listOwner>
|
membersOnly | protected boolean membersOnly(Code) | | Whether only members can post to the list specified by the config param: 'membersonly'.
eg: <membersonly>false</membersonly>
Defaults to false
|
replyToList | protected boolean replyToList(Code) | | Whether the reply-to header should be set to the list address
specified by the config param: 'replytolist'.
eg: <replytolist>true</replytolist>
Defaults to true
|
specificPostersOnly | protected boolean specificPostersOnly(Code) | | |
subjectPrefix | protected String subjectPrefix(Code) | | A String to prepend to the subject of the message when it is sent to the list
specified by the config param: 'subjectPrefix'.
eg: <subjectPrefix>MyList</subjectPrefix>
For example: MyList
|
usersRepository | protected UsersRepository usersRepository(Code) | | The repository containing the users on this list
specified by the config param: 'repositoryName'.
eg: <repositoryName>list-announce</repositoryName>
|
addFooter | protected void addFooter(Mail mail) throws MessagingException(Code) | | Add the footer using
CommandListservFooter Parameters: mail - throws: MessagingException - |
checkAllowedPoster | protected boolean checkAllowedPoster(Mail mail, Collection members) throws MessagingException(Code) | | Returns true if this user is ok to send to the list
Parameters: mail - true if this message is ok, false otherwise throws: MessagingException - |
checkAnnouncements | protected boolean checkAnnouncements(Mail mail) throws IOException, MessagingException(Code) | | Returns true if this is ok to send to the list
Parameters: mail - true if this message is ok, false otherwise throws: IOException - throws: MessagingException - |
checkBeenThere | protected boolean checkBeenThere(MailAddress listservAddr, Mail mail) throws MessagingException(Code) | | return true if this is ok, false otherwise
Check if the X-been-there header is set to the listserv's name
(the address). If it has, this means it's a message from this
listserv that's getting bounced back, so we need to swallow it
Parameters: listservAddr - Parameters: mail - true if this message has already bounced, false otherwse throws: MessagingException - |
checkMembers | protected boolean checkMembers(Collection members, Mail mail) throws MessagingException(Code) | | Returns true if this user is ok to send to the list
Parameters: members - Parameters: mail - true if this message is ok, false otherwise throws: MessagingException - |
getBoolean | protected boolean getBoolean(String attrName, boolean defValue)(Code) | | Get a configuration value
Parameters: attrName - Parameters: defValue - the value if found, defValue otherwise |
getCommandListservFooter | protected CommandListservFooter getCommandListservFooter() throws MessagingException(Code) | | Lazy init
throws: MessagingException - |
getString | protected String getString(String attrName, String defValue)(Code) | | Get a configuration value
Parameters: attrName - Parameters: defValue - the attrValue if found, defValue otherwise |
init | public void init() throws MessagingException(Code) | | Initialize the mailet
|
initAllowedPosters | protected void initAllowedPosters(Configuration configuration) throws Exception(Code) | | |
initUsersRepository | protected void initUsersRepository() throws Exception(Code) | | Fetch the repository of users
|
initializeResources | protected void initializeResources() throws Exception(Code) | | initialize the resources
throws: Exception - |
prepareListMessage | protected MimeMessage prepareListMessage(Mail mail, MailAddress listservAddr) throws MessagingException(Code) | | Create a new message with some set headers
Parameters: mail - Parameters: listservAddr - a prepared List Message throws: MessagingException - |
service | public void service(Mail mail) throws MessagingException(Code) | | A message was sent to the list serv. Broadcast if appropriate...
Parameters: mail - throws: MessagingException - |
setSubject | protected void setSubject(MimeMessage message) throws MessagingException(Code) | | |
|
|