Commit Graph

563 Commits

Author SHA1 Message Date
Linus Heckemann
918a149888
Merge pull request #167322 from alyssais/mailman-webHosts
nixos/mailman: improve empty webHosts error
2022-04-09 20:15:33 +02:00
Linus Heckemann
0eba1fd840
Merge pull request #142005 from sorpaas/patch-6
nixos/mailman: use separate virtualHosts
2022-04-09 20:14:55 +02:00
Alyssa Ross
fb2fa1b50f
nixos/postfix: pull setup into its own unit
Consider a service that generates postfix lookup tables with
postmap(1), like Mailman.  It needs the Postfix configuration file to
exist, but Postfix qmgr needs all the lookup tables its configured
with to exist before it starts.  So the service that runs postmap
needs to run after the Postfix configuration and directory structure
is generated, but before Postfix itself is started.  To enable this,
we split Postfix into two units: a oneshot unit that sets up the
configuration, and a longrun unit that supervises the Postfix
daemons.  The postmap services can then be inserted in between these
two units.
2022-04-05 10:24:34 +00:00
Alyssa Ross
e7c301df52
nixos/mailman: remove obsolete setting
This was dropped in mailman 3.2.0.
2022-04-05 10:22:21 +00:00
Alyssa Ross
f4a0bb8334
nixos/mailman: improve empty webHosts error
Now this configuration mistake will generate the assertion message,
instead of "error: list index 0 is out of bounds".
2022-04-05 10:18:57 +00:00
Sandro Jäckel
ae66e2d5ec
treewide: use configured nginx package 2022-02-08 12:13:30 +01:00
Guillaume Girol
4bbd574b2b
Merge pull request #152367 from helsinki-systems/fix/dovecot-ssh_dh
nixos/dovecot: make ssl_dh optional
2022-01-22 18:07:16 +00:00
ajs124
0efda5e2d0 nixos/dovecot: make use of mkEnableOption 2022-01-20 00:37:02 +01:00
ajs124
c6683b4f27 nixos/dovecot: make ssl_dh optional
hasn't been needed since 2.3.3, in fact it is encouraged not to use such cipher suites anymore
2022-01-19 22:39:57 +01:00
Jonas Heinrich
71c423671b nixos/maddy: Better description, user and group handling 2021-12-30 14:17:00 +01:00
Graham Christensen
06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae
b9950385e5 treewide: make option examples constant
escape interpolations in examples, or replace them where they are not
useful.
2021-12-09 01:38:24 +01:00
Jonas Heinrich
ecd88f91a0
nixos/maddy: Add module for maddy
Co-authored-by: Patrick Hilhorst <git@hilhorst.be>
2021-12-07 22:58:22 +01:00
pennae
2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
ajs124
5816eb198f
Merge pull request #141833 from poscat0x04/dovecot-quota-backend
nixos/dovecot: use the count backend for quota plugin
2021-11-21 19:37:08 +01:00
Travis Athougies
82037871bb
nixos/postfix: Use better types for submissionOptions and submissionsOptions (#138205) 2021-11-12 17:28:39 +01:00
Maximilian Bosch
4f88fb9331
roundcube: 1.4.11 -> 1.5.0
ChangeLog: https://github.com/roundcube/roundcubemail/releases/tag/1.5.0
2021-10-18 23:27:00 +02:00
Wei Tang
a62c5f3435
nixos/mailman: use separate virtualHosts 2021-10-17 17:15:12 +02:00
Poscat
afd62c2773
nixos/dovecot: use the count backend for quota plugin 2021-10-16 09:52:18 +08:00
Michele Guerini Rocco
e99b3f242c
Merge pull request #140359 from rnhmjoj/setgid-nobody
nixos: make setgid wrappers root-owned
2021-10-06 08:36:35 +02:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rnhmjoj
31790c81dc
nixos: make setgid wrappers root-owned 2021-10-03 11:44:57 +02:00
V
cc49c13a6b nixos/postfix: Fix virtual alias manpage section
virtual(8) is for virtual mailboxes, not aliases.
2021-09-27 06:39:27 +02:00
Rickard Nilsson
d30701f2f1
nixos/opensmtpd: Add missing brackets in config (#138989)
* nixos/opensmtpd: Add missing brackets in config

Without this commit, you end up missing the sendmail suid wrapper,
because the "program" attribute would not override the right thing.

* Update nixos/modules/services/mail/opensmtpd.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-09-22 22:01:39 +02:00
rnhmjoj
fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00
rnhmjoj
8f76a6eefc
nixos: add implict security.wrappers options
This is to keep the same permissions/setuid/setgid as before the change
in security.wrappers defaults.
2021-09-13 13:48:13 +02:00
rnhmjoj
41a498578e
nixos/mail: reuse security.wrappers type 2021-09-13 13:48:13 +02:00
Maximilian Bosch
749caaef5b
nixos/postfixadmin: fix eval & pin to PHP 7.4
Even though some PHP8 compat fixes seem to be in the release that's
packaged here, it seems as if there are still some minor issues[1].

[1] https://github.com/postfixadmin/postfixadmin/issues/395
2021-08-24 23:50:31 +02:00
Robin Gloster
8a0b6a42ee
postfixadmin: fix db owner 2021-08-24 23:46:07 +02:00
Robin Gloster
862dd4ef58
postfixadmin: review additions
Co-authored-by: Linus Heckemann <git@sphalerite.org>
2021-08-24 23:46:06 +02:00
Robin Gloster
0eafc74d50
postfixadmin: init at 3.3.9 2021-08-24 23:46:06 +02:00
ajs124
0e19ea6cd1
Merge pull request #134940 from dminuoso/dovecot-switch-service-to-notify
nixos/dovecot: Switch systemd service type to notify
2021-08-22 19:15:10 +02:00
Victor Nawothnig
60c8c64595 nixos/dovecot: Switch systemd service type to notify 2021-08-22 18:44:58 +02:00
Victor Nawothnig
942d78d9cd nixos/rspamd: Avoid empty postfix service 2021-08-22 03:18:55 +02:00
Victor Nawothnig
10933c5ccf nixos/dovecot: Allow any or no protocol 2021-08-19 11:59:43 +02:00
Michal Sojka
a2943e74e3 nixos/nullmailer: Create "failed" directory
Nullmailer expects that this directory exists (see
073f4e9c5d/doc/nullmailer-send.8 (L185)).
When it doesn't and an email cannot be sent due to a permanent failure
or has been in the queue longer than queuelifetime (7 days), message
"Can't rename file: No such file or directory" starts appearing in the
log and nullmailer never sends "Could not send message" notification.
This means that the user may never learn that his email was not
delivered.
2021-08-06 10:48:19 +02:00
Ben Siraphob
b63a54f81c
Merge pull request #110742 from siraben/deprecate-fold 2021-07-27 15:13:31 +07:00
Malte Voos
f41f456422 nixos/roundcube: Use php74 2021-06-05 15:28:29 +02:00
Michal Sojka
2a4755e1d4 nixos/mailman: Fix mailman-settings.service configuration
Without this change, mailman-settings.service is not guaranteed to
complete before dependent services. This can lead to various errors
like:

    mailman-web-setup.service: Changing to the requested working directory failed: No such file or directory
2021-06-02 08:20:08 +02:00
V
f4c5ebea50 nixos/mailman: fix documentation option links 2021-05-14 18:33:24 +02:00
Luke Granger-Brown
649672e76e nixos/postfix: fix compatibility level
Postfix has started outputting an error on startup that it can't parse
the compatibility level 9999.

Instead, just set the compatibility level to be identical to the current
version, which seems to be the (new) intent for the compatibility level.
2021-05-02 21:49:33 +00:00
Martin Weinelt
6f358fa1d4
nixos/rspamd: Fix CapabilityBoundingSet option
An empty list results in no CapabilityBoundingSet at all, an empty
string however will set `CapabilityBoundingSet=`, which represents a
closed set.

Related: #120617
2021-04-25 20:26:22 +02:00
Martin Weinelt
3a9609613d
nixos/opendkim: Fix CapabilityBoundingSet option
An empty list results in no CapabilityBoundingSet at all, an empty
string however will set `CapabilityBoundingSet=`, which represents a
closed set.

Related: #120617
2021-04-25 20:24:39 +02:00
Luke Granger-Brown
30ab5fb006
Merge pull request #107604 from pkern/exim
nixos/exim: Make queue runner interval configurable and reduce it to 5m by default
2021-04-25 11:15:17 +01:00
Luke Granger-Brown
2fa2e63932
Merge pull request #103902 from pkern/spamassassin
nixos/spamassassin: Avoid network dependency on boot
2021-04-25 11:14:57 +01:00
Florian Klink
6c961dddd1 nixos/nullmailer: set isSystemUser
setting users.users.name.{isSystemUser,isNormalUser} is required since #115332
2021-04-17 12:29:51 +02:00
Alyssa Ross
cc10432418
mailman: add myself as a maintainer all around 2021-04-17 01:07:38 +00:00
Milan Pässler
2ed0f723c7 nixos/mailman: add http listener for uwsgi
With the config suggested in the module docs both Mailman core and
Hyperkitty are running, but Mailman core can not connect to Hyperkitty,
since the default hyperkitty.baseUrl is not set up by the module.

This adds a http listener to the uwsgi config and changes the default
hyperkitty.baseUrl to connect to this http listener.
2021-04-16 12:16:12 +02:00
ajs124
6637ce9fd8 nixos/dovecot: set isSystemUser for mailUser
needed after 7a87973b4c
2021-04-16 00:42:43 +02:00
Alyssa Ross
912e11a468 mailman-web: 2019-09-29 -> 2021-04-10
* Make it clearer what code comments apply to
* Fix the state directory (this was changed in the update)
* Add m1cr0man as a maintaner

Co-authored-by: Lucas Savva <lucas@m1cr0man.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-04-14 16:23:09 +00:00
Alyssa Ross
d0ead9021e
Revert "mailman-web-unstable: 2019-09-29 -> 2021-04-10 (#119135)"
This reverts commit 8dbd553792.

The update has changed where mailman-web looks for its database and
broken the Mailman module in NixOS.
2021-04-14 12:18:44 +00:00
Lucas Savva
8dbd553792
mailman-web-unstable: 2019-09-29 -> 2021-04-10 (#119135)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-04-13 01:31:53 +02:00
Alyssa Ross
d45fc07bc2 nixos/postfix: add services.postfix.canonical opt
This mirrors the services.postfix.transport and
services.postfix.virtual options we already have.
2021-04-11 00:31:12 +00:00
Francesco Gazzetta
d56f72178e nixos/mlmmj: use appropriate postfix options
instead of extra*

should make the module more interoperable with others
2021-02-17 16:00:59 +00:00
Francesco Gazzetta
7596e7a495 nixos/mlmmj: add more list headers
since we already add a couple of default headers, it makes sense to have
a sensible default and add the unsubscribe header and friends
2021-02-17 15:59:06 +00:00
Luke Granger-Brown
cfed3b8b22 treewide: update 21.03 to 21.05
The NixOS 21.03 release has been delayed to 21.05. See NixOS/rfcs#80.

There are two instances of 21.03 which have been left as is, since they
are in stateVersion comparisons. This will ensure that existing user
configurations which refer to 21.03 will continue to work.
2021-02-12 14:12:48 -08:00
Philipp Kern
8854b82511 nixos/spamassassin: Handle return codes correctly
For sa-update we care about two successful codes:

 * 1 -> no updates available: exit successfully
 * 0 -> updates have been installed: run sa-compile and pass
   through its return code
2021-02-11 10:12:16 +01:00
Philipp Kern
c86b339491 nixos/spamassassin: Only run sa-compile when updates have been installed 2021-02-11 10:12:15 +01:00
Philipp Kern
cc625c968d nixos/spamassassin: Run sa-compile after updating the rules
sa-compile speeds up processing the rules by compiling them from Perl to
C.  This needs to be run after every update and is saved in the local
state directory by Perl and SpamAssassin version.
2021-02-11 10:12:15 +01:00
Philipp Kern
624cc51bad nixos/spamassassin: Simplify services by using StateDirectory
Let systemd create SpamAssassin's state directory and populate it using the
regular updater service. Depend on the updater service on boot but do not
propagate failure to the main service.

spamd's commands to start and reload the service are still executed as
root but user/group are set to properly chown the state directory to the
target user. spamd drops privileges itself for its runner children but
preserves root on the main daemon (to listen and re-exec).
2021-02-11 10:09:45 +01:00
Philipp Kern
1db74d1150 nixos/spamassassin: Fix network requirement on boot
sa-update currently runs as part of the pre-start script of spamd. The
network is not guaranteed to be online at that point and even if we
were to depend on that, it makes the bootup brittle, as there is a
reliance on SpamAssassin's update server as a startup dependency on
boot.

Refactor the setup to move the pre-start script into its own unit.
This allows to perform the setup task only once. Continuous updates
are already done by sa-update.service triggered by sa-update.timer.
Only run sa-update in case /var/lib/spamassassin is empty.

While we are on it, let sa-update.service depend on the network being
online.
2021-02-11 10:09:45 +01:00
Fritz Otlinghaus
8de8e40d64
nixos/postfix: add types (#111426) 2021-01-31 13:52:46 +01:00
Ben Siraphob
1c2a2b0a08 treewide: fold -> foldr 2021-01-26 10:57:07 +07:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Alyssa Ross
011d073393 nixos/postfix: deprecate services.postfix.useDane
Now that smtp_tls_security_level is using mkDefault, and therefore can
be overridden, there's no need for an option for overriding it to a
specific value.
2021-01-14 10:24:31 +00:00
Alyssa Ross
9ed5ee909b nixos/postfix: allow custom smtp_tls_security_level
I run Postfix on my workstation as a smarthost, where it only ever
talks to my SMTP server.  Because I know it'll only ever connect to
this server, and because I know this server supports TLS, I'd like to
set smtp_tls_security_level to "encrypt" so Postfix won't fall back to
an unencrypted connection.
2021-01-14 10:24:31 +00:00
Alyssa Ross
c7d13b551e
nixos/mailman: remove spurious uwsgi.service dep
b478e0043c removed every other instance of uwsgi.service and
httpd.service from Mailman before and requiredBy lists.  This one
looks like it was just missed, since I can't see a reason to keep it
but remove the others.

Fixes: b478e0043c ("nixos/mailman: refactor")
2021-01-06 10:44:29 +00:00
Philipp Kern
c260905c80 nixos/exim: Make queue runner interval configurable and reduce it to 5m
Exim spawns a new queue runner every n minutes as configured by the
argument to -q; up to queue_run_max can be active at the same time.
Spawning a queue runner only every 30 mins means that a message that
failed delivery on the first attempt (e.g. due to greylisting) will only
be retried 30 minutes later.

A queue runner will immediately exit if the queue is empty, so it is
more a function on how quickly Exim will scale to mail load and how
quickly it will retry than something that is taxing on an otherwise
empty system.
2020-12-25 21:00:33 +01:00
Linus Heckemann
cc786acdce
Merge pull request #105397 from kisik21/mailman-other-mta-support
nixos/mailman: make Postfix support optional (provided you configure the MTA yourself)
2020-12-14 09:46:05 +01:00
Vika
ad023b0c88
nixos/mailman: make Postfix support optional (provided you configure the MTA yourself)
Mailman can now work with MTAs other than Postfix. You'll have to configure
it yourself using the options in `services.mailman.settings.mta`.

This addition is reflected in the release notes for 21.03.
2020-12-14 02:41:30 +03:00
Alyssa Ross
a2460414cb
nixos/mailman: run non-minutely jobs
Fixes: b478e0043c
 ("nixos/mailman: refactor")
2020-12-11 17:23:50 +00:00
Marc 'risson' Schmitt
27dacb8b4b
nixos/postfix: fix masterCf type
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2020-12-10 18:49:05 +01:00
Jörg Thalheim
b1ed5ffeab
Merge pull request #93293 from tnias/nixos_rspamd_20200716 2020-12-01 13:10:43 +00:00
Jörg Thalheim
3b6ef967f3
nixos/rspamd: fix postfix integration 2020-11-30 07:29:32 +01:00
Peter Simons
58f29d3ca8
Merge pull request #104721 from vkleen/postfix-smtp-fix
nixos.postfix: make postfix.enableSmtp work again
2020-11-24 08:58:35 +01:00
Viktor Kleen
6216c843ed
nixos/postfix: make postfix.enableSmtp work again
This fixes issue #104715.
2020-11-23 23:46:06 +00:00
zowoq
dbbd289982 nixos/*: fix indentation 2020-11-23 08:42:51 +10:00
Niklas Hambüchen
91b20fb1aa roundcube service: Restart on config changes.
Until now, e.g. `extraConfig` changes did not reflect in
the system on `nixos-rebuild switch`.
2020-11-08 22:20:18 +01:00
freezeboy
ee0e1e0bcb nixos(freepops): remove module 2020-11-03 10:45:29 +01:00
lf-
b37bbca521 nixos/modules: fix systemd start rate-limits
These were broken since 2016:
f0367da7d1
since StartLimitIntervalSec got moved into [Unit] from [Service].
StartLimitBurst has also been moved accordingly, so let's fix that one
too.

NixOS systems have been producing logs such as:
/nix/store/wf98r55aszi1bkmln1lvdbp7znsfr70i-unit-caddy.service/caddy.service:31:
Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.

I have also removed some unnecessary duplication in units disabling
rate limiting since setting either interval or burst to zero disables it
(ad16158c10/src/basic/ratelimit.c (L16))
2020-10-31 01:35:56 -07:00
Malte Brandy
cebf9198f3
treewide: De-inline uses of lib.boolToString
This commit should not change eval results
2020-10-14 01:46:17 +02:00
Philipp Bartsch
9cca2eb4c8 nixos/rspamd: fixup cosmetics 2020-07-18 12:25:07 +02:00
Philipp Bartsch
7e9f3e9eb1 nixos/rspamd: add systemd service sandbox
Drop preStart script in favour of systemd StateDirectory parameter.
2020-07-16 21:15:22 +02:00
lewo
9534da25bf
Merge pull request #90115 from asbachb/postfix-tls
postfix: Replaced config key by recommendation and introduced usage of system trust store
2020-07-09 20:29:49 +02:00
Maximilian Bosch
87d7f0f0f3
Merge pull request #92329 from asbachb/roundcube/add-message-size
roundcube: Added new option `maxAttachmentSize` to configure max attachment size
2020-07-08 11:22:14 +02:00
Maximilian Bosch
5bc22adb5a
nixos/manual: fix build
Option names must be `opt-<full-option-name>` in docbook XML.
2020-07-08 11:09:01 +02:00
Benjamin Asbach
12e0d726fd roundcube: Added new option maxAttachmentSize to configure the maximum attachment size
The multiplication is used since roundcube uses only 70% of the php configured upload size.
2020-07-08 01:22:28 +02:00
Eric Wolf
8af58eda12
postfix: Add submissions option for postfix and test (#91691)
RFC 8314 suggests, for end user submission of
mails, SMTP over TLS on port 465 should be used.

Closes #91690
2020-07-06 03:37:56 +02:00
Benjamin Asbach
632104e5a4 postfix: deprecated sslCACert in favour of tlsTrustedAuthorities
`sslCACert` was used for trust store of client and server certificates. Since `smtpd_tls_ask_ccert` defaults to no the setup of `smtpd_tls_CApath` was removed.

>By default (see smtpd_tls_ask_ccert), client certificates are not requested, and smtpd_tls_CApath should remain empty.
see http://www.postfix.org/postconf.5.html#smtpd_tls_CAfile
2020-07-05 14:53:34 +02:00
Benjamin Asbach
9d697837f0 postfix: used recommended configuration key to enable tls
> With Postfix 2.3 and later use smtp_tls_security_level instead.

http://www.postfix.org/postconf.5.html#smtp_use_tls
2020-07-05 14:50:40 +02:00
Linus Heckemann
d5cc8fb892 nixos/mailman: fix search index location 2020-06-18 17:23:34 +02:00
Linus Heckemann
176bc68a69 mailman: log to journal 2020-06-18 17:23:33 +02:00
Linus Heckemann
3dbbc786f5 nixos/mailman: RFC42-ise 2020-06-18 17:23:33 +02:00
Linus Heckemann
1b8af3e1ae nixos/mailman: fix clearing static files 2020-06-18 17:23:33 +02:00
Linus Heckemann
32c556b039 nixos/mailman: document, add maintainers 2020-06-18 17:23:29 +02:00
Linus Heckemann
b478e0043c nixos/mailman: refactor
- Add serve.enable option, which configures uwsgi and nginx to serve
  the mailman-web application;
- Configure services to log to the journal, where possible. Mailman
  Core does not provide any options for this, but will now log to
  /var/log/mailman;
- Use a unified python environment for all components, with an
  extraPackages option to allow use of postgres support and similar;
- Configure mailman's postfix module such that it can generate the
  domain and lmtp maps;
- Fix formatting for option examples;
- Provide a mailman-web user to run the uwsgi service by default
- Refactor Hyperkitty's periodic jobs to reduce repetition in the
  expressions;
- Remove service dependencies not related to functionality included in
  the module, such as httpd -- these should be configured in user config
  when used;
- Move static files root to /var/lib/mailman-web-static by default. This avoids
  permission issues when a static file web server attempts to access
  /var/lib/mailman which is private to mailman. The location can still
  be changed by setting services.mailman.webSettings.STATIC_ROOT;
- Remove the webRoot option, which seems to have been included by
  accident, being an unsuitable directory for serving via HTTP.
- Rename mailman-web.service to mailman-web-setup.service, since it
  doesn't actually serve mailman-web. There is now a
  mailman-uwsgi.service if serve.enable is set to true.
2020-06-18 17:21:41 +02:00
Maximilian Bosch
e826a6ce03
nixos/dovecot2: refactor mailboxes option
Specifying mailboxes as a list isn't a good approach since this makes it
impossible to override values. For backwards-compatibility, it's still
possible to declare a list of mailboxes, but a deprecation warning will
be shown.
2020-06-17 22:05:58 +02:00
Martin Weinelt
23c1374bd7
Merge pull request #90067 from mmilata/sympa-6.2.56
nixos/sympa: fix PATH_INFO splitting for sympa-6.2.56
2020-10-04 04:33:41 +02:00
Gabriel Ebner
f26dcb4850
Merge pull request #93201 from symphorien/dovecot-namespace-mailbox
nixos/dovecot: configure mailboxes for all processes
2020-10-03 14:46:40 +02:00
Peter Hoeg
9123308be5 nixos/mailhog: run with DynamicUser 2020-09-07 17:56:53 +08:00
Philipp Bartsch
47928442a8 nixos/opendkim: add keyPath to ReadWritePaths 2020-09-03 17:54:16 +02:00
Philipp Bartsch
118f341723 nixos/opendkim: add systemd service sandbox 2020-09-03 17:54:15 +02:00
Symphorien Gibol
7200fde2d5 nixos/dovecot: configure mailboxes for all processes
Notably fts plugins need them for fts_autoindex_exclude = \SomeFlag
2020-08-28 22:24:04 +02:00
Silvan Mosberger
fc121e2813
nixos/dovecot: Improve mailboxes type
The previous use of types.either disallowed assigning a list at one
point and an attrset an another.
2020-08-18 14:25:51 +02:00
Jörg Thalheim
0f2ee10cbf
Merge pull request #94270 from jerith666/postfix-dane
postfix: add useDane config option
2020-08-13 06:53:53 +01:00
Matt McHenry
a45f1453eb postfix: add useDane config option 2020-08-12 21:18:36 -04:00
zowoq
8fb410c0ad nixos/*: editorconfig fixes 2020-08-08 10:54:16 +10:00
Maximilian Bosch
fc179ef8a6
nixos/dovecot2: add autoexpunge setting
To automatically purge old email.

See also https://wiki.dovecot.org/MailboxSettings
2020-06-17 01:07:27 +02:00
Martin Milata
bd4e4dddff nixos/sympa: fix PATH_INFO splitting for sympa-6.2.56
Our regex for splitting HTTP path into SCRIPT_NAME and PATH_INFO was
incorrect when webLocation was set to "/". Since Sympa 6.2.56 this has
caused the web interface to return "421 Misdirected Request".

Since 6.2.56 Sympa can do the splitting on its own so we can simply
remove it from nginx configuration.

See also:
- https://github.com/sympa-community/sympa/issues/879
- https://github.com/sympa-community/sympa/pull/910
- https://github.com/sympa-community/sympa-community.github.io/pull/53
2020-06-10 17:44:37 +02:00
José Romildo Malaquias
a421af29e4
nixos/opensmtpd: add a setgid wrapper for smtpctl (#89962)
The setgid is currently required for offline enqueuing, and
unfortunately smtpctl is currently not split from sendmail so there's
little running around it.
2020-06-10 15:08:36 +02:00
Jörg Thalheim
43b3c15228
Merge pull request #87255 from symphorien/dovecot-restart-module 2020-05-08 15:05:10 +01:00
Symphorien Gibol
0f3b4928b2 dovecot: restart when modules are changed 2020-05-08 12:00:00 +00:00
Elis Hirwing
27b9b7b3af
Merge pull request #85026 from talyz/php_buildenv_override
php.buildEnv: Make the exported php package overridable, improve handling of currently enabled extensions, etc
2020-04-29 19:57:37 +02:00
Dominik Xaver Hörl
c10d82358f treewide: add types to boolean / enable options or make use of mkEnableOption 2020-04-27 09:32:01 +02:00
talyz
2ba7926959
php.buildEnv: Provide a list of currently enabled extensions
Rework withExtensions / buildEnv to handle currently enabled
extensions better and make them compatible with override. They now
accept a function with the named arguments enabled and all, where
enabled is a list of currently enabled extensions and all is the set
of all extensions. This gives us several nice properties:

 - You always get the right version of the list of currently enabled
   extensions

 - Invocations chain

 - It works well with overridden PHP packages - you always get the
   correct versions of extensions

As a contrived example of what's possible, you can add ImageMagick,
then override the version and disable fpm, then disable cgi, and
lastly remove the zip extension like this:

{ pkgs ? (import <nixpkgs>) {} }:
with pkgs;

let
  phpWithImagick = php74.withExtensions ({ all, enabled }: enabled ++ [ all.imagick ]);

  phpWithImagickWithoutFpm743 = phpWithImagick.override {
    version = "7.4.3";
    sha256 = "wVF7pJV4+y3MZMc6Ptx21PxQfEp6xjmYFYTMfTtMbRQ=";
    fpmSupport = false;
  };

  phpWithImagickWithoutFpmZip743 = phpWithImagickWithoutFpm743.withExtensions (
    { enabled, all }:
      lib.filter (e: e != all.zip) enabled);

  phpWithImagickWithoutFpmZipCgi743 = phpWithImagickWithoutFpmZip743.override {
    cgiSupport = false;
  };
in
  phpWithImagickWithoutFpmZipCgi743
2020-04-26 16:43:05 +02:00
Dominik Xaver Hörl
0412bde942 treewide: add bool type to enable options, or make use of mkEnableOption
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
2020-04-21 08:55:36 +02:00
Alyssa Ross
1b0d8015fe nixos/rss2email: globally install rss2email
For man pages.
2020-04-18 14:16:00 +00:00
Symphorien Gibol
9e417bc9e3 roundcube: use pspell for spellchecking
By default, upstream enables a third party service in the cloud:
https://github.com/roundcube/roundcubemail/blob/1.4.3/config/defaults.inc.php#L790-L798
2020-04-10 12:00:00 +00:00
Martin Milata
fdc36e2c89 nixos/sympa: fix outgoing messaging
Because ProtectKernelModules implies NoNewPrivileges, postfix's sendmail
executable, which is setgid, wasn't able to send mail.
2020-03-24 02:35:39 +01:00
Martin Milata
8f632b404f sympa: build with --enable-fhs
Update module accordingly.
2020-03-24 02:32:22 +01:00
Léo Gaspard
693d834c37
Merge pull request #76739 from symphorien/mail_plugins
nixos/dovecot: add an option to enable mail_plugins
2020-03-12 22:44:23 +01:00
Benjamin Staffin
3a2790c342 services.mailman: RemainAfterExit so settings take effect properly
Prior to this fix, changes to certain settings would not be applied
automatically and users would have to know to manually restart the
affected service.  A prime example of this is
`services.mailman.hyperkitty.baseUrl`, or various things that affect
`mailman3/settings.py`
2020-03-02 02:25:20 +00:00
Martin Milata
097ab90850 nixos/sympa: init module 2020-02-07 22:54:27 +01:00
Alyssa Ross
0167eb303f nixos/mailman: make mailman package configurable
This will allow users to provide other archiver plugins than the
default mailman-hyperkitty.
2020-01-30 23:14:45 +00:00
Alyssa Ross
8f4fd4d9f5 nixos/mailman: restart services when config changed 2020-01-30 23:14:45 +00:00
Alyssa Ross
881dd9963f mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.

The reason it was done that way before was so that a few NixOS
options could be substituted in.  Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.

In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way.  NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before.  I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-30 23:14:45 +00:00
Alyssa Ross
a8538a73a7 mailman: init package for Mailman CLI
We already had python3Packages.mailman, but that's only really usable
as a library.  The only other option was to create a whole Python
environment, which was undesirable to install as a system-wide
package.
2020-01-30 23:14:45 +00:00
Alyssa Ross
8d9636e092 nixos/mailman: don't set Postfix hashes
It's likely that a user might want to set multiple values for
relay_domains, transport_maps, and local_recipient_maps, and the order
is significant.  This means that there's no good way to set these
across multiple NixOS modules, and they should probably all be set
together in the user's Postfix configuration.

So, rather than setting these in the Mailman module, just make the
Mailman module check that the values it needs to occur somewhere, and
advise the user on what to set if not.
2020-01-30 23:14:45 +00:00
Alyssa Ross
db0a3712bb nixos/mailman: support running through uwsgi 2020-01-30 23:14:45 +00:00
Alyssa Ross
c397d1909f nixos/mailman: don't keep secrets in the Nix store
This replaces all Mailman secrets with ones that are generated the
first time the service is run.  This replaces the hyperkittyApiKey
option, which would lead to a secret in the world-readable store.
Even worse were the secrets hard-coded into mailman-web, which are not
just world-readable, but identical for all users!

services.mailman.hyperkittyApiKey has been removed, and so can no
longer be used to determine whether to enable Hyperkitty.  In its
place, there is a new option, services.mailman.hyperkitty.enable.  For
consistency, services.mailman.hyperkittyBaseUrl has been renamed to
services.mailman.hyperkitty.baseUrl.
2020-01-30 23:14:45 +00:00
Alyssa Ross
112fa077b1 nixos/mailman: siteOwner default -> example
A default of example.com is useful to nobody.  The correct value of
this depends on the system.
2020-01-30 23:14:45 +00:00
Alyssa Ross
547b91b971 nixos/mailman: add webUser option
Not everybody is using Apache.
2020-01-30 23:14:45 +00:00
Alyssa Ross
85a9743f13 spamassassin: use /etc/mail/spamassassin for config
Using a custom path in the Nix store meant that users of the module
couldn't add their own config files, which is a desirable feature.  I
don't think avoiding /etc buys us anything.
2020-01-30 00:47:10 +00:00
Symphorien Gibol
28321223d8 dovecot: add missing descriptions 2020-01-28 12:00:00 +00:00
Symphorien Gibol
7a40ced06b nixos/modules/services/mail/dovecot.nix: nixpkgs-fmt 2020-01-28 12:00:00 +00:00
symphorien
56f9c51b05 Update nixos/modules/services/mail/dovecot.nix
Co-Authored-By: Léo Gaspard <github@leo.gaspard.ninja>
2020-01-28 20:30:25 +01:00
Symphorien Gibol
0da7a14f16 nixos/dovecot: add an option to enable mail_plugins
Motivation:
if enableQuota is true, mail plugins cannot be enabled in extraConfig
because of the problem described here:

https://doc.dovecot.org/configuration_manual/config_file/config_file_syntax/#variable-expansion

doveconf: Warning: /etc/dovecot/dovecot.conf line 8: Global setting
mail_plugins won't change the setting inside an earlier filter at
/etc/dovecot/dovecot.conf line 5 (if this is intentional, avoid this
warning by moving the global setting before /etc/dovecot/dovecot.conf
line 5)
2020-01-28 20:30:25 +01:00
Maximilian Bosch
2d9e51adc3
Merge pull request #77532 from symphorien/roundcube
nixos/roundcube: security improvements
2020-01-22 21:58:25 +01:00
Symphorien Gibol
b5d692e123 nixos/roundcube: provide path to mime.types file
fixes this warning:
WARNING: Mimetype to file extension mapping doesn't work properly!
2020-01-18 16:12:50 +01:00
Symphorien Gibol
b6e6bec57c nixos/roundcube: don't use the default and insecure des_key
The php installer creates a random one, but we bypass it, so we have
to create one ourselves.

This should be backward compatible as encryption is used for session
cookies only: users at the time of the upgrade will be logged out but
nothing more.

259b7fa065/config/config.inc.php.sample (L73)
2020-01-18 16:12:50 +01:00
Symphorien Gibol
52cf727a53 nixos/roundcube: do not write passwords to the store nor run php as root
If the database is local, use postgres peer authentication.
Otherwise, use a password file.

Leave database initialisation to postgresql.ensure*.
Leave /var/lib/roundcube creation to systemd.
Run php upgrade script as unpriviledged user.
2020-01-18 15:27:45 +01:00
Jan Tojnar
e85b34c484
tree-wide: fix more warning related to loaOf deprecation 2020-01-11 08:09:56 +01:00
Alyssa Ross
59c4035e58 nixos/spamassassin: allow initPreConf to be a path
Supporting a path here is important because it allows e.g. fetching a
configuration from a URL.  To do this and provide the configuration as
a string, IFD would be necessary.  It's just written into a path
anyway.
2020-01-10 21:49:06 +00:00
Milan Pässler
2a31a6a412 tree-wide: fix errors and warning related to loaOf deprecation 2020-01-07 06:23:28 +01:00
rnhmjoj
1d61efb7f1 treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
Silvan Mosberger
4ee3e8b21d
nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because:
- It breaks disabledModules for modules that have a rename defined
- Adding/removing renames for a module means having to find them in the
central file
- Merge conflicts due to multiple people editing the central file
2019-12-10 02:51:19 +01:00
Robin Gloster
5f7bcffe21
Merge pull request #71407 from f--t/fix/roundcube
roundcube: fix -- quoting string env variable
2019-11-20 09:25:10 +01:00
Aaron Andersen
07bba3fcd3
Merge pull request #73295 from aanderse/mailcatcher
nixos/mailcatcher: add http.path option
2019-11-19 17:15:52 -05:00
f--t
4c18309ca6
Merge branch 'master' into fix/roundcube 2019-11-19 13:16:16 -08:00
Victor Nawothnig
f42b402706 Specify correct type for fuzzy worker 2019-11-18 13:56:56 +01:00
Alyssa Ross
7813c249ef
nixos/postfix: add missing setgid wrapper
This is basically an alias for a special case of postqueue, which
already has a setgid wrapper.  Would be silly to allow postqueue -p
but not mailq.
2019-11-13 15:31:32 +00:00
Aaron Andersen
1759424fc6 nixos/mailcatcher: add http.path option 2019-11-12 10:11:24 -05:00
Florian Klink
e349b6e0fe nixos/opensmtpd: refactor to use tmpfiles to set up spool directories 2019-11-08 15:05:18 +01:00
ft
6a600b1c22 roundcube: fix -- quoting string env variable 2019-10-19 16:08:54 -07:00
Janne Heß
d6c08776ba treewide: Switch to system users 2019-10-12 22:25:28 +02:00
Victor Nawothnig
187c0b3aef Specify correct option type 2019-10-04 09:57:06 +02:00
Jörg Thalheim
bfed455de3
Merge pull request #68946 from volth/escape
treewide: fix string escapes
2019-09-24 04:19:12 +01:00
volth
6c038cd409
nixos/mailcatcher: add bind capabilities 2019-09-22 19:49:26 +00:00
volth
602a39c318
nixos/rspamd: fix fancy unicode quote 2019-09-16 23:40:32 +00:00
Alyssa Ross
27b459ce1e
nixos/mailman: types.string -> types.str 2019-09-11 14:14:09 +00:00
Peter Simons
d0dba96e1d nixos/mailman: properly wrap the mailman-web script 2019-09-11 15:22:37 +02:00
Peter Simons
a7941fe210 nixos/mailman: create "mailman" executable as a proper wrapper script 2019-09-11 15:11:34 +02:00
Peter Simons
1cb5cff611 nixos/mailman: clean up our variable names 2019-09-11 14:58:16 +02:00
Peter Simons
0cc37b3cfa nixos/mailman: httpd.services requires mailman-web in the systemd sense
When mailman-web restarts, it removes the generated "static" directory. This
breaks a currently running httpd process, which needs a re-start, too, to
obtain a new handle for the newly generated path.
2019-09-11 14:52:47 +02:00
Peter Simons
86f8895abb python-mailman-web: turn these Djando configuration files into a make-shift Python library
Suggested in https://github.com/NixOS/nixpkgs/pull/67951#issuecomment-530309702.
2019-09-11 14:48:51 +02:00
Peter Simons
72c7ba5aba nixos/mailman: add support for the Mailman Web UI (Postorius & Hyperkitty) 2019-09-11 12:19:23 +02:00
Léo Gaspard
a80eef922d rss2email: 3.9 -> 3.10 2019-09-09 18:03:17 +02:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Silvan Mosberger
478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Frederik Rietdijk
ad1d58c622 Merge staging-next into staging 2019-08-31 10:04:20 +02:00
Peter Simons
eedf3dc6e2 nixos/mailman: decouple the mailman module from the postfix module
https://github.com/NixOS/nixpkgs/pull/67708#discussion_r319579987 suggested
that simply appending the necessary maps to the appropriate attributes in
services.postfix.config gets the job done; we don't special support in the
postfix module to accomplish that.
2019-08-30 18:44:47 +02:00
Peter Simons
6b87772ca4 nixos/mailman: don't reserve a static uid in the system
Any system uid will do, so we let the system allocate
one for us. The 'mailman' group is gone entirely since
we don't need it. Users who wish to run the 'mailman'
administration utility can do so via 'sudo':

    $ sudo -u mailman mailman info

Also, simplify the syntax of our user.users entry to
rely on an attribute set rather than a list.
2019-08-30 18:00:36 +02:00
Peter Simons
5a81797119 nixos/mailman: cosmetic 2019-08-30 15:38:43 +02:00
Peter Simons
c1c1ce7221 mailman: add NixOS module to install and deploy the mailing list server 2019-08-29 20:29:35 +02:00
Frederik Rietdijk
5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
Maximilian Bosch
56a7bc05e1
nixos/treewide: drop dependencies to keys.target
The `keys.target` is used to indicate whether all NixOps keys were
successfully uploaded on an unattended reboot. However this can cause
startup issues e.g. with NixOS containers (see #67265) and can block
boots even though this might not be needed (e.g. with a dovecot2
instance running that doesn't need any of the NixOps keys).

As described in the NixOps manual[1], dependencies to keys should be
defined like this now:

``` nix
{
  systemd.services.myservice = {
    after = [ "secret-key.service" ];
    wants = [ "secret-key.service" ];
  };
}
```

However I'd leave the issue open until it's discussed whether or not to
keep `keys.target` in `nixpkgs`.

[1] https://nixos.org/nixops/manual/#idm140737322342384
2019-08-27 18:55:55 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Alexander V. Nikolaev
885511cb5c rmilter: remove deprecated package (and module) 2019-08-24 17:33:48 +03:00
Aaron Andersen
400c6aac71 nixos/phpfpm: deprecate extraConfig options in favor of settings options 2019-08-23 07:56:27 -04:00
Aaron Andersen
0ce8317c46 nixos/phpfpm: deprecate poolConfigs option 2019-08-23 07:54:51 -04:00
Silvan Mosberger
88bb9fa403
nixos/modules: Replace all nested types.either's with types.oneOf's 2019-08-08 23:35:52 +02:00
Peter Simons
59bacaca3d nixos: add 'localRecipients' config option for Postfix
The new option services.postfix.localRecipients allows
configuring the postfix option 'local_recipient_maps'. When
set to a list of user names (or patterns), that map
effectively replaces the lookup in the system's user
database that's used by default to determine which local
users are valid.

This option is useful to explicitly set local users that are
allowed to receive e-mail from the outside world. For local
injection i.e. via the 'sendmail' command this option has no
effect.
2019-07-15 17:36:20 +02:00
Aaron Andersen
278d867a9b Revert "Merge pull request #63156 from Izorkin/phpfpm-rootless"
This reverts commit b5478fd1a2, reversing
changes made to dbb00bfcbf.
2019-06-28 21:47:43 -04:00
Elis Hirwing
b5478fd1a2
Merge pull request #63156 from Izorkin/phpfpm-rootless
phpfpm: do not run anything as root
2019-06-27 19:13:53 +02:00
Graham Christensen
38c28ef10c
Merge pull request #56265 from aanderse/permissions-start-only
replace deprecated usage of PermissionsStartOnly (part 2)
2019-06-25 18:04:22 -04:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Izorkin
59a33f25e5 nixos/roundcube: fix work with phpfpm-rootless mode 2019-06-16 12:33:51 +03:00
Aaron Andersen
fbe5943237 nixos/opendkim: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-05-26 07:20:57 -04:00
Aaron Andersen
4775c59528 nixos/dspam: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-05-26 07:20:57 -04:00
Daniel Schaefer
786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
Aaron Andersen
4a11ce7f26
cleanup redundant text in modules utilizing mkEnableOption
Closes #59911
2019-04-20 14:44:02 +02:00
Aaron Andersen
a585d29bfd nixos/rss2email: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-04-13 07:00:57 -04:00
Aaron Andersen
64fdacc580 nixos/nullmailer: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-04-13 07:00:57 -04:00
Robin Gloster
f370553f8f
Merge pull request #58804 from Ma27/roundcube-fixes
roundcube: minor fixes
2019-04-09 18:30:00 +00:00
Florian Klink
2457510db4
Merge pull request #51918 from bobvanderlinden/var-run
tree-wide: nixos: /var/run -> /run
2019-04-07 20:09:46 +02:00
Maximilian Bosch
6b6348eaba
nixos/roundcube: only configure postgres config if localhost is used as database
When using a different database, the evaluation fails as
`config.services.postgresql.package` is only set if `services.postgresql` is enabled.

Also, the systemd service shouldn't have a relation to postgres if a
remote database is used.
2019-04-02 16:02:53 +02:00
Aaron Andersen
01cec5155f nixos/davmail: set logging default to warn, instead of debug 2019-04-02 09:52:32 -04:00
Aaron Andersen
395ec8c0d4 nixos/mailcatcher: init module for existing package 2019-03-27 09:15:47 -04:00
Bob van der Linden
c67f2f0815 nixos/spamassassin: /var/run -> /run 2019-03-20 00:02:44 +01:00
Bob van der Linden
edd5c88086 nixos/postgrey: /var/run -> /run 2019-03-20 00:02:44 +01:00