Version 1.28.1

Released: 2006-11-10

CMD_EMAIL_ACCOUNT_VACATION (api only) new

Similar to CMD_EMAIL_ACCOUNT_QUOTA and CMD_CHANGE_EMAIL_PASSWORD such that the user can setup his own vacation message without needing a DA account login/password. Practical implementations of all 3 of these commands would be something like a squirrelmail module.

This is an api only command.

The 4 things you can do are:

action=create
action=modify
action=delete

and no action at all to show the current message and dates.

For info on how to use these 4 commands, the options passed are exactly the same as the ones passed through DA's interface.

Thus, use the same options/return values as for:

CMD_API_EMAIL_VACATION

API for vacation/autoresponders

except.. that you must also pass:

user=bob
domain=domain.com
password=secretpass

for all commands so it can authenticate.

ability to allow numbered usernames new

If you add:

allow_numeric_username=1

to your directadmin.conf and restart DA, it will allow you to start a username with a number, which bypasses the check.

Note that we have seen issues were services confuse numerical usernames with user ID numbers, so we still don't advise using this.

majordomo subscribe_policy to a dropdown (SKINS) new

user/email/list_modify.html

change:

<input type=text size=16 name=subscribe_policy value="|subscribe_policy|">

to

|subscribe_policy|

and change:

<input type=text size=16 name=unsubscribe_policy value="|unsubscribe_policy|">

to:

|unsubscribe_policy|

Restore mbox file onto a system with dovecot new

If you make a backup from a system with mbox (vm-pop3d) files.. and try to restore onto a system with Maildir (dovecot), the inbox files will be ignored.

This addition will notice the old format and do a conversion during the restore process so that files are not lost. No need to manually convert to dovecot after you've restored the user, it's now done on the fly.

user_suspend_pre.sh & user_activate_pre.sh new

Run before user is suspended or activated. A non-zero return value will abort the suspension/activation.

same data as user_suspend_post.sh & user_activate_pre.sh

callback script for suspensions

ips.conf template new

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

It contains both the http and https virtualhosts at in the same file.. they're added together to the /etc/httpd/conf/ips.conf.

The usual template rules apply. If you want to customize it, first copy it to the custom directory.

If the ips_virtual_host.conf file doesn't exist in either the template or custom directory, the hardcoded version is used for writing the ips.conf file (the way it used to be)

CMD_API_CHANGE_INFO new

API version of CMD_CHANGE_INFO

method: POST only.

update=<anything>

will attempt to trigger a disk usage "mini tally".. without webalizer stats, or banwidth, etc..

email=<anything>
evalue=user@email.com

will attempt to set the users email address to user@email.com

name=<anything>
nvalue=Bob Smith

attempts to set the user's full name.

language=<anything>
lvalue=en

sets the language to "en". The language name isn't checked for existence, so you have to know what you're setting.

zoom=<anything>
zvalue=100

don't ask.. this is depreciated. The power_user skin used to have a ZOOM=100 token set in the stylesheets that allowed you to make the entire interface bigger or smaller. The token was removed from the style sheet. You can in theory use this value for your own purposes if you have a program that needs info on any html page. Only accepts values from 95 to 120.

You can pass multiple values at the same time.

See: CMD_CHANGE_INFO: set multiple values at the same time

CMD_API_ADDITIONAL_DOMAINS new

used to list the users domains with their current settings.

If you want to create/delete/change domain settings, use CMD_API_DOMAIN.

2 ways of calling it:

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

CMD_API_ADDITIONAL_DOMAINS

without any options. It will output a list of domains, eg:

domain1=data&domain2=data, etc.. where "data" is an encoded list:

eg:

UseCanonicalName=OFF&bandwidth=0 / unlimited&cgi=ON&defaultdomain=no&domain=domain.com2&ip=192.168.0.2&open_basedir=ON&php=ON&quota=0.0521383&safemode=OFF&ssl=ON&subdomain=4&suspended=no&username=bob

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

The other way is like when you click on the domain name to "view" it.

CMD_API_ADDITIONAL_DOMAINS

action=view
domain=domain.com

Sample output:

UseCanonicalName=OFF&bandwidth=unlimited&cgi=ON&defaultdomain=no&domain=domainwithareallylongnamedotcom%2Ecom%32&ip=%31%39%32%2E%31%36%38%2E%30%2E%32&open%5Fbasedir=ON&php=ON&private%5Fhtml=link&quota=unlimited&safemode=OFF&ssl=ON&suspended=no&username=bob

Which is just a dump of the domain.com.conf file, plus one extra item: private_html.

The only thing to note is you have either:

public_html=link

or

public_html=dir

depending on the state of the private_html directory.

CMD_API_CHANGE_DOMAIN new

API version of CMD_CHANGE_DOMAIN

method: POST only
old_domain=olddomain.com
new_domain=newdomain.com

it will return the usual:

error=1

or

error=0

with some text and details.

change tally named rewrite to use named.conf fixed

The command:

echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

previously took it's list from the /etc/virtual/domains file.

This prevents the rewrite of zones that were either remote MX record zones (domain not in the domains file), or reverse lookup zones, (ips are not domains).

This fix will now get the list from the named.conf as it should.

Only zones with filenames that begin with the / character will be included (how all DA zones always work, full paths)

wrong confirmation messageduring open_basedir save fixed

When you enable open_basedir, it gives you a message about safemode instead 😉

The function works fine, just the wrong message (copy/paste error)

.htaccess and .protected.list files not updated during domain name change fixed

When a user changes the name of his domain, the .protected.list file's contents was not being updated to reflect the new domain name. Also, the .htaccess files had paths to the .htpasswd file, again with the name of the domain which were not being updated.

add option to backups to remember if a domain uses external mail. fixed

The /etc/virtual/domains file contains the list of local domains.

Users have the option in the MX records section of their control panel to remove their domain from this list (uncheck Local Domain).

The backup system doesn't take note of this change, so any restore will end up re-adding the domain to the /etc/virtual/domains file.

The fix will simply take note that it's external and not add it to the file.

database with multiple access hosts leaves users behind when deleted fixed

With the addition of the multiple user per database feature.. the removal of users from the mysql.users table has become more complex. DA counted the number of instances a particular user in the mysql.db table shows up. If that number is greater than 1, it assumed that there were more than 1 database that the user account was being used for thus didn't delete it. This assumption is false when there are access hosts added, meaning the user will show up once for each host, even with only 1 database. Thus, when a database is deleted from mysql when multiple access hosts are used, DA sees more than one instance of the user and doesn't delete it. This fix will only count "AND where host='localhost'" because a user cannot delete the localhost accesshost, thus we can rely on it for a more accurate way of counting the number of times the user shows up.

database restore fails during DA user restore to a remote mysql server fixed

When DA tries to restore the sql files for a user, it takes the DA username in mysql and temporarily assigns a temp password to it so that it can have access to restore the sql file without needing to know the DA users password. Locally, this works fine, but if you are using a remote mysql host, the GRANT option has to use your server IP for thost host, and not "localhost". This change will check to see if the host in the mysq.conf file is something other than "localhost".. if it's not localhost, it will assign the server IP for the host value in the grant option so that username@serverIP has access to the remote mysql server for the sql file restore.

kernel returns repeated pid numbers in services monitor fixed

On freebsd machines, the sysctl function to get the processes list return multiple entries for mysql with the same pid number. This fix is to scan the list before adding the next pid to ensure it wasn't already added.

dns control couldn't delete plus characters in TXT records fixed

The + characters were being translated into spaces during the decoding.

Added a flag to the decoder to ignore the + characters for decoding.

Regular spaces are not affected because they're decoded on the first pass.

Last Updated: