Commit graph

374 commits

Author SHA1 Message Date
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
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