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    package org.apache.james.protocols.smtp;
022    
023    
024    public class SMTPConfigurationImpl implements SMTPConfiguration{
025    
026        public String helloName = "localhost";
027        private long maxMessageSize = 0;
028        private boolean bracketsEnforcement = true;
029        private String greeting = "JAMES SMTP Protocols";
030        private boolean enforceHeloEhlo = true;
031            private boolean startTLSsupported = false;
032        
033        public String getHelloName() {
034            return helloName;
035        }
036    
037        public long getMaxMessageSize() {
038            return maxMessageSize;
039        }
040    
041        public boolean isRelayingAllowed(String remoteIP) {
042            return false;
043        }
044    
045        public boolean isAuthRequired(String remoteIP) {
046            return false;
047        }
048    
049        public void setHeloEhloEnforcement(boolean enforceHeloEhlo) {
050            this.enforceHeloEhlo = enforceHeloEhlo;
051        }
052        
053        
054        public boolean useHeloEhloEnforcement() {
055            return enforceHeloEhlo;
056        }
057    
058        public String getSMTPGreeting() {
059            return greeting;
060        }
061    
062        public void setSMTPGreeting(String greeting) {
063            this.greeting = greeting;
064        }
065        
066        
067        public boolean useAddressBracketsEnforcement() {
068            return bracketsEnforcement;
069        }
070    
071        public void setUseAddressBracketsEnforcement(boolean bracketsEnforcement) {
072            this.bracketsEnforcement = bracketsEnforcement;
073        }
074        
075        
076        @Override
077        public boolean isStartTLSSupported() {
078            return startTLSsupported;
079        }
080    
081        public void setStartTLSSupported(boolean startTLSsupported) {
082            this.startTLSsupported = startTLSsupported;
083        }
084    }