[Deploying Sakai] SMTP and office 365

Ganga Calderon, Nelson Fredy fganga at unap.cl
Fri Feb 20 05:58:36 PST 2015


Hi everyone,

Trying to connect sakai to smtp.office365.com (using TLS) I see some errors in debug.
Setting up 587 port (required by office365) is replaced when SSL is enabled by 465 port.(So smtp.office365.com reject the connection)

When SSL is set to false, it's possible to connect to port 587 but, I receive the next error message.

DEBUG: JavaMail version 1.4.5
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTranspo
rt,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems,
Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.
POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Prov
ider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop
3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.m
ail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSL
Transport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Prov
ider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport
,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.office365.com", port 587, isSSL false
220 BN1PR02CA0019.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fri, 20 Feb 2015 13:45:48 +0000
DEBUG SMTP: connected to host "smtp.office365.com", port: 587

EHLO myserver.unap.cl
250-BN1PR02CA0019.outlook.office365.com Hello [146.x.x.x]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250 CHUNKING
DEBUG SMTP: Found extension "SIZE", arg "157286400"
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<myoffice365account at unap.cl>
530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
DEBUG SMTP: got response code 530, with response: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

RSET
DEBUG SMTP: EOF: [EOF]
DEBUG SMTP: MessagingException while sending
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

        at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2114)
        at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1618)
        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1119)
        at org.sakaiproject.email.impl.BasicEmailService.sendToUsers(BasicEmailService.java:811)
        at org.sakaiproject.component.app.messageforums.ui.PrivateMessageManagerImpl.sendPrivateMessage(PrivateMessageManagerImpl.java:1232)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)


Username and password are checked.
TLS is required by office365.com
So, how could we connect to smtp.office365.com using TLS?

P.D: Gmail smtp service works fine (Using SSL at 465 port)

Thanks in advice.

Fredy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/production/attachments/20150220/d26d6f2d/attachment-0001.html 


More information about the production mailing list