Version 1.21.3

Released: 2004-04-18

CMD_API_SHOW_DOMAINS new

API for users to get their own domains. Nothing is passed. Url encoded list.

Safemode control for Admins (SKINS) new

Ability to enable/disable safe_mode for new domains. They'll be able to set the default for new domains, but they'll also have the ability to change the domains after they've been created.

virtual_host*.conf templates require the |SAFE_MODE| token for the:

php_admin_flag safe_mode |SAFE_MODE|

SKINS:

files_admin.conf

CMD_PHP_SAFE_MODE=admin/safe_mode.html

Also added links in admin/admin_settings.html (and admin/content_main.html in powe_user)

Add Email data (messages) to backups new

Add the physical emails that are stored in /var/spool/mail/username and /var/spool/virtual/domain.com/. As well, store the webmail/squirrelmail data (Address book, prefs, etc) and imap data (/home/username/imap/)

John

Tables "starts with" new

Added another search function in all "Advanced Search" tables. The command is "starts with" .. and is used to find all items that being with the given string.

DNS quick search for domains (SKINS) new

Added a quick form at the top of the admin/dns_admin.html page to search through the domains a bit quicker. It's essentially the same as the "advanced search", but is more refined and very quick/easy to use. This change is not essential and won't affect anything if it's not added.

add this just before the |TABLE| token

<br>
<table class=list cellpadding=3 cellspacing=1>
<form action="" method="GET">
<tr><td class=listtitle>
Show Domains that
<select class=selectclass name=comparison1>
<option value="none">--</option >
<option value="equals">equal</option >
<option value="contains">contain</option >
<option selected value="startswith">start with</option >
</select>
<input type=text size=12 class=inputclass name=value1>
<input type=hidden name=sort1 value="1">
<input type=hidden name=sort1dir value="1">
<input type=hidden name=ipp value="50">
<input type=submit value="Search"></td></tr>
</form>
</table>

Add Reseller's own user files to list of backups new

Add the Reseller User to the list of Users available for backup in the Reseller version of the "Manage User Backups" page.

API for vacation/autoresponders new

AutoResponders:

** view all autoresponders

CMD_API_EMAIL_AUTORESPONDER
domain=domain.com

returns:

user1=email@domain.com
user2=email2@domain.com
user3=
user4=

where... user1, user2 .etc.. are the name of the autoresponders.

email@domain.com are the cc copies to be sent. If no email@domain.com is specified, then no cc email is to be sent.

** Delete auto responders

CMD_API_EMAIL_AUTORESPONDER
action=delete
domain=domain.com
select0=user1
(select1=user2)
(...)

** create an auto responder

CMD_API_EMAIL_AUTORESPONDER
action=create
domain=domain.com
user=user (without @domain.com)
text=autoresponder message
cc=ON or OFF (if you want to send a cc to email)
email=value of the cc, only if cc is ON.
create=Create

** view an autoresponder

CMD_API_EMAIL_AUTORESPONDER_MODIFY
domain=domain.com
user=user1 (without @domain.com)
returns: email=email@cc.com&text=autoreply message&user=user1
Vacation messages:

** List all vacation messages:

CMD_API_EMAIL_VACATION
domain=domain.com

returns:

url encoded string. Each encoded value is another encoded string with the time values, eg:

char=endday%3D%30%34%26endmonth%3D%30%31%26endtime%3Dafternoon%26endyear%3D%32%30%30%35%26startday%3D%30%33%26startmonth%3D%30%31%26starttime%3Dafternoon%26startyear%3D%32%30%30%34&new=endday%3D%31%37%26endmonth%3D%30%34%26endtime%3Devening%26endyear%3D%32%30%30%35%26startday%3D%31%37%26startmonth%3D%30%32%26starttime%3Dafternoon%26startyear%3D%32%30%30%34

** create a vacation message

CMD_API_EMAIL_VACATION
domain=domain.com
action=create
user=user (user part of user@domain.com)
text=the vaction text
starttime=morning|afternoon|evening
startmonth=01|02|03|...|12
startday=01|02|03|...|31
startyear=2002|2003| ...
endtime,endmonth,endday,endyear, all the same format as "start".
create=Create

** view a vacation message:

CMD_API_EMAIL_VACATION_MODIFY
domain=domain.com
user=user

** change a vacation message

CMD_API_EMAIL_VACATION
domain=domain.com
action=modify
user=user (user part of user@domain.com)
text=the vaction text
starttime=morning|afternoon|evening
startmonth=01|02|03|...|12
startday=01|02|03|...|31
startyear=2002|2003| ...
endtime,endmonth,endday,endyear, all the same format as "start".

** Delete a vacation message

CMD_API_EMAIL_VACATION
domain=domain.com
action=delete
select0=user
(select2=user2) ..etc

Ability to turn off backup message emails (SKINS) new

Checkbox to enable/disable messages when backups are made.

added the following after the cron table:

<table width=100% cellspacing=1 cellpadding=0>
<tr><td bgcolor="#C0C0C0"> </td></tr>
<tr><td height=5> </td></tr>
</table>

<table class=list cellspacing=6 cellpadding=12>
<tr><td align=center colspan=3><b>Backup / Restore Settings</b></td></tr>
<tr><td align=center class=step colspan=3>
<table class=list cellspacing=1 cellpadding=3>
<tr>
<td class=listtitle colspan=2>&nbsp;</td>
</tr>
<form action="/CMD_USER_BACKUP" method="POST">
<input type=hidden name=action value="setting">
<tr>
<td class=list align=center>
<input type=checkbox name=message value="yes" |SEND_MESSAGE|>
</td>
<td class=list>
Send a message when a backup has finished.
</td>
</tr>
<tr><td class=listtitle align=right colspan=2><input type=submit value="Save"></td></tr>
</table>
</td></tr>
</table>

Api for ftp : CMD_API_FTP new

  • CMD_API_FTP
  • CMD_API_FTP_SETTINGS
  • CMD_API_FTP_SHOW

CMD_API_FTP

Shows list of accounts and ftp paths.

DOMAIN=domain.com
returns: user=/path/ftp&user2@domain.com=/path/ftp2
1.53.5 update: allows additional GET &extended=yes for extra info.

CMD_API_FTP

Create ftp account.

action=create
domain=domain.com
user=user  (without @domain.com)
type=system|domain|ftp|user|custom
   domain: /home/username/domains/domain.com
   ftp: /home/username/domains/domain.com/public_ftp
   user: /home/username/domains/domain.com/public_html/user
passwd=pass
passwd2=pass
(if type=custom)
custom_val=/home/user/path/to/custom/path

CMD_API_FTP

Change Ftp Password / Account type.

action=modify
domain=domain.com
user=user  (without @domain.com)
type=system|domain|ftp|user|custom
   system: system user /home/username
   domain: /home/username/domains/domain.com
   ftp: /home/username/domains/domain.com/public_ftp
   user: /home/username/domains/domain.com/public_html/user
passwd=pass
passwd2=pass
(if type=custom)
custom_val=/home/user/path/to/custom/path

CMD_API_FTP

Delete ftp account(s)

action=delete
domain=domain.com
select0=user (without @domain.com)
(select1=user2)
(...)

CMD_API_FTP_SHOW

Show an ftp account

domain=domain.com
user=user (without @domain.com)
returns:  fulluser=user@domain.com&type=usertype&user=user
"type" can be system|domain|ftp|user|custom
"user" is just the user, without @domain.com, but fulluser is the exact login name, whether it be user or user@domain.com.

CMD_API_FTP_SETTINGS

Get current ftp settings.

domain=domain.com
returns: Anonymous=no&AnonymousUpload=no&AuthUserFile=/usr/local/directadmin/data/users/usrename/ftp.passwd&DefaultRoot=/home/anixs/domains/steve.com/public_ftp&ExtendedLog=/var/log/proftpd/1.2.3.4.bytes&MaxClients=20&MaxLoginAttempts=3&ServerAdmin=webmaster@domain.com&ServerName=ProFTPd&defaultdomain=no&ip=1.2.3.4&message=Ftp welcome message text.

