Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 54 results.
of 3
raissa sagot
configuration smtp gmail
June 8, 2012 8:55 AM
Answer

raissa sagot

Rank: New Member

Posts: 16

Join Date: March 22, 2012

Recent Posts

Fix permissions??
Hello
I new in liferay and I have a configuration problem.
Sorry for my basic English, I'm French and I have difficulties to speak English.
Since two days, I try to setup SMTP with gmail account. When I add a new user, or when I try to recover password for a user, I don't receive any email.
I had consult many page about this subjet such as :
  • http://www.liferay.com/community/wiki/-/wiki/Main/User+your+email+account+as+SMTP+server+with+Tomcat
  • http://www.liferay.com/community/forums/-/message_boards/message/13410111



I use liferay 6.1, with Tomcat

I have configure Server Administration -> Mail the following way :
SMTP Server: smtp.gmail.com
Port: 465
Use Secure Connection : true
User: my gmail adress
Password: my gmail password

I have change Settings : The domain name of mail server in gmail.com
and modify Expeditor in Email notification with my gmail adress

But I still get no email emoticon

In Eclipse I have got error :

ERROR [MailEngine:507] Exception reading response
ERROR [MailEngine:154] java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:57)
at sun.security.validator.Validator.getInstance(Validator.java:161)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1053)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:128)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:529)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:465)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1120)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:744)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)



Could you help me please with clear and simple explanations?
Thank you in advance
R. Sagot
raissa sagot
RE: configuration smtp gmail
April 19, 2012 12:17 AM
Answer

raissa sagot

Rank: New Member

Posts: 16

Join Date: March 22, 2012

Recent Posts

Nobody ?? I really need to solve my problem
Jignesh Vachhani
RE: configuration smtp gmail
April 19, 2012 12:22 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 785

Join Date: March 10, 2008

Recent Posts

Take a look on below properties :

name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.imap.host="localhost"
mail.pop.host="localhost"
mail.store.protocol="imap"
mail.transport.protocol="smtp"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.starttls.enable="true"
mail.smtp.user="username"
password="*****"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"


might be this property is for older liferay version so there would be some different in property key name.
you can refer http://www.liferaysolution.com/2011/08/smtp-setup-with-liferay.html for other details
raissa sagot
RE: configuration smtp gmail
April 20, 2012 7:00 AM
Answer

raissa sagot

Rank: New Member

Posts: 16

Join Date: March 22, 2012

Recent Posts

Thank you Jignesh Vachhani, but I already try this solution, no results for me.
I think something is missing.
David H Nebinger
RE: configuration smtp gmail
April 20, 2012 9:42 AM
Answer
Mayur Soneta
RE: configuration smtp gmail
April 20, 2012 2:38 PM
Answer

Mayur Soneta

Rank: New Member

Posts: 4

Join Date: April 4, 2012

Recent Posts

I have the similar issue. Can anyone have the fix for that.
David H Nebinger
RE: configuration smtp gmail
April 20, 2012 4:17 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11478

Join Date: September 1, 2006

Recent Posts

There's already two links that explain what you need to do, plus the google search link so you can find more.

What more do you want us to do?
Gabriel Leon Leyva
RE: configuration smtp gmail
April 20, 2012 5:08 PM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 243

Join Date: June 20, 2009

Recent Posts

David, Configuring gmail is easy, the problem is when you have your own mail server, I couldn't configure liferay to use my emal server.
David H Nebinger
RE: configuration smtp gmail
April 20, 2012 5:17 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11478

Join Date: September 1, 2006

Recent Posts

Ah, well that is a beast of a different color, and probably should be a different thread.

This thread has been on how to enable using Gmail as the SMTP server and the necessary steps to get the certificate to work.

If you're having issues w/ your own mail server, I'd say start a new thread with details about the issue and we'll be happy to help if we can...
Gabriel Leon Leyva
RE: configuration smtp gmail
April 20, 2012 5:56 PM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 243

Join Date: June 20, 2009

Recent Posts

I just try this in the latest build of liferay 6.1.1, I think that it's an issue with the certificate. In my case the certificate its not registered with certificate provider, that maybe my problem emoticon,
Attachments: email.bmp (1,364.4k)
raissa sagot
RE: configuration smtp gmail
April 24, 2012 1:21 AM
Answer

raissa sagot

Rank: New Member

Posts: 16

Join Date: March 22, 2012

Recent Posts

I find nothing that works, even on google. my problem is still not resolved. this becomes very annoying.
I don't understand that many people have this problem and no solution station.emoticon
Hitoshi Ozawa
RE: configuration smtp gmail
April 24, 2012 6:07 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Yes, it's a problem with setting up a certificate. Try setting JSSE truststore.

http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#javaHome
Mayur Soneta
RE: configuration smtp gmail
April 25, 2012 10:21 PM
Answer

Mayur Soneta

Rank: New Member

Posts: 4

Join Date: April 4, 2012

Recent Posts

Still no luck:

Exception:

