public abstract class EmailServer
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
Modifier | Constructor and Description |
---|---|
protected |
EmailServer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
authenticateUserNamePassword(String userName,
char[] password)
authenticate with a user/password
|
protected void |
filterSender(String sender)
Filter incoming message by its sender e-mail address.
|
AuthenticationComponent |
getAuthenticationComponent() |
protected String |
getDomain() |
protected EmailService |
getEmailService() |
protected int |
getMaxConnections()
Returns the maximum number of connection accepted by the server.
|
protected int |
getPort() |
boolean |
isAuthenticate() |
boolean |
isEnableTLS() |
boolean |
isHideTLS() |
protected boolean |
isNullReversePatAllowed() |
boolean |
isRequireTLS() |
static void |
main(String[] args) |
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
void |
setAllowedSenders(String allowedSenders)
Set the allowed senders as a comma separated list.
|
void |
setAllowedSendersList(List<String> allowedSenders) |
void |
setAuthenticate(boolean enableAuthentication) |
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent) |
void |
setBlockedSenders(String blockedSenders)
Set the blocked senders as a comma separated list.
|
void |
setBlockedSendersList(List<String> blockedSenders) |
void |
setDomain(String domain) |
void |
setEmailService(EmailService emailService) |
void |
setEnabled(boolean enabled) |
void |
setEnableTLS(boolean enableTLS) |
void |
setHideTLS(boolean hideTLS)
Hide the TLS (Trusted Login Session) option
|
void |
setMaxConnections(int maxConnections)
Sets the maximum number of connection accepted by the server
|
void |
setPort(int port) |
void |
setRequireTLS(boolean requireTLS) |
void |
setUnknownUser(String unknownUser)
Used only for check "isNullReversePatAllowed".
|
abstract void |
shutdown()
Method is called when server is shutting down.
|
abstract void |
startup()
Method is called when server is starting up.
|
public void setEnabled(boolean enabled)
enabled
- Enable/disable serverprotected String getDomain()
public void setDomain(String domain)
protected int getPort()
public void setPort(int port)
port
- SMTP port (25 is default)protected int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections
- public void setBlockedSenders(String blockedSenders)
blockedSenders
- a comman separated list of blocked senderspublic void setBlockedSendersList(List<String> blockedSenders)
blockedSenders
- a list of senders that are not allowed to email inpublic void setAllowedSenders(String allowedSenders)
allowedSenders
- a comman separated list of blocked senderspublic void setAllowedSendersList(List<String> allowedSenders)
allowedSenders
- a list of senders that are allowed to email inprotected EmailService getEmailService()
public void setEmailService(EmailService emailService)
emailService
- the service interface to interact withpublic void setUnknownUser(String unknownUser)
unknownUser
- authority nameprotected boolean isNullReversePatAllowed()
protected void filterSender(String sender)
sender
- An e-mail address of senderEmailMessageException
- if the e-mail is rejected accordingly with blocked and allowed listspublic abstract void startup()
public abstract void shutdown()
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
public static void main(String[] args)
protected boolean authenticateUserNamePassword(String userName, char[] password)
userName
- password
- public void setHideTLS(boolean hideTLS)
hideTLS
- public boolean isHideTLS()
public void setEnableTLS(boolean enableTLS)
public boolean isEnableTLS()
public void setRequireTLS(boolean requireTLS)
public boolean isRequireTLS()
public void setAuthenticate(boolean enableAuthentication)
public boolean isAuthenticate()
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
public AuthenticationComponent getAuthenticationComponent()
Copyright © 2005–2017 Alfresco Software. All rights reserved.