Note that many of those settings are not going to be of any use to you. (some/many may not be used for the ftp setup ie: maxclients etc.)

CMD_API_FTP_SETTINGS

Set current settings.

domain=domain.com
action=modify
anon=yes|no
anonup=yes|no
message=welcome message text

API for email quotas new

CMD_API_POP

action=list
domain=domain.com
type=quota

returns:

user=quota=10&usage=0.00065
user2=quota=0&usage=0

But it's encoded as one long string so it will need to be url decoded twice.

eg:

user=quota%3D%31%30%34%38%35%37%36%30%26usage%3D%30&user2=quota%3D%30%26usage%3D%30

Backup: option for "all users" so adding/removing users to the cron isn't required (SKINS) new

Adding another "who" option for step 1 of the backup where you can select "all users" so that when adding/removing user accounts from your Reseller, you don't need to make any changes to the backup cron. All users will always be selected (including the reseller himself)

reseller/backups.html

reseller/backup_modify.html

change the <div> for users to this:

<table cellpadding=0 cellspacing=1>
<tr>
<td class=listtitle align=center>
<input type=radio name=who value="all">
</td>
<td class=listtitle>
- All Users
</td>
</tr>
<tr>
<td class=listtitle align=center>
<input type=radio name=who value="selected" checked>
</td>
<td class=listtitle>
- Selected Users
</td>
</tr>
<tr><td></td>
<td>
<div style="overflow: auto; height: 160px; width: 150px;">
|USERS|
</div>
</td>
</tr>
</table>

Session key system for API logins in the skins new

Ability for skin scripting to login to da without knowing the password. It's essentially the same as the sessions based system, except it will work for the localhost ip (127.0.0.1).

The key will be passes through the env in skins as:

SESSION_KEY

the session ID is also now passed through the env:

SESSION_ID

The key should be passed as a cookie along with the token

session=<SESSION_ID>; key=<SESSION_KEY>

eg header in php (communication class):

$query .= "Cookie: session=".getenv("SESSION_ID")."; key=".getenv("SESSION_KEY")."rn";

https://forum.directadmin.com/posts/16773

CMD_API_CRON_JOBS new

CMD_API_CRON_JOBS

api for cronjobs.

No GET or POST returns the url list of cron jobs.

