<?xml version="1.0"?>
<clientConfig version="1.1">
    <emailProvider id="example.com">
      <domain>fbli.com</domain>
      <domain>friendly-devops.comt</domain>
      <domain>beauregard.online</domain>

      <displayName>FBLi Mail</displayName>
      <displayShortName>fbli</displayShortName>

      <!-- type=
           "imap": IMAP
           "pop3": POP3
           -->
      <incomingServer type="imap">
         <hostname>mail.fbli.com</hostname>
         <port>993</port>
           <!-- "plain": no encryption
                "SSL": SSL 3 or TLS 1 on SSL-specific port
                "STARTTLS": on normal plain port and mandatory upgrade to TLS via STARTTLS
                -->
         <socketType>STARTTLS</socketType>
         <username>%EMAILLOCALPART%</username>
            <!-- Authentication methods:
                 "password-cleartext",
                          Send password in the clear
                          (dangerous, if SSL isn't used either).
                          AUTH PLAIN, LOGIN or protocol-native login.
                 "password-encrypted",
                           A secure encrypted password mechanism.
                           Can be CRAM-MD5 or DIGEST-MD5. Not NTLM.
                 "NTLM":
                           Use NTLM (or NTLMv2 or successors),
                           the Windows login mechanism.
                 "GSSAPI":
                           Use Kerberos / GSSAPI,
                           a single-signon mechanism used for big sites.
                 "client-IP-address":
                           The server recognizes this user based on the IP address.
                           No authentication needed, the server will require no username nor password.
                 "TLS-client-cert":
                           On the SSL/TLS layer, the server requests a client certificate and the client sends one (possibly after letting the user select/confirm one), if available. (Not yet supported by Thunderbird)
                 "OAuth2":
                           OAuth2. Works only on specific hardcoded servers, please see below. Should be added only as second alternative.
                 "none":
                           No authentication
                 -->
         <authentication>password-cleartext</authentication>
         <pop3>
            <!-- remove the following and leave to client/user? -->
            <leaveMessagesOnServer>true</leaveMessagesOnServer>
            <downloadOnBiff>true</downloadOnBiff>
            <daysToLeaveMessagesOnServer>14</daysToLeaveMessagesOnServer>
            <!-- only for servers which don't allow checks more often -->
            <checkInterval minutes="15"/><!-- not yet supported -->
         </pop3>
         <password>optional: the user's password</password>
      </incomingServer>

      <outgoingServer type="smtp">
         <hostname>mail.fbli.com</hostname>
         <port>587</port>
         <socketType>STARTTLS</socketType> <!-- see <incomingServer> -->
         <username>%EMAILLOCALPART%</username> <!-- if smtp-auth -->
            <!-- smtp-auth (RFC 2554, 4954) or other auth mechanism.
                 For values, see incoming.
                 Additional options here:
                 "SMTP-after-POP":
                     authenticate to incoming mail server first
                     before contacting the smtp server.
                  Compatibility note: Thunderbird 3.0 accepts only "plain",
                  "secure", "none", and "smtp-after-pop".
                  It will ignore the whole XML file, if other values are given.
            -->
         <authentication>password-cleartext</authentication>
            <!-- If the server makes some additional requirements beyond
                 <authentication>.
                 "client-IP-address": The server is only reachable or works,
                     if the user is in a certain IP network, e.g.
                     the dialed into the ISP's network (DSL, cable, modem) or
                     connected to a company network.
                     Note: <authentication>client-IP-address</>
                     means that you may use the server without any auth.
                     <authentication>password-cleartext</> *and*
                     <restriction>client-IP-address</> means that you need to
                     be in the correct IP network *and* (should) authenticate.
                     Servers which do that are highly discouraged and
                     should be avoided, see {{bug|556267}}.
                Not yet implemented. Spec (element name?) up to change.
            -->
         <restriction>client-IP-address</restriction>
         <!-- remove the following and leave to client/user? -->
         <addThisServer>true</addThisServer>
         <useGlobalPreferredServer>true</useGlobalPreferredServer>
         <password>optional: the user's password</password>
      </outgoingServer>

      <!-- Add this only when users (who already have an account) have to
           do something manually before the account can work with IMAP/POP or SSL.
           Note: Per XML, & (ampersand) needs to be escaped to & a m p ;
           (without spaces).
           Not yet implemented, see bug 586364. -->
      <enable
         visiturl="https://mail.google.com/mail/?ui=2&shva=1#settings/fwdandpop">
         <instruction>Check 'Enable IMAP and POP' in Google settings page</instruction>
         <instruction lang="de">Schalten Sie 'IMAP und POP aktivieren' auf der Google Einstellungs-Seite an</instruction>
      </enable>

      <!-- A page where the ISP describes the configuration.
           This is purely informational and currently mainly for
           maintenance of the files and not used by the client at all.
           Note that we do not necessarily use exactly the config suggested
           by the ISP, e.g. when they don't recommend SSL, but it's available,
           we will configure SSL.
           The text content should contains a description in the native
           language of the ISP (customers), and a short English description,
           mostly for us.
      -->
      <documentation url="http://mail.fbli.com/help/mail/thunderbird">
         <descr lang="en">Configure Thunderbird 2.0 for IMAP</descr>
         <descr lang="de">Thunderbird 2.0 mit IMAP konfigurieren</descr>
      </documentation>

    </emailProvider>

    <!-- Syncronize the user's address book / contacts. -->
         Note: Thunderbird uses RFC 6764 for CardDAV auto discovery. -->
    <addressBook type="carddav">
      <username>%EMAILADDRESS%</username>
         <!-- Authentication methods. See also <incomingServer>.
              "http-basic":
                        Authenticate to the HTTP server using
                        WWW-Authenticate: Basic
              "http-digest":
                        Authenticate to the HTTP server using
                        WWW-Authenticate: Digest
              "OAuth2":
                        OAuth2. Uses the same token as for email.
              -->
      <authentication>http-basic</authentication>
      <serverURL>https://mail.fbli.com/remote.php/dav<serverURL>
    </addressBook>

    <!-- Syncronize the user's calendar.
         Note: Thunderbird uses RFC 6764 for CalDAV auto discovery. -->
    <calendar type="caldav">
      <username>%EMAILADDRESS%</username>
      <authentication>http-basic</authentication> <!-- see <addressBook> -->
      <serverURL>https://mail.fbli.com/remote.php/dav<serverURL>
    </calendar>

    <!-- Upload files, allowing the user to share them. Not yet implemented.
         This can be used for Thunderbird's FileLink feature,
         or to set up a file sync folder on the user's desktop. -->
    <fileShare type="webdav">
      <username>%EMAILADDRESS%</username>
      <authentication>http-basic</authentication> <!-- see <addressBook> -->
      <serverURL>https://share.example.com/remote.php/dav<serverURL>
    </fileShare>

    <!-- This allows to access the webmail service of the provider.
         The URLs are loaded into a standard webbrowser for the user.
         Specifying this is optional. -->
    <webMail>
      <!-- Webpage where the user has to log in manually by entering username
           and password himself.
           HTTPS required. -->
      <loginPage url="https://mail.fbli.com/" />

      <!-- Same as loginAutomaticDOM, but the website makes checks that
           the user comes from the login page. So, open the login page
           in the browser, get the page's DOM, fill out name and password
           fields for the user, and trigger the login button.
           The login button might not be an HTML button, just a div, so
           to trigger it, send a click event to it.
           HTTPS is required for the URL. -->
      <loginPageInfo url="https://mail.fbli.com/">
        <!-- What to fill into the usernameField.
             Format is the same as for <username> within <incomingServer>,
             including placeholders. See below for valid placeholders. -->
        <username>%EMAILADDRESS%</username>
        <!-- Allows to find the textfield on the page, to fill it out.
             The id attribute give the DOM ID,
             The name attribute give the DOM name attribute.
             One or both of id and name attributes must exist.
             Try the ID first (e.g. using getElementById()), if existing.
             Otherwise, try finding the element by name.
             Don't treat the IDs given in this XML file as trusted,
             but before using them, verify the format
             (e.g. only characters and digits for IDs).
             If you use powerful functions like jQuery, and the XML returns
             you code in the username ID, and you feed it unchecked to jQuery,
             it may be executed. -->
        <usernameField id="email_field" name="email" />
        <passwordField name="password" />
        <!-- The submit button to trigger the server submit
             after filling in the fields.
             id and name attributes: See <usernameField> -->
        <loginButton id="submit_button" name="login"/>
      </loginPageInfo>
    </webMail>

    <!-- see description. Not yet supported, see bug 564043. -->
    <!-- inputField key="USERNAME" label="Screen name"></inputField>
    <inputField key="GRANDMA" label="Grandma">Elise Bauer</inputField>

    <clientConfigUpdate url="https://www.fbli.com/config/mozilla.xml" / -->

</clientConfig>

