Class EmailServer

java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.email.server.EmailServer
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
Direct Known Subclasses:
SubethaEmailServer

public abstract class EmailServer extends org.springframework.extensions.surf.util.AbstractLifecycleBean
Base implementation of an email server.
Since:
2.2
  • Constructor Details

    • EmailServer

      protected EmailServer()
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Parameters:
      enabled - Enable/disable server
    • getDomain

      protected String getDomain()
    • setDomain

      public void setDomain(String domain)
    • getPort

      protected int getPort()
    • setPort

      public void setPort(int port)
      Parameters:
      port - SMTP port (25 is default)
    • getMaxConnections

      protected int getMaxConnections()
      Returns the maximum number of connection accepted by the server.
      Returns:
      the maximum number of connections
    • setMaxConnections

      public void setMaxConnections(int maxConnections)
      Sets the maximum number of connection accepted by the server
      Parameters:
      maxConnections -
    • setBlockedSenders

      public void setBlockedSenders(String blockedSenders)
      Set the blocked senders as a comma separated list. The entries will be trimmed of all whitespace.
      Parameters:
      blockedSenders - a comman separated list of blocked senders
    • setBlockedSendersList

      public void setBlockedSendersList(List<String> blockedSenders)
      Parameters:
      blockedSenders - a list of senders that are not allowed to email in
    • setAllowedSenders

      public void setAllowedSenders(String allowedSenders)
      Set the allowed senders as a comma separated list. The entries will be trimmed of all whitespace.
      Parameters:
      allowedSenders - a comman separated list of blocked senders
    • setAllowedSendersList

      public void setAllowedSendersList(List<String> allowedSenders)
      Parameters:
      allowedSenders - a list of senders that are allowed to email in
    • getEmailService

      protected EmailService getEmailService()
      Returns:
      the service interface to interact with
    • setEmailService

      public void setEmailService(EmailService emailService)
      Parameters:
      emailService - the service interface to interact with
    • setUnknownUser

      public void setUnknownUser(String unknownUser)
      Used only for check "isNullReversePatAllowed".
      Parameters:
      unknownUser - authority name
    • isNullReversePatAllowed

      protected boolean isNullReversePatAllowed()
    • filterSender

      protected void filterSender(String sender)
      Filter incoming message by its sender e-mail address.
      Parameters:
      sender - An e-mail address of sender
      Throws:
      EmailMessageException - if the e-mail is rejected accordingly with blocked and allowed lists
    • startup

      public abstract void startup()
      Method is called when server is starting up.
    • shutdown

      public abstract void shutdown()
      Method is called when server is shutting down.
    • onBootstrap

      protected void onBootstrap(org.springframework.context.ApplicationEvent event)
      Specified by:
      onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
    • onShutdown

      protected void onShutdown(org.springframework.context.ApplicationEvent event)
      Specified by:
      onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean
    • authenticateUserNamePassword

      protected boolean authenticateUserNamePassword(String userName, char[] password)
      authenticate with a user/password
      Parameters:
      userName -
      password -
      Returns:
      true - authenticated
    • setHideTLS

      public void setHideTLS(boolean hideTLS)
      Hide the TLS (Trusted Login Session) option
      Parameters:
      hideTLS -
    • isHideTLS

      public boolean isHideTLS()
    • setEnableTLS

      public void setEnableTLS(boolean enableTLS)
    • isEnableTLS

      public boolean isEnableTLS()
    • setRequireTLS

      public void setRequireTLS(boolean requireTLS)
    • isRequireTLS

      public boolean isRequireTLS()
    • setAuthenticate

      public void setAuthenticate(boolean enableAuthentication)
    • isAuthenticate

      public boolean isAuthenticate()
    • setAuthenticationComponent

      public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
    • getAuthenticationComponent

      public AuthenticationComponent getAuthenticationComponent()