SK.gnome.dwarf.mail.smtp
Class FileSMTPHost

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.GenericServer
          extended bySK.gnome.dwarf.mail.MailHost
              extended bySK.gnome.dwarf.mail.smtp.SMTPHost
                  extended bySK.gnome.dwarf.mail.smtp.FileSMTPHost
All Implemented Interfaces:
SK.gnome.dwarf.Reportable, SK.gnome.dwarf.Server, SK.gnome.dwarf.Service

public class FileSMTPHost
extends SMTPHost

Provides filesystem-based SMTP host.


Field Summary
protected  SK.gnome.dwarf.utils.StringProperties aliases
           
 
Fields inherited from class SK.gnome.dwarf.mail.MailHost
aclStore, hostId, mailStore, stripDomain, userStore
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
FileSMTPHost(java.lang.String name)
           
 
Method Summary
 java.lang.String[] expandAlias(java.lang.String username)
          Expands the given alias name to a list of addresses.
 void init(SK.gnome.dwarf.Server parent)
          Initializes the service.
 void reload()
          Reloads the alias database.
 void setAliases(SK.gnome.dwarf.utils.StringProperties aliases)
           
 
Methods inherited from class SK.gnome.dwarf.mail.MailHost
addService, getACLStore, getHostId, getMailStore, getUserStore, mapVirtualUser, setHostId, setStripDomain, stripDomain
 
Methods inherited from class SK.gnome.dwarf.GenericServer
addService, getAuthenticator, getLogger, getParameters, getService, getServices, getServices, removeService, report, shutdown, start, stop
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getName, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface SK.gnome.dwarf.Service
getFullName, getName, getState, log, log, login, logout
 

Field Detail

aliases

protected SK.gnome.dwarf.utils.StringProperties aliases
Constructor Detail

FileSMTPHost

public FileSMTPHost(java.lang.String name)
Method Detail

setAliases

public void setAliases(SK.gnome.dwarf.utils.StringProperties aliases)

init

public void init(SK.gnome.dwarf.Server parent)
          throws SK.gnome.dwarf.ServiceException
Description copied from class: SMTPHost
Initializes the service.

If the parent server is not an instance of the SMTPServer class, the IllegalServiceClassException is thrown.

Specified by:
init in interface SK.gnome.dwarf.Service
Overrides:
init in class SMTPHost
Throws:
SK.gnome.dwarf.ServiceException

expandAlias

public java.lang.String[] expandAlias(java.lang.String username)
Description copied from class: SMTPHost
Expands the given alias name to a list of addresses.

If the user argument is an alias, it is expanded to an array of addresses and returned back. The argument value is always a simple local name without the '@' character and a domain part after it. The returned addresses may or need not contain the domain part. It they do not contain it, the original domain of user's address will be appended to them automatically.

Specified by:
expandAlias in class SMTPHost
Parameters:
username - the user identiciation
Returns:
the array of RFC 822 addresses

reload

public void reload()
            throws MailException
Description copied from class: SMTPHost
Reloads the alias database.

It reloads the database of aliases to reflect the changes made by the outside world.

Specified by:
reload in class SMTPHost
Throws:
MailException - if an error occured


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.