Version 1.59.5

Released: 2019-11-13

Alias Domain Pointers to use their own VirtualHost (TEMPLATES) new

To aid with certificate management, alias domain pointers could make use of having their own VirtualHost.

Feature will be off by default with internal value:

pointers_own_virtualhost=0

to enable:

./directadmin set pointers_own_virtualhost 1

This will make use of the AdminSSL feature to automate the certificates for pointers.

Extra domain pointers can be added/removed without needing to make entire new requests for all pointers under the domain.

TEMPLATES
virtual_host2.conf
virtual_host2_secure.conf
virtual_host2_sub.conf
virtual_host2_secure_sub.conf
nginx_server.conf
nginx_server_secure.conf
nginx_server_sub.conf
nginx_server_secure_sub.conf

Added after CUSTOM1

|?HOST_DOMAIN=\`DOMAIN\`|
|*if HOST_POINTER|
|?HOST_DOMAIN=\`HOST_POINTER\`|
|*endif|

And now using:

ServerName www.|HOST_DOMAIN|
ServerAlias www.|HOST_DOMAIN| |HOST_DOMAIN| |SERVER_ALIASES|

or

ServerName www.|SUB|.|HOST_DOMAIN|
ServerAlias www.|SUB|.|HOST_DOMAIN| |SUB|.|HOST_DOMAIN| |SERVER_ALIASES|

The rest of the |DOMAIN| tokens are unaffected, as they'll still use the main domain.

Command-line suspend: reason new

Realting to the command-line suspend/unsuspend feature:

Suspend/Unsuspend Users/Domains from command line

You can now include:

reason=X

where X must be one of the reason indexes (left side) in the file:

/usr/local/directadmin/data/templates/suspension_reason.txt

Omitting a reason will set the reason to be "root ssh" as it was before.

Ability to force a pop cache rewrite new

CMD_EMAIL_POP or CMD_API_EMAIL_POP

method: POST

action=write_popcache
domain=domain.com

Will let you decide when the cache is re-computed, rather than having the User's access of the email list trigger it for the dataskq to run 1 minute later.

An old cache will still be triggered if it's older, that code has not changed.

This simply lets you pre-call the rewrite if you happen to know a list pull will happen shortly.

Option: Tally after restore to task.queue new

Relating to this setting:

Option to not run the tally after a Reseller/Admin Level restore

you can already control if you want the tally to run after a restore, in sequence, before the restore message is delivered.

However, if you do want to run the tally, but want to get the restore message before the tally, you can now use:

tally_after_restore=2

Which will call a tally for that Reseller to the task.queue (to be run later), so the result message will arrive much more quickly.


T21328

Create User: DA can now select a random shared IP new

When creating a user, you can already set:

ip=1.2.3.4

for a specific IP, or:

ip=shared|server|assign

for DA to hunt down and use an IP of any of those 3 types.

A new 4th type is shared_random available,making the choices:

ip=1.2.3.4|shared|server|assign|shared_random

Where ip=shared_random will tell DA to hunt for all shared IPs available to this Reseller,

and randomly select one from the list.

====

JSON

CMD_IP_CONFIG?json=yes

will now include:

"have_shared": "1",

where, when 1 is set, the IP selectbox should include:

<option value='shared_random'>Shared - randomly selected</option>

T21402

Reseller: mass IP swap of Users via "List Users" new

New feature where a Reseller can use their "List Users" page to select a set of Users, and pick a new IP to be swapped to.

Similar to the new mass-package setting feature on the same page.

Related to:

Reseller Level -> List Users

in Enhanced, it's CMD_USER_SHOW.

The form will now offer the ability to select the desired Uses, select the desired IP, and click "Set".

This saves the need to manually set the IP for each User, one at a time.

POST

The command to save will be:

action: CMD_SELECT_USERS
method: POST
doip=<anytext>
ip=1.2.3.4
select0=fred
(select1=george)
etc..
JSON

The CMD_USER_SHOW?json=yes request will offer extra values:

"ips":
{
        "0":
        {
                "selected": "yes",
                "text": "-- Select IP",
                "value": ""
        },
        "1":
        {
                "text": "1.2.3.4 - Shared - Server",
                "value": "1.2.3.4"
        },
        "2":
        {
                "text": "1.2.3.5 - Shared",
                "value": "1.2.3.5"
        },
        "3":
        {
                "text": "2001:56a:f6f9:f600:20c:19ff:fe1e:638a",
                "value": "2001:56a:f6f9:f600:20c:19ff:fe1e:638a"
        },
}

TODO:

Evolution (Enhanced is done)


T21211

Use doveadm for faster quota loads new

New default internal directadmin.conf value:

pop_disk_usage_dovecot_quota=0

to enable, set:

./directadmin set pop_disk_usage_dovecot_quota 1
service directadmin restart

This feature will attempt to use the "doveadm quota" tool to retrieve quotas, rather than relying on a more I/O intensive traversal count of the ~/imap folder.

Requires value enabled:

add_userdb_quota=1

which should already be enabled.

Command used:

doveadm -f flow quota get -u 'email@domain.com'

Where the Type=STORAGE Value= (returns in KB) is used for the internal ~/imap total.

Note, the doveadm return value only returns the size of data used, not actual disk space used

eg: one block is always used, regardless of how small the file

so the "Apparent Size" field will not be shown in the account hover-over usage.

It's been noted that it does not count every byte of data, so the index files, etc.. may show up in the old method, while this method might return 0 bytes for no emails..

as the overhead of the indexes to take up space, but are not included in the actual message quota.

Subdomain DocumentRoot override file (TEMPLATES) new

New optional file, GUI to be implemented in the future:

/usr/local/directadmin/data/users/USERNAME/domains/DOMAIN.COM.subdomains.docroot.override

where the file might show this for sub.DOMAIN.COM:

sub=public_html=/domains/DOMAIN.COM/public_html&private_html=/domains/DOMAIN.COM/private_html

where "sub" is the index on the left, matching up with the subdomain in question.

While writing the VirtualHost for a subdomain, if the file exist, "sub" exist, and the given public_html or private_html variable exist for that VH, DA will use the listed path as an override, relative to the User's home directory.

In the above example, the DocumentRoot would end up being:

ServerName www.sub.DOMAIN.COM
...
DocumentRoot /home/USERNAME/domains/DOMAIN.COM/public_html

The one of the public_html and private_html values are optional, in case you wanted to override one part, but not the other.

==================

TEMPLATES

openlitespeed_vhost.conf

Because the OLS template is a single file for domains, subdomains, and http/https, minor changes were needed to allow the SDOCROOT to be set globally, to override the DOCROOT token in the template:

Set AFTER the CUSTOM token:

|?SDOCROOT=`DOCROOT`/`SUB`|
|*if SUB|
|?DOCROOT=`SDOCROOT`|
|*endif|

where SDOCROOT is not set if it was already loaded globally (which is what the override file does)


T21547

Disk Usage update wait period will not apply to Admins new

Users can update their Disk Usage once every 10 minutes.

Admins are now able to bypass this limit if they're logged in as the User with "Login As".


T21729

Restore: include domain force_ssl and force_redirect fixed

The "Force SSL" and "Force Redirect" options will now be restored.

They were already in the backup, so only restore functionality was added.


T21162

MySQL 8: Add Access Host with caching_sha2_password fixed

When duplicating a mysql.user entry to add an access host, if the existing entry was using caching_sha2_password,

the mysql_use_new_user_methods call to CREATE USER was not picking up the $A$005$ tag in the hash,

using mysql_native_password instead,

throwing errors during access host creation (user row duplication)

Rspamd blacklist template changes (TEMPLATES) fixed

Related forum post:

https://forum.directadmin.com/threads/59294

TEMPLATE:

/usr/local/directadmin/data/templates/rspamd_settings.conf

Changed the blacklist section:

        action {
                   reject = -999;
                   |CUSTOM11|
        }

to be:

apply {
        actions {
                reject = -999;
                greylist = null;
                "add header" = null;
                |CUSTOM11|
        }
}

DB: Clearing Access Host if User is in broken state fixed

If the system account "user" was in a broken state for a given host, eg:

mysql.db has: user@1.2.3.4

mysql.user does not have user@.1.2.3.4

(which should never happen, hence it's a broken state), but it's possible to be in that state for some reason (perhaps manual edits, etc),

the issue is try trying to delete that 1.2.3.4 host from the given DB fails with the error:

Unable to delete the host 1.2.3.4 for user user: There is no such grant defined for user 'user' on host '1.2.3.4'

Since the REVOKE call fails as there is no user@1.2.3.4 in mysql.user, but it does exist in mysql.db, which is why 'user' was in the list to get delete deleted from that host.

The result is the 1.2.3.4 value never gets removed.

The fix is to simply add a backup deletion from mysql.db in the event the original REVOKE fails, just for this user/host/db combination.

Deleted Users reading incorrect size fixed

Bug where the bandwidth.reseller.tally file is being incorrectly read, showing a higher bandwidth usage for Reseller who've deleted users than should be shown.

Last Updated: