Default URL in Notification Emails

youds

Verified User
Joined
Jul 11, 2008
Messages
477
Location
Lancashire, UK
Hi,

I'm using DA 1.32.2 and whenever an email is sent with a direct link to the CP, it uses the *last added* domain as the primary domain on the admin account. In my case, this is very incorrect, and I'm a little stuck as to how I'll get round it, without deleting the domain from the admin account and re-creating it elsewhere.

The scenario is this:
1) Install DA
2) Setup your "default" domain
3) Then add another domain which you own

The other domain which you own, in this case, completely unrelated to the "default" domain, then comes the primary domain when sending emails et al.

Example email below

Code:
A new message or response with subject:

User XXX has used up 80.1367% of his bandwidth and 7.33538% of his allocated disk space

has arrived for you to view.
Follow this link to view it:

http://roundcubethemes.net:2222/CMD_TICKET?action=view&number=000000072&type=ticket


======================================================
Automatically generated email produced by DirectAdmin 1.32.2

Do Not Reply.

Also, better values for usage eg. to 2 floating points would help readability / stop customer questions regarding "WTF is this" etc

Kind regards
 
Hello,

The way DA grabs the domain name to use in the link is as follows:
- If there is more than 1 domain in the domains.list file, use the domain=domain.com from the user.conf (the default domain)
- If there is only 1 domain in the list, use the only value from the domains.list file.
- If there are no domains in the domains.list, use the servername, as set in the directadmin.conf

So in your case, if you've got 2 domains, then the domain used in the ticket would be your default domain.
Additional domains added onto an account do not currently change the default domain value (set in the user.conf). They did used to, but that was changed a while back.

So check your "User Level -> Domain Setup" page.. to ensure you've got the domain you want set as the default (it will be in bold).

I just tested our build system to ensure that new domains (after the first one in the user's list) are not being set as the default, which was correct.. I didn't notice anything wrong there.

If you want some other URL in the tickets, you can modify the templates if you wish to have a constant URL, like and IP if you wish.
/usr/local/directadmin/data/templates/user_limit.txt
copy it to the "custom" folder and edit the custom copy (to be safe from overwrites with updates)

As for the number of digitals after decimal, I've changed the code to only show 3 digits for the next release, eg:
0.12
1.23
12.3
123

John
 
Aha, I understood that fully. Thanks.

The problem was no Default domain was ever selected, so none of them were appearing as bold. Actually I do think it may of been using the "last added" domain as default because of this.

I think youds.com would of been created by custombuild, maybe this thread should be moved there. The reason being, when I create other accounts and domains, a default one is assigned automatically.

I could of swore I followed all the setup guides and made very good use of the knoweldge base when setting the server up, can't believe I missed this. Duhh!!!

Kind regards
 
Last edited:
If you want some other URL in the tickets, you can modify the templates if you wish to have a constant URL, like and IP if you wish.
/usr/local/directadmin/data/templates/user_limit.txt
copy it to the "custom" folder and edit the custom copy (to be safe from overwrites with updates)
As for the number of digitals after decimal, I've changed the code to only show 3 digits for the next release, eg:
0.12
1.23
12.3
123

Also - many thanks for the above. Much appreciated.
 
Back
Top