<?xml version="1.0" encoding="UTF-8"?>

<clientConfig version="1.1">
  <emailProvider id="rai.usc.es">
    <domain>rai.usc.es</domain>

    <displayName>Universidade de Santiago de Compostela (rai.usc.es)</displayName>
    <displayShortName>USC (rai.usc.es)</displayShortName>

    <incomingServer type="imap">
      <hostname>outlook.office365.com</hostname>
      <port>993</port>
      <socketType>SSL</socketType>
      <username>%EMAILADDRESS%</username>
      <authentication>OAuth2</authentication>
      <authentication>password-cleartext</authentication>
    </incomingServer>

    <incomingServer type="pop3">
      <hostname>outlook.office365.com</hostname>
      <port>995</port>
      <socketType>SSL</socketType>
      <username>%EMAILADDRESS%</username>
      <authentication>OAuth2</authentication>
      <authentication>password-cleartext</authentication>
    </incomingServer>

    <oAuth2>
      <issuer>login.microsoftonline.com</issuer>
      <scope>https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access</scope>
      <authURL>https://login.microsoftonline.com/common/oauth2/v2.0/authorize</authURL>
      <tokenURL>https://login.microsoftonline.com/common/oauth2/v2.0/token</tokenURL>
    </oAuth2>

    <outgoingServer type="smtp">
      <hostname>smtp.office365.com</hostname>
      <port>587</port>
      <socketType>STARTTLS</socketType>
      <username>%EMAILADDRESS%</username>
      <authentication>OAuth2</authentication>
      <authentication>password-cleartext</authentication>
    </outgoingServer>

    <documentation url="https://www.usc.es/export9/sites/webinstitucional/gl/servizos/atic/correo/manuais/oauth2-thunderbird.pdf">
      <descr lang="gl">Configuración xeral do Thunderbird con OAuth 2.0</descr>
      <descr lang="es">Configuración general de Thunderbird con OAuth 2.0</descr>
      <descr lang="en">Thunderbird general settings with OAuth 2.0</descr>
    </documentation>
  </emailProvider>
</clientConfig>