Apache Virtual Host Wildcard

This is something I've always wondered about but never bothered to try…

ServerName mail.cthought.com
ServerAlias mail.*

Basically as we have been providing more and more virtual hosting for email I have been looking for a better way to manage the webmail virtual hosting. Adding a server configuration directive every time I needed to insert a new company name is a little cumbersome. Thankfully Apache does support wildcard records in the serveralias field. Time to play around with this more.