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    package org.apache.james.protocols.smtp;
021    
022    /**
023     * Result code defined in RFC 2821
024     */
025    public class SMTPRetCode {
026        /** System status, or system help reply */
027        public static final String SYSTEM_STATUS = "211";
028    
029        /**
030         * Help message (Information on how to use the receiver or the meaning of a
031         * particular non-standard command; this reply is useful only to the human
032         * user)
033         */
034        public static final String HELP_MESSAGE = "214";
035    
036        /** <domain> Service ready */
037        public static final String SERVICE_READY = "220";
038    
039        /** <domain> Service closing transmission channel */
040        public static final String SYSTEM_QUIT = "221";
041    
042        /** Auth ok */
043        public static final String AUTH_OK = "235";
044    
045        /** Requested mail action okay, completed */
046        public static final String MAIL_OK = "250";
047    
048        /**
049         * 251 User not local; will forward to <forward-path> (See section 3.4)
050         */
051        public static final String MAIL_FORWARDING = "251";
052    
053        /**
054         * Cannot VRFY user, but will accept message and attempt delivery (See
055         * section 3.5.3)
056         */
057        public static final String MAIL_UNDEFINDED = "252";
058    
059        public static final String AUTH_READY = "334";
060    
061        /** Start mail input; end with <CRLF>.<CRLF> */
062        public static final String DATA_READY = "354";
063    
064        /**
065         * <domain> Service not available, closing transmission channel (This may be
066         * a reply to any command if the service knows it must shut down)
067         */
068        public static final String SERVICE_NOT_AVAILABLE = "421";
069    
070        /**
071         * This response to the AUTH command indicates that the user needs to
072         * transition to the selected authentication mechanism. This typically done
073         * by authenticating once using the PLAIN authentication mechanism.
074         */
075        public static final String AUTH_PASSWORD_TRANSITION_ERROR = "432";
076    
077        /**
078         * Requested mail action not taken: mailbox unavailable (e.g., mailbox busy)
079         */
080        public static final String MAILBOX_TEMP_UNAVAILABLE = "450";
081    
082        /**
083         * Requested action aborted: local error in processing
084         */
085        public static final String LOCAL_ERROR = "451";
086    
087        /**
088         * Requested action not taken: insufficient system storage
089         */
090        public static final String SYSTEM_STORAGE_ERROR = "452";
091    
092        /**
093         * This response to the AUTH command indicates that the authentication
094         * failed due to a temporary server failure.
095         */
096        public static final String AUTH_TEMPORARY_ERROR = "454";
097    
098        /**
099         * Syntax error, command unrecognized (This may include errors such as
100         * command line too long)
101         */
102        public static final String SYNTAX_ERROR_COMMAND_UNRECOGNIZED = "500";
103    
104        /**
105         * Syntax error in parameters or arguments
106         */
107        public static final String SYNTAX_ERROR_ARGUMENTS = "501";
108    
109        /**
110         * Command not implemented (see section 4.2.4)
111         */
112        public static final String UNIMPLEMENTED_COMMAND = "502";
113    
114        /**
115         * Bad sequence of commands
116         */
117        public static final String BAD_SEQUENCE = "503";
118    
119        /**
120         * Command parameter not implemented
121         */
122        public static final String PARAMETER_NOT_IMPLEMENTED = "504";
123    
124        /**
125         * This response may be returned by any command other than AUTH, EHLO, HELO,
126         * NOOP, RSET, or QUIT. It indicates that server policy requires
127         * authentication in order to perform the requested action.
128         */
129        public static final String AUTH_REQUIRED = "530";
130    
131        /**
132         * Auth failed
133         */
134        public static final String AUTH_FAILED = "535";
135    
136        /**
137         * This response to the AUTH command indicates that the selected
138         * authentication mechanism is weaker than server policy permits for that
139         * user.
140         */
141        public static final String AUTH_MECHANISM_WEAK = "534";
142    
143        /**
144         * This response to the AUTH command indicates that the selected
145         * authentication mechanism may only be used when the underlying SMTP
146         * connection is encrypted.
147         */
148        public static final String AUTH_ENCRYPTION_REQUIRED = "538";
149    
150        /**
151         * Requested action not taken: mailbox unavailable (e.g., mailbox not found,
152         * no access, or command rejected for policy reasons)
153         */
154        public static final String MAILBOX_PERM_UNAVAILABLE = "550";
155    
156        /**
157         * User not local; please try <forward-path> (See section 3.4)
158         */
159        public static final String USER_NOT_LOCAL = "551";
160    
161        /**
162         * Requested mail action aborted: exceeded storage allocation
163         */
164        public static final String QUOTA_EXCEEDED = "552";
165    
166        /**
167         * Requested action not taken: mailbox name not allowed (e.g., mailbox
168         * syntax incorrect)
169         */
170        public static final String SYNTAX_ERROR_MAILBOX = "553";
171    
172        /**
173         * Transaction failed (Or, in the case of a connection-opening response,
174         * "No SMTP service here")
175         */
176        public static final String TRANSACTION_FAILED = "554";
177    
178    }