<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
{% for vd in virtual_domains %}
    <emailProvider id="{{ vd.name }}">
        <domain>{{ vd.name }}</domain>
        <displayName>{{ vd.name }}</displayName>
        <displayShortName>{{ vd.name }}</displayShortName>
        <incomingServer type="imap">
            <hostname>{{ mail_server_subdomain }}.{{ vd.name }}</hostname>
            <port>993</port>
            <socketType>SSL</socketType>
            <authentication>password-cleartext</authentication>
            <username>%EMAILADDRESS%</username>
        </incomingServer>
        <incomingServer type="pop3">
            <hostname>{{ mail_server_subdomain }}.{{ vd.name }}</hostname>
            <port>995</port>
            <socketType>SSL</socketType>
            <authentication>password-cleartext</authentication>
            <username>%EMAILADDRESS%</username>
        </incomingServer>
        <outgoingServer type="smtp">
            <hostname>{{ mail_server_subdomain }}.{{ vd.name }}</hostname>
            <port>587</port>
            <socketType>STARTTLS</socketType>
            <authentication>password-cleartext</authentication>
            <username>%EMAILADDRESS%</username>
        </outgoingServer>
    </emailProvider>
{% endfor %}
</clientConfig>