Version 1.26.0

Released: 2005-12-19

API for Resellers IP list with status for each: CMD_API_SHOW_RESELLER_IPS new

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.

/CMD_API_SHOW_RESELLER_IPS

dumps the list of IPs, no info about the IP.

CMD_API_SHOW_RESELLER_IPS?ip=1.2.3.4

dumps the info for that IP.

CMD_API_SHOW_RESELLER_IPS?action=all

dumps everything for all resellers IPs.

Outputs everything on one line, so you need to double decode it:

Sample php decoding:

http://www.directadmin.com/double_decode.txt

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.

Admin file editor (SKINS) new

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.

  1. only admins have access to this editor.

  2. only root can add/remove files from the edit_files.txt file.

Example of the format of the edit_files.txt file:

/path/to/file.txt=user=bob&group=bob&permission=755
/usr/local/directadmin/data/admin/ip_blacklist=user=root&group=root&permission=644

(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:

&secure=yes

eg:

/usr/local/directadmin/data/admin/ip_blacklist=user=root&group=root&permission=644&secure=yes

which will require authentication before the file can be saved.

The secure authenticatin was added in DA 1.31.0

root password protect senstive files in the admin file editor (SKINS)

SKINS:

admin/conent_main.html:

<a href="/CMD_ADMIN_FILE_EDITOR">File Editor</a><br>

files_admin.conf:

CMD_ADMIN_FILE_EDITOR=admin/file_editor.html

admin/file_editor.html (see released skin)

lower priority scheduling for user backups new

Use the setpriority funciton when running user backups.

setpriority(PRIO_PROCESS, 0, 19);

the numerical priority will be set in the directadmin.conf.

backup_nice=19 (default value)

Button to refresh disk usage stats. new

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:

quota_update_interval=10

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)

CMD_API_DOMAIN_OWNERS new

dump the /etc/virtual/domainowners file.

Outputs a standard list:

domain.com=user&domain2.com=user2&...

if an Admin calls it, he'll get all the domains.

If a Reseller calls it, he'll get the domains/users that he controlls (including himself).

CMD_API_CUSTOM_HTTPD new

To add/remove custom httpd settings via the api.

CMD_API_CUSTOM_HTTPD

Read data:

Method: GET
domain=domain.com

eg:

CMD_API_CUSTOM_HTTPD?domain=domain.com

will dump the contents of the /usr/local/directadmin/data/users/username/domains/domain.com.cust_httpd


Set data:

Method: POST
domain=domain.com
config=custom httpd.conf data

To delete the entry, set the data with

config=

such that config is blank, eg ""

user_password_change_post.sh new

run after the DA user's password is changed.

environmental variables:

username=username
passwd=password
home=/home/username

CMD_API_MANAGE_RESELLER_PACKAGES CMD_API_MANAGE_USER_PACKAGES new

API commands for adding/saving/deleting packages.

GET or POST

CMD_API_MANAGE_RESELLER_PACKAGES
CMD_API_MANAGE_USER_PACKAGES
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..

CMD_API_SKINS new

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:

CMD_API_MODIFY_USER

method: POST or GET
action=single
skin=*anything*   (only the existance of the name "skin" is important, the value it's set to isnt important)
skinvalue=skinname
user=username

custom input in custom package item form values new

Ability to insert custom form input code.

Related to Ability to add your own package items (SKINS)

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:

&custom=customvalue

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

&custom=id%3Dfred

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.

ability to change the ftp username separator character from @ new

option to use another character, instead of @ for the ftp separator.

add:

ftpsep=@

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.

CMD_API_EMAIL_AUTH new

api to verify if a pop account password is correct

CMD_API_EMAIL_AUTH

GET or POST

email=user@domain.com
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.

SERVERNAME token for message_user.txt and message_tech.txt new

SERVERNAME token for message_user.txt and message_tech.txt

Also available for welcome messages (u_welcome.txt, r_welcome.txt, a_welcome.txt)

DOVECOT (Major Feature) new

For custombuild, use this guide instead:

http://help.directadmin.com/item.php?id=143

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:

  1. Update to DA 1.26.0 or higher.

  2. Type:

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.

Start/restart dovecot:

Linux: /sbin/service dovecot restart
Debian: /etc/init.d/dovecot restart
FreeBSD: /usr/local/etc/rc.d/dovecot restart
  1. 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

apache log rotate only deletes logs if subdomain exists fixed

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.

delete /home/username/imap/domain.com with domain fixed

Delete /home/username/imap/domain.com when the domain is deleted.

Last Updated: