Add option for setting Maildomain

Add option for setting maildomain and add some validation for the variable.