FileDocCategorySizeDatePackage
ParsedConfiguration.javaAPI DocApache James 2.3.131938Fri Jan 12 12:56:24 GMT 2007org.apache.james.fetchmail

ParsedConfiguration

public class ParsedConfiguration extends Object

Parses and validates an org.apache.avalon.framework.configuration.Configuration.

Creation Date: 27-May-03

Fields Summary
private org.apache.avalon.framework.logger.Logger
fieldLogger
The logger.
private String
fieldJavaMailFolderName
The name of the folder to fetch from the javamail provider
private String
fieldJavaMailProviderName
The name of the javamail provider we want to user (pop3,imap,nntp,etc...)
private boolean
fieldFetchAll
Fetch both old (seen) and new messages from the mailserver. The default is to fetch only messages the server are not marked as seen.
private String
fieldFetchTaskName
The unique, identifying name for this task
private String
fieldHost
The server host name for this fetch task
private boolean
fieldLeave
Keep retrieved messages on the remote mailserver. Normally, messages are deleted from the folder on the mailserver after they have been retrieved
private boolean
fieldLeaveBlacklisted
Keep blacklisted messages on the remote mailserver. Normally, messages are kept in the folder on the mailserver if they have been rejected
private boolean
fieldLeaveRemoteRecipient
Keep messages for remote recipients on the remote mailserver. Normally, messages are kept in the folder on the mailserver if they have been rejected.
private boolean
fieldLeaveUserUndefined
Keep messages for undefined users on the remote mailserver. Normally, messages are kept in the folder on the mailserver if they have been rejected.
private boolean
fieldLeaveUndeliverable
Keep undeliverable messages on the remote mailserver. Normally, messages are kept in the folder on the mailserver if they cannot be delivered.
private boolean
fieldMarkSeen
Mark retrieved messages on the remote mailserver as seen. Normally, messages are marked as seen after they have been retrieved
private boolean
fieldMarkBlacklistedSeen
Mark blacklisted messages on the remote mailserver as seen. Normally, messages are not marked as seen if they have been rejected
private boolean
fieldMarkRemoteRecipientSeen
Mark remote recipient messages on the remote mailserver as seen. Normally, messages are not marked as seen if they have been rejected
private boolean
fieldMarkUserUndefinedSeen
Mark messages for undefined users on the remote mail server as seen. Normally, messages are not marked as seen if they have been rejected.
private boolean
fieldMarkUndeliverableSeen
Mark undeliverable messages on the remote mail server as seen. Normally, messages are not marked as seen if they are undeliverable.
private boolean
fieldDeferRecipientNotFound
Defer processing of messages for which the intended recipient cannot be determined to the next pass.
private boolean
fieldRecurse
Recurse folders if available?
private org.apache.james.services.MailServer
fieldServer
The MailServer service
private String
fieldDefaultDomainName
The domain part to use to complete partial addresses
private boolean
fieldRejectUserUndefined
Only accept mail for defined recipients. All other mail is rejected.
private int
fieldRemoteReceivedHeaderIndex
The index of the received header to use to compute the remote address and remote host name for a message. This is 0 based and defaults to -1.
private boolean
fieldLeaveRemoteReceivedHeaderInvalid
Keep messages with an invalid received header on the remote mailserver. Normally, messages are kept in the folder on the mailserver if they have been rejected
private boolean
fieldMarkRemoteReceivedHeaderInvalidSeen
Mark messages with an invalid received header on the remote mailserver as seen. Normally, messages are not marked as seen if they have been rejected.
private boolean
fieldRejectRemoteReceivedHeaderInvalid
Reject messages with an invalid received header.
private boolean
fieldRejectRecipientNotFound
Reject messages for which a recipient could not be determined.
private boolean
fieldLeaveRecipientNotFound
Leave messages on the server for which a recipient could not be determined.
private boolean
fieldMarkRecipientNotFoundSeen
Mark as seen messages on the server for which a recipient could not be determined.
private boolean
fieldRejectBlacklisted
Reject mail for blacklisted users
private boolean
fieldRejectRemoteRecipient
Only accept mail for local recipients. All other mail is rejected.
private Set
fieldBlacklist
The Set of MailAddresses for whom mail should be rejected
private int
fieldMaxMessageSizeLimit
The maximum message size limit 0 means no limit.
private boolean
fieldRejectMaxMessageSizeExceeded
Reject mail exceeding the maximum message size limit
private boolean
fieldLeaveMaxMessageSizeExceeded
Leave messages on the server that exceed the maximum message size limit.
private boolean
fieldMarkMaxMessageSizeExceededSeen
Mark as seen messages on the server that exceed the maximum message size limit.
private org.apache.james.services.UsersRepository
fieldLocalUsers
The Local Users repository
Constructors Summary
private ParsedConfiguration()
Constructor for ParsedConfiguration.

    



            
     
    
        super();
    