05:14:17,161 ERROR [MailEngine:489] Could not connect to SMTP host: smtp.gmail.com, port: 465
05:14:17,162 ERROR [MailEngine:154] java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)
at sun.security.validator.Validator.getInstance(Validator.java:179)
at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:314)
at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:173)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:186)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1320)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:154)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:998)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1294)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1321)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1305)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:548)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:352)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:233)




in ROOT.xml

<Resource
name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.imap.host="localhost"
mail.pop.host="localhost"
mail.store.protocol="imap"
mail.transport.protocol="smtp"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.starttls.enable="true"
mail.smtp.user="xxxxx"
password='xxxxx"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"


in tomcat --> server.xml
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/Users/mayursoneta/programming/Liferay-Portal/apache-tomcat-6.0.35/webapps/ROOT/WEB-INF/classes/keystore"
keystorePass="password"
/>

I can login with https://localhost:8443/

So let me know please if I am missing anything . Thank you.
Hitoshi Ozawa
RE: configuration smtp gmail
April 26, 2012 2:07 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

So where did you set the setting in the page I've shown you?
Mayur Soneta
RE: configuration smtp gmail
May 1, 2012 8:56 PM
Answer

Mayur Soneta

Rank: New Member

Posts: 4

Join Date: April 4, 2012

Recent Posts

Thanks for the reply. Which setting are you talking about ?
omer 345621
RE: configuration smtp gmail
May 21, 2012 10:58 PM
Answer

omer 345621

Rank: Junior Member

Posts: 54

Join Date: May 9, 2012

Recent Posts

Hi,

My gmail is working fine in liferay but my company email is not working fine with exchange. Any tips??
Jignesh Vachhani
RE: configuration smtp gmail
May 21, 2012 11:59 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 785

Join Date: March 10, 2008

Recent Posts

Are you using mail portlet or configuring through property file ?
omer 345621
RE: configuration smtp gmail
May 22, 2012 12:51 AM
Answer

omer 345621

Rank: Junior Member

Posts: 54

Join Date: May 9, 2012

Recent Posts

Do you mean via portal website and via porta-ext file? Bcz i tried via both!
Vitor Silva
RE: configuration smtp gmail
May 22, 2012 5:43 AM
Answer

Vitor Silva

Rank: Junior Member

Posts: 36

Join Date: May 3, 2012

Recent Posts

Hi omer.
Can you describe what error has occurred? Do you have anything in the log file?
What version of the exchange server do you have?
Can you post the settings that you used to configure the email account?
Also, have you managed to configure any standard email client application with you exchange server?
Regards,
Vitor
omer 345621
RE: configuration smtp gmail
May 22, 2012 11:54 PM
Answer

omer 345621

Rank: Junior Member

Posts: 54

Join Date: May 9, 2012

Recent Posts

Hi Vitor,

Sure I appreciate it. My problem is that I can use Gmail settings to works fine when I create a new account with liferay. I get new account emails notifications. But with my company email server it doesnot work and give ssl error and some others. My https://localhost:8443 also not working.
I pasted the code below. I am using exchange 2010. Settings are below:

Portal ext property file:


#defaultmanaarlogo
image.default.company.logo=manaar.jpg
#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://10.0.136.34:3306/mantradb
jdbc.default.username=liferay
jdbc.default.password=liferay

## Set the mail session properties
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.auth.mechanisms=LOGIN
mail.session.mail.smtp.auth.plain.disable=true
mail.session.mail.smtp.host=mail.manaarco.com
mail.session.mail.smtp.password=*******
mail.session.mail.smtp.port=587
mail.session.mail.smtp.user=MANAARNET\ABC
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.transport.protocol=smtp


#
# Set the theme's shorcut icon.
#
theme.shortcut.icon=liferay.ico




# Set this to false if you want to be able to create users without an email
# address. An email address will be automatically assigned to a user based
# on the property "users.email.address.auto.suffix".
#
users.email.address.required=false
company.security.auth.type=screenName
#
# Set the suffix of the email address that will be automatically generated
# for a user that does not have an email address. This property is not used
# unless the property "users.email.address.required" is set to false. The
# autogenerated email address will be the user id plus the specified suffix.
# users.email.address.auto.suffix=noreply@email.com
login.events.pre=com.company.LdapEmailHook

Server.xml file =

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
--><Server port="8005" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener"/>
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->


<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8096" protocol="HTTP/1.1" redirectPort="8443"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector URIEncoding="UTF-8" port="8009" protocol="AJP/1.3" redirectPort="8443"/>


<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine defaultHost="localhost" name="Catalina">

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->

<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>

</Host>
</Engine>
</Service>
</Server>

CONTEXT

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><!-- The contents of this file will be loaded for each web application --><Context>

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->

<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->

</Context>


[b]ROOT


<Context path="" crossContext="true">

<!-- JAAS -->

<!--<Realm
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.kernel.security.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.kernel.security.jaas.PortalRole"
/>-->

<!--
Uncomment the following to disable persistent sessions across reboots.
-->

<!--<Manager pathname="" />-->

<!--
Uncomment the following to not use sessions. See the property
"session.disabled" in portal.properties.
-->

<!--<Manager className="com.liferay.support.tomcat.session.SessionLessManagerBase" />-->
</Context>
Showing 1 - 20 of 54 results.
of 3