<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>domain name instead ip address into email verification</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110324748" />
  <subtitle>domain name instead ip address into email verification</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110324748</id>
  <updated>2026-04-05T09:58:47Z</updated>
  <dc:date>2026-04-05T09:58:47Z</dc:date>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110931703" />
    <author>
      <name>john smith</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110931703</id>
    <updated>2018-09-12T05:58:30Z</updated>
    <published>2018-09-12T05:58:30Z</published>
    <summary type="html">&lt;p&gt; I have also the same problem When I create an account into my
  portal, the registration verification URL with the ticket is built
  with the ip address instead of the site name. Actually, I am using the
  Hotmail service so, regarding this problem I consult with the Hotmail
  support team by clicking  &lt;a&gt;Hotmail Support Number&lt;/a&gt; general
  inquiry about this problem.&lt;/p&gt;</summary>
    <dc:creator>john smith</dc:creator>
    <dc:date>2018-09-12T05:58:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110348438" />
    <author>
      <name>Sandeep Nair</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110348438</id>
    <updated>2018-06-27T04:38:21Z</updated>
    <published>2018-06-27T04:38:21Z</published>
    <summary type="html">&lt;p&gt;Yes, It seems to be because of ServiceContext. Can you log what is
  there in serviceContext.getPortalURL(). If it prints out IP then that
  is the root cause. Simply set the portalURL there. You can use
  PortalUtil to get portal URL. There are a bunch of utility methods to
  get the portalURL based on various parameters. See which one fits you
  and use the same.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sandeep&lt;/p&gt;</summary>
    <dc:creator>Sandeep Nair</dc:creator>
    <dc:date>2018-06-27T04:38:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110337148" />
    <author>
      <name>Fabrizio Attanasio</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110337148</id>
    <updated>2018-06-25T09:25:39Z</updated>
    <published>2018-06-25T09:25:39Z</published>
    <summary type="html">&lt;p&gt;Sorry, the version is liferay 6.2-ce-ga5&lt;/p&gt;
&lt;p&gt;I have this configuration of apache2 virtual host:&lt;/p&gt;
&lt;p&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt; ServerName www.domainname.it&lt;br /&gt;
  ServerAlias domainname.it&lt;/p&gt;
&lt;p&gt;ProxyRequests Off&lt;br /&gt; &amp;lt;Proxy *&amp;gt;&lt;br /&gt; Order deny,allow&lt;br /&gt;
  allow from all&lt;br /&gt; &amp;lt;/Proxy&amp;gt;&lt;br /&gt; ProxyPreserveHost On&lt;br /&gt;
  ProxyPass / http://IPADDRESS:PORT/&lt;br /&gt; ProxyPassReverse /
  http://IPADDRESS:PORT/&lt;br /&gt; &amp;lt;/VirtualHost&amp;gt;&lt;/p&gt;</summary>
    <dc:creator>Fabrizio Attanasio</dc:creator>
    <dc:date>2018-06-25T09:25:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110336727" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110336727</id>
    <updated>2018-06-25T09:05:06Z</updated>
    <published>2018-06-25T09:05:06Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Fabrizio Attanasio:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;ok.... :)&lt;/p&gt;
      &lt;p&gt;version: Liferay 6.2 CE&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;I was hoping for the &lt;em&gt;exact&lt;/em&gt; version, e.g. one digit more. Anyways...&lt;/p&gt;
&lt;p&gt;Repeating my question from earlier: Are you using a reverse proxy? As
  you create the service context for the call: Instead of assuming that
  it &amp;quot;might be empty&amp;quot;, you can also just inspect it - e.g.
  using the various &lt;a
  href="https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/service/ServiceContext.html"&gt;get***URL&lt;/a&gt;
  methods. I'm assuming that it is properly initialized, contains the
  IP-Address instead of the domain name, and my assumption is that this
  is largely due to a misconfigured reverse proxy.&lt;/p&gt;
&lt;p&gt;Plus, answering that other question: It's hard to say why an email
  would be flagged as spam, but containing an IP-Address-URL is a good
  assumption to start with.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2018-06-25T09:05:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110335687" />
    <author>
      <name>Fabrizio Attanasio</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110335687</id>
    <updated>2018-06-25T08:37:45Z</updated>
    <published>2018-06-25T08:37:45Z</published>
    <summary type="html">&lt;p&gt;ok.... :)&lt;/p&gt;
&lt;p&gt;version: Liferay 6.2 CE&lt;/p&gt;
&lt;p&gt;registration function in web service added into
  MyCustomUserServiceImpl class:&lt;/p&gt;
