newCMD_EMAIL_ACCOUNT_VACATION (api only)
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:
except.. that you must also pass:
user=bob domain=domain.com password=secretpass
for all commands so it can authenticate.
newability to allow numbered usernames
If you add:
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.
newmajordomo subscribe_policy to a dropdown (SKINS)
<input type=text size=16 name=subscribe_policy value="|subscribe_policy|">
<input type=text size=16 name=unsubscribe_policy value="|unsubscribe_policy|">
newRestore mbox file onto a system with dovecot
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.
newuser_suspend_pre.sh & user_activate_pre.sh
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
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)
API version of CMD_CHANGE_INFO
method: POST only.
will attempt to trigger a disk usage "mini tally".. without webalizer stats, or banwidth, etc..
will attempt to set the users email address to email@example.com
name=<anything> nvalue=Bob Smith
attempts to set the user's full name.
sets the language to "en". The language name isn't checked for existence, so you have to know what you're setting.
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.
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:
without any options. It will output a list of domains, eg:
domain1=data&domain2=data, etc.. where "data" is an encoded list:
UseCanonicalName=OFF&bandwidth=0 / unlimited&cgi=ON&defaultdomain=no&domain=domain.com2&ip=192.168.0.2&open_basedir=ON&php=ON"a=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.
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:
depending on the state of the private_html directory.
API version of CMD_CHANGE_DOMAIN
method: POST only old_domain=olddomain.com new_domain=newdomain.com
it will return the usual:
with some text and details.
fixedchange tally named rewrite to use named.conf
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)
fixedwrong confirmation messageduring open_basedir save
When you enable open_basedir, it gives you a message about safemode instead 😉
The function works fine, just the wrong message (copy/paste error)
fixed.htaccess and .protected.list files not updated during domain name change
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.
fixedadd option to backups to remember if a domain uses external mail.
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.
fixeddatabase with multiple access hosts leaves users behind when deleted
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.
fixeddatabase restore fails during DA user restore to a remote mysql server
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.
fixedkernel returns repeated pid numbers in services monitor
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.
fixeddns control couldn't delete plus characters in TXT records
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.