newAPI for Resellers IP list with status for each: CMD_API_SHOW_RESELLER_IPS
Already completed in current release, was just missing the documentation, but will add one new feature for a full IP dump, with all IP info.
dumps the list of IPs, no info about the IP.
dumps the info for that IP.
dumps everything for all resellers IPs.
Outputs everything on one line, so you need to double decode it:
Sample php decoding:
Test out the above API command in a webbrowser to get a sample output, then dump it into the double_decode php form/script to get a sample out that you can read.
newAdmin file editor (SKINS)
Editor in the admin level.
There will be a file: /usr/local/directadmin/data/templates/edit_files.txt
This file contains a list of files that can be edited via the editor in the Admin Level.
only admins have access to this editor.
only root can add/remove files from the edit_files.txt file.
Example of the format of the edit_files.txt file:
(this feature was added mainly for the ip_blacklist editing, but might as well be able to edit other files as well).
If you'd like to protect any file such that the root password is required to authenticate first, then you can do by adding this to the end of the line:
which will require authentication before the file can be saved.
The secure authenticatin was added in DA 1.31.0
<a href="/CMD_ADMIN_FILE_EDITOR">File Editor</a><br>
admin/file_editor.html (see released skin)
newlower priority scheduling for user backups
Use the setpriority function when running user backups.
setpriority(PRIO_PROCESS, 0, 19);
the numerical priority will be set in the directadmin.conf.
backup_nice=19 (default value)
newButton to refresh disk usage stats.
With the introduction of the "mini-tally" for the User Backup Disk usage threshold feature (see previous release), the code is already implemented to calculate the disk usage for users. A button in their control panel will allow them to update their disk usage stats on command.
There is a interval minimum time, default is 10 minutes, directadmin.conf:
If you want users to be able to update more often, change the value.
No skin changes are required.
Button is found in:
User Level -> Stats / Logs -> "Update" (beside the Total Disk Usage)
dump the /etc/virtual/domainowners file.
Outputs a standard list:
if an Admin calls it, he'll get all the domains.
If a Reseller calls it, he'll get the domains/users that he controls (including himself).
To add/remove custom httpd settings via the api.
Method: GET domain=domain.com
will dump the contents of the /usr/local/directadmin/data/users/username/domains/domain.com.cust_httpd
Method: POST domain=domain.com config=custom httpd.conf data
To delete the entry, set the data with
such that config is blank, eg ""
run after the DA user's password is changed.
username=username passwd=password home=/home/username
API commands for adding/saving/deleting packages.
GET or POST
To add a package, or to set a package
add=Save (can be anything, but must have name 'add') packagename=package1
see skins for the rest of the values, eg bandwidth, ubandwidth, quota, uquota..etc.
To delete a package
delete=Delete (again, name is importan, value isn't) delete0=package1 (delete1=package2) ...etc..
list skins, set skins for all users.
To upload a skin: (this might be tricky to do unless you know how httpd file uploads work)
Method: POST enctype: multipart/form-data action=upload file=file (type is file though, not a "normal" form value) name=skinname server=yes|no (only admins can set to yes). set to serverwide.
Delete a skin:
Method: POST delete=Delete (can be set to anything, presence of name is all that's required) select0=skinname (select1=skin2) etc..
Set Skin to yourself (Reseller/Admin)
Method: POST reseller=anythingyouwant (name is only important part). select0=skinname
Set Skin to All Users:
Method: POST all=anythingyouwant select0=skinname
Set a Skin for one user (not used via interface)
Method: POST user=username select0=skinname
Also, to set skin for one user (2nd version of the same thing), you can already use:
method: POST or GET action=single skin=*anything* (only the existence of the name "skin" is important, the value it's set to isnt important) skinvalue=skinname user=username
newcustom input in custom package item form values
Ability to insert custom form input code.
Eg, used to use something like
<input type=checkbox name=bob value=ON>
you can add custom data, say "id=fred", making it:
<input type=checkbox name=bob value=ON id=fred>
In the "custom_package_items.conf" file, you can add:
to the end of the line, eg:
feature=type=checkbox&string=My Feature&desc=short description&checked=yes&custom=customvalue
Where customvalue would be what's inserted into the checkbox (or listbox, or text input)
Note, if you wanted to add id=fred, you'd need to make sure it's encoded in hex.
Hex for = is 3D, so you'd type
hex for & is %26 (if you need it). Those are the only 2 important characters you'd need to encode. The rest should be fine.
THis custom input can be inserted into any of the 3 input types.
newability to change the ftp username separator character from @
option to use another character, instead of @ for the ftp separator.
in your directadmin.conf, where @ is the character you want to swap. The + character would be a good alternative.
Note: there is no swap script to change existing accounts. If you are to use a different separator, then it's recommended to do it before you create any ftp accounts. Else, you'll need to swap the @ character with the one you wish manually.
api to verify if a pop account password is correct
GET or POST firstname.lastname@example.org passwd=password
You'll receive a standard api output..
if error=1, then the password is not right (or something else is wrong).
if error=0, then password is correct.
Also included is "text" and "details", which will give you some info about what's wrong if error=1.
newSERVERNAME token for message_user.txt and message_tech.txt
SERVERNAME token for message_user.txt and message_tech.txt
Also available for welcome messages (u_welcome.txt, r_welcome.txt, a_welcome.txt)
newDOVECOT (Major Feature)
For custombuild, use this guide instead:
If you don't actively change to this, dovecot will not be installed (nothing on your system related to this feature will be changed with the update)
NOTE this is a one-way trip. There is no undo-script to return to mbox.
It's been in testing for a while now, and has proven itself.
Major improvement over the previous mail system.
Old system used the mbox format. Dovecot will use Maildir. Maildir has a significant performance improvement over mbox.
Users will not see any changes to their setttings or email data during this conversion.
Dovecot will replace wu-imap and vm-pop3d.
To convert to dovecot:
Update to DA 1.26.0 or higher.
cd /usr/local/directadmin/customapache ./build update ./build update_dovecot ./build dovecot ./build todovecot
DO NOT ABORT the "todovecot" command. It can take a long time to convert everything.
Linux: /sbin/service dovecot restart Debian: /etc/init.d/dovecot restart FreeBSD: /usr/local/etc/rc.d/dovecot restart
- Make sure that dovecot is running. Take a few days to ensure that everything is working correctly. Once satisfied, you can clean the old mbox files by typing:
echo "action=delete&value=mbox" >> /usr/local/directadmin/data/task.queue
fixedapache log rotate only deletes logs if subdomain exists
The files in /home/username/domains/domain.com/logs are only delete if a subdomain exists on the domain.
Workaround until release: add a subdomain.
fixeddelete /home/username/imap/domain.com with domain
Delete /home/username/imap/domain.com when the domain is deleted.