cronid=1 2 3 4 5 /command/to/run&cronid2=2 3 4 * * /command2/to/run
GET or POST
action=create
minute=cron value
hour=cron value
dayofmonth=cron value
month=cron value
dayofweek=cron value
command=/home/username/pathtorun
GET or POST
action=delete
select0=cron id #
(select1=cron id #)
(...)

DA 1.41.0 added support for adjusting the MAILTO value:

MAILTO for cronjobs (SKINS)

GET or POST:

action=saveemail
email=your@email.com

User specified ftp directories (SKINS) new

Ability for the user to specify which directory he wants the ftp account to use.

Can be anywhere within the users home directory.

No symbolic links allowed.

SKINS:

user/ftp/ftp_create.html:

<tr><td class=list>Custom:</td><td class=list align=center><input type=radio name=type value="custom"></td><td class=listwrap><input type=text size=48 name=custom_val value="|HOME_DIR|"></td></tr>

user/ftp/ftp_show.html:

<tr><td class=list>Custom:</td><td class=list align=center><input type=radio name=type value="custom" |CUSTOMCHECKED|></td><td class=listwrap><input type=text size=48 name=custom_val value="|CUSTOM_PATH|"></td></tr>

FreeBSD Frontpage error: FrontPage SUID Error: invalid environment arguments fixed

fpexec is generating that error on FreeBSD systems. This is caused when mod_frontpage isn't passing the required environmental variables to suexec/fpexec.

Update: I added the following items to the env. vars. list in the suexec.c file so that it doesn't remove them when mod_frontpage is passing fpexe to suexec. (suexec calls fpexec but was removing the required variables.)

FIX:

cd /usr/local/directadmin/customapache
./build clean
rm frontpage.patch
./build update
./build apache_mod_ssl
/usr/local/etc/rc.d/httpd restart

Restore public_html directory (FreeBSD) fixed

The restore is failing to restore /home/username/domains/* due to an invalid path for /bin/tar. Workaround is to create a symbolic link from /bin/tar to /usr/bin/tar

ln -s /usr/bin/tar /bin/tar

Package changes only affect users once fixed

When a Reseller changes one of his User packages, all users who currently have that package will get the new settings. However, their set package name is then set to custom, so any other changes to the package will not affect them. This fix prevents the setting of "custom" to the users set package, so that they are always bound their set package (unless their account is manually modified, in which case their package would in fact be set to "custom")

User cleanup if void user is left in users.list file. fixed

https://forum.directadmin.com/posts/15282

IMPLEMENT ME::User::cleanup big mess, make the user GONE. (!user)

Workaround:

remove the user from the /usr/local/directadmin/data/users/reseller/users.list file.

Permission on public_html to 750 fixed

currently used chmod 710 with user:apache, but that was causing problems. Changing defaul to be 750 user:apache.

When the frontpage extension are installed, they'll be changed to 755 user:user

Segfault in dataskq preventing tally fixed

In reference to:

https://forum.directadmin.com/posts/15932

key info:

#2  0x0818314f in operator delete\[\](void*) (ptr=0x40002ff8)
           at ../../../../libstdc++-v3/libsupc++/del_opv.cc:36
#3  0x080705fd in delString(char*&) ()
#4  0x08070625 in delString(char*&, char*&) ()
#5  0x080b6b84 in Tally::tallyReseller(int) ()

Found: was deleting memory when not allocated. Workaround:

Delete /usr/local/directadmin/data/templates/reseller_limit.txt

Next release will recreate the file and fix the bug.

Change php_flag to php_admin_flag fixed

change

php_flag engine on/off

to

php_admin_flag engine on/off

Remove cron jobs after user is removed fixed

Remove cron jobs after user is removed

Backup feature isn't running for a cron with many users (~30) (SKINS) fixed

The crontab files apparently have a limit on the number of characters they'll run. It seems to be topping out at around 974 characters, so if the cron command stored in the crontab file for "diradmin" is longer than that, the command isn't correctly run, and the cron won't take place.

Workaround:

create 2 (or more) cron jobs with half the users in each. They can still be run at the same time, but as long as each one is under the character limit, it should run.

Actual fix:

Create a cron list file with an index. The cronjobs will simply store the cron index and will get the taskq to retrive the actual cron data from the list.

A converter has been made to move the old cron jobs to the new location/format.

echo "action=convert&value=cronbackups" >> /usr/local/directadmin/data/task.queue (executed during update).
SKINS:

reseller/backup_modify.html

<input type=hidden name=old value="|old|">

is changed to:

<input type=hidden name=id value="|id|">

Remove Auth lines from .htaccess during Frontpage Install fixed

Remove 3 lines from .htaccess during frontpage install.

https://forum.directadmin.com/posts/16057

/home/username/domains/domain.com/public_html/_vti_bin/.htaccess and removed the 3 Auth* lines:

AuthName www.tbb.directadmin.com
AuthUserFile /home/user/domains/tbb.directadmin.com/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/domains/tbb.directadmin.com/public_html/_vti_pvt/service.grp

Mysql database dump add --quote-names fixed

Added --quote-names so that odd database/table names don't confuse mysql.

in reference to thread:

https://forum.directadmin.com/posts/16449

Basically just truncate the files to zero.

#include <unistd.h>
int truncate("file", 0);

instead of "unlink("file")

Allow single quotes in filter fixed

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

allow the ' character to be used in the mail filters.

Email disk usage counted twice if /var and /home on same partitiion fixed

Some systems use separate partitions for /home and /var so email disk usage has to be counted in addition to the system quota disk usage. This fix will add a check to see if they're on the same partition or not and decide whether to add the email disk usage again or not.

Demo List/Modify Accounts shows "Error Reading File" fixed

Optimizations to the List/Modify accounts page did not take into account demo accounts.

Remove domain pointers from /etc/virtual/domain when local mailserver is unchecked fixed

Remove domain pointers from /etc/virtual/domain when local mailserver is unchecked.

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

Last Updated: