Package org.subethamail.smtp

Examples of org.subethamail.smtp.RejectException


            throws RejectException {
        try {
            return new MailAddressFactory().createRecipient(recipient);
        } catch (ParseException e) {
            logger.debug("Syntax error in recipient " + recipient, e);
            throw new RejectException(553, "Syntax error in mailbox name "
                    + recipient);
        }
    }
View Full Code Here


     * Converts this exception to a SubEthaSMTP {@link RejectException}.
     *
     * @return the {@link RejectException} corresponding to this exception.
     */
    public RejectException toRejectException() {
        return new RejectException(reply.getSmtpReplyCode(),
                reply.getMessagePrefixedWithEnhancedStatusCode());
    }
View Full Code Here

        try {
            transmitter.transmit(mail);
        } catch (LocalMailSystemException e) {
            logger.warn("Cannot accept mail because of a "
                    + "transmission failure", e);
            throw new RejectException(e.errorStatus().getSmtpReplyCode(), e
                    .errorStatus().getMessagePrefixedWithEnhancedStatusCode());
        }
    }
View Full Code Here

            return backend.connect();
        } catch (SMTPException e) {
            throw new BackendRejectException(e,
                    " - Backend rejected connection");
        } catch (IOException e) {
            throw new RejectException(451, e.getMessage());
        }
    }
View Full Code Here

        try {
            smartClient.from(from);
        } catch (SMTPException e) {
            throw new BackendRejectException(e, " - Backend rejected sender");
        } catch (IOException e) {
            throw new RejectException(451, e.getMessage());
        }
    }
View Full Code Here

            destinationMailbox = recipient.sourceRouteStripped();
            smartClient.to(destinationMailbox);
        } catch (SMTPException e) {
            throw new BackendRejectException(e, " - Backend rejected recipient");
        } catch (IOException e) {
            throw new RejectException(451, e.getMessage());
        }
    }
View Full Code Here

        try {
            smartClient.dataStart();
        } catch (SMTPException e) {
            throw new BackendRejectException(e, " - Backend rejected DATA");
        } catch (IOException e) {
            throw new RejectException(451, e.getMessage());
        }
    }
View Full Code Here

        int numRead;
        while ((numRead = data.read(buffer)) > 0) {
            try {
                smartClient.dataWrite(buffer, numRead);
            } catch (IOException e) {
                throw new RejectException(451, e.getMessage());
            }
        }
    }
View Full Code Here

            smartClient.dataEnd();
        } catch (SMTPException e) {
            throw new BackendRejectException(e,
                    " - Backend server rejected at end of data");
        } catch (IOException e) {
            throw new RejectException(451, e.getMessage());
        }
    }
View Full Code Here

        @Override
        public void from(ReversePath from) throws RejectExceptionExt {
            if (!isAuthenticated()) {
                logger.debug("None of the authentication specifications "
                        + "matched the session, rejecting");
                throw new RejectException(530, "Authentication required");
            }
            chain.from(from);
        }
View Full Code Here

TOP

Related Classes of org.subethamail.smtp.RejectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.