Merge pull request #174 from mailcow/sogo-connector

SOGo Integrator now built into Connector
Dieser Commit ist enthalten in:
Michael Kuron 2019-10-22 09:11:48 +02:00 committet von GitHub
Commit 7523ad6c38
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23
5 geänderte Dateien mit 52 neuen und 61 gelöschten Zeilen

Datei anzeigen

@ -23,34 +23,34 @@
<li>
Close the account settings window with the <i>OK</i> button.
</li>
<li class="client_integrator_enabled">
In your web browser, download <span class="client_variables_unavailable">SOGo Integrator</span><span class="client_variables_available"><a class="client_var_integrator_link client_var_link" href="/thunderbird-plugins/sogo-integrator-__VERSION__-__DOMAIN__.xpi">SOGo Integrator</a></span>.
<li class="client_connector_enabled">
In your web browser, download <span class="client_variables_unavailable">SOGo Connector</span><span class="client_variables_available"><a class="client_var_connector_link client_var_link" href="/thunderbird-plugins/sogo-connector-__VERSION__-__DOMAIN__.xpi">SOGo Connector</a></span>.
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
Back in Thunderbird, go to the <i>Tools</i> menu and select <i>Add-ons</i>.
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
Click <i>Extensions</i> on the left and ensure that the <i>Lightning</i> add-on is already installed. It is installed by default in the Windows and macOS versions of Thunderbird, but if you are running Linux and installed Thunderbird through your distribution's package manager, <i>Lightning</i> might be available as a separate package (e.g. xul-ext-lightning on Ubuntu).
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
Click <i>Extensions</i> on the left, click the little gear icon at the top and select <i>Install Add-on From File</i>. Select the file you downloaded in step 9, click <i>Open</i> and, after waiting for a few seconds, <i>Install Now</i>.
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
Click the <i>Restart Now</i> button at the top that appears.
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
Thunderbird briefly shows a message that it is updating extensions, then restarts automatically once more.
</li>
<li class="client_integrator_enabled">
<li class="client_connector_enabled">
When you are prompted to authenticate<span class="client_variables_available"> for <code><span class="client_var_host"></span><span class="client_var_port"></span></code></span>, enter your email address and password, check <i>Use Password Manager</i> and click <i>OK</i>.
</li>
</ol>
<div class="client_integrator_disabled client_variables_available" markdown="1">
<div class="client_connector_disabled client_variables_available" markdown="1">
Automatic configuration of calendars and address books in Thunderbird is not currently supported.
You can ask your server administrator to enable SOGo Integrator if you need it.
You can ask your server administrator to enable SOGo Connector if you need it.
</div>
<div class="client_variables_unavailable" markdown="1">
Automatic configuration of calendars and address books (from step 9 onward) in Thunderbird is only supported if your server administrator has enabled [SOGo Integrator](https://mailcow.github.io/mailcow-dockerized-docs/third_party-thunderbird).
Automatic configuration of calendars and address books (from step 9 onward) in Thunderbird is only supported if your server administrator has enabled [SOGo Connector](https://mailcow.github.io/mailcow-dockerized-docs/third_party-thunderbird).
</div>

Datei anzeigen

@ -27,8 +27,8 @@ if (window.location.href.indexOf('/client/') >= 0) {
if (getParameterByName('port')) {
setCookie("port", getParameterByName('port'));
}
if (getParameterByName('integrator')) {
setCookie("integrator", getParameterByName('integrator'));
if (getParameterByName('connector')) {
setCookie("connector", getParameterByName('connector'));
}
if (getParameterByName('outlookEAS')) {
setCookie("outlookEAS", getParameterByName('outlookEAS'));
@ -97,16 +97,16 @@ if (window.location.href.indexOf('/client') >= 0) {
});
}
/* Hide those sections that are not applicable because useOutlookForEAS is disabled or SOGo integrator is not available */
if (getCookie('integrator')) {
Array.prototype.forEach.call(document.getElementsByClassName('client_var_integrator_link'), function(el) {
el.href = el.href.replace('__DOMAIN__', getCookie('domain')).replace('__VERSION__', getCookie('integrator'));
/* Hide those sections that are not applicable because useOutlookForEAS is disabled or SOGo Connector is not available */
if (getCookie('connector')) {
Array.prototype.forEach.call(document.getElementsByClassName('client_var_connector_link'), function(el) {
el.href = el.href.replace('__DOMAIN__', getCookie('domain')).replace('__VERSION__', getCookie('connector'));
});
Array.prototype.forEach.call(document.getElementsByClassName('client_integrator_disabled'), function(el) {
Array.prototype.forEach.call(document.getElementsByClassName('client_connector_disabled'), function(el) {
el.style.display = 'none';
});
} else if (getCookie('host')) {
Array.prototype.forEach.call(document.getElementsByClassName('client_integrator_enabled'), function(el) {
Array.prototype.forEach.call(document.getElementsByClassName('client_connector_enabled'), function(el) {
el.style.display = 'none';
});
}

Datei anzeigen

@ -10,60 +10,51 @@ fi
cd $(dirname $0)
wget -O integrator.tar.gz https://github.com/inverse-inc/sogo-integrator/archive/master.tar.gz
wget -O connector.tar.gz https://github.com/inverse-inc/sogo-connector/archive/master.tar.gz
mkdir -p integrator connector
tar --strip-components=1 -C integrator -xf integrator.tar.gz
mkdir -p connector
tar --strip-components=1 -C connector -xf connector.tar.gz
# build custom integrator
# build custom connector
while read DOMAINS; do
for DOMAIN in $DOMAINS; do
echo "Building SOGo Integrator for $DOMAIN hosted on $MAILHOST"
cd integrator
echo > defaults/preferences/site.js
echo "Building SOGo Connector for $DOMAIN hosted on $MAILHOST"
cd connector
mkdir -p custom/${DOMAIN}
cp -r custom/sogo-demo/* custom/${DOMAIN}/
sed -i "s/http:\/\/sogo-demo\.inverse\.ca/https:\/\/${MAILHOST}/g" custom/${DOMAIN}/chrome/content/extensions.rdf
sed -i "s/plugins\/updates\.php[?]/thunderbird-plugins.php?domain=${DOMAIN}\&amp;/g" custom/${DOMAIN}/chrome/content/extensions.rdf
echo 'pref("sogo-integrator.autocomplete.server.urlid", "'${DOMAIN}'");' > custom/${DOMAIN}/defaults/preferences/site.js
sed -i "s/http:\/\/sogo-demo\.inverse\.ca/https:\/\/${MAILHOST}/g" custom/${DOMAIN}/chrome/content/sogo-connector/global/extensions.rdf
sed -i "s/plugins\/updates\.php[?]/thunderbird-plugins.php?domain=${DOMAIN}\&amp;/g" custom/${DOMAIN}/chrome/content/sogo-connector/global/extensions.rdf
echo > custom/${DOMAIN}/defaults/preferences/site.js
echo 'pref("sogo-connector.autocomplete.server.urlid", "'${DOMAIN}'");' > custom/${DOMAIN}/defaults/preferences/site.js
echo 'pref("mail.collect_email_address_outgoing", false);' >> custom/${DOMAIN}/defaults/preferences/site.js
sed -i 's/<\/Seq>/<li><Description em:id="sieve@mozdev.org" em:name="Sieve"\/><\/li><li><Description em:id="imap-acl@sirphreak.com" em:name="Imap-ACL-Extension"\/><\/li><\/Seq>/g' custom/${DOMAIN}/chrome/content/extensions.rdf
#sed -i 's/<\/Seq>/<li><Description em:id="sieve@mozdev.org" em:name="Sieve"\/><\/li><li><Description em:id="imap-acl@sirphreak.com" em:name="Imap-ACL-Extension"\/><\/li><\/Seq>/g' custom/${DOMAIN}/chrome/content/sogo-connector/global/extensions.rdf
make build=${DOMAIN}
INTEGRATOR_VER=$(grep em:version install.rdf | awk -F '"' '{print $2}')
INTEGRATOR_MIN_VER=$(grep em:minVersion install.rdf | grep -Eo '[0-9\.]+' | head -n 1)
cp sogo-integrator-*-${DOMAIN}.xpi ../sogo-integrator-${INTEGRATOR_VER}-${DOMAIN}.xpi
cd ..
done
done
# build connector
cd connector
make
CONNECTOR_VER=$(grep em:version install.rdf | awk -F '"' '{print $2}')
CONNECTOR_MIN_VER=$(grep em:minVersion install.rdf | grep -Eo '[0-9\.]+' | head -n 1)
cp sogo-connector-*.xpi ../sogo-connector-${CONNECTOR_VER}.xpi
mv sogo-connector-*.xpi ../sogo-connector-${CONNECTOR_VER}-${DOMAIN}.xpi
cd ..
done
done
# download Sieve plugin
SIEVE_RELEASES=$(wget --header="Accept: application/vnd.github.v3+json" -qO - https://api.github.com/repos/thsmi/sieve/releases)
SIEVE_VER=$(echo "$SIEVE_RELEASES" | grep -o '"tag_name": *"[^"]*"' | head -n 1 | awk -F '"' '{print $4}')
SIEVE_URL=$(echo "$SIEVE_RELEASES" | grep -o '"browser_download_url": *"[^"]*"' | head -n 1 | awk -F '"' '{print $4}')
wget -O sieve-${SIEVE_VER}.xpi ${SIEVE_URL}
unset SIEVE_RELEASES
# if you add any other plugins below, you need to add them into extensions.rdf as in the line commented out above
# download ACL plugin
IMAP_ACL_RELEASES=$(wget -qO - 'https://addons.thunderbird.net/en-US/thunderbird/addon/imap-acl-extension/')
IMAP_ACL_VER=$(echo "$IMAP_ACL_RELEASES" | grep version-number | awk -F '[<>]' '{print $3}' | head -n 1)
IMAP_ACL_URL=$(echo "$IMAP_ACL_RELEASES" | grep -o 'https://.*\.xpi' | head -n 1)
wget -O imap_acl_extension-${IMAP_ACL_VER}-tb.xpi ${IMAP_ACL_URL}
unset IMAP_ACL_RELEASES
# # download Sieve plugin
# SIEVE_RELEASES=$(wget --header="Accept: application/vnd.github.v3+json" -qO - https://api.github.com/repos/thsmi/sieve/releases)
# SIEVE_VER=$(echo "$SIEVE_RELEASES" | grep -o '"tag_name": *"[^"]*"' | head -n 1 | awk -F '"' '{print $4}')
# SIEVE_URL=$(echo "$SIEVE_RELEASES" | grep -o '"browser_download_url": *"[^"]*"' | head -n 1 | awk -F '"' '{print $4}')
# wget -O sieve-${SIEVE_VER}.xpi ${SIEVE_URL}
# unset SIEVE_RELEASES
#
# # download ACL plugin
# IMAP_ACL_RELEASES=$(wget -qO - 'https://addons.thunderbird.net/en-US/thunderbird/addon/imap-acl-extension/')
# IMAP_ACL_VER=$(echo "$IMAP_ACL_RELEASES" | grep version-number | awk -F '[<>]' '{print $3}' | head -n 1)
# IMAP_ACL_URL=$(echo "$IMAP_ACL_RELEASES" | grep -o 'https://.*\.xpi' | head -n 1)
# wget -O imap_acl_extension-${IMAP_ACL_VER}-tb.xpi ${IMAP_ACL_URL}
# unset IMAP_ACL_RELEASES
# update version file
echo "sogo-connector@inverse.ca;${CONNECTOR_VER};sogo-connector-${CONNECTOR_VER}.xpi;${CONNECTOR_MIN_VER}" > version.csv
echo "sogo-integrator@inverse.ca;${INTEGRATOR_VER};sogo-integrator-${INTEGRATOR_VER}-__DOMAIN__.xpi;${INTEGRATOR_MIN_VER}" >> version.csv
echo "sieve@mozdev.org;${SIEVE_VER};sieve-${SIEVE_VER}.xpi" >> version.csv
echo "imap-acl@sirphreak.com;${IMAP_ACL_VER};imap_acl_extension-${IMAP_ACL_VER}-tb.xpi" >> version.csv
echo "sogo-connector@inverse.ca;${CONNECTOR_VER};sogo-connector-${CONNECTOR_VER}-__DOMAIN__.xpi;${CONNECTOR_MIN_VER}" > version.csv
# echo "sieve@mozdev.org;${SIEVE_VER};sieve-${SIEVE_VER}.xpi" >> version.csv
# echo "imap-acl@sirphreak.com;${IMAP_ACL_VER};imap_acl_extension-${IMAP_ACL_VER}-tb.xpi" >> version.csv
rm -rf connector integrator *.tar.gz
rm -rf connector *.tar.gz

Datei anzeigen

@ -1,4 +1,4 @@
# Build the SOGo Integrator plugin
# Build the SOGo Connector plugin
Install GNU Make, tar, and ZIP if you don't already have them installed. On Debian/Ubuntu, this can be done using
@ -24,5 +24,5 @@ echo example.com example.org | ./build-plugins.sh mailcow.example.com
# Install it in Thunderbird
After you have set up your mailcow IMAP account in Thunderbird, download the SOGo integrator plugin for your domain, e.g. https://mailcow.example.com/thunderbird-plugins/sogo-integrator-31.0.6-example.com.xpi, and install it into Thunderbird.
After you have set up your mailcow IMAP account in Thunderbird, download the SOGo Connector plugin for your domain, e.g. https://mailcow.example.com/thunderbird-plugins/sogo-connector-68.0.0-example.com.xpi, and install it into Thunderbird.
All your address books and calendars will be configured automatically.

Datei anzeigen

@ -105,7 +105,7 @@ nav:
- 'Windows Phone': 'client/client-windowsphone.md'
- 'Manual configuration': 'client/client-manual.md'
- 'Third party apps':
- 'SOGo Integrator for Thunderbird': 'third_party-thunderbird.md'
- 'SOGo Connector for Thunderbird': 'third_party-thunderbird.md'
- 'Roundcube': 'third_party-roundcube.md'
- 'Portainer': 'third_party-portainer.md'
- 'Gogs': 'third_party-gogs.md'