Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Hyperkittyのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Hyperkitty
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:メールサーバー]] [[Category:ウェブアプリケーション]] [https://gitlab.com/mailman/hyperkitty Hyperkitty] は、[[Django]] ベースのアーカイバおよび [[Mailman]] のアーカイブインターフェイスです。 == インストール == Hyperkitty を使用するには、動作する [[ウェブサーバー]] のセットアップが必要です (たとえば、[[Apache HTTP Server]] を使用して [[wikipedia:Wsgi|WSGI]] に直接転送するか、[[Nginx]] を使用してリクエストを転送します) [[UWSGI]] などのアプリケーションサーバー) {{Pkg|hyperkitty}} パッケージを [[インストール]] します。 {{Warning|Hyperkitty には [[TLS]] 経由でのみアクセスしてください (テスト目的でハイパーキティを実行しているマシンから直接アクセスする場合を除く)。そうしないと、パスワードやユーザー データがネットワークに公開されてしまいます。}} == 設定 == Web アプリケーションは、{{ic|/etc/webapps/hyperkitty/settings_local.py}} で設定されます (これは、{{ic|/usr/share/webapps/hyperkitty/settings.py}} のデフォルト設定に含まれています) {{Note|Hyperkitty は、ユーザーの機密データ (sqlite データベースなど) を {{ic|/var/lib/hyperkitty/data/}} に保存する必要があります。このディレクトリには root とアプリケーション自体だけがアクセスできるためです。}} アプリケーションのデフォルトのシークレットを変更します。 {{hc|/etc/webapps/hyperkitty/settings_local.py|2= SECRET_KEY = <nowiki>'</nowiki>''something-very-secret''<nowiki>'</nowiki> }} 運用環境で実行する場合は、必ずデバッグを無効にしてください。 {{hc|/etc/webapps/hyperkitty/settings_local.py|2= DEBUG = False }} 有効な電子メール設定を追加します ([[Django]] アプリケーションが購読者を確認できるようにします) {{hc|/etc/webapps/hyperkitty/settings_local.py|2= EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = ''username'' EMAIL_HOST_PASSWORD = ''password'' }} {{Note|{{ic|DEFAULT_FROM_MAIL}} 設定オプションと {{ic|SERVER_MAIL}} 設定オプションを使用して、それぞれ内部認証とエラー報告のために送信されるメールの {{ic|From:}} ヘッダーを定義できます。}} 実行中の [[mailman]] インスタンスの REST API に接続するには、設定オプションを hyperkitty の構成に追加する必要があります。 {{hc|/etc/webapps/hyperkitty/settings_local.py|<nowiki> MAILMAN_REST_API_URL = 'http://localhost:8001' MAILMAN_REST_API_USER = 'rest_admin' MAILMAN_REST_API_PASS = 'rest_admin_password' </nowiki>}} [[mailman]] インスタンスとのアーカイブ統合を構成するには、Mailman 側で [[Mailman#Integrate with Hyperkitty|integration with hyperkitty]] をセットアップし、次にそれらの接続を受け入れるように hyperkitty を設定します。 {{hc|/etc/webapps/hyperkitty/settings_local.py|2= MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey' MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1') }} アプリケーションの有効なホスト名またはドメイン名を定義する必要があります。 {{hc|/etc/webapps/hyperkitty/settings_local.py|2= ALLOWED_HOSTS = [ 'localhost', 'lists.example.com' ] }} == ホスティング == {{Expansion|Example for a setup using [[Apache HTTP Server]].}} {{Note| * Hyperkitty は独自のユーザーおよびグループ (すなわち {{ic|hyperkitty}}) として実行する必要があります。{{ic|/etc/webapps/hyperkitty/}}、{{ic|/var/lib/hyperkitty/}}、{{ic|/run/hyperkitty/}} をそれぞれ設定、静的キャッシュ、(潜在的な) ソケットに使用します。 * 静的ファイルはデフォルトではトップレベルの {{ic|static/}} ディレクトリから提供され、同じ (サブ) ドメイン上の [[postorius]] と衝突するため、{{ic|/etc/webapps/hyperkitty/settings_local.py}} 内の {{ic|STATIC_URL}} 変数をユニークなもの (例えば{{ic|'/hyperkitty_static/'}}) に設定することを推奨します。 }} === Nginx と uWSGI === Hyperkitty には、{{ic|/etc/uwsgi/hyperkitty.ini}} に動作する [[uWSGI]] 設定ファイルが付属しています。 {{Pkg|nginx}}と{{Pkg|uwsgi-plugin-python}} を [[インストール]] し、[[uWSGI]] 用のアプリケーションごとのソケットを作成し ([[UWSGI#uWSGIソケットのアクセシビリティ]] を参照)、{{ic|uwsgi-secure@hyperkitty.socket}} ユニットを [[Systemd#Using units|activate]] します。 ローカルのテストセットアップでは、Hyperkitty を http://localhost/hyperkitty/、以下の [[Nginx]] を設定に追加してください: {{hc|/etc/nginx/hyperkitty.conf|<nowiki> server { listen 80; server_name localhost; charset utf-8; client_max_body_size 75M; root /usr/share/webapps/hyperkitty; access_log /var/log/nginx/access.hyperkitty.log; error_log /var/log/nginx/error.hyperkitty.log; location /hyperkitty_static { alias /var/lib/hyperkitty/static; } location ~^/(hyperkitty|user-profile)/(.*)$ { include /etc/nginx/uwsgi_params; uwsgi_pass unix:/run/hyperkitty/hyperkitty.sock; } } </nowiki>}} == セットアップ == {{Note| {{ic|hyperkitty}} ユーザーとして次のコマンドを実行します (例: [[sudo]] または [[su]] を使用)}} 最初のインストール後、必ずデータベースを生成してください。 [hyperkitty]$ django-admin migrate --pythonpath /usr/share/webapps/hyperkitty/ --settings settings その後、アプリケーションの静的データを収集する必要があります。 [hyperkitty]$ django-admin collectstatic --pythonpath /usr/share/webapps/hyperkitty/ --settings settings データを圧縮するには、次のコマンドを実行します。 [hyperkitty]$ django-admin compress --pythonpath /usr/share/webapps/hyperkitty/ --settings settings Web アプリケーションで必要な非同期操作のための {{ic|hyperkitty-qcluster.service}} [[systemd]] サービスを [[有効化]] および [[起動]] します。 データベースにデフォルトデータを入力します (初めてセットアップする場合) [hyperkitty]$ django-admin loaddata --pythonpath /usr/share/webapps/hyperkitty/ --settings settings first_start [[Django]] アプリケーションのスーパーユーザーアカウントを作成します。 [hyperkitty]$ django-admin createsuperuser --pythonpath /usr/share/webapps/hyperkitty --settings settings http://localhost/hyperkitty/admin にある [[Django]] アプリケーションの管理インターフェイスにログインして、デフォルトの {{ic|example.com}} 以外に {{ic|Sites}} を追加できるようにするか、さらに {{ic|Mail ドメイン}} を追加します。 {{Note|新しい {{ic|site}} を追加した後、{{ic|/etc/webapps/hyperkitty/settings_local.py}} の {{ic|SITE_ID}} 変数をそれぞれの ID に設定してください。}} == ヒントとテクニック == === mailman2 アーカイブのインポート === Hyperkitty は、mailman 3.0 より前のバージョンからアーカイブをインポートできます。 {{Note|次のコマンドを {{ic|hyperkitty}} ユーザーとして実行します (例: [[sudo]] または [[su]] を使用)}} [hyperkitty]$ django-admin hyperkitty_import --pythonpath /usr/share/webapps/hyperkitty --settings settings -l ''ADDRESS'' ''mbox_file'' [''mbox_file'' ...] ここで、{{ic|''ADDRESS''}} は完全修飾リスト名 (例: {{ic|list@example.com}}) で、引数 {{ic|''mbox_file''}} は既存のアーカイブを表します。([[Wikipedia:Mbox|mbox]] 形式) でインポートします (通常は {{ic|/var/lib/mailman/archives/private/''LIST_NAME''.mbox/''LIST_NAME''.mbox} にあります) }) その後、全文検索インデックスを手動で更新します。 [hyperkitty]$ django-admin update_index_one_list --pythonpath /usr/share/webapps/hyperkitty --settings settings ''ADDRESS'' {{Note|全文検索インデックスは、分単位で実行される cron ジョブによって自動的に作成されます。}} === Content-Security-Policy Header === It is possible to define a [https://content-security-policy.com/ Content-Security-Policy] HTTP response header for HyperKitty. This allows content and resources only from specified locations. When using [[nginx]] add the following to the {{ic|server}} directive in which HyperKitty is setup in: {{hc|/etc/nginx/hyperkitty.conf|2= [..] add_header Content-Security-Policy "default-src 'self'; connect-src 'self'; img-src 'self' https://secure.gravatar.com; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'"; [..] }} === Disabling Gravatar support === The builtin [[Wikipedia:Gravatar (web service)|Gravatar]] support can be disabled in the configuration: {{hc|/etc/webapps/hyperkitty/settings_local.py|2= HYPERKITTY_ENABLE_GRAVATAR = False }} This option was introduced in Hyperkitty 1.3.4. In earlier versions, use this instead: {{hc|/etc/webapps/hyperkitty/settings_local.py|2= GRAVATAR_SECURE_URL = ''''''' }} === Saving mail attachments to disk === By default Hyperkitty stores mail attachments in its database. However, it can be configured to save the attachments to disk instead: {{hc|/etc/webapps/hyperkitty/settings_local.py|2= HYPERKITTY_ATTACHMENT_FOLDER = /var/lib/hyperkitty/data/attachments }} {{Note|The location needs to be accessible and writable by the {{ic|hyperkitty}} user.}} === Template customization === Using [[Django]]'s [https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-TEMPLATES-DIRS TEMPLATES-DIRS] capabilities, it is possible to override the following templates to change the looks of the application: * {{ic|hyperkitty/headers.html}}: the content will appear before the {{ic|</head>}} tag * {{ic|hyperkitty/top.html}}: the content will appear before the {{ic|<body>}} tag * {{ic|hyperkitty/bottom.html}}: the content will appear before the {{ic|</body>}} tag === Xapian search backend === Hyperkitty can make use of a Xapian based search backend. [[Install]] the {{Pkg|python-xapian-haystack}} package and configure the backend: {{hc|/etc/webapps/hyperkitty/settings_local.py|2= HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'xapian_backend.XapianEngine', 'PATH': "/var/lib/hyperkitty/data/xapian_index", }, } }} Make sure to create the search index for all lists afterwards. Run the following command as the {{ic|hyperkitty}} user (e.g. using [[sudo]] or [[su]]): [hyperkitty]$ django-admin update_index --pythonpath /usr/share/webapps/hyperkitty --settings settings == Troubleshooting == === SMTP AUTH extension not supported by server === If upon first login with the admin user a {{ic|SMTNotSupportedError}} is thrown (logged to {{ic|/var/log/hyperkitty/hyperkitty.log}}), make sure to verify the {{ic|EMAIL_*}} settings in {{ic|/etc/webapps/hyperkitty/settings_local.py}}. By default e.g. {{ic|EMAIL_USE_TLS}} is set to {{ic|False}} which might trigger a failed login via SMTP. == See also == * [https://hyperkitty.readthedocs.io/en/latest/ Hyperkitty Documentation] - The upstream documentation * [https://docs.mailman3.org/en/latest/ Mailman Suite Documentation] - The (high level) upstream documentation for the entire Mailman Suite (Mailman, Hyperkitty and Postorius)
このページで使用されているテンプレート:
テンプレート:Expansion
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Message
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
Hyperkitty
に戻る。
検索
検索
Hyperkittyのソースを表示
話題を追加