Mailman: Difference between revisions
imported>Caugner Postfix: add sslCert + sslKey |
m Category:Django added |
||
| (8 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
[https://www.list.org/ Mailman] is free software for managing electronic mail discussion and e-newsletter lists. Mailman and its web interface can be configured using the corresponding NixOS module. | |||
This article extends the documentation in [https://nixos.org/manual/nixos/stable/#module-services-mailman NixOS manual]. | |||
__TOC__ | __TOC__ | ||
= Running Mailman on NixOS = | = Running Mailman on NixOS = | ||
This example includes: | This example includes: | ||
| Line 86: | Line 88: | ||
services.nginx = { | services.nginx = { | ||
enable = true; | enable = true; | ||
recommendedGzipSettings = true; | |||
recommendedProxySettings = true; | recommendedProxySettings = true; | ||
recommendedTlsSettings = true; | |||
virtualHosts.${MAILMAN_HOST} = { | virtualHosts.${MAILMAN_HOST} = { | ||
enableACME = true; | enableACME = true; | ||
forceSSL = true; | forceSSL = true; | ||
locations."/static/".alias = "/var/lib/mailman-web/static/"; | locations."/static/".alias = "/var/lib/mailman-web/static/"; | ||
# If you're coming from Mailman 2, you might want these redirects: | |||
# locations."~ ^/(?:pipermail|private)/([a-z-]+)/".return = "303 https://${MAILMAN_HOST}/hyperkitty/list/$1.${MAILMAN_HOST}/"; | |||
# locations."~ ^/(?:listadmin)/([a-z-]+)".return = "303 https://${MAILMAN_HOST}/postorius/lists/$1.${MAILMAN_HOST}/settings/"; | |||
# locations."~ ^/(?:listinfo|options)/([a-z-]+)".return = "303 https://${MAILMAN_HOST}/postorius/lists/$1.${MAILMAN_HOST}/"; | |||
# locations."/create".return = "301 https://${MAILMAN_HOST}/postorius/lists/new"; | |||
locations."/".extraConfig = '' | locations."/".extraConfig = '' | ||
uwsgi_pass 127.0.0.1:33140; | uwsgi_pass 127.0.0.1:33140; | ||
| Line 134: | Line 143: | ||
=== Social logins === | === Social logins === | ||
Mailman 3 uses [https:// | Mailman 3 uses [https://docs.allauth.org/en/latest/ django-allauth] to allow logins via many external auth providers, such as GitHub and Google. To enable these we need to update our Django settings and add some per-provider specifics in the admin UI. | ||
In this example we're just adding GitHub, but there are [https:// | In this example we're just adding GitHub, but there are [https://docs.allauth.org/en/latest/socialaccount/providers/ lots of other providers] available. | ||
* Add to your <code>configuration.nix</code> and run <code>nixos-rebuild switch</code>: | * Add to your <code>configuration.nix</code> and run <code>nixos-rebuild switch</code>: | ||
| Line 156: | Line 165: | ||
Now you should be able to login to your mailman site with GitHub, and see your account's connections at <code>https://<your_mailman_hostname>/accounts/social/connections/</code> | Now you should be able to login to your mailman site with GitHub, and see your account's connections at <code>https://<your_mailman_hostname>/accounts/social/connections/</code> | ||
[[Category:Mail Server]] | |||
[[Category:Server]] | |||
[[Category:Web Applications]] | |||
[[Category:Django]] | |||
[[Category:NixOS Manual]] | |||