com.ericdaugherty.mail.server.services.general
Class DeliveryService

java.lang.Object
  extended by com.ericdaugherty.mail.server.services.general.DeliveryService
All Implemented Interfaces:
ConfigurationParameterConstants

public class DeliveryService
extends java.lang.Object
implements ConfigurationParameterConstants

Handles the evalution of general mail delivery rules, including SMTP Relaying.

Author:
Eric Daugherty

Field Summary
 
Fields inherited from interface com.ericdaugherty.mail.server.configuration.ConfigurationParameterConstants
ACTIVATE_AMAVISD, ADD_PCT_RCPT, ALLOWCLEARTEXT, ALWAYS, AMAVISD_FILTERED_SMTPPORT, AMAVISD_INCOMING_DIRECTORY, AMAVISD_LISTEN_ADDRESS, AMAVISD_SMTPPORT, CLIENTAUTH_TYPE, CONFIG_ADDRESS, CONFIG_PORT, DEFAULT_MAILBOX, DEFAULT_SMTP_SERVERS, DISABLE_WARNING, DOMAINS, ENABLE_HELO, ENABLE_SECURITYMANAGER, ENABLED_CIPHERS, ENABLED_PROTOCOLS, ENCRYPTEDONLY, EXECUTE_THREADS, EXTERNAL_DELEGATED, FILE_ENCODING, KEYSTORELOCATION, KEYSTOREPROVIDER, KEYSTORETYPE, LISTEN_ADDRESS, LOCALE_COUNTRY, LOCALE_LANGUAGE, LOGGING_DEFAULT_THRESHOLD, MAIL_RETRIEVAL_MODE, MAIL_TRANSFER_MODE, MAX_ERROR_COUNT, MAX_PASS_ATTEMPTS, MAX_VALID_RCPT, MIME8BIT, MIN_PCT_FAIL_RCPT, MIN_TOT_FAIL_RCPT, NEVER, NOTIFY_DEFAULT, OS_NAME, OUTGOINGSECURE, POP3PORT, REALM_DEF_PREFIX, REJECT_NON_EXISTENT_LOCAL, RELAY_ADDRESSLIST, RELAY_EMAILSLIST, RELAY_POP_BEFORE_SMTP, RELAY_POP_BEFORE_SMTP_TIMEOUT, SASL_DIGEST_MD5_CIPHERS, SASL_DIGEST_MD5_ENABLE, SASL_GSS_ENABLE, SASL_GSS_KDC, SASL_GSS_KEYTAB, SASL_GSS_PRINCIPAL, SASL_GSS_REALM, SASL_GSS_STOREKEY, SASL_GSS_USEKEYTAB, SASL_QOP, SECURE_EXECUTE_THREADS, SECUREACTIVE, SECUREPOP3PORT, SECURESMTPPORT, SMTP_DELIVERY_INTERVAL, SMTP_DELIVERY_THRESHOLD, SMTP_MAX_MESSAGE_SIZE, SMTPDIRECTORY, SMTPPORT, STANDARDPOP3SECURE, STANDARDSMTPSECURE, TESTING_DESTINATION, TRUSTSTORELOCATION, TRUSTSTOREPROVIDER, TRUSTSTORETYPE, USER_DEF_PREFIX, USER_FILE_FORWARDS, USER_PROPERTY_PREFIX, USERSDIRECTORY, VERIFY_IP
 
Constructor Summary
protected DeliveryService()
          Load the parameters from the Mail configuration.
 
Method Summary
 boolean acceptAddress(EmailAddress address, java.lang.String clientIp, EmailAddress clientFromAddress)
          Checks an address to see if we should accept it for delivery.
static DeliveryService getDeliveryService()
          Accessor for the singleton instance for this class.
 void ipAuthenticated(java.lang.String clientIp)
          This method should be called whenever a client authenticates themselves.
 boolean isLocalAddress(EmailAddress address)
          Determines if the domain for the specified email address is hosted locally in this mail server.
 boolean isMailboxLocked(EmailAddress address)
          Checks to see if a user currently has the specified mailbox locked.
 void lockMailbox(EmailAddress address)
          This method locks a mailbox so that two clients can not access the same mailbox at the same time.
 void unlockMailbox(EmailAddress address)
          Unlocks an mailbox.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeliveryService

protected DeliveryService()
Load the parameters from the Mail configuration.

Method Detail

getDeliveryService

public static DeliveryService getDeliveryService()
Accessor for the singleton instance for this class.


isLocalAddress

public boolean isLocalAddress(EmailAddress address)
Determines if the domain for the specified email address is hosted locally in this mail server.


acceptAddress

public boolean acceptAddress(EmailAddress address,
                             java.lang.String clientIp,
                             EmailAddress clientFromAddress)
Checks an address to see if we should accept it for delivery.


ipAuthenticated

public void ipAuthenticated(java.lang.String clientIp)
This method should be called whenever a client authenticates themselves.


lockMailbox

public void lockMailbox(EmailAddress address)
This method locks a mailbox so that two clients can not access the same mailbox at the same time.


isMailboxLocked

public boolean isMailboxLocked(EmailAddress address)
Checks to see if a user currently has the specified mailbox locked.


unlockMailbox

public void unlockMailbox(EmailAddress address)
Unlocks an mailbox.