Version 1.31.5

Released: 2008-04-14

~username/domain.com as default new

Update: Default changed in DA 1.32.2 back to 1:

changing the default ~username public_html link back to old default

Original info (older):


https://forum.directadmin.com/threads/198

Although ~username/domain.com will be the new default, for existing systems, if you wish to use the standard ~username method still, you can add:

old_public_html_link=1

to your directadmin.conf and the old fashioned way of handing the link is used.

The internal default will be:

old_public_html_link=0

which won't be present in the directadmin as it's the internal default.

This change will convert the link:

/home/username/public_html

to a directory, and links for each domain will be placed inside that.

Note that existing users will not be affected until they do something domain related, like add another one, change the name, or change their default domain.

If they don't touch anything then the link will remain untouched.

Inside the new /home/username/public_html directory will be an .htaccess file.

This .htaccess file will be created via a template in:

/usr/local/directadmin/data/templates/userdir/.htaccess

You can override this with a custom version, but creating:

/usr/local/directadmin/data/templates/custom/userdir

and putting whatever you want in it.

Anything in the priority userdir directory is fully template/parsed (see the .htacess for an example)

CMD_API_HANDLERS new

API for apache handlers: CMD_API_HANDLERS

To add a handler:

method: POST
action=add
domain=domain.com
name=handlername
extension=extension(s)

To delete a handler:

method: POST
action=multiple
domain=domain.com
button=type
select0=handlername
(select1=handelrname1)

To delete an extension from a handler:

method: POST
action=multiple
domain=domain.com
button=extension
extension=anything
select0=handlername

To view domain handlers:

method: GET
domain=domain.com

To view system handlers:

method: GET
domain=domain.com
action=system

CMD_API_NAME_SERVER new

new Api: CMD_API_NAME_SERVER

All commands will be exactly the same as for:

CMD_NAME_SERVER

As used in:

Reseller Level -> Nameservers

change the default ns1/ns2 a reseller provides when a user is created:

method: GET or POST

action=modify
ns1=ns1.whatever.com
ns2=ns2.whatever.com

create 2 normal nameservers with selected IPs:

method: POST

create=anything (just has to exist)
select0=1.2.3.4
select1=1.2.3.5
domain=domain.com
ns1=ns1
ns2=ns2

create 2 virtual nameservers with selected IPs (it will use the IPs that the main server ns1/ns2 in the admin settings use):

method: POST
create=anything (just has to exist)
virtual=yes
domain=domain.com
ns1=ns1
ns2=ns2

delete 2 nameservers:

method: POST

delete=anything (just has to exist)
select0=1.2.3.4
select1=1.2.3.5

View the nameservers page:

method: GET or POST

don't pass anything (POST has no use in this case)

output:

domains=domain1.com|domain2.com|domain3.com (shows all domains for all reseller's users and the reseller's domains)
NS1=ns1.reseller.com (the value specified by the reseller for new users)
NS2=ns2.reseller.com
1.2.3.4=gateway=&netmask=255.255.255.0&ns=&reseller=admin&status=shared&value=4
1.2.3.5=gateway=&netmask=255.255.255.0&ns=&reseller=bob&status=owned&value=ftptest

in summary, the output will have domains, NS1, NS2 as standard, then will have a list of IPs. It would likely be easiest to grab all of the output, read and remove domains,NS1,NS2, then it will leave you with the full list of IPs and their related information.

Email count in bandwidth breakdown new

Relates to:

CMD_BANDWIDTH_BREAKDOWN

and

CMD_API_BANDWIDTH_BREAKDOWN

New item called "email_count" to show the number of emails sent per day.

Also has email_count in the total for the total monthly email sends, based on the bandwidth.tally file (stored in the bandwidth.tally.cache)

The count will show 0 until the bandwidth.tally.cache is recreated.

autoresponder_delete_pre.sh and forwarder_delete_pre.sh new

custom scripts:

autoresponder_delete_pre.sh and forwarder_delete_pre.sh

environment:

username=username
domain=domain.com
user=bob

all_pre.sh and all_post.sh on HTM files new

directadmin.conf option for all_pre.sh and all_post.sh to be run with HTM files. It's off by default, so if you want all_pre/post.sh with HTM files, it would first have to be turned on. Option is:

htm_all_scripts=1

if you want it. It default to 0 internally (the option won't be present by default).

This will all creation of your own HTM pages with your own root run code in the all_pre.sh and all_post.sh if you want to create your own applications that need root access. A plugin could find this very handy. The plugin would have to add HTM pages to the skins/skinname/files_custom.conf to be safe from DA updates overwriting them. Each skin would need a files_custom.conf if they are all to have custom HTM pages.

include package details along with package names in the API for the name list new

Relating to:

CMD_API_PACKAGES_RESELLER

CMD_API_PACKAGES_USER

Simly adding the extra option:

full=yes

eg: CMD_API_PACKAGES_RESELLER?full=yes

will generate a full double encoded output of all packages, with all package details.

This will greatly speed things up if you're trying to get all packages data for those packages, as it can be done in 1 hit, instead of 1 hit per package.

name value accepted at creation time new

If the "name=Bob" value is passed at creation time, the account's "name" will be set to it. There won't be a form entry in DA, but you can add one if you wish. Also, it will work for API requests that assemble requests on their own.

Added /.Trash folder for the purge_spam_days option new

Appended to the feature to clear out old spam and old trash email if you have dovecot, added the .Trash folder to the list. .INBOX.Trash and .INBOX.spam are already used.

The User History and Reseller History links on the stats pages are often hard to notice. Changed to a button type so people know they exist.

CMD_API_TICKETS were not returning leading 0s fixed

In the full list of tickets in the CMD_API_TICKETS output, the leading zeros were removed. When the number without zeros is used to get a ticket, DA said it was invalid since the 0's were missing. This fix returns the ticket numbers with leading zeros so that ticket requests work.

change ncftpput to use the -f config option for ftp info fixed

in the script:

/usr/local/directadmin/scripts/ftp_upload.php

I've change the way the user login info is passed to ncftpput.

The "-f config" method is now used so as to prevent people seeing the login info from a process list output:

CFG=${ftp_local_file}.cfg
rm -f $CFG
touch $CFG
chmod 600 $CFG
echo "host $ftp_ip" >> $CFG
echo "user $ftp_username" >> $CFG
echo "pass $ftp_password" >> $CFG

$FTPPUT -f $CFG -t 25 -m "$ftp_path" "$ftp_local_file" 2>&1
RET=$?
Last Updated: