Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Help about MediaWiki
FUTO
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Introduction to a Self Managed Life: a 13 hour & 28 minute presentation by FUTO software
(section)
Main Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Calendar & Contacts using SoGo within Mailcow = '''No more saving your contacts & calendar to your Gmail account or iCloud – keep it all on your OWN server!''' This guide will walk you through the process of installing and configuring '''mailcow''' on Ubuntu Server. Mailcow is an excellent solution for managing email, contacts, and calendars. It simplifies the setup of multiple mail-related services like <code>dovecot</code>, <code>rspamd</code>, <code>SpamAssassin</code>, <code>postfix</code>, <code>SoGo web interface</code>, <code>CalDAV</code>, making it easier ''(I will never use the word ''“easy”'' to describe self-managed email)'' to maintain a secure, working mail server with calendar & contacts sync. Mailcow’s ease of use and strong community support make it perfect for self-hosting these services. You will come to appreciate mailcow’s simplicity when we set up postfix manually for FreePBX & ZFS filesystem alerts in later sections. <span id="prerequisites"></span> == Prerequisites: == <span id="for-self-hosted-calendar-contacts"></span> === For self-hosted calendar & contacts: === * ''[https://mailcow.email/ mailcow]'' on your server * ''[https://www.davx5.com/ DAVx⁵]'' on your phone * A calendar app that works with ''[https://www.davx5.com/ DAVx⁵]'' such as ''[https://f-droid.org/en/packages/org.fossify.calendar/ Fossify Calendar]'' <span id="for-self-hosted-email"></span> === For self-hosted email: === * A domain name pointed to your server’s IP address that allows you to add TXT records, A records, etc. * An SMTP relay provider such as ''[https://postmarkapp.com/blog/smtp-relay-services postmark]'' * More patience than ''[https://youtu.be/DwQJT6Y7CyY?t=813 Rachel Cox waiting to leave Wind Cave]'' or John McCain ''[https://postmarkapp.com/blog/smtp-relay-services waiting to be rescued from prison in Vietnam]'' '''These instructions are going to serve as a base for each of our installations of a virtual machine that uses Ubuntu Server. I will ask you to refer back to these later.''' <span id="step-1-prepare-ubuntu-server"></span> == Step 1: Prepare Ubuntu Server == You can either work through virtual machine manager since virtual machine manager provides you a console view of your virtual machine, or <code>ssh</code> in from another computer. <span id="update-and-upgrade-your-system"></span> ==== 1.1 Update and upgrade your system ==== <pre>sudo apt update && sudo apt upgrade -y sudo apt install curl git wget -y</pre> <span id="check-for-other-docker-installations"></span> ==== 1.2 Check for other Docker installations: ==== Run <code>docker --version</code> and see what is installed. Nothing should be installed yet since this is a fresh system. If something is installed, remove it. <pre># Just in case you accidentally installed snap version of docker: sudo snap remove docker For other versions of docker: sudo apt remove docker docker-engine docker.io containerd runc</pre> <span id="install-docker-using-official-docker-script"></span> ==== 1.3 Install Docker using official Docker script: ==== <pre>curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh</pre> <blockquote> '''Note:''' It’s very important to use the official Docker installation and not the Snap version. The Snap version can cause issues due to its sandboxed nature, making it a mess for mailcow’s requirements. Docker snap makes me sad, and it’ll make you sad too if you try to make things work with it. </blockquote> <blockquote> '''Editor's Note:''' Louis uses the ''[https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script convenience script]'' provided by Docker here. This method is <q>Only recommended for testing and development environments.</q> and may not update your dependencies correctly. For installation methods meant for a production environment see [https://docs.docker.com/engine/install/ubuntu/#installation-methods the official Docker manual]. </blockquote> <span id="install-docker-compose"></span> ==== 1.4 Install Docker Compose: ==== Ubuntu’s <code>docker-compose-plugin</code> is safe to use, it is not snap cancer. <pre>sudo apt install docker-compose-plugin -y sudo systemctl enable --now docker</pre> <span id="verify-the-install"></span> ==== 1.5 Verify the install ==== Run <code>docker compose version</code> and make sure the version is 2.0 or higher. Run <code>docker --version</code> and make sure version is 24.0.0 or higher <span id="set-proper-permissions"></span> ==== 1.6 Set proper permissions: ==== Docker needs to be run as root for some operations, but you can add your user to the docker group to avoid using <code>sudo</code> all the time. To be clear, mailcow’s own [https://docs.mailcow.email/getstarted/install/#check-selinux-specifics documentation] and [https://community.mailcow.email/d/59-mailcow-containers-running-as-root community] suggest starting with root or <code>sudo</code>, and you should trust them more than me. To quote mailcow developers, ''“Controlling the Docker daemon as non-root user does not give you additional security. The unprivileged user will spawn the containers as root likewise. The behaviour of the stack is identical.”'' Run this command to add your user: <pre>sudo usermod -aG docker $USER</pre> Log out and log back in, or run: <code>newgrp docker</code> <span id="step-2-install-mailcow"></span> == Step 2: Install mailcow == <span id="clone-the-mailcow-repository"></span> ==== 2.1 Clone the mailcow repository ==== <pre>cd /opt sudo git clone https://github.com/mailcow/mailcow-dockerized cd mailcow-dockerized</pre> <span id="set-the-correct-permissions"></span> ==== 2.2 Set the correct permissions ==== Run <code>umask 0022</code> <span id="generate-the-configuration-file"></span> ==== 2.3 Generate the configuration file ==== Run <code>sudo ./generate_config.sh</code> When prompted, enter your Fully Qualified Domain Name (FQDN), such as <code>mail.yourdomain.com</code>. <span id="start-mailcow-services"></span> ==== 2.4 Start mailcow services ==== <pre>sudo docker compose pull sudo docker compose up -d</pre> The <code>-d</code> option runs mailcow in detached mode so it continues running in the background. <ol start="2" style="list-style-type: decimal;"> <li>'''Verify the installation:''' Run <code>sudo docker ps</code> You should see a list of containers associated with mailcow running.</li></ol> <span id="step-3-access-and-configure-mailcow"></span> == Step 3: Access and Configure mailcow == Firstly, my screenshots from this guide were missing the top bar – my apologies. Refer to this below to see what was cut off, and hopefully where my mouse is clicking in both the rest of the screenshots & the video will make sense: <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_c552f8ef.png File:lu55028jxdhn_tmp_2c7243ee.png </gallery> <span id="access-the-web-interface"></span> ==== 3.1 Access the web interface ==== Open a browser and navigate to <code>https://mailserver.home.arpa</code>, replacing <code>your-mailcow-domain</code> with the hostname you set up when installing Ubuntu and making a static mapping. For example, with '''pfSense'''’s default domain ''home.arpa'', if the hostname is ''mailserver'', you can access it at <code>https://mailserver.home.arpa</code>. If unsure, use the IP address. If the IP is <code>192.168.5.3</code>, it would be <code>https://192.168.5.3/</code>. Ignore the warning about self-signed certificates since this is a new installation. <span id="log-in-with-default-credentials"></span> ==== 3.2 Log in with default credentials ==== * '''Username:''' admin * '''Password:''' moohoo <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_aa2eac37.png File:lu55028jxdhn_tmp_40fcec0b.png File:lu55028jxdhn_tmp_4c65a41d.png </gallery> <span id="change-the-administrative-password"></span> ==== 3.3 Change the administrative password ==== * Click on '''System → Configuration''' in the top menu. * Click on '''Access → Administrators'''. * Find the admin account and click the edit (pencil) icon. * Enter a new, strong password. * Click “Save changes”. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_4255fdcb.png File:lu55028jxdhn_tmp_a4d4f170.png </gallery> <span id="add-a-domain"></span> ==== 3.4 Add a domain ==== * Go to '''Email → Configuration''' on the top menu. * In the '''Domains''' tab, click '''Add domain'''. * Enter your domain name (e.g., yourdomain.com). * Set any desired options (quota, aliases, etc.). * Click '''Add domain''' (for example, <code>louishomeserver.chickenkiller.com</code>). <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_40fc5c1d.png File:lu55028jxdhn_tmp_316dff73_2.png File:lu55028jxdhn_tmp_f296577e.png File:lu55028jxdhn_tmp_316dff73.png </gallery> <span id="add-an-email-account"></span> ==== 3.5 Add an email account ==== * Go to '''Email → Configuration → Mailboxes'''. * In the '''Mailboxes''' tab, click '''Add mailbox'''. ** Enter the username (the part before @ in the email address). ** Choose the domain name (e.g., louis@yourdomain.com). ** Set a password for the mailbox. ** Make sure to check '''Grant direct login access to SOGo''' *** This is what we use for webmail, calendar & contacts * Click '''Add ''' to add your mailbox. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_f3c558c8.png File:lu55028jxdhn_tmp_c65c7b62.png File:lu55028jxdhn_tmp_49a98cdf.png </gallery> <span id="step-4-accessing-calendarcontacts-services"></span> == Step 4: Accessing Calendar/Contacts Services == # Go to <code>https://mailserver.home.arpa</code>, or in this case, <code>https://192.168.5.3/</code> - this was the IP address & hostname I suggested utilizing for this machine. # Log in with your credentials. # Click on “Apps” in the top right corner. # Select '''SOGo''' to access webmail, calendar, and contacts. # Alternatively, go directly to webmail by visiting <code>https://192.168.5.3/SoGo</code>. This can be faster, but the standard login section offers important spam control options so I suggest browsing around there first. '''SoGo''' is the web interface similar to <code>gmail.com</code> <blockquote>'''Note:''' When logging in, make sure to use your full email address. This is necessary because mailcow supports multiple domains, so the full email address is required to identify the correct account. </blockquote> You can also set up your email client or mobile device using the configuration details provided in the mailcow interface. You’ve now successfully set up mailcow on your Ubuntu Server. This is the base of a great self-hosted solution for email, calendars, and contacts. Right now, we are not setting up email but focusing on calendar and contacts. For mobile access and syncing, we’re going to set up '''DAVx⁵''' on an Android device and configuring '''OpenVPN''' for secure remote access to your server. This will let you automatically sync calendar & contacts from anywhere, for multiple calendars and multiple devices! <span id="step-5-sync-android-with-mailcow-using-davx⁵"></span> == Step 5: Sync Android with mailcow using DAVx⁵ == <span id="installing-davx⁵-on-an-android-phone"></span> ==== 5.1 Installing DAVx⁵ on an Android Phone ==== # Open the F-Droid store on your Android phone. If not installed, download it from https://f-droid.org/. # In F-Droid, search for '''“DAVx⁵”'''. # Locate DAVx⁵ in the results and tap on it. # Tap the “Install” button to download and install . # Once installed, open '''DAVx⁵'''. # Grant all requested permissions when prompted. These typically include: #* Access to contacts #* Access to calendars #* Access to storage # You may see a donation request screen. While appreciated by developers, you can skip this for now. But they’re nice people, so think about giving them some money. <span id="installing-fossifys-calendar-app-on-android-using-f-droid-store"></span> ==== 5.2. Installing Fossify’s Calendar App on Android Using F-Droid Store ==== # Open the F-Droid store on your Android phone. # In the search bar, type '''“Calendar”''' and find the one made by '''fossify'''. You have to click the app sometimes to figure out who made it. It’s worth it. Their app is the only one that works properly. # Press the “Install” button to download and install the app. <blockquote>'''Note:''' Fossify Calendar is a fork of Simple Mobile Tools’ calendar app, maintained by developers who prioritize privacy and open-source principles. Simple mobile tools’ app was [https://www.reddit.com/r/SimpleMobileTools/comments/187w64x/simple_mobile_tools_bought_by_zipoapps/ bought by a cancerous spyware company]. IF YOU WERE USING OLD SIMPLE MOBILE TOOLS APPS – UNINSTALL THEM OR DO NOT ALLOW THEM TO AUTO UPDATE AGAIN, EVER. </blockquote> <span id="make-sure-android-phones-openvpn-connection-is-still-connected"></span> ==== 5.3. Make Sure Android Phone’s OpenVPN Connection is Still Connected ==== # Locate the OpenVPN Connect app on your Android phone. # Open the app and check the connection status. # If not connected, tap on the profile you created earlier (e.g., “Home VPN”). # Tap the '''“Connect”''' button. # Wait for the connection to establish. You should see a “Connected” status. <blockquote>'''Important:''' Make sure you’re connected to your home network via OpenVPN before attempting to sync your contacts and calendar. If you’re not, it won’t find your server, since we haven’t forwarded any ports, and you are using local IP/hostnames to connect to it. Your router knows who <code>mailserver.home.arpa</code> is, your router knows who <code>192.168.5.3</code> is. To the outside world, this means nothing… and further, you’re not open to the outside world anyway. </blockquote> <blockquote>Think of it like the difference between saying “I want to find Sabrina Carpenter” to a hotel bellhop, vs. “I want to find my girlfriend.” Girlfriend only means something in reference to you. <code>Mailserver.home.arpa</code> only means something to you. The rest of the world has no idea who the fk that is. </blockquote> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170755552.png </gallery> </div> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:vlcsnap-2024-11-06-15h57m41s864.png File:vlcsnap-2024-11-06-16h00m43s034.png </gallery> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241107032249683.png </gallery> </div> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:vlcsnap-2024-11-06-16h00m46s981.png File:vlcsnap-2024-11-06-16h00m51s682.png File:vlcsnap-2024-11-06-16h00m57s170.png File:vlcsnap-2024-11-06-16h01m09s607.png File:vlcsnap-2024-11-06-16h01m17s742.png File:vlcsnap-2024-11-06-16h01m35s918.png File:vlcsnap-2024-11-06-16h02m15s625.png File:vlcsnap-2024-11-06-16h02m40s141.png File:vlcsnap-2024-11-06-16h02m52s410.png File:vlcsnap-2024-11-06-16h03m03s451.png File:vlcsnap-2024-11-06-16h04m37s060.png File:vlcsnap-2024-11-06-16h05m02s910.png </gallery> <span id="adding-mailcow-acct-to-your-phone-in-davx⁵"></span> ==== 5.4 Adding Mailcow acct to your phone in DAVx⁵ ==== <ol style="list-style-type: decimal;"> <li><p>Open the '''DAVx⁵''' app on your Android phone.</p></li> <li><p>Tap on '''Add account''' to set up a new connection. ⊕</p></li> <li><p>Choose “Login with URL and username”.</p></li> <li><p>In the '''Base URL''' field, enter one of the following:</p> <ul> <li>Your server’s local IP address (e.g., <code>https://192.168.5.3</code>) or hostname (<code>https://mailserver.home.arpa</code>)</li></ul> <blockquote><p>''Note:'' Use <code>https://</code> at the beginning of the URL for a secure connection. If it bitches at you, use <code>http://</code> - we’re connecting to this via OpenVPN which provides incredibly secure encryption anyway.</p></blockquote></li> <li><p>Enter your login credentials:</p> <ul> <li>'''Username:''' Your full email address (e.g., <code>user@yourdomain.com</code>)</li> <li>'''Password:''' Your mailcow account password</li></ul> </li> <li><p>Tap '''Login''' or '''Next''' to proceed.</p></li> <li><p>If you see a certificate warning (due to a self-signed certificate), hit '''ACCEPT ''', this is your server. If you misfollowed something here so bad that you even have the ability to connect to someone else’s server right now, you amaze me more than the [https://expandingdan.substack.com/p/steely-dan-second-arrangement-erased-interview assistant engineer on the set of Gaucho].</p></li></ol> <blockquote>'''NOTE:''' Self-signed certificates are common & normal when setting up a home self managed server. They are not normal on the regular internet. The entire point of a certificate is that a trusted certificate authority has deemed them to be them. When you go to amazon.com, someone authoritative is vouching that they are actually amazon, so some scammer can’t pretend to be amazon.com tomorrow. For that authority to be able to vouch for amazon, they have to be able to '''ACCESS''' amazon. We aren’t letting anyone access our server; and that’s the point. It’s only open via VPN - therefore, we can’t get a real certificate. You could open the port temporarily, and then close it right after you get the certificate, but that just feels dirty. It’s fine to accept this warning for your OWN server; but don’t let this fly when you’re putting your credit card details or bank password into someone else’s website. </blockquote> <ol start="8" style="list-style-type: decimal;"> <li><p>When prompted for an account name, use your email address.</p></li> <li><p>On the next screen, you’ll see options for syncing different data types:</p> <ul> <li>'''For Contacts:''' Enable “CardDAV” sync</li> <li>'''For Calendar:''' Enable “CalDAV” sync</li> <li>'''For Tasks (optional):''' Enable if you plan to use this feature, I don’t though.</li></ul> </li> <li><p>Tap “Create account” or “Finish” to complete the setup.</p></li></ol> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163120676.png </gallery> </div> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163401141.png </gallery> <span id="adjusting-sync-settings"></span> ==== 5.5 Adjusting Sync Settings ==== After setting up your account, adjust the sync settings so you actually enjoy using this over Google/iCloud. The default sync interval is every 4 hours, which is horrible. # In the DAVx⁵ app, find and tap on the account you just created. # Look for sync settings, which will be in the settings, that you get to by clicking on the gear icon at the top of the application. # Set up the sync intervals: #* '''For server changes:''' Set to every 15 minutes (this is usually the minimum allowed interval) #* '''For local changes:''' Set to immediate. # Tap on each sync type (e.g., '''“Contacts”''' or '''“CardDAV”'''). # Look for sync interval settings within each category. # Set server sync to 15 minutes and local changes to immediate for each. '''Important Notes:''' * The exact menu layouts and option names may vary slightly depending on your <code>DAVx⁵</code> version. * Remember that for the 15-minute sync interval to work, make sure that <code>DAVx⁵</code> is exempted from battery optimization settings on your Android device. Android batteries are glued into the phone and most phones don’t let you limit charging to 80-90%, meaning the phone you’re using right now’s battery probably sucks and dies all the time anyway, might as well have up-to-date syncing on your contacts & calendar. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163429362.png </gallery> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163518587.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163545562.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163610419.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163632504.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163645629.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163709224.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163812905.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163835127.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106163941177.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106164009686.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106164255822.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106164453410.png </gallery> </div> <span id="step-6-managing-contacts-with-mailcow-android"></span> == Step 6: Managing Contacts with Mailcow & Android == <span id="finding-your-new-mailcow-contacts-account-in-android"></span> ==== 6.1 Finding Your New Mailcow Contacts Account in Android ==== # Open the Contacts app on your Android phone. # Tap on the menu icon (usually three lines or dots) to open settings. # Go to '''Settings'''. # Go to '''Accounts'''. # Tap '''Add Account'''. # Tap '''DAVx5 address book'''. # Enter '''DAVx5''' app as it opens automatically, click checkbox. # Once in the app, make sure your accounts are all selected & checked. # Return to the Android contacts app. # Go to '''Settings —> Accounts''' again. # Do you see the green DAVx⁵ icon & your account from Mailcow there? If so, great! # Go back to '''Settings''' in the contacts app. # Set up the '''default account for new contacts''' and the '''contacts to display''' so that your phone stores your contacts on your new Mailcow server to the account you created, and shows you contacts from your new server. # Make sure this account is checked or toggled on to display its contacts. # '''MAKE SURE YOU KNOW WHAT CONTACTS YOU ARE VIEWING & WHERE THEY ARE BEING SAVED EARLY ON SO YOU DO NOT SCREW YOURSELF LATER! ON MY SETUP I EXPORT ALL OF MY CONTACTS TO A FILE, IMPORT THEM TO MAILCOW, AND AVOID USING THE PHONE FOR CONTACTS EVER. MORE PLACES YOU STORE CONTACTS = MORE CHANCES YOU SAVE TO THE WRONG PLACE & SCREW YOURSELF LATER!''' <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106164523457.png </gallery> </div> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_1f446aa8.png File:lu55028jxdhn_tmp_26bc974a.png File:lu55028jxdhn_tmp_e1f61714.png File:lu55028jxdhn_tmp_f38b22b5.png File:vlcsnap-2024-11-06-16h05m02s910.png </gallery> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106164958898.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106165036936.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106165048430.png </gallery> </div> <span id="adding-a-contact-in-mailcow-and-verifying-on-android"></span> ==== 6.2 Adding a Contact in Mailcow and Verifying on Android ==== # In the Mailcow SoGo web interface located at <code>https://192.168.5.3/SOGo/</code>, after logging in, find the option to add a new contact. # Create a test contact with a unique name (e.g., “Test Mailcow Sync”). # Save the new contact. # On your Android phone, open the DAVx⁵ app and hit refresh. # This will sync with Mailcow every 15 minutes, but if waiting 15 minutes. # Yeah, I know, I know, Google & iCloud have push… This is open source. We make sacrifices. # When you add a contact on your PHONE, it will show up on the mailcow server in SOGo immediately. But the other way around takes 15 minutes. # Open your Android Contacts app. # Browse to the address book we just added. Or, do what I suggested above and stop using your device contacts list to begin with! # Search for the unique name you gave the test contact. # The contact should appear in your list, confirming that syncing from Mailcow to Android is working. # Make sure this works both ways. Do not trust it until you test it. The worst thing in the world is losing a contact you thought you added. Ruby Lewis from Cirque Du Soleil could decide she wants to go out with you tomorrow—do you really want to lose her number because you messed up configuring <code>DAVx⁵</code>? I didn’t think so. It’s too easy to mess up this section not to double-check. <blockquote>''Trivia: I quit Avatar Studios in 2008, after working there for a year as an intern, then junior technician in the tech room. I made $7.50/hr. Had I stayed there another 8 years, I wouldn’t have started a business, a YouTube channel, or made more than $15/hr; the other technician who had a master’s degree & was 13 years my senior made $15. However, I would’ve gotten to say “hi” to Ruby Lewis in person. Would it have been worth it to not quit to meet my celebrity crush? Absolutely.'' </blockquote> '''Important Notes:''' * Make sure your OpenVPN connection is active if you’re not on your home network or this will not work. We intentionally set this server up to have no contact with the outside world with regards to contacts & calendar syncing, so your phone must be connected to your home network via VPN for this to work. * <code>DAVx⁵</code> typically syncs every 15 minutes, but you can force an immediate sync in the <code>DAVx⁵</code> app. * If contacts don’t appear immediately, wait a few minutes or try forcing a sync in both <code>DAVx⁵</code> and your Contacts app. * Remember to choose to save contacts in your Mailcow-linked address book to make sure they sync properly. <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170046456.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170349909.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170237454.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170546706.png </gallery> </div> <span id="exporting-contacts-from-your-old-address-book"></span> ==== 6.3 Exporting Contacts from Your Old Address Book ==== # In your '''Android Contacts app''', go to '''Settings'''. # Look for an option '''“Export”'''. Contacts app may be different from phone to phone, old version to new version, etc. # Choose the account you want to export from (likely your old Google account or phone storage). # Select '''Export to .vcf file'''. # Choose a location to save the file, such as your phone’s Downloads folder. <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170604109.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170623962.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170635966.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170651317.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106170701373.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106171303341.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106171535285.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106171556372.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106171747070.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106172157386.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106173758592.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106174328393.png </gallery> </div> <span id="importing-contacts-into-your-new-mailcow-address-book"></span> ==== 6.4 Importing Contacts into Your New Mailcow Address Book ==== # In the contacts app, click the three horizontal bars at the top you usually click before going to settings. # Tap on your Mailcow account. # Confirm that it only has the one contact that we added. # Go back to the three-bar menu we were at before tapping the Mailcow account and tap settings. # Find the option to “Import contacts”, usually called '''import.''' # Select the <code>.vcf</code> file you exported earlier. # Choose “DAVx⁵ personal address book” or your Mailcow-linked address book as the destination. # Confirm the import. This process may take a few minutes depending on the number of contacts. # Once it is done, customize your view by clicking “contacts to display” in your settings. Turn off EVERYTHING besides the DAVx⁵ Mailcow address book. # Go back to the three-bar menu. # Click onto your DAVx⁵ Mailcow address book. Do you see your contacts? It worked. :) <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_c7099f8b.png </gallery> <span id="verifying-contacts-in-mailcow-web-interface"></span> ==== 6.5 Verifying Contacts in Mailcow Web Interface ==== # On your computer, open a web browser and navigate to your Mailcow server’s address. # Log in with your Mailcow credentials. Go to the webmail app, the SOGo thing. # Look for the “Contacts” or “Address Book” section. # You should see the contacts you just imported listed here. :D <span id="step-7-setting-up-and-using-your-mailcow-calendar"></span> == Step 7: Setting Up and Using Your Mailcow Calendar == <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175124281.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175231132.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175249692.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175259734.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175311876.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175346849.png </gallery> </div> <span id="configuring-fossify-calendar-app-with-davx⁵-synced-mailcow-calendar"></span> ==== 7.1. Configuring Fossify Calendar App with DAVx⁵-synced Mailcow Calendar ==== # Open the Fossify Calendar app on your Android phone. # Tap the menu icon (usually three lines or dots) and select <code>Settings</code>. # Check the box next to '''caldav sync'''. # Tap '''Manage synced calendars'''. # You should see a list of available calendars. Find the one associated with your Mailcow account and look for something with a familiar name to what you set up before. # Make sure this calendar is checked or toggled on to display its events. # If you don’t see your Mailcow calendar, go back to the <code>DAVx⁵</code> app, find your account, and make sure calendar sync is enabled. <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175409676.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175424361.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175544267.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106175452608.png </gallery> </div> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_717bf114.png </gallery> <span id="adding-events-in-android-calendar-app-and-verifying-in-mailcow"></span> ==== 7.2 Adding Events in Android Calendar App and Verifying in Mailcow ==== # In the Fossify Calendar app, tap the “+” or '''Add event''' button. # Enter event details: #* '''Title''': Give it a unique name (e.g., “Test Android to Mailcow Sync”) #* '''Date and time''' #* Any other details you want to add <blockquote>'''Important''': Make sure you select your Mailcow calendar as the destination calendar (not “Store locally only”). THIS IS VERY EASY TO MESS UP. PAY ATTENTION. </blockquote> <ol start="3" style="list-style-type: decimal;"> <li><p>Save the event.</p></li> <li><p>Open a web browser and log into your Mailcow web interface.</p></li> <li><p>Navigate to the calendar section.</p></li> <li><p>You should see the event you just created appear in your Mailcow calendar. If it does not, you probably forgot to configure <code>DAVx⁵</code> properly so that it syncs on local changes immediately. Or you’re not on the VPN. Or you just messed up the configuration; do not pass go & do not collect $200.</p></li></ol> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxdhn_tmp_7b768f4d.png File:lu55028jxdhn_tmp_58d82fba.png File:lu55028jxdhn_tmp_d4b8aa27.png </gallery> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106180513082.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106180657084.png </gallery> </div> <div class="figure"> <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:image-20241106180744849.png </gallery> </div> <span id="adding-events-in-mailcow-and-verifying-on-android"></span> ==== 7.3 Adding Events in Mailcow and Verifying on Android ==== # In your Mailcow web interface, navigate to the Calendar section. # Find the option to add a new event (usually a “+” or '''New Event''' button). # Create an event with a unique name (e.g., “Test Mailcow to Android Sync”). # Set the date, time, and any other details. # Save the event. # On your Android phone, open the Fossify Calendar app. # Swipe down or tap refresh. # The new event should appear in your calendar view. # '''''PSYCH!!!!''''' <span id="refreshing-calendar-data"></span> ==== 7.4 Refreshing Calendar Data ==== <span id="refresh-button-in-calendar-app-is-not-real"></span> ===== Refresh button in Calendar app is not real ===== '''Refreshing directly in the Fossify Calendar app DOES NOT immediately show new events added on the server. For immediate updates:''' # Open the DAVx⁵ app on your Android phone. # Tap the '''Refresh''', and then the '''Synchronize Now''' button. # Tap this to force an immediate sync with your Mailcow server. # After the sync completes in DAVx⁵, open the Fossify Calendar app. # Your calendar should now show the most up-to-date information. You may wonder why this is, given that the calendar app literally has an option that says, “Refresh CalDAV Calendars.” that does not refresh your calendar. Welcome to the beautiful world of open-source software! :) I hope you’ll stay awhile. What we lack in functional UI, we make up for in not [https://docs.fcc.gov/public/attachments/FCC-24-40A2.pdf selling your data to bail bondsmen & bounty hunters]. It’s kinda worth it…. kinda. <span id="why-does-it-work-this-way"></span> ===== Why does it work this way? ===== When you tap '''“Refresh CalDAV Calendars”''', what you’re actually doing is asking the calendar app to check if anything has changed in CalDAV. You’re not telling CalDAV to contact your server to fetch new entries. Here’s how it works: # '''Mailcow server → CalDAV''' (Mailcow sends updates every 15 minutes) # '''CalDAV → Calendar app''' (The calendar app pulls from CalDAV) The calendar app will not immediately refresh unless you manually ask it to. And even when you do, it’s just checking DAVx⁵ for updates. It doesn’t ask DAVx⁵ to go and poll your Mailcow server. * Remember that automatic syncs occur every 15 minutes by default. * Always make sure you’re adding events to the correct calendar (your Mailcow calendar, not a local one). * If you’re away from your home network, make sure your OpenVPN connection is active for the sync to work. * If you experience any sync issues, check your internet connection and OpenVPN status, then try a manual refresh in DAVx⁵, NOT the calendar or contacts app first. '''To force an immediate sync from the server at any time, you can tap refresh/sync now within the DAVx⁵ app or use a “Sync now” option if available.''' '''THIS IS IMPORTANT: REFRESHING IN THE FOSSIFY CALENDAR APP WE INSTALL WILL NOT REFRESH INSTANTLY.''' DAVx⁵ grabs data from our home server. Calendar & contacts apps grab the data from DAVx⁵. When you tap '''“refresh”''' in your calendar app, what you’re ''actually'' doing is grabbing the latest data from DAVx⁵ on your phone. If DAVx⁵ does not have new data, it doesn’t matter if you just added a calendar event on your server & you tap refresh furiously in the calendar app 50 times. The fossify calendar will still not see a new event on your server until '''DAVx⁵''' refreshes. Fossify does not have a way to trigger DAVx⁵ to refresh when you tap '''refresh''' in the fossify calendar app. '''IF YOU WANT TO REFRESH TO SEE UPDATES IMMEDIATELY IN THE CALENDAR APP, YOU NEED TO HIT REFRESH/SYNC IN THE DAVx⁵ APP, ''THEN'' IN THE CALENDAR.''' * I call this an ''“OPEN SOURCISM”'' - these are the byproducts of 20+ years of [https://www.reddit.com/r/immich/comments/1codh0p/comment/l5rfpu7/ people thinking it’s wrong for developers to get paid for their work]. It’s why Google & Apple win; for all their flaws, they understand that developers want to be able to pay their rent & feed their family in exchange for working 10 hours a day to produce software people use. There is only so much a small band of enthusiasts can do in their spare time, given that they need to make money to live indoors & pay for food like the rest of us. * If you want this to get better, show that you are willing to pay for software so people put time & effort into fixing all of this. By following these steps, you’ve now set up <code>DAVx⁵</code> to securely connect to your <code>mailcow</code> server and configured it to sync your data efficiently. As efficiently as it’ll let you; welcome to the world of self-managed open source servers! :D <span id="self-managed-email-with-mailcow-postmark"></span>
Summary:
Please note that all contributions to FUTO may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FUTO:Copyrights
for details).
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)