Added localhost check
Fixed problem with mailPattern
Merge branch 'release' into newdev