Bug in u_welcome.txt?

markus

Verified User
Joined
Nov 7, 2004
Messages
90
Location
Girona, Catalunya
When a new user/domain is created and attached to a shared IP, I believe it reports a bad reference to access the user website before his/her domain resolves. I mean this message:

Use |ip|/~|username| to access it until the domain resolves.


As an example, say this is our scenario (pretty common I believe):
- The server's main IP is 192.168.0.10
- The server's hostname is server.example.com
- The new username is john
- The new domain is johndomain.com
- johndomain.com has been assigned a shared IP, say 192.168.0.20
- IP 192.168.0.20 already contains several websites. No doubt, it's shared.

So, the welcome message for john is generated like this:

Use 192.168.0.20/~john to access it until the domain resolves.

However, this results in a 404 http error. Well, I've noticed this today. I believe the correct reference should be:

Use 192.168.0.10/~john to access it until the domain resolves.

or

Use server.example.com/~john to access it until the domain resolves.


I'm wondering if there's a template variable or something to use instead of |ip| to generate the correct reference. Maybe something like this?

Use |serverhostname|/~|username| to access it until the domain resolves.


Has anyone else seen this? Is it a bug in DA or... something strange in my apache configuration?


References:
a) I believe this welcome message is generated from this file:
/usr/local/directadmin/data/users/admin/u_welcome.txt

b) The same problem affects the welcome message for resellers:
/usr/local/directadmin/data/admin/r_welcome.txt
 
Last edited:
Just another comment. As a workaround I've tried to create my own custom version of the u_welcome.txt file. I did it like this:

cp /usr/local/directadmin/data/users/admin/u_welcome.txt /usr/local/directadmin/data/templates/custom/u_welcome.txt

edit /usr/local/directadmin/data/templates/custom/u_welcome.txt to replace this line:

Use |ip|/~|username| to access it until the domain resolves.

by:

Use server.example.com/~|username| to access it until the domain resolves.

To test it I went to resend the welcome message from DA/CMD_SHOW_USER. The message sent didn't reflected the change.

I ended up modifying the master version of this template locate here:
/usr/local/directadmin/data/users/admin/u_welcome.txt


Is this another bug? ...or a bug in the /usr/local/directadmin/data/templates/README file, which reads like this:
The following templates can be used in the custom dir:

named.db
zone.conf
outlook_setup.reg
virtual_host.conf
virtual_host_secure.conf
virtual_host_secure_sub.conf
virtual_host_sub.conf
u_welcome.txt
r_welcome.txt
a_welcome.txt
email_pass_change/custom/index.html
reseller_limit.txt
user_limit.txt
webalizer.conf
message_tech.txt
message_user.txt
dns_a.conf
dns_mx.conf
dns_cname.conf
dns_ns.conf
:confused:
 
1. That's not a bug. Just inaccuracy (one of many in DA, these days ;) |ip| token is for IP-address assigned for account. So if /~username/ access is enabled only on server IP, |serverip| token must be used there. But, unfortenately |serverip| token is still not available for this template...

2. That's not a bug at all. AFAIK, /usr/local/directadmin/data/templates/custom/u_welcome.txt not used to generate welcome email when account created.
/usr/local/directadmin/data/users/*/u_welcome.txt used instead.
/usr/local/directadmin/data/templates/custom/u_welcome.txt used only for copying to /usr/local/directadmin/data/users/*/ directory when admin or reseller account is added.
So "master version" is in /usr/local/directadmin/data/templates/custom , not in /usr/local/directadmin/data/users/admin
 
Last edited:
Back
Top