<html><body bgcolor="#FFFFFF"><div>Thanks for this hint, I will change the code. It's a bit I didn't write :-)<br><br>-- <div>Jules</div></div><div><br>On 21 Aug 2010, at 02:39 PM, Sergio Rabellino <<a href="mailto:rabellino@di.unito.it">rabellino@di.unito.it</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>
I have UseCanonical set to Off and the urls are constructed correctly
with the FQDN name of my virtualhost.<br>
As a reference:<br>
<br>
<blockquote type="cite">
<h3 class="sect2"><a>3.4.2. UseCanonicalName</a></h3>
<blockquote>
<pre class="code"><a name="INDEX-253">UseCanonicalName <em class="replaceable">on|off</em>
Default: on
Server config, virtual host, directory, .htaccess</a></pre>
</blockquote>
<p><a name="INDEX-253">This directive controls how Apache forms URLs
that refer to itself, for example, when redirecting a request for <em class="emphasis">http://www.domain.com/some/directory</em> to the
correct <em class="emphasis">http://www.domain.com/some/directory/</em>
(note the trailing "/" ). If <tt class="literal">UseCanonical-Name</tt>
is <tt class="literal">on</tt> (the default), then the hostname and
port used in the redirect will be those set by <tt class="literal">ServerName</tt>
and <tt class="literal">Port</tt>. If it is <tt class="literal">off</tt>,
then the name and port used will be the ones in the original request.</a></p>
<p><a name="INDEX-253">One instance where this directive may be
useful is when users are in the same domain as the web server (for
example, on an intranet). In this case, they may use the "short" name
for the server (<em class="emphasis">www</em>, for example), instead of
the fully qualified domain name (<em class="emphasis">www.domain.com</em>,
say). If a user types a URL such as <em class="emphasis">http://www/somedir</em>
(without the trailing slash), then, with <tt class="literal">UseCanonicalName</tt>
switched <tt class="literal">on</tt><em class="emphasis">,</em> the
user will be directed to <em class="emphasis">http://www.domain.com/somedir/</em>,
whereas with <tt class="literal">UseCanonicalName</tt> switched <tt class="literal">off</tt>, he or she will be redirected to <em class="emphasis">http://www/somedir/</em>. An obvious case in which
this is useful is when user authentication is switched on: reusing the
server name that the user typed means they won't be asked to
reauthenticate when the server name appears to the browser to have
changed. More obscure cases relate to name/address translation caused
by some firewalling techniques</a></p>
</blockquote>
<br>
How are you calling your server in the browser url ? If you use the IP,
probably then you'll get the IP on the email.<br>
Which browser/version are you using ?<br>
<br>
Into the lines you pinpointed, it's used $_SERVER['HTTP_HOST'] instead
of $_SERVER['SERVER_NAME']: i agree with you, the second is better
because it's related to the request's headers and not to the server
configuration. I suggest Jules to exchange these as the values at the
worst case are identical.<br>
<br>
hope this helps.<br>
<br>
Brad Beckenhauer ha scritto:
<blockquote cite="mid:4C6E792D020000680005E2C3@smtp.aafp.org" type="cite">
<div>Ok, I'm no PHP kung-fu expert, but I'm pretty sure that I've
narrowed down where my problem is, but I'm not sure how to fix it or if
there is a better method.</div>
<div> </div>
<div>in /lib/NSSDropbox.php lines 40-43 appear to be what is
extracting the server name for the email message. In my case it's
always an IP Address instead of the desired DNS host name. I did abit
of research and found that if I set "UseCanonical On" in the apache
conf file that $_SERVER['SERVER_NAME']; would return my server DNS name.</div>
<div> </div>
<div>I have a correct entry in my /etc/hosts file.</div>
<div> </div>
<div>What am I missing here to get the email to have the dns name
instead of the hostname?</div>
<div> </div>
<div> </div>
<div>thanks</div>
<div>Brad</div>
</blockquote>
....<br>
<div class="moz-signature">-- <br>
<center><span style="font-family: Verdana,sans-serif; font-weight: bold;">
Ing. Sergio Rabellino<br>
</span>
<br>
<span style="font-family: Verdana,sans-serif;">
Università degli Studi di Torino<br>
Dipartimento di Informatica<br>
ICT Services Director<br>
Tel +39-0116706701
Fax +39-011751603<br>
C.so Svizzera , 185 - 10149 - Torino<br>
<br>
<a href="http://www.di.unito.it" alt="Dipartimento di Informatica"><logo.jpg></a>
</span></center>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>ZendTo mailing list</span><br><span><a href="mailto:ZendTo@zend.to">ZendTo@zend.to</a></span><br><span><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a></span></div></blockquote></body></html>