Feature/allow webapp and mx on one host

this fixes bug #3839 and then also  feature #3776