Merge pull request #312 from mailcow/thunderbird

Update Thunderbird client instructions for built-in CardDAV support
Dieser Commit ist enthalten in:
Michael Kuron 2021-10-31 22:07:39 +01:00 committet von GitHub
Commit 7e5faf455b
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23
8 geänderte Dateien mit 6 neuen und 268 gelöschten Zeilen

Datei anzeigen

@ -6,76 +6,22 @@
If this is the first time you launched Thunderbird, it asks you whether you would like a new email address. Click <i>Skip this and use my existing email</i> and proceed to step 4. If this is the first time you launched Thunderbird, it asks you whether you would like a new email address. Click <i>Skip this and use my existing email</i> and proceed to step 4.
</li> </li>
<li> <li>
Go to the <i>Tools</i> menu and select <i>Account Settings</i>. Go to the <i>File</i> menu and select <i>New</i>, <i>Existing Mail Account...</i>.
</li>
<li>
Click the <i>Account Actions</i> dropdown menu at the bottom left and select <i>Add Mail Account</i>.
</li> </li>
<li> <li>
Enter your name<span class="client_variables_available"> (<code><span class="client_var_name"></span></code>)</span>, email address<span class="client_variables_available"> (<code><span class="client_var_email"></span></code>)</span> and your password. Make sure the <i>Remember password</i> checkbox is selected and click <i>Continue</i>. Enter your name<span class="client_variables_available"> (<code><span class="client_var_name"></span></code>)</span>, email address<span class="client_variables_available"> (<code><span class="client_var_email"></span></code>)</span> and your password. Make sure the <i>Remember password</i> checkbox is selected and click <i>Continue</i>.
</li> </li>
<li> <li>
Once the configuration has been automatically detected, click <i>Done</i>. Once the configuration has been automatically detected, make sure <i>IMAP</i> is selected and click <i>Done</i>.
</li> </li>
<li> <li>
If you already had other accounts configured in Thunderbird, select the new one<span class="client_variables_available"> (<code><span class="client_var_email"></span></code>)</span> on the left, click the <i>Account Actions</i> dropdown and select Set as <i>Default</i>. To use your contacts from the server, click on the arrow next to "Address Books" and click the <i>Connect</i> button on each address book you would like to use.
</li> </li>
<li> <li>
Close the account settings window with the <i>OK</i> button. To use your calendars from the server, click on the arrow next to "Calendars" and click the <i>Connect</i> button on each calendar you would like to use.
</li> </li>
<li class="client_connector_enabled"> <li>
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>. Click <i>Finish to close the Account Setup window.
</li>
<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_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_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_connector_enabled">
Click the <i>Restart Now</i> button at the top that appears.
</li>
<li class="client_connector_enabled">
Thunderbird briefly shows a message that it is updating extensions, then restarts automatically once more.
</li>
<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> </li>
</ol> </ol>
<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 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 Connector](https://mailcow.github.io/mailcow-dockerized-docs/third_party-thunderbird).
</div>
## Different method of connecting Cal-/CardDAV in Thunderbird with automatic detection of address books and calendars
Instead of using SOGo Connector you can use a combination of
- https://addons.thunderbird.net/de/thunderbird/addon/tbsync/ and
- https://addons.thunderbird.net/de/thunderbird/addon/dav-4-tbsync/
1. To add your Cal-/CardDAV accounts go to `Tools` and find TbSync
![TbSync](../images/thunderbird-tbsync.png)
2. You can add new accounts via the CalDAV & CardDAV provider:
![TbSync - CalDAV & CardDAV Provider](../images/thunderbird-tbsync-caldav.png)
3. Choose "Automatic Configuration". Use your mail address as account and username. Use your mail password as DAV password. The server URL is your MAILCOW_HOSTNAME (specifying any protocol is not necessary, just enter the full domain).
4. Now tick the checkbox for "Enable and synchronize this account" in the synchronization status tab:
![TbSync - Enable](../images/thunderbird-tbsync-enable.png)
5. Several available resources should appear in the same window area now. Tick all checkboxes of the resources (address books and calendars) that you want to sync. Choose a synchronization period (in minutes) in the same window area before clicking on "Synchronize now". If you leave the sync at "0" it will only sync manually so choose at least 30 minutes for periodic synchronization.
If you want to manually synchronize you can find this option under "Account actions" - the dropdown-menu where you added the Cal-/CardDAV account (step 2).

Datei anzeigen

@ -1,61 +0,0 @@
#!/bin/bash
set -e
MAILHOST=$1
if [ "$MAILHOST" = "" ]; then
echo "Usage: echo example.com example.org | $0 mailcow.example.com"
exit 1
fi
cd $(dirname $0)
# we have to use the master branch, because there is no tag or release at the moment
wget -O connector.zip https://github.com/inverse-inc/sogo-connector/archive/master.zip
unzip connector.zip
# build custom connector
while read DOMAINS; do
for DOMAIN in $DOMAINS; do
echo "Building SOGo Connector for $DOMAIN hosted on $MAILHOST"
cd sogo-connector-master
mkdir -p custom/${DOMAIN}
cp -r custom/sogo-demo/* custom/${DOMAIN}/
sed -i "s/https:\/\/demo\.sogo\.nu/https:\/\/${MAILHOST}/g" custom/${DOMAIN}/chrome/content/sogo-connector/general/custom-preferences.js
sed -i "s/plugins\/updates\.php[?]/thunderbird-plugins.php?domain=${DOMAIN}\&amp;/g" chrome/content/sogo-connector/global/extensions.rdf
# adjust sogo-connector.autocomplete.server.urlid
sed -i "s/\"public\"/\"${MAILHOST}\"/g" custom/${DOMAIN}/chrome/content/sogo-connector/general/custom-preferences.js
# remove wrong timezone setting
sed -i 's/char_pref(\"calendar\.timezone\.local\", \"\/mozilla\.org\/20070129_1\/America\/Montreal\");//g' custom/${DOMAIN}/chrome/content/sogo-connector/general/custom-preferences.js
echo 'bool_pref("mail.collect_email_address_outgoing", false);' >> custom/${DOMAIN}/chrome/content/sogo-connector/general/custom-preferences.js
make build=${DOMAIN}
CONNECTOR_VER=$(grep \"version\" manifest.json | awk -F '"' '{print $4}')
CONNECTOR_MIN_VER=$(grep strict_min_version manifest.json | grep -Eo '[0-9\.]+' | head -n 1)
mv sogo-connector-*.xpi ../sogo-connector-${CONNECTOR_VER}-${DOMAIN}.xpi
cd ..
done
done
# if you add any other plugins below, you need to add them into extensions.rdf as in the line commented out above
# # 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}-__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 sogo-connector-master *.zip

Datei anzeigen

@ -1,118 +0,0 @@
<?php
/* updates.php - this file is part of SOGo
*
* Copyright (C) 2006-2014 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* This script handles the automatic propagation of extensions pertaining to a
SOGo site. It requires PHP 4.1.0 or later. */
$plugin_dir = 'thunderbird-plugins';
chdir($plugin_dir);
$plugins = array();
if (file_exists('version.csv'))
{
$fh = fopen('version.csv', 'r');
if ($fh)
{
while (($row = fgetcsv($fh, 1000, ';')) !== FALSE)
{
$plugins[$row[0]] = array(
'application' => 'thunderbird',
'version' => $row[1],
'filename' => str_replace('__DOMAIN__', $_GET["domain"], $row[2]),
);
if (count($row) > 3)
{
$plugins[$row[0]]['min_version'] = $row[3];
}
else
{
$plugins[$row[0]]['min_version'] = '30.0';
}
}
fclose($fh);
}
}
$applications
= array( "thunderbird" => "<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>__MIN_VERSION__</em:minVersion>
<em:maxVersion>99.*</em:maxVersion>" );
$pluginname = $_GET["plugin"];
$plugin =& $plugins[$pluginname];
$application =& $applications[$plugin["application"]];
if ( $plugin ) {
$platform = $_GET["platform"];
if ( $platform
&& file_exists( $platform . "/" . $plugin["filename"] ) ) {
$plugin["filename"] = $platform . "/" . $plugin["filename"];
}
elseif ( !file_exists( $plugin["filename"] ) ) {
$plugin = false;
}
}
if (preg_match('/Thunderbird\/([0-9\.]+)/', $_SERVER['HTTP_USER_AGENT'], $client_ver))
{
$client_ver = $client_ver[1];
}
else
{
$client_ver = $plugin['min_version'];
}
if ( $plugin ) {
if (version_compare($client_ver, $plugin['min_version'], '<')) {
header("Content-type: text/plain; charset=utf-8", true, 404);
echo( 'Plugin not compatible with client version' );
exit;
}
header("Content-type: text/xml; charset=utf-8");
echo ('<?xml version="1.0"?>' . "\n");
?>
<!DOCTYPE RDF>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:<?php echo $pluginname ?>">
<em:updates>
<Seq>
<li>
<Description>
<em:version><?php echo $plugin["version"] ?></em:version>
<em:targetApplication>
<Description>
<?php echo str_replace('__MIN_VERSION__', $plugin['min_version'], $applications[$plugin["application"]]); ?>
<em:updateLink><?php echo 'https://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . $plugin_dir . '/' . $plugin["filename"] ?></em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
<?php
} else {
header("Content-type: text/plain; charset=utf-8", true, 404);
echo( 'Plugin not found' );
}
?>

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 32 KiB

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 39 KiB

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 22 KiB

Datei anzeigen

@ -1,28 +0,0 @@
# 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
```
apt-get install make tar zip
```
Next, go to `data/web` inside mailcow-dockerized.
Place the file [thunderbird-plugins.php](download/thunderbird-plugins.php) into that directory.
Create a new directory `thunderbird-plugins` and place the script [build-plugins.sh](download/build-thunderbird-plugins.sh) into it.
Finally, execute the script with your hostname as an argument and piping it the names of all domains that mailcow handles.
All of this can be done using the following commands:
```
cd data/web
curl -LO https://github.com/mailcow/mailcow-dockerized-docs/raw/master/docs/download/thunderbird-plugins.php
mkdir thunderbird-plugins
cd thunderbird-plugins
curl -Lo build-plugins.sh https://github.com/mailcow/mailcow-dockerized-docs/raw/master/docs/download/build-thunderbird-plugins.sh
chmod +x build-plugins.sh
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 Connector plugin for your domain, e.g. https://mailcow.example.com/thunderbird-plugins/sogo-connector-68.0.1-example.com.xpi (see `data/web/thunderbird-plugins`), and install it into Thunderbird.
All your address books and calendars will be configured automatically.

Datei anzeigen

@ -142,7 +142,6 @@ nav:
- 'Nextcloud': 'third_party-nextcloud.md' - 'Nextcloud': 'third_party-nextcloud.md'
- 'Portainer': 'third_party-portainer.md' - 'Portainer': 'third_party-portainer.md'
- 'Roundcube': 'third_party-roundcube.md' - 'Roundcube': 'third_party-roundcube.md'
- 'SOGo Connector for Thunderbird': 'third_party-thunderbird.md'
extra: extra:
palette: palette:
primary: "indigo" primary: "indigo"