mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
improved domain validation
This commit is contained in:
parent
6bcebeaba5
commit
b1449299bc
4 changed files with 6 additions and 8 deletions
|
@ -16,7 +16,6 @@
|
||||||
# Argument definition
|
# Argument definition
|
||||||
user=$1
|
user=$1
|
||||||
domain=$2
|
domain=$2
|
||||||
domain_idn=$2
|
|
||||||
ip=$3
|
ip=$3
|
||||||
ns1=$4
|
ns1=$4
|
||||||
ns2=$5
|
ns2=$5
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# Argument definition
|
# Argument definition
|
||||||
user=$1
|
user=$1
|
||||||
domain=$2
|
domain=$2
|
||||||
domain_idn=$2
|
|
||||||
antispam=${3-yes}
|
antispam=${3-yes}
|
||||||
antivirus=${4-yes}
|
antivirus=${4-yes}
|
||||||
dkim=${5-yes}
|
dkim=${5-yes}
|
||||||
|
|
|
@ -875,12 +875,11 @@ format_domain() {
|
||||||
domain=$(echo "$domain" |sed -e "s/^www.//")
|
domain=$(echo "$domain" |sed -e "s/^www.//")
|
||||||
fi
|
fi
|
||||||
if [[ "$domain" =~ .*\.$ ]]; then
|
if [[ "$domain" =~ .*\.$ ]]; then
|
||||||
domain=$(echo "$domain" |sed -e "s/\.$//")
|
domain=$(echo "$domain" |sed -e "s/[.]*$//g")
|
||||||
fi
|
fi
|
||||||
if [[ "$domain" =~ ^\. ]]; then
|
if [[ "$domain" =~ ^\. ]]; then
|
||||||
domain=$(echo "$domain" |sed -e "s/^\.//")
|
domain=$(echo "$domain" |sed -e "s/^[.]*//")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
format_domain_idn() {
|
format_domain_idn() {
|
||||||
|
@ -896,6 +895,9 @@ format_aliases() {
|
||||||
if [ ! -z "$aliases" ] && [ "$aliases" != 'none' ]; then
|
if [ ! -z "$aliases" ] && [ "$aliases" != 'none' ]; then
|
||||||
aliases=$(echo $aliases |tr '[:upper:]' '[:lower:]' |tr ',' '\n')
|
aliases=$(echo $aliases |tr '[:upper:]' '[:lower:]' |tr ',' '\n')
|
||||||
aliases=$(echo "$aliases" |sed -e "s/\.$//" |sort -u)
|
aliases=$(echo "$aliases" |sed -e "s/\.$//" |sort -u)
|
||||||
|
aliases=$(echo "$aliases" |tr -s '.')
|
||||||
|
aliases=$(echo "$aliases" |sed -e "s/[.]*$//g")
|
||||||
|
aliases=$(echo "$aliases" |sed -e "s/^[.]*//")
|
||||||
aliases=$(echo "$aliases" |grep -v www.$domain |sed -e "/^$/d")
|
aliases=$(echo "$aliases" |grep -v www.$domain |sed -e "/^$/d")
|
||||||
aliases=$(echo "$aliases" |tr '\n' ',' |sed -e "s/,$//")
|
aliases=$(echo "$aliases" |tr '\n' ',' |sed -e "s/,$//")
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,6 +4,4 @@
|
||||||
rm -f /usr/local/vesta/data/users/admin/notifications.conf
|
rm -f /usr/local/vesta/data/users/admin/notifications.conf
|
||||||
/usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, copy, edit, view, and retrieve all your web domain files using a fully featured <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is available for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." 'filemanager'
|
/usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, copy, edit, view, and retrieve all your web domain files using a fully featured <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is available for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." 'filemanager'
|
||||||
/usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want to have SFTP accounts that will be used only to transfer files (and not to SSH), you can <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>"
|
/usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want to have SFTP accounts that will be used only to transfer files (and not to SSH), you can <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>"
|
||||||
/usr/local/vesta/bin/v-add-user-notification admin "Free SSL Certificates" "Lets Encrypt is a free and automated Certificate Authority. You can find out more information at <a href='https://letsencrypt.org/'>letsencrypt.org</a>"
|
/usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-18" "Biggest the <a href='http://vestacp.com/roadmap/#0.9.8-18'>release notes</a>"
|
||||||
/usr/local/vesta/bin/v-add-user-notification admin "Keyboard Control" "You can use your keyboard to perform many of the actions you perform with your mouse, such as navigating to or selecting menus and items"
|
|
||||||
/usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-17" "Notable in this release is the improved server tab. You can now edit service configs, php.ini and so on. We have added nice mail helpers and fixed a dozen bugs. For more information please read the <a href='http://vestacp.com/roadmap/#0.9.8-17'>release notes</a>"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue