001: /****************************************************************
002: * Licensed to the Apache Software Foundation (ASF) under one *
003: * or more contributor license agreements. See the NOTICE file *
004: * distributed with this work for additional information *
005: * regarding copyright ownership. The ASF licenses this file *
006: * to you under the Apache License, Version 2.0 (the *
007: * "License"); you may not use this file except in compliance *
008: * with the License. You may obtain a copy of the License at *
009: * *
010: * http://www.apache.org/licenses/LICENSE-2.0 *
011: * *
012: * Unless required by applicable law or agreed to in writing, *
013: * software distributed under the License is distributed on an *
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
015: * KIND, either express or implied. See the License for the *
016: * specific language governing permissions and limitations *
017: * under the License. *
018: ****************************************************************/package org.apache.james.smtpserver;
019:
020: import org.apache.james.services.MailServer;
021: import org.apache.james.services.UsersRepository;
022:
023: /**
024: * Provides a number of server-wide constant values to the
025: * SMTPHandlers
026: *
027: */
028: public interface SMTPHandlerConfigurationData {
029:
030: /**
031: * Returns the service wide hello name
032: *
033: * @return the hello name
034: */
035: String getHelloName();
036:
037: /**
038: * Returns the service wide reset length in bytes.
039: *
040: * @return the reset length
041: */
042: int getResetLength();
043:
044: /**
045: * Returns the service wide maximum message size in bytes.
046: *
047: * @return the maximum message size
048: */
049: long getMaxMessageSize();
050:
051: /**
052: * Returns whether relaying is allowed for the IP address passed.
053: *
054: * @param remoteIP the remote IP address in String form
055: * @return whether relaying is allowed
056: */
057: boolean isRelayingAllowed(String remoteIP);
058:
059: /**
060: * Returns whether SMTP AUTH is active for this server, and
061: * necessary for the IP address passed.
062: *
063: * @param remoteIP the remote IP address in String form
064: * @return whether SMTP authentication is on
065: */
066: boolean isAuthRequired(String remoteIP);
067:
068: /**
069: * Returns whether SMTP auth is active for this server.
070: *
071: * @return whether SMTP authentication is on
072: */
073: boolean isAuthRequired();
074:
075: /**
076: * Returns whether the service validates the identity
077: * of its senders.
078: *
079: * @return whether SMTP authentication is on
080: */
081: boolean isVerifyIdentity();
082:
083: /**
084: * Returns whether the remote server needs to send a HELO/EHLO
085: * of its senders.
086: *
087: * @return whether SMTP authentication is on
088: */
089: boolean useHeloEhloEnforcement();
090:
091: /**
092: * Returns the MailServer interface for this service.
093: *
094: * @return the MailServer interface for this service
095: */
096: MailServer getMailServer();
097:
098: /**
099: * Returns the UsersRepository for this service.
100: *
101: * @return the local users repository
102: */
103: UsersRepository getUsersRepository();
104:
105: }
|