Java Mail client not working on Linux -


i have email ssl client zimbra mail server work on windows got failure authentication on linux, had verified network conf. dns, port , firewall correct

the properties session:

props.put("mail.smtps.host", "my.mail.server"); props.put("mail.smtps.host", "my.mail.server"); props.put("mail.smtps.starttls.enable", "true"); props.put("mail.smtps.port", "465"); props.put("mail.smtps.auth", "true"); props.put("mail.smtps.ssl.trust", "my.mail.server"); 

getting session:

session session = session.getdefaultinstance(props); 

transport :

transport t = session.gettransport("smtps"); t.connect("user", "pass"); t.sendmessage(message, message.getallrecipients()); 

something got attention when using debug, postfix response in message

windows debug log:

debug: setdebug: javamail version 1.4.3 debug: getprovider() returning javax.mail.provider[transport,smtps,com.sun.mail.smtp.smtpssltransport,sun microsystems, inc] debug smtp: useehlo true, useauth true debug smtp: trying connect host "my.mail.server", port 465, isssl true 220 my.mail.server esmtp ready. debug smtp: connected host "my.mail.server", port: 465

meanwhile on linux got this:

debug: setdebug: javamail version 1.4.3 debug: getprovider() returning javax.mail.provider[transport,smtps,com.sun.mail.smtp.smtpssltransport,sun microsystems, inc] debug smtp: useehlo true, useauth true debug smtp: trying connect host "my.mail.server", port 465, isssl true 220 my.mail.server esmtp postfix debug smtp: connected host "my.mail.server", port: 465

i appreciate help.

the difference in debug messages not significant. cosmetic difference in 2 (local) mail servers put in "connection greeting reply" line. example, linux server running postfix mta typically say:

220 smtp.example.com esmtp postfix 

the esmtp spec says:

"smtp server implementations may include identification of software , version information in connection greeting reply after 220 code, practice permits more efficient isolation , repair of problems. implementations may make provision smtp servers disable software , version announcement causes security concerns."

the real problem else.

if trying debug this, start looking @ mta logs see if why session being shut down. check user / password correct , mta has been configured appropriately allow trying do.


Comments