public ParsedConfiguration(org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.logger.Logger logger, org.apache.james.services.MailServer server, org.apache.james.services.UsersRepository localUsers)
Constructor for ParsedConfiguration.

param
configuration
param
logger
param
server
param
localUsers
throws
ConfigurationException

        this();
        setLogger(logger);
        setServer(server);
        setLocalUsers(localUsers);      
        configure(configuration);
    
Methods Summary
protected java.lang.StringcomputeDefaultDomainName()
Computes the defaultDomainName.

        String hostName = null;
        try
        {
            // These shenanigans are required to get the fully qualified
            // hostname prior to JDK 1.4 in which get getCanonicalHostName()
            // does the job for us
            InetAddress addr1 = java.net.InetAddress.getLocalHost();
            InetAddress addr2 = addr1.getByName(addr1.getHostAddress());
            hostName = addr2.getHostName();
        }
        catch (UnknownHostException ue)
        {
            hostName = "localhost";
        }
        return hostName;
    
protected voidconfigure(org.apache.avalon.framework.configuration.Configuration conf)

see
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)

        setHost(conf.getChild("host").getValue());

        setFetchTaskName(conf.getAttribute("name"));
        setJavaMailProviderName(
            conf.getChild("javaMailProviderName").getValue());
        setJavaMailFolderName(conf.getChild("javaMailFolderName").getValue());
        setRecurse(conf.getChild("recursesubfolders").getValueAsBoolean());

        Configuration recipientNotFound = conf.getChild("recipientnotfound");
        setDeferRecipientNotFound(
            recipientNotFound.getAttributeAsBoolean("defer"));
        setRejectRecipientNotFound(
            recipientNotFound.getAttributeAsBoolean("reject"));
        setLeaveRecipientNotFound(
            recipientNotFound.getAttributeAsBoolean("leaveonserver"));
        setMarkRecipientNotFoundSeen(
            recipientNotFound.getAttributeAsBoolean("markseen"));

        Configuration defaultDomainName = conf.getChild("defaultdomain", false);
        if (null != defaultDomainName)
            setDefaultDomainName(defaultDomainName.getValue());

        setFetchAll(conf.getChild("fetchall").getValueAsBoolean());

        Configuration fetched = conf.getChild("fetched");
        setLeave(fetched.getAttributeAsBoolean("leaveonserver"));
        setMarkSeen(fetched.getAttributeAsBoolean("markseen"));

        Configuration remoterecipient = conf.getChild("remoterecipient");
        setRejectRemoteRecipient(
            remoterecipient.getAttributeAsBoolean("reject"));
        setLeaveRemoteRecipient(
            remoterecipient.getAttributeAsBoolean("leaveonserver"));
        setMarkRemoteRecipientSeen(
            remoterecipient.getAttributeAsBoolean("markseen"));

        Configuration blacklist = conf.getChild("blacklist");
        setBlacklist(blacklist.getValue(""));
        setRejectBlacklisted(blacklist.getAttributeAsBoolean("reject"));
        setLeaveBlacklisted(blacklist.getAttributeAsBoolean("leaveonserver"));
        setMarkBlacklistedSeen(blacklist.getAttributeAsBoolean("markseen"));

        Configuration userundefined = conf.getChild("userundefined");
        setRejectUserUndefined(userundefined.getAttributeAsBoolean("reject"));
        setLeaveUserUndefined(
            userundefined.getAttributeAsBoolean("leaveonserver"));
        setMarkUserUndefinedSeen(
            userundefined.getAttributeAsBoolean("markseen"));

        Configuration undeliverable = conf.getChild("undeliverable");
        setLeaveUndeliverable(
            undeliverable.getAttributeAsBoolean("leaveonserver"));
        setMarkUndeliverableSeen(
            undeliverable.getAttributeAsBoolean("markseen"));

        Configuration remotereceivedheader = conf.getChild("remotereceivedheader", false);
        if (null != remotereceivedheader)
        {
            setRemoteReceivedHeaderIndex(
                remotereceivedheader.getAttributeAsInteger("index"));
            setRejectRemoteReceivedHeaderInvalid(
                remotereceivedheader.getAttributeAsBoolean("reject"));
            setLeaveRemoteReceivedHeaderInvalid(
                remotereceivedheader.getAttributeAsBoolean("leaveonserver"));
            setMarkRemoteReceivedHeaderInvalidSeen(
                remotereceivedheader.getAttributeAsBoolean("markseen"));
        }            

        Configuration maxmessagesize = conf.getChild("maxmessagesize", false);
        if (null != maxmessagesize)
        {
            setMaxMessageSizeLimit(
                maxmessagesize.getAttributeAsInteger("limit") * 1024);
            setRejectMaxMessageSizeExceeded(
                maxmessagesize.getAttributeAsBoolean("reject"));
            setLeaveMaxMessageSizeExceeded(
                maxmessagesize.getAttributeAsBoolean("leaveonserver"));
            setMarkMaxMessageSizeExceededSeen(
                maxmessagesize.getAttributeAsBoolean("markseen"));
        }

        if (getLogger().isDebugEnabled())
        {
            getLogger().info(
                "Configured FetchMail fetch task " + getFetchTaskName());
        }
    
public java.util.SetgetBlacklist()
Returns the blacklist.

return
Set

        return fieldBlacklist;
    
public java.lang.StringgetDefaultDomainName()
Returns the defaultDomainName. Lazy initializes if required.

return
String

        String defaultDomainName = null;
        if (null == (defaultDomainName = getDefaultDomainNameBasic()))
        {
            updateDefaultDomainName();
            return getDefaultDomainName();
        }   
        return defaultDomainName;
    
private java.lang.StringgetDefaultDomainNameBasic()
Returns the defaultDomainName.

return
String

        return fieldDefaultDomainName;
    
public java.lang.StringgetFetchTaskName()
Returns the fetchTaskName.

return
String

        return fieldFetchTaskName;
    
public java.lang.StringgetHost()
Returns the host.

return
String

        return fieldHost;
    
public java.lang.StringgetJavaMailFolderName()
Returns the javaMailFolderName.

return
String



              
      
    
        return fieldJavaMailFolderName;
    
public java.lang.StringgetJavaMailProviderName()
Returns the javaMailProviderName.

return
String

        return fieldJavaMailProviderName;
    
public org.apache.james.services.UsersRepositorygetLocalUsers()
Returns the localUsers.

return
UsersRepository

    return fieldLocalUsers;
public org.apache.avalon.framework.logger.LoggergetLogger()
Returns the logger.

return
Logger

        return fieldLogger;
    
public intgetMaxMessageSizeLimit()
Returns the maxMessageSizeLimit.

return
int

        return fieldMaxMessageSizeLimit;
    
public intgetRemoteReceivedHeaderIndex()
Returns the remoteReceivedHeaderIndex.

return
int

        return fieldRemoteReceivedHeaderIndex;
    
public org.apache.james.services.MailServergetServer()
Returns the server.

return
MailServer

        return fieldServer;
    
public booleanisDeferRecipientNotFound()
Returns the deferRecipientNotFound.

return
boolean

        return fieldDeferRecipientNotFound;
    
public booleanisFetchAll()
Returns the fetchAll.

return
boolean

        return fieldFetchAll;
    
public booleanisLeave()
Returns the keep.

return
boolean

        return fieldLeave;
    
public booleanisLeaveBlacklisted()
Returns the keepRejected.

return
boolean

        return fieldLeaveBlacklisted;
    
public booleanisLeaveMaxMessageSizeExceeded()
Returns the leaveMaxMessageSize.

return
boolean

        return fieldLeaveMaxMessageSizeExceeded;
    
public booleanisLeaveRecipientNotFound()
Returns the leaveRecipientNotFound.

return
boolean

        return fieldLeaveRecipientNotFound;
    
public booleanisLeaveRemoteReceivedHeaderInvalid()
Returns the leaveRemoteReceivedHeaderInvalid.

return
boolean

        return fieldLeaveRemoteReceivedHeaderInvalid;
    
public booleanisLeaveRemoteRecipient()
Returns the leaveRemoteRecipient.

return
boolean

        return fieldLeaveRemoteRecipient;
    
public booleanisLeaveUndeliverable()
Returns the leaveUndeliverable.

return
boolean

        return fieldLeaveUndeliverable;
    
public booleanisLeaveUserUndefined()
Returns the leaveExternal.

return
boolean

        return fieldLeaveUserUndefined;
    
public booleanisMarkBlacklistedSeen()
Returns the markRejectedSeen.

return
boolean

        return fieldMarkBlacklistedSeen;
    
public booleanisMarkMaxMessageSizeExceededSeen()
Returns the markMaxMessageSizeSeen.

return
boolean

        return fieldMarkMaxMessageSizeExceededSeen;
    
public booleanisMarkRecipientNotFoundSeen()
Returns the markRecipientNotFoundSeen.

return
boolean

        return fieldMarkRecipientNotFoundSeen;
    
public booleanisMarkRemoteReceivedHeaderInvalidSeen()
Returns the markRemoteReceivedHeaderInvalidSeen.

return
boolean

        return fieldMarkRemoteReceivedHeaderInvalidSeen;
    
public booleanisMarkRemoteRecipientSeen()
Returns the markRemoteRecipientSeen.

return
boolean

        return fieldMarkRemoteRecipientSeen;
    
public booleanisMarkSeen()
Returns the markSeen.

return
boolean

        return fieldMarkSeen;
    
public booleanisMarkUndeliverableSeen()
Returns the markUndeliverableSeen.

return
boolean

        return fieldMarkUndeliverableSeen;
    
public booleanisMarkUserUndefinedSeen()
Returns the markExternalSeen.

return
boolean

        return fieldMarkUserUndefinedSeen;
    
protected booleanisOpenReadOnly()
Answers true if the folder should be opened read only. For this to be true the configuration options must not require folder updates.

return
boolean

        return isLeave()
            && !isMarkSeen()
            && isLeaveBlacklisted()
            && !isMarkBlacklistedSeen()
            && isLeaveRemoteRecipient()
            && !isMarkRemoteRecipientSeen()
            && isLeaveUserUndefined()
            && !isMarkUserUndefinedSeen()
            && isLeaveUndeliverable()
            && !isMarkUndeliverableSeen()
            && isLeaveMaxMessageSizeExceeded()
            && !isMarkMaxMessageSizeExceededSeen()              
            && isLeaveRemoteReceivedHeaderInvalid()
            && !isMarkRemoteReceivedHeaderInvalidSeen()             
            ;
    
public booleanisRecurse()
Returns the recurse.

return
boolean

        return fieldRecurse;
    
public booleanisRejectBlacklisted()
Returns the rejectBlacklisted.

return
boolean

        return fieldRejectBlacklisted;
    
public booleanisRejectMaxMessageSizeExceeded()
Returns the rejectMaxMessageSize.

return
boolean

        return fieldRejectMaxMessageSizeExceeded;
    
public booleanisRejectRecipientNotFound()
Returns the rejectRecipientNotFound.

return
boolean

        return fieldRejectRecipientNotFound;
    
public booleanisRejectRemoteReceivedHeaderInvalid()
Returns the rejectRemoteReceivedHeaderInvalid.

return
boolean

        return fieldRejectRemoteReceivedHeaderInvalid;
    
public booleanisRejectRemoteRecipient()
Returns the rejectRemoteRecipient.

return
boolean

        return fieldRejectRemoteRecipient;
    
public booleanisRejectUserUndefined()
Returns the localRecipientsOnly.

return
boolean

        return fieldRejectUserUndefined;
    
protected voidsetBlacklist(java.util.Set blacklist)
Sets the blacklist.

param
blacklist The blacklist to set

        fieldBlacklist = blacklist;
    
protected voidsetBlacklist(java.lang.String blacklistValue)
Sets the blacklist.

param
blacklist The blacklist to set

        StringTokenizer st = new StringTokenizer(blacklistValue, ", \t", false);
        Set blacklist = new HashSet();
        String token = null;
        while (st.hasMoreTokens())
        {
            try
            {
                token = st.nextToken();
                blacklist.add(new MailAddress(token));
            }
            catch (ParseException pe)
            {
                throw new ConfigurationException(
                    "Invalid blacklist mail address specified: " + token);
            }
        }
        setBlacklist(blacklist);
    
protected voidsetDefaultDomainName(java.lang.String defaultDomainName)
Validates and sets the defaultDomainName.

param
defaultDomainName The defaultDomainName to set

        validateDefaultDomainName(defaultDomainName);
        setDefaultDomainNameBasic(defaultDomainName);
    
private voidsetDefaultDomainNameBasic(java.lang.String defaultDomainName)
Sets the defaultDomainName.

param
defaultDomainName The defaultDomainName to set

        fieldDefaultDomainName = defaultDomainName;
    
protected voidsetDeferRecipientNotFound(boolean deferRecipientNotFound)
Sets the deferRecipientNotFound.

param
deferRecipientNotFound The deferRecepientNotFound to set

        fieldDeferRecipientNotFound = deferRecipientNotFound;
    
protected voidsetFetchAll(boolean fetchAll)
Sets the fetchAll.

param
fetchAll The fetchAll to set

        fieldFetchAll = fetchAll;
    
protected voidsetFetchTaskName(java.lang.String fetchTaskName)
Sets the fetchTaskName.

param
fetchTaskName The fetchTaskName to set

        fieldFetchTaskName = fetchTaskName;
    
protected voidsetHost(java.lang.String host)
Sets the host.

param
host The host to set

        fieldHost = host;
    
protected voidsetJavaMailFolderName(java.lang.String javaMailFolderName)
Sets the javaMailFolderName.

param
javaMailFolderName The javaMailFolderName to set

        fieldJavaMailFolderName = javaMailFolderName;
    
protected voidsetJavaMailProviderName(java.lang.String javaMailProviderName)
Sets the javaMailProviderName.

param
javaMailProviderName The javaMailProviderName to set

        fieldJavaMailProviderName = javaMailProviderName;
    
protected voidsetLeave(boolean keep)
Sets the keep.

param
keep The keep to set

        fieldLeave = keep;
    
protected voidsetLeaveBlacklisted(boolean keepRejected)
Sets the keepRejected.

param
keepRejected The keepRejected to set

        fieldLeaveBlacklisted = keepRejected;
    
protected voidsetLeaveMaxMessageSizeExceeded(boolean leaveMaxMessageSize)
Sets the leaveMaxMessageSize.

param
leaveMaxMessageSize The leaveMaxMessageSize to set

        fieldLeaveMaxMessageSizeExceeded = leaveMaxMessageSize;
    
protected voidsetLeaveRecipientNotFound(boolean leaveRecipientNotFound)
Sets the leaveRecipientNotFound.

param
leaveRecipientNotFound The leaveRecipientNotFound to set

        fieldLeaveRecipientNotFound = leaveRecipientNotFound;
    
protected voidsetLeaveRemoteReceivedHeaderInvalid(boolean leaveRemoteReceivedHeaderInvalid)
Sets the leaveRemoteReceivedHeaderInvalid.

param
leaveRemoteReceivedHeaderInvalid The leaveRemoteReceivedHeaderInvalid to set

        fieldLeaveRemoteReceivedHeaderInvalid =
            leaveRemoteReceivedHeaderInvalid;
    
protected voidsetLeaveRemoteRecipient(boolean leaveRemoteRecipient)
Sets the leaveRemoteRecipient.

param
leaveRemoteRecipient The leaveRemoteRecipient to set

        fieldLeaveRemoteRecipient = leaveRemoteRecipient;
    
protected voidsetLeaveUndeliverable(boolean leaveUndeliverable)
Sets the leaveUndeliverable.

param
leaveUndeliverable The leaveUndeliverable to set

        fieldLeaveUndeliverable = leaveUndeliverable;
    
protected voidsetLeaveUserUndefined(boolean leaveExternal)
Sets the leaveExternal.

param
leaveExternal The leaveExternal to set

        fieldLeaveUserUndefined = leaveExternal;
    
protected voidsetLocalUsers(org.apache.james.services.UsersRepository localUsers)
Sets the localUsers.

param
localUsers The localUsers to set

    fieldLocalUsers = localUsers;
protected voidsetLogger(org.apache.avalon.framework.logger.Logger logger)
Sets the logger.

param
logger The logger to set

        fieldLogger = logger;
    
protected voidsetMarkBlacklistedSeen(boolean markRejectedSeen)
Sets the markRejectedSeen.

param
markRejectedSeen The markRejectedSeen to set

        fieldMarkBlacklistedSeen = markRejectedSeen;
    
protected voidsetMarkMaxMessageSizeExceededSeen(boolean markMaxMessageSizeSeen)
Sets the markMaxMessageSizeSeen.

param
markMaxMessageSizeSeen The markMaxMessageSizeSeen to set

        fieldMarkMaxMessageSizeExceededSeen = markMaxMessageSizeSeen;
    
protected voidsetMarkRecipientNotFoundSeen(boolean markRecipientNotFoundSeen)
Sets the markRecipientNotFoundSeen.

param
markRecipientNotFoundSeen The markRecipientNotFoundSeen to set

        fieldMarkRecipientNotFoundSeen = markRecipientNotFoundSeen;
    
protected voidsetMarkRemoteReceivedHeaderInvalidSeen(boolean markRemoteReceivedHeaderInvalidSeen)
Sets the markRemoteReceivedHeaderInvalidSeen.

param
markRemoteReceivedHeaderInvalidSeen The markRemoteReceivedHeaderInvalidSeen to set

        fieldMarkRemoteReceivedHeaderInvalidSeen =
            markRemoteReceivedHeaderInvalidSeen;
    
protected voidsetMarkRemoteRecipientSeen(boolean markRemoteRecipientSeen)
Sets the markRemoteRecipientSeen.

param
markRemoteRecipientSeen The markRemoteRecipientSeen to set

        fieldMarkRemoteRecipientSeen = markRemoteRecipientSeen;
    
protected voidsetMarkSeen(boolean markSeen)
Sets the markSeen.

param
markSeen The markSeen to set

        fieldMarkSeen = markSeen;
    
protected voidsetMarkUndeliverableSeen(boolean markUndeliverableSeen)
Sets the markUndeliverableSeen.

param
markUndeliverableSeen The markUndeliverableSeen to set

        fieldMarkUndeliverableSeen = markUndeliverableSeen;
    
protected voidsetMarkUserUndefinedSeen(boolean markExternalSeen)
Sets the markExternalSeen.

param
markExternalSeen The markExternalSeen to set

        fieldMarkUserUndefinedSeen = markExternalSeen;
    
protected voidsetMaxMessageSizeLimit(int maxMessageSizeLimit)
Sets the maxMessageSizeLimit.

param
maxMessageSizeLimit The maxMessageSizeLimit to set

        fieldMaxMessageSizeLimit = maxMessageSizeLimit;
    
protected voidsetRecurse(boolean recurse)
Sets the recurse.

param
recurse The recurse to set

        fieldRecurse = recurse;
    
protected voidsetRejectBlacklisted(boolean rejectBlacklisted)
Sets the rejectBlacklisted.

param
rejectBlacklisted The rejectBlacklisted to set

        fieldRejectBlacklisted = rejectBlacklisted;
    
protected voidsetRejectMaxMessageSizeExceeded(boolean rejectMaxMessageSize)
Sets the rejectMaxMessageSize.

param
rejectMaxMessageSize The rejectMaxMessageSize to set

        fieldRejectMaxMessageSizeExceeded = rejectMaxMessageSize;
    
protected voidsetRejectRecipientNotFound(boolean rejectRecipientNotFound)
Sets the rejectRecipientNotFound.

param
rejectRecipientNotFound The rejectRecipientNotFound to set

        fieldRejectRecipientNotFound = rejectRecipientNotFound;
    
protected voidsetRejectRemoteReceivedHeaderInvalid(boolean rejectRemoteReceivedHeaderInvalid)
Sets the rejectRemoteReceivedHeaderInvalid.

param
rejectRemoteReceivedHeaderInvalid The rejectRemoteReceivedHeaderInvalid to set

        fieldRejectRemoteReceivedHeaderInvalid =
            rejectRemoteReceivedHeaderInvalid;
    
protected voidsetRejectRemoteRecipient(boolean rejectRemoteRecipient)
Sets the rejectRemoteRecipient.

param
rejectRemoteRecipient The rejectRemoteRecipient to set

        fieldRejectRemoteRecipient = rejectRemoteRecipient;
    
protected voidsetRejectUserUndefined(boolean localRecipientsOnly)
Sets the localRecipientsOnly.

param
localRecipientsOnly The localRecipientsOnly to set

        fieldRejectUserUndefined = localRecipientsOnly;
    
protected voidsetRemoteReceivedHeaderIndex(int remoteReceivedHeaderIndex)
Sets the remoteReceivedHeaderIndex.

param
remoteReceivedHeaderIndex The remoteReceivedHeaderIndex to set

        fieldRemoteReceivedHeaderIndex = remoteReceivedHeaderIndex;
    
protected voidsetServer(org.apache.james.services.MailServer server)
Sets the server.

param
server The server to set

        fieldServer = server;
    
protected voidupdateDefaultDomainName()
Updates the defaultDomainName.

        setDefaultDomainNameBasic(computeDefaultDomainName());
    
protected voidvalidateDefaultDomainName(java.lang.String defaultDomainName)
Validates the defaultDomainName.

param
defaultDomainName The defaultDomainName to validate

        if (!getServer().isLocalServer(defaultDomainName))
        {
            throw new ConfigurationException(
                "Default domain name is not a local server: "
                    + defaultDomainName);
        }