edit mail account page

This commit is contained in:
Serghey Rodin 2012-06-19 14:04:11 +03:00
commit dd249d8e60
13 changed files with 254 additions and 33 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
# info: add mail account alias aka nickname
# options: user domain account alias
# info: add mail account autoreply message
# options: user domain account message
#
# The function add new email account.
@ -27,7 +27,7 @@ source $VESTA/func/domain.sh
# Verifications #
#----------------------------------------------------------#
check_args '4' "$#" 'user domain account autoreply'
check_args '4' "$#" 'user domain account message'
validate_format 'user' 'domain' 'account' 'autoreply'
is_system_enabled "$MAIL_SYSTEM"
is_object_valid 'user' 'USER' "$user"

View file

@ -31,9 +31,9 @@ json_list_account() {
echo -e "\t\"$value\": {"
else
if [ "$fileds_count" -eq "$i" ]; then
echo -e "\t\t\"${field//$/}\": \"$value\","
else
echo -e "\t\t\"${field//$/}\": \"$value\""
else
echo -e "\t\t\"${field//$/}\": \"$value\","
fi
fi
(( ++i))

View file

@ -23,7 +23,7 @@ json_list_msg() {
i='1' # iterator
echo '{'
echo -e "\t\"$account\": {"
echo " \"MSG\": \"$msg\""
echo " \"MSG\": \"$msg\""
echo -e "\t}\n}"
}