Package mireka.address

Examples of mireka.address.RemotePart


        private boolean isLocalReversePathDomain() {
            if (localDomains != null) {
                return localDomains.isSatisfiedBy(mailbox.getRemotePart());
            } else {
                if (originalRecipient instanceof RemotePartContainingRecipient) {
                    RemotePart recipientRemotePart =
                            ((RemotePartContainingRecipient) originalRecipient)
                                    .getMailbox().getRemotePart();
                    return mailbox.getRemotePart().equals(recipientRemotePart);
                } else {
                    return mailbox.getRemotePart().equals(defaultRemotePart);
View Full Code Here


        private ReversePath rewriteNotSrs() {
            String timestamp = calculateTimestamp();
            String host = mailbox.getRemotePart().smtpText();
            String localPart = mailbox.getLocalPart().smtpText();
            String hash = calculateHash(timestamp + host + localPart);
            RemotePart rewrittenRemotePart = calculateRewrittenRemotePart();

            StringBuilder buffer = new StringBuilder();
            buffer.append("SRS0=");
            buffer.append(hash).append('=');
            buffer.append(timestamp).append('=');
            buffer.append(host).append('=');
            buffer.append(localPart);
            buffer.append('@');
            buffer.append(rewrittenRemotePart.smtpText());

            return new MailAddressFactory()
                    .createReversePathAlreadyVerified(buffer.toString());
        }
View Full Code Here

                return defaultRemotePart;
            }

            RemotePartContainingRecipient remotePartContainingRecipient =
                    (RemotePartContainingRecipient) originalRecipient;
            RemotePart recipientRemotePart =
                    remotePartContainingRecipient.getMailbox().getRemotePart();
            if (localDomains == null
                    || localDomains.isSatisfiedBy(recipientRemotePart)) {
                return recipientRemotePart;
            } else {
View Full Code Here

            String localPart = mailbox.getLocalPart().smtpText();
            // remove the SRS0 prefix
            localPart = localPart.substring(4);

            String hash = calculateHash(host + localPart);
            RemotePart rewrittenRemotePart = calculateRewrittenRemotePart();

            StringBuilder buffer = new StringBuilder();
            buffer.append("SRS1=");
            buffer.append(hash).append('=');
            buffer.append(host).append('=');
            buffer.append(localPart);
            buffer.append('@');
            buffer.append(rewrittenRemotePart.smtpText());

            return new MailAddressFactory()
                    .createReversePathAlreadyVerified(buffer.toString());
        }
View Full Code Here

            PersedSrs1LocalPart parsedSrs1 = PersedSrs1LocalPart.parse(mailbox);

            String hash =
                    calculateHash(parsedSrs1.originalHost
                            + parsedSrs1.compactOriginalLocalPart);
            RemotePart rewrittenRemotePart = calculateRewrittenRemotePart();

            StringBuilder buffer = new StringBuilder();
            buffer.append("SRS1=");
            buffer.append(hash).append('=');
            buffer.append(parsedSrs1.originalHost).append('=');
            buffer.append(parsedSrs1.compactOriginalLocalPart);
            buffer.append('@');
            buffer.append(rewrittenRemotePart.smtpText());

            return new MailAddressFactory()
                    .createReversePathAlreadyVerified(buffer.toString());
        }
View Full Code Here

TOP

Related Classes of mireka.address.RemotePart

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.