... yes, that's right ...
I see three blocks here.
The 1st one make https if http called via option "Exclusively Serve On HTTPS". I think that this one have the highest priority due it's the 1st touch.
The 2rd one as rule have to redirect all mail.* subs to mail.domain1.com
The 3rd one as rule have to redirect all with and without
www.*, except mail, to domain1.com
Can it be better to go an other way?
1. http -> https by "Exclusively Serve On HTTPS"
2. mail.* -> mail.domain1.com
3.
www.* -> domain1.com
4. NOT domain1.com -> domain1.com
... ok, now I've confused myself *grrr*
!!! Not that we talk at different things: the whole domain-block for webside is one host, the whole mail.* block for webmail is an other host (on the same machine) !!!
BTW: Over the years I try again and again to understand/learn RegEx but sometimes two things never goes together like RegEx and my Brain...