### Install HyperKitty Package Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Installs the HyperKitty package and its dependencies using setup.py. ```bash sudo python setup.py install ``` -------------------------------- ### Clone HyperKitty and Install Dependencies Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md After activating the virtual environment, clone the HyperKitty repository and install its development dependencies using pip. ```bash git clone https://gitlab.com/mailman/hyperkitty.git cd hyperkitty pip install -e '.[dev]' ``` -------------------------------- ### Install Sass globally with Node.js/npm Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/_sass.rst Install the Sass command-line tool globally using npm, suitable for any platform with Node.js. ```bash npm install -g sass ``` -------------------------------- ### Start HyperKitty Asynchronous Task Workers Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Command to start the distributed task queue workers. These workers handle long operations offloaded from the main process. Ensure the `example_project` path and `settings` are correctly configured. ```bash django-admin qcluster --pythonpath example_project --settings settings ``` -------------------------------- ### Development Database Configuration Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Create a 'settings_local.py' file for development. This example sets DEBUG to True, TEMPLATE_DEBUG to DEBUG, and USE_SSL to False. ```python DEBUG = True TEMPLATE_DEBUG = DEBUG USE_SSL = False ``` -------------------------------- ### Install Dart Sass on Arch Linux Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/_sass.rst Install the Dart Sass package using pacman on Arch Linux. ```bash sudo pacman -S dart-sass ``` -------------------------------- ### Markdown Bold Text Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Example of how to format text as bold using Markdown. ```markdown **Bold Text** ``` -------------------------------- ### Install Dart Sass on macOS Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/_sass.rst Use Homebrew to install the Dart Sass CSS processor on macOS. ```bash brew install dart-sass ``` -------------------------------- ### PGP Signature Format Example Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Illustrates the structure of an inline PGP signature recognized by Hyperkitty. This format includes message and signature blocks. ```default ----BEGIN PGP SIGNED MESSAGE----- This is the text. -----BEGIN PGP SIGNATURE----- iQEXYZXYZ -----END PGP SIGNATURE----- ``` -------------------------------- ### Markdown Hyperlink Syntax Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Examples of different ways to create hyperlinks in Markdown, including reference-style links. ```markdown [Text](https://url) [Text][1] [1]: https://URL ``` -------------------------------- ### Markdown Image Syntax Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Example of Markdown syntax for including images with alt text, URL, and title. ```markdown ![Image's alt text](http://image.com/file.png "Image Title") ``` -------------------------------- ### Verify Dart Sass Installation Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/_sass.rst Check the installed version of Dart Sass using the command-line executable. ```bash sass --version ``` -------------------------------- ### HyperKitty RHEL RPM Repository Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md URL for the repository file to install HyperKitty RPMs on RHEL 7. This enables installation and management using RPM on Red Hat Enterprise Linux. ```text https://repos.fedorapeople.org/repos/abompard/hyperkitty/hyperkitty-el.repo ``` -------------------------------- ### HyperKitty Fedora RPM Repository Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md URL for the repository file to install HyperKitty RPMs on Fedora 21. This allows for easier installation and management via RPM package manager. ```text http://repos.fedorapeople.org/repos/abompard/hyperkitty/hyperkitty.repo ``` -------------------------------- ### Markdown Italics Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Example of how to format text as italics using Markdown. ```markdown *Italics* ``` -------------------------------- ### Email Signature Delimiter Example Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Demonstrates the standard delimiter '-- ' used to identify email signatures. An empty space after the two dashes is crucial for recognition. ```default -- Thanks, My Name http://example.com ``` -------------------------------- ### Nested Blockquote Example Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Shows how nested blockquotes are indicated using the '>' character for each level. Hyperkitty supports up to 6 levels of nested quotes. ```default > This is level 1 quote > > This is Level 2 quote > > > This level 3 quote. ``` -------------------------------- ### Blockquote with Improper Folding Example Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Highlights a common issue where email clients introduce hard line breaks, causing text from higher-level quotes to appear under lower levels, making parsing difficult. ```default > > > This line of sentence will be broken unintentionally > > into the lower > > > level because of the improper folding of the email text > > by > > > some of the email clients. ``` -------------------------------- ### Build HTML Documentation Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Run this command in the 'doc' directory to generate HTML documentation using Sphinx. The output will be in 'doc/_build/html'. ```bash make -C doc html ``` -------------------------------- ### Load Initial Database Data Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Populate the HyperKitty database with initial data, such as thread categories, using the loaddata management command. Specify the Python path, settings, and data fixture. ```bash django-admin loaddata --pythonpath example_project --settings settings first_start ``` -------------------------------- ### Run HyperKitty Tests Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Execute the test suite for HyperKitty using this command. Ensure your custom tests are placed in the `hyperkitty/tests` directory and added to the folder's `__init__.py`. ```bash django-admin test --settings hyperkitty.tests.settings_test hyperkitty ``` -------------------------------- ### Create HyperKitty Database Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/database.rst Use this command to create the HyperKitty database. Ensure your Django settings are correctly configured. ```bash django-admin migrate --pythonpath example_project --settings settings ``` -------------------------------- ### Markdown Lists Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Demonstrates different ways to create unordered lists in Markdown. ```markdown * List Items * List Item 2 * List Item 3 * List Item 4 - List Item - List Item 2 ``` -------------------------------- ### Run HyperKitty Development Server Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Use this command to run HyperKitty locally during development with Django's integrated web server. This server should only be used for local development, not production environments. ```bash django-admin runserver --pythonpath example_project --settings settings ``` -------------------------------- ### jQuery for Thread View Initialization Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/thread.html Initializes tooltips for navigation buttons, sets up category, tags, and favorites, folds quotes by default, and loads thread replies asynchronously. This code runs when the DOM is ready. ```javascript $(document).ready(function() { //enable tooltips for thread buttons $("btn#next-thread").tooltip(); $("btn#prev-thread").tooltip(); setup_category(); setup_tags(); setup_favorites(); // Hide quotes by default in the thread view fold_quotes("div.container-xxl"); // Load the replies update_thread_replies("{% url 'hk_thread_replies' threadid=thread.thread_id mlist_fqdn=mlist.name %}?sort={{sort_mode}}&last_view={{last_view|date:'U'}}"); setup_unreadnavbar("#unreadnavbar"); setup_thread_keyboard_shortcuts(); }); ``` -------------------------------- ### Create and Activate Virtual Environment Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Use VirtualEnv to create an isolated Python environment for development. First, create the virtual environment, then activate it. ```bash virtualenv venv_hk source venv_hk/bin/activate ``` -------------------------------- ### Enable Inline Image Rendering Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md To enable inline image rendering, set HYPERKITTY_RENDER_INLINE_IMAGE to True in settings.py. By default, Markdown image syntax is ignored. ```python HYPERKITTY_RENDER_INLINE_IMAGE = True ``` -------------------------------- ### Include Apache Configuration Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Include the HyperKitty Apache configuration file in your main Apache or httpd configuration. This line should be added to your Apache/httpd configuration file. ```apache Include "/{path-to-example_project}/apache.conf" ``` -------------------------------- ### Import Mailman 2.1 Archives Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/database.rst Import existing Mailman archives into the HyperKitty database. Replace ADDRESS with the fully-qualified list name and mbox_file with the path to the archive files. ```bash django-admin hyperkitty_import --pythonpath example_project --settings settings -l ADDRESS mbox_file [mbox_file ...] ``` -------------------------------- ### Markdown Inline and Multi-line Code Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Illustrates how to format inline code and multi-line code blocks in Markdown. ```markdown `inline code for text` ``` Multi-line code segment ``` Code can also be indented by 4 spaces without any backticks. ``` -------------------------------- ### Compress Static Files Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md Run 'compress' to generate compressor content for static files. This is necessary when DEBUG is False and static files change. The '--force' flag can be used to override settings. ```bash django-admin compress --pythonpath example_project --settings settings ``` -------------------------------- ### Tags Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/api.html Retrieve a list of all available tags in HyperKitty. ```APIDOC ## Tags ### Description Retrieve a list of all available tags in HyperKitty. ### Endpoint /api/tags/ ### Query Parameters - **format** (string) - Optional - Specifies the desired output format (e.g., json, txt, xml, html). Defaults to html. ``` -------------------------------- ### Configure Mailman Archiver for HyperKitty Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Add the HyperKitty archiver configuration to Mailman's mailman.cfg file. This enables HyperKitty to receive emails from Mailman. ```ini [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /path/to/example_project/mailman-hyperkitty.cfg ``` -------------------------------- ### Markdown Footnotes Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Demonstrates how to add footnotes to Markdown text. ```markdown This text has a footnote reference[^note] [^note]: Foonotes for testing. ``` -------------------------------- ### List of mailing-lists Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/api.html Retrieve information about all mailing lists available in HyperKitty. ```APIDOC ## List of mailing-lists ### Description Retrieve information about all mailing lists available in HyperKitty. ### Endpoint /api/mailinglists/ ### Query Parameters - **format** (string) - Optional - Specifies the desired output format (e.g., json, txt, xml, html). Defaults to html. ``` -------------------------------- ### Collect Static Files Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md When DEBUG is False and static files change, run 'collectstatic' to gather them. Ensure you specify the correct Python path and settings. ```bash django-admin collectstatic --pythonpath example_project --settings settings ``` -------------------------------- ### Generate Mailman Aliases Database Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/install.md Force Mailman to generate the database files used by Postfix or other MTAs for list lookups. This is crucial for correct SMTP delivery and email validation. ```bash mailman aliases ``` -------------------------------- ### Django Template Sorting Toggle Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/thread.html Provides a link to toggle between sorting replies by 'thread' and 'date'. Dynamically generates the URL based on the current sort mode. ```html {% if sort_mode == "date" %} [{% trans "Show replies by thread" %}]({% url 'hk_thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}?sort=thread) {% else %} [{% trans "Show replies by date" %}]({% url 'hk_thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}?sort=date) {% endif %} ``` -------------------------------- ### Django Template AJAX Loader and No-Script Link Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/thread.html Includes an AJAX loader image and a link for a non-JavaScript version of the page. This is displayed when JavaScript is not enabled or the user is a bot. ```html ![{% trans 'Loading...' %}]({% static 'hyperkitty/img/ajax-loader.gif' %}) [{% trans 'Visit here for a non-javascript version of this page.' %}]({% url 'hk_thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}?noscript) ``` -------------------------------- ### Django Template Navigation Links Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/thread.html Generates navigation links for 'newer' and 'older' threads, including the subject of the linked thread. Uses Django's URL tag and template filters for formatting. ```html [{% trans "newer" %}]({% url 'hk_thread' threadid=next_thread.thread_id mlist_fqdn=mlist.name %}) [{{ next_thread.subject|strip_subject:mlist|truncatesmart:"35"}}]({% url 'hk_thread' threadid=next_thread.thread_id mlist_fqdn=mlist.name %} "{{ next_thread.subject|strip_subject:mlist|escape }}") ``` ```html [{% trans "older" %}]({% url 'hk_thread' threadid=prev_thread.thread_id mlist_fqdn=mlist.name %} "{{ prev_thread.subject|strip_subject:mlist|escape }}") [{{ prev_thread.subject|strip_subject:mlist|truncatesmart:"35"}}]({% url 'hk_thread' threadid=prev_thread.thread_id mlist_fqdn=mlist.name %} "{{ prev_thread.subject|strip_subject:mlist|escape }}") ``` -------------------------------- ### Update Full-Text Search Index Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/database.rst After importing archives, update the full-text search engine index. This command is essential for search functionality. ```bash django-admin update_index --pythonpath example_project --settings settings ``` -------------------------------- ### Django Template: Thread List Structure Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/thread_list.html This snippet shows the basic Django template structure for displaying a list of email threads. It includes extending a base template, loading static tags, and defining content blocks. ```html {% extends "hyperkitty/base.html" %} {% load i18n %} {% load hk_generic %} {% load pagination %} {% load cache %} {% block head_title %} {{ list_title }} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }} {% endblock %} {% block head_feed %} {% endblock %} {% block content %} [{% if mlist.display_name %} {{ mlist.display_name }} {% else %} {{ mlist.name|until:"@" }} {% endif %}]({% url 'hk_list_overview' mlist_fqdn=mlist.name %}) =============================================================================================================================================================== {% if posting_enabled %} [{% trans 'Thread'%} {% trans 'Start a new thread'%}]({% url {% endif %} {% if export and export_allowed %} [{{ export.message }}]({{ export.url }} "{{ export.title }}") {% endif %} {% cache 86400 month_list_select LANGUAGE_CODE months_list mlist.name %} {% include 'hyperkitty/fragments/month_list.html' with show_select='True' %} {% endcache %} {{ mlist.name }} {{ list_title }} ----------------- {% if participants_count %}* {{ participants_count }} {% trans "participants" %} {% endif %}* {{ threads.paginator.count }} {% trans "discussions" %} {% for thread in threads %} {% include "hyperkitty/threads/summary_thread_large.html" %} {% empty %} {% trans "Sorry no email threads could be found" %} {{ no_results_text }}. {% endfor %} {# Cache the pagination template rendering for the mailing list for 24hrs. #} {% cache 86400 threads_paginator threads LANGUAGE_CODE %} {% paginator threads bydate=True %} {% endcache %} {% endblock %} {% block additionaljs %} $(document).ready(function() { $('span.expander').expander({ slicePoint: 100, userCollapseText : '

View less', expandText : '
View more', beforeExpand: function() { $(this).removeClass("collapsed"); $(this).addClass("expanded"); }, onCollapse: function() { $(this).removeClass("expanded"); $(this).addClass("collapsed"); } }); // setup_category(); // onchange event for month_list select (seen only in tiny/xs viewports) // only add this event listener if the element exists if ($('select#months-list').length > 0) { $('select#months-list').change(function() { var date = $('select#months-list>option:selected').text().split(' '); var url = "{% url 'hk_archives_with_month' year=9999 mlist_fqdn=mlist.name month=0 %}"; url = url.replace('0', $(this).val()); url = url.replace('9999', date[1]); window.parent.location.href = url; }); } }); {% endblock %} ``` -------------------------------- ### Markdown Horizontal Rule Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/rendering.md Shows the syntax for creating horizontal rules in Markdown. ```markdown --- *** ``` -------------------------------- ### HyperKitty 429 Error Template Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/429.html This is the main HTML template for the 429 error page. It extends a base template and defines styles and content for the error message. ```html {% extends "hyperkitty/base.html" %} {% load i18n %} {% block content %} #contentBox { padding:10px; font-family: 'Times New Roman'; font-size:20px; color:#444; margin-left:300px; margin-top:100px; } .hello { font-size:100px; color:#444; font-family: 'Times New Roman'; } a { color:#323232; } {% trans "Error 429" %} {% trans "Oh No!" %} {% trans "Too many requests." %} [{% trans "Go back home" %}]({% url 'hk_root' %}) {% endblock %} ``` -------------------------------- ### Threads in a mailing list Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/api.html Retrieve information about all threads within a specified mailing list. ```APIDOC ## Threads in a mailing list ### Description Retrieve information about all threads within a specified mailing list. ### Endpoint /api/mailinglists/{mlist_fqdn}/threads/ ### Parameters #### Path Parameters - **mlist_fqdn** (string) - Required - The fully qualified domain name of the mailing list (e.g., list-address@example.com). ### Query Parameters - **format** (string) - Optional - Specifies the desired output format (e.g., json, txt, xml, html). Defaults to html. ``` -------------------------------- ### Emails in a thread Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/api.html Retrieve a list of emails belonging to a specific thread in a mailing list. ```APIDOC ## Emails in a thread ### Description Retrieve a list of emails belonging to a specific thread in a mailing list. ### Endpoint /api/mailinglists/{mlist_fqdn}/threads/{thread_id}/ ### Parameters #### Path Parameters - **mlist_fqdn** (string) - Required - The fully qualified domain name of the mailing list (e.g., list-address@example.com). - **thread_id** (string) - Required - The identifier of the thread. ### Query Parameters - **format** (string) - Optional - Specifies the desired output format (e.g., json, txt, xml, html). Defaults to html. ``` -------------------------------- ### An email in a mailing list Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/templates/hyperkitty/api.html Retrieve detailed information about a specific email within a mailing list. ```APIDOC ## An email in a mailing list ### Description Retrieve detailed information about a specific email within a mailing list. ### Endpoint /api/mailinglists/{mlist_fqdn}/emails/{message_id_hash}/ ### Parameters #### Path Parameters - **mlist_fqdn** (string) - Required - The fully qualified domain name of the mailing list (e.g., list-address@example.com). - **message_id_hash** (string) - Required - The hash of the message ID for the email. ### Query Parameters - **format** (string) - Optional - Specifies the desired output format (e.g., json, txt, xml, html). Defaults to html. ``` -------------------------------- ### Default Mailman Archive Location Source: https://gitlab.com/mailman/hyperkitty/-/blob/master/doc/development.md This is the typical location for Mailman 2.1 archive mbox files on the server. ```bash /var/lib/mailman/archives/private/LIST_NAME.mbox/LIST_NAME.mbox ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.