I did something like this ;)
<rule name="*.example.pl" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="example\.pl$" />
</conditions>
<action type="Redirect" url="http://example.pl/" />
</rule>
<rule name="*.example2.pl" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="example2\.pl$" />
</conditions>
<action type="Redirect" url="http://example2.pl/" />
</rule>
Far from perfection, but it works. I won't be able to filter domain in match url - i don't know why ;(