# vmail configs # constants readonly MYSQL_CONNECTION_INFO_FILE=/usr/local/etc/vmail-db-info.conf readonly VMAIL_DIR=/var/vmail readonly VMAIL_DB=vmail # functions # crude but good enough domain name format validation function vmail::validate_domain () { local my_domain=$1 if [[ $my_domain =~ ^(([a-zA-Z](-?[a-zA-Z0-9])*)\.)+[a-zA-Z]{2,}$ ]] ; then return 0 else return 1 fi }