Version 1.24.4

Released: 2005-08-18

CMD_API: catch-all, pop passwords, frontpage, protected dirs, ssl certs new

Catch-all email account API:

CMD_API_EMAIL_CATCH_ALL

pass via GET or POST:

domain=domain.com

you get:

value=:fail:|:blackhole:|fowareder value (username or email address).

CMD_API_EMAIL_CATCH_ALL

pass via GET or POST

domain=domain.com
catch=:fail:|:blackhole:|address
value=email value, if you chose address for 'catch'
update=Update

Change email password:

CMD_API_POP
GET or POST
domain=domain.com
action=modify
user=bob
passwd=newpass
passwd2=newpass
quota=# (0 is unlimited)
OPTIONAL:   newuser=bob2 to rename bob to bob2.  Eg: ...&user=bob&newuser=bob2&...

Frontpage Extensions

CMD_API_FRONTPAGE
domain=domain.com
returns:
status=enabled|disabled
user=username

set frontpage extensions

CMD_API_FRONTPAGE
method GET or POST
domain=domain.com
action=onoff  (yes, "onoff", one word)
passwd=system password for this user.  Must match their actual password.
ON=Enable
*or*
OFF=Disable

Password Protected Directories

CMD_API_PROTECTED_DIRECTORIES
method: GET
domain=domain.com

returns path list of protected directories.

CMD_API_FILE_MANAGER

View a protected directory's settings.

method: GET
action=protect
path=/domains/domain.com/public_html/directory

returns:

enabled=yes|no
name=protected name (eg, 'members area')
1=user1
2=user2 etc... returns the user list too.

CMD_API_FILE_MANAGER

Set a protected directories settings and add users.