&lt;p&gt;....with this code:&lt;/p&gt;
&lt;p&gt;         @AccessControlled(guestAccessEnabled=true)&lt;br /&gt;         
  @JSONWebService(method=&amp;quot;POST&amp;quot;,value=&amp;quot;/creaUser&amp;quot;)&lt;br /&gt;
           public Object creaUser(String usrws,String pwdws,long
  companyId,String nome,String cognome,String email,String
  codiceFiscale,int codUtenteBooking){&lt;br /&gt;                    .....&lt;/p&gt;
&lt;p&gt;                   .....&lt;/p&gt;
&lt;p&gt;                   ....&lt;/p&gt;
&lt;p&gt;                   ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext();&lt;/p&gt;
&lt;p&gt;                   ut = UserLocalServiceUtil.addUser(20433,
  companyId,true, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;,true, StringPool.BLANK,
  email.trim(),0l,&amp;quot;&amp;quot;,Locale.ITALY, nome.trim(),
  StringPool.BLANK, cognome.trim(), 0, 0, true, 1, 1, 2017,
  StringPool.BLANK, null, null, new long[]{ROLE_UTENTE_APP}, null, true,
  serviceContext);&lt;br /&gt;                    ......&lt;/p&gt;
&lt;p&gt;                  ......&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Yes, i restart portal after change portal.properties in the hook.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</summary>
    <dc:creator>Fabrizio Attanasio</dc:creator>
    <dc:date>2018-06-25T08:37:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110330440" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110330440</id>
    <updated>2018-06-24T15:02:00Z</updated>
    <published>2018-06-24T15:02:00Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Fabrizio Attanasio:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;Hi,&lt;/p&gt;
      &lt;p&gt;I set web.server.host but it didn't change.&lt;br /&gt; The API
        addUser take as last parameter the serviceContext.&lt;/p&gt;
      &lt;p&gt;Thinking......the registration is done by a web service json
        into liferay, could it be that the service context is empty and
        so it simply takes the ip address instead of the domain name?&lt;/p&gt;
      &lt;p&gt;Another question is that the registration email goes into spam
        folder of gmail.... ?????&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Ok, it's time to ask for actual steps to reproduce.&lt;/p&gt;
&lt;p&gt;Which &lt;em&gt;(exact)&lt;/em&gt; version? How do you register?&lt;/p&gt;
&lt;p&gt;And I assume that you restarted after setting web.server.host (as
  that's required with changes to portal-ext.properties)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2018-06-24T15:02:00Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110329669" />
    <author>
      <name>Fabrizio Attanasio</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110329669</id>
    <updated>2018-06-24T10:36:09Z</updated>
    <published>2018-06-24T10:36:09Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I set web.server.host but it didn't change.&lt;br /&gt; The API addUser
  take as last parameter the serviceContext.&lt;/p&gt;
&lt;p&gt;Thinking......the registration is done by a web service json into
  liferay, could it be that the service context is empty and so it
  simply takes the ip address instead of the domain name?&lt;/p&gt;
&lt;p&gt;Another question is that the registration email goes into spam folder
  of gmail.... ?????&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;thank you&lt;/p&gt;</summary>
    <dc:creator>Fabrizio Attanasio</dc:creator>
    <dc:date>2018-06-24T10:36:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110329270" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110329270</id>
    <updated>2018-06-24T09:09:15Z</updated>
    <published>2018-06-24T09:09:15Z</published>
    <summary type="html">&lt;p&gt;Which version are you referring to?&lt;br /&gt;
  &lt;br /&gt; Version independent: If you are using a reverse proxy (Apache
  httpd? Nginx? Another one?) with improper configuration, it might be
  swallowing the host name. Share or validate your configuration if you
  need help.&lt;/p&gt;
&lt;p&gt;And a quick fix (not for all issues, but maybe for this one) could be
  to use at &lt;a
    href="https://docs.liferay.com/portal/7.0-latest/propertiesdoc/portal.properties.html#Web%20Server"&gt;these
  properties&lt;/a&gt;. Even if these settings work, I'd still recommend to
  check underlying issues like reverse proxies&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2018-06-24T09:09:15Z</dc:date>
  </entry>
  <entry>
    <title>domain name instead ip address into email verification</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110324747" />
    <author>
      <name>Fabrizio Attanasio</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110324747</id>
    <updated>2018-06-22T15:47:58Z</updated>
    <published>2018-06-22T15:47:58Z</published>
    <summary type="html">&lt;p&gt;Hello to all,&lt;/p&gt;
&lt;p&gt;I have a small problem. When I create a account into my portal, the
  registration verification URL with the ticket is built with the ip
  address instead of the site name.&lt;/p&gt;
&lt;p&gt;In the portal settings I have correctly set the Virtual Host field
  with the domain name. In fact, the site works correctly even when I
  enter the other pages.&lt;/p&gt;
&lt;p&gt;The only problem I have in the mail where the variable [$
  EMAIL_VERIFICATION_URL $] is built like this: http: // IPADDRESS: PORT
  / verify .... etc ... etc ..&lt;/p&gt;
&lt;p&gt;But I would like it to be http: //www.domainname.ext/verify .....
  etc..ecc ...&lt;/p&gt;
&lt;p&gt;Thanks so much&lt;/p&gt;</summary>
    <dc:creator>Fabrizio Attanasio</dc:creator>
    <dc:date>2018-06-22T15:47:58Z</dc:date>
  </entry>
</feed>
