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 ****************************************************************/
019
020
021
022 package org.apache.james.protocols.smtp;
023
024
025 /**
026 * Provides a number of server-wide constant values to the
027 * SMTPHandlers
028 *
029 */
030 public interface SMTPConfiguration {
031
032 /**
033 * Returns the service wide hello name
034 *
035 * @return the hello name
036 */
037 String getHelloName();
038
039 /**
040 * Returns the service wide maximum message size in bytes.
041 *
042 * @return the maximum message size
043 */
044 long getMaxMessageSize();
045
046 /**
047 * Returns whether relaying is allowed for the IP address passed.
048 *
049 * @param remoteIP the remote IP address in String form
050 * @return whether relaying is allowed
051 */
052 boolean isRelayingAllowed(String remoteIP);
053
054 /**
055 * Returns whether SMTP AUTH is active for this server, and
056 * necessary for the IP address passed.
057 *
058 * @param remoteIP the remote IP address in String form
059 * @return whether SMTP authentication is on
060 */
061 boolean isAuthRequired(String remoteIP);
062
063 /**
064 * Returns whether the remote server needs to send a HELO/EHLO
065 * of its senders.
066 *
067 * @return whether SMTP authentication is on
068 */
069 boolean useHeloEhloEnforcement();
070
071
072 /**
073 * Return the SMTPGreeting which should used.
074 *
075 * @return the SMTPGreeting
076 */
077 String getSMTPGreeting();
078
079 /**
080 * Return wheter the mailserver will accept addresses without brackets enclosed.
081 *
082 * @return true or false
083 */
084 boolean useAddressBracketsEnforcement();
085
086 /**
087 * Return <code>true</code> if STARTTLS is supported.
088 *
089 * @return starttls
090 */
091 boolean isStartTLSSupported();
092
093 }