method: POST
action=protect
path=/domain/etc..
enabled=yes  (don't pass 'enabled' at all for "no")
name=members area
user=username  (you can leave this blank if you only want to set the enabled or name).
passwd=pass
passwd2=pass

CMD_API_FILE_MANAGER

Delete a protected directory user

method: GET or POST
action=delete
path=/domain/etc..
select0=bob
(select1=fred)
etc..  You can delete several users at once.

SSL Certificates

CMD_API_SSL

domain=domain.com

returns:

ssl_on=yes|no  (if the domain has ssl enabled.)
server=yes|no  (if the cert being used is the server cert, or a pasted one)
certificate=the whole cert, if it exists for the user
key=the whole key, if it exists for the user.

CMD_API_SSL

method: POST
domain=domain.com
action=save
type=server|create|paste

type=create:

also include:

request=yes|no  (to make a request, else self signed cert)
country, province, city, company, division, name=www.domain.com, email=bob@domain.com, keysize=2048

if request=yes, it returns:

request=the certificate request.

type=paste:

also include:

certificate=cert and key.  add n between them, and at the end.

CMD_SSL

view the cacert and setting for it.

domain=domain.com
view=cacert
returns:
enabled=yes|no
cacert=the ca root cert, should it exist yet.

CMD_SSL

set the cacert and settings.

GET or POST
domain=domain.com
action=save
type=cacert
active=yes  (dont' pass 'active' at all, for 'no')
cacert=the ca certificate

Site Redirection

already exists:

Domain pointers API

CMD_API_TICKET & CMD_API_TICKET_MANAGE new

Api for the ticket system.

CMD_API_TICKET

By itself, will produce a url encoded array. Element names will be the ticket #. Element values will be another encoded array. The value array will contain:

from=bob    username who sent it.
lastmessage=Today at 14:11      Time of the message in a string.
name=Bob Smith
new=yes or no   depending if the message has been viewed or not.
priority=10|20|30  (doesnt do anything, just something included by the sender)
status=open|closed
subject=subject of the ticket
time=1124309478    unix timestamp of the message (non string version of lastmessage)
type=ticket|message|request    tickets are recieved from users (anyone lower), messages are recieved by any type, requests are sent to resellers (anyone higher).
user=creator|multiple|username    who it's sent to.   creator means it was sent to whoever made this user account.  Multiple is when a message is sent to many users, username is when it's targeted to one person (normally for messages)

CMD_API_TICKET?action=view&number=000001217&type=ticket (type=ticket is require, but doen't do anything for the api).

This is the function to view a particular ticket. Also sent in a multi level url encoded arrays. Top array names will be message numbers, 0, 1, 3, etc. Element values wil be a url encoded array consisting of:

from=bob
message=the actual message data
name=Bob Smith
priority=none (ignore this value)
status=open|closed (This should be ignored, except for message 0 of the ticket.. each message will have a stutus, but they are not ever changed/used.)
time=unix timestamp of this message
type=ticket|message|request|reply  (most will be replies .. #1 and up)

CMD_API_TICKET_CREATE

Used by everyone to create tickets requets and messages.

method must be "POST".

action=create
type=request
user=creator|all|realusername|multiple
priority=10|20|30
subject=your subject
message=your message

email_only=yes (optional, used for messages)

if user=multiple, then specify your user list with:

user0=bob
(user1=fred) etc..

CMD_API_TICKET

used to reply to a ticket.

method must be "POST"
action=reply
type=reply
number=000001544  (ticket number)
user=creator
subject=your reply subject
priority=10|20|30  .. this value is ignored.
message=your reply message

CMD_API_TICKET

deletes messages. You can specify multpiled ticket # at once.

method: POST
action=multiple
select0=12345
(select1=12346)
delete=anything you want

CMD_API_TICKET

sets the ticket system email address.

method: POST
action=email
email=bob@bob.com
ON=yes (don't pass ON at all for 'no')

CMD_API_TICKET_MANAGE

Note, you can use CMD_API_TICKET to view all tickets, even the tickets recieved by your users.. they're "type=ticket".

This function will just show the ticket system settings for this reseller.

returns:

active=yes|no
html=html link for when active is no.
new_closed=#  (the number of new messages in closed tickets)

CMD_API_TICKET_MANAGE

Sets the status of the ticket system for that resller.

method: POST
action=active
active=yes  (else don't pass it for no)
html=html link.

CMD_API_TICKET_MANAGE

to reply to a user's ticket, as reseller/admin.

method: POST
action=reply
type=reply
number=12345
user=bob (who to)
subject=your subject line
priority=none (not important)
status=open|closed
message=your message

CMD_API_TICKET_MANAGE

to change the status of a message without a reply.

method: POST
action=status
number=12345
status=open|closed

Ability for users to create public stats page new

Same functionality as this:

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

But is done through the User interface:

User Level -> domain.com -> Site Summary / Statistics / Logs

syslogd option added new

You can now use syslogd instead of having DA append the logs in /var/log/directadmin/*

syslog info:

openlog("directadmin", LOG_PID|LOG_CONS, LOG_DAEMON);

Log levels:

error.log : LOG_ERR
system.log: LOG_NOTICE
security.log: LOG_CRIT
YYYY-MM-DD.log: LOG_INFO (this may flood things, so you may want to put it into another file.)

To enable this, add:

use_syslogd=1

to your directadmin.conf file. This will disable the other logging method.

If a user has a limit of 0 for a particular item, the link to setup that item on the User Level page for the domain will be hidden.

These include:

  • dns management
  • ftp accounts
  • subdomains
  • databases
  • email accounts
  • forwarders
  • autoresponsders
  • spamassassin (was already done)

if emails is 0, then vacation messages, spam filters, and the links to the webmail/squirrelamail programs are also hidden.

In the dns management page, the forms to add new records is hidden if dns control is off.

SKINS:

new tokens:

USERDNSCONTROL ON or OFF

USERSSL ON or OFF

enhanced/user/show_domain.html (snips of html):

|*if USERDNSCONTROL="ON"|
                        <a href="/CMD_DNS_CONTROL?domain=|domain|">|LANG_DNS_MANAGEMENT|</a><br>
|*endif|
|*if USERFTPMAX!="0"|
                        <a href="/CMD_FTP?domain=|domain|">|LANG_FTP_MANAGEMENT|</a><br>
|*endif|
|*if NUSERSUBDOMAINSMAX!="0"|
                        <a href="/CMD_SUBDOMAIN?domain=|domain|">|LANG_SUBDOMAIN_MANAGEMENT|</a><br>
|*endif|

etc.. 

see the actual file for more details.

and enhanced/user/dns_control.html (just one long |*if|)

callback script for suspensions new

user_suspend_post.sh

user_activate_post.sh

environmental variables:

the entire user.conf file, plus

bandwidth_used

quota_used

choice=1 or 0. 1 means the admin or reseller actually clicked a suspend button. The account will not be unsuspended upon the montly reset if choice was 1. 0 means the dataskq did it for bandwidth overusage and the account will be unsuspended at the beginning of the month (reset).

DNS manager for domain pointers (SKINS) new

abilty to use the dns manager for domain pointers (user level)

See user/dns_control.html

new TREE:

|*if ptr|
|?TREE=&raquo; <a class=tree href="/CMD_SHOW_DOMAIN?domain=\`domain\`">\`domain\`</a> &raquo; <a class=tree href="/CMD_DOMAIN_POINTER?domain=\`domain\`">Domain Pointer</a> &raquo;<a class=tree href="/CMD_DNS_CONTROL?domain=\`domain\`&ptr=\`DOMAIN\`">DNS Settings (\`DOMAIN\`)</a>|
|*else|
|?TREE=&raquo; <a class=tree href="/CMD_SHOW_DOMAIN?domain=\`DOMAIN\`">\`DOMAIN\`</a> &raquo; <a class=tree href="/CMD_DNS_CONTROL?domain=\`DOMAIN\`">DNS Settings</a>|
|*endif|

replace:

<input type=hidden name=domain value="|DOMAIN|">

with:

<input type=hidden name=domain value="|domain|">
<input type=hidden name=ptr_val value="|ptr_val|">

CASE is important, take note what they are.

The "local mailserver" feature doesn't apply to the dns pointers because pointers will follow the domain they're on. (eg, if you use a remote server for your main domain, then you'll do so for the remote domains too.

Too many domain pointers per line fixed

Added a check to allow a maximum of 4000 character per ServerAlias line. If more domainpointers are needed, new lines are added.

Debian path to mysql and mysqldump fixed

Was using /usr/bin/mysql and /usr/bin/mysqldump.

The DA binary will now use /usr/local/mysql/bin/mysql and /usr/local/mysql/bin/mysqldump, as the installer will put them in /usr/local/mysql/bin/* now.

Note, for any older debian systems that have mysql in /usr/bin, you can create symbolic links if needed:

mkdir -p /usr/local/mysql/bin
ln -s /usr/bin/mysql /usr/local/mysql/bin/mysql
ln -s /usr/bin/mysqldump /usr/local/mysql/bin/mysqldump
Last Updated: