Commit Graph

62 Commits

Author SHA1 Message Date
Antoine Eiche 41219cc690 Rename rejectMessage to sendOnlyRejectMessage 2020-05-08 20:43:46 +02:00
Galen Abell d47e4ead88 Add send-only accounts 2020-05-08 20:43:46 +02:00
Galen Abell 6563abc1c4 Fix password hash file generation behavior
- Move the "create password hash file from hashed password" behavior to
  a separate variable, since having it in the default field of config
  would always cause the warning to trigger
- Change type of hashedPassword to `nullOr str`
2020-03-06 17:27:47 +00:00
Alberto Berti 6033364d0b Merge branch 'delimiter' into delimiter-master 2019-07-26 19:28:51 +02:00
Alberto Berti 253c8732b4 Add subaddresses configuration 2019-07-25 17:30:20 +02:00
Oscar Carlsson 4e8fbac580 Disable TLSv1.0 and deprecated ciphers.
TLSv1.0 is as deprecated as the older SSL versions, and should not be
used. I've also disabled a slew of ciphers, and hopefully this will
make us less vulnerable to downgrade attacks and similar.
2019-06-21 11:09:30 +02:00
Christian Kauhaus bce95d0229 Use services.postfix.virtual option
SNM used to define virtual_alias_maps in extraConfig which collides with
the same parameter defined by the standard services.postfix.virtual
option. This led to *lots* of warnings during postfix startup like

```
May 02 18:29:58 nun postfix/master[24758]: warning: /etc/postfix/main.cf, line 47: overriding earlier entry: virtual_alias_maps=hash:/etc/postfix/virtual
```

Refraining from overriding virtual_alias_maps has the additional
advantage that virtual aliases defined by other modules dont' stop
working with SNM.
2019-05-03 11:25:23 +00:00
Michishige Kaito c2ca4d1bb0 postfix: allow configuring message_size_limit 2018-11-23 14:29:23 +00:00
Robin Raymond acd65c0803 New Feature >>rejectSender<<
Authored by tokudan
2018-11-10 14:29:16 +01:00
Brian Olsen 88e292c5b7 postfix: Support setting options for policyd-spf 2018-06-29 21:36:34 +09:30
Brian Olsen 616d779e1f Move from rmilter to rspamd #25 2018-06-29 21:36:34 +09:30
Brian Olsen e32a915489 postfix: Use pypolicyd-spf for SPF checking 2018-06-29 21:35:16 +09:30
Brian Olsen f209fa3bf3 postfix: use masterConfig option instead of extraMasterConf
extraMasterConf is just a string while masterConfig is a nix module so
the options are more explicit and has help text.
2018-06-29 21:35:16 +09:30
Brian Olsen 7036371f75 Use OpenDKIM instead of rmilter for DKIM
As part of #61 this moves DKIM handling from rmilter to OpenDKIM.
2018-06-29 21:35:16 +09:30
Brian Olsen 8a27b941bf Start dovecot before postfix and add target for certificates
It seemed weird to me that preStart on postfix was used to generate
files not needed directly by postfix and for the self-signed
certificate which is also needed by dovecot. nginx.service was also
used as a proxy for when ACME certificate generation was done.

So I have created mailserver-certificates.target for when certificates
are available for other services. For self-signed that means that a
new oneshot service called mailserver-selfsigned-certificate has been
run. And for ACME this means that the target
acme-selfsigned-certificates has been reached (which is when acme has
created the self-signed certificates used before the actual
certificates provided by LetsEncrypt are created). This setup has the
added bonus that if you want to run a service to provide your own
certificates you can set that to run before
mailserver-certificates.target.

DH Parameters are only needed by dovecot so generation of that file has
been moved to the dovecot2 preStart.

And lastly the only remaining reason to for dovecot to start before
postfix was that the auth and lmtp sockets where located in a directory
created by postfix. But since they could just as well be located in
/run/dovecot2 as long as postfix has access to them I have moved them
there.
2018-06-29 21:35:16 +09:30
Robin Raymond 6d3ab77a5d
Merge pull request #114 from geistesk/message-id
Fog user's hostname in the Message-ID
2018-05-10 13:05:32 +02:00
Daniel Frank f613779999 Allow rejecting mails to selected local addresses from remote systems 2018-04-15 01:49:26 +02:00
geistesk 386faf960c Fog user's hostname in the Message-ID 2018-04-09 22:14:17 +02:00
Robin Raymond e4c6682eb9 Merge branch 'master' of github.com:r-raymond/nixos-mailserver 2018-04-08 15:28:58 +02:00
Robin Raymond c28d7756c1
Merge pull request #101 from tokudan/mydestination
Avoid accepting mail to xyz@localhost from remote systems
2018-04-08 15:25:48 +02:00
geistesk c0df22aaae Support for multiple extraVirtualAliases
Should fix #104 by introducing

```
extraVirtualAliases = {
  "single-alias@domain.foobar" = "user1@domain.foobar";
  "multi-alias@domain.foobar" = [
    "user1@domain.foobar" "user2@domain.foobar" ];
};
```
2018-04-03 11:52:03 +02:00
Daniel Frank f283b6750b Avoid accepting mail to xyz@localhost. Local email should be aliased to another user anyway. 2018-03-10 17:13:30 +01:00
Robin Raymond f69081226d
Merge pull request #98 from tokudan/fix_backscatter
Avoid backscattering on unknown recipients. Fixes #97
2018-03-06 16:00:54 +01:00
Daniel Frank 330cc73089 Avoid backscattering on unknown recipients. Fixes #97 2018-03-05 20:29:02 +01:00
Robert Schütz f9820b55ab Don't include identity twice in vaccounts
fixes #94
2018-03-05 16:20:54 +01:00
Robin Raymond c1c4706519 remove deprecated virtualAliases 2018-02-23 16:48:13 +01:00
Robin Raymond a3043b2242 fixes #87 2018-02-23 14:52:11 +01:00
Robin Raymond 436cf0513b add vitual mail users 2018-02-18 12:17:32 +01:00
Robin Raymond aca43875dc update copywright 2018-01-29 10:34:27 +01:00
Robin Raymond eeb7fd64af implement qutoas 2017-12-22 16:58:35 +01:00
Robin Raymond 2d0648e0f4 move from real users to passwd file 2017-12-22 16:08:42 +01:00
Ruben Maher 3a333ab71a mail-server/postfix: add each loginAccount to virtual_alias_maps 2017-12-20 10:54:57 +10:30
Robin Raymond fc9b63f0e6 add explicit catchAlls #49 2017-12-18 12:26:54 +01:00
geistesk 0091ae1761 Postfix: set hostname to FQDN
This should fix #43
2017-11-26 11:56:34 +01:00
Robin Raymond 8ce3d42c13 implement extraVirtualAliases 2017-11-21 11:52:16 +01:00
Robin Raymond 67c29a561c concat all valiases 2017-11-21 11:35:52 +01:00
Robin Raymond d94b8acd78 implement alias list 2017-11-21 11:18:07 +01:00
Ruben Maher f076a0af65 mail-server/postfix.nix: set mydestination to localhost
In the event that your `cfg.fqdn` is the same as a domain in `cfg.domains`, you
will not be able to receive mail for users like `user1@fqdn` because postfix
will try to deliver the mail locally.
2017-11-14 09:16:53 +10:30
Robin Raymond b89d6e7b27 fix fqdn in smtp banner 2017-11-11 14:19:05 +01:00
John Boehr 16fb41de01 Change domain to fqdn and extraDomains to domains 2017-11-11 09:45:06 +00:00
John Boehr f372754052
Qualify user names 2017-11-09 14:17:03 -08:00
John Boehr ebd0f656ed
Preliminary multi-domain support 2017-11-09 13:13:27 -08:00
Robin Raymond 2f7e3a9f0c initial acme support; needs testing 2017-09-23 09:56:09 +02:00
r-raymond bc48b701c8 Merge pull request #15 from phdoerfler/patch-3
Added header filtering for removing sensitive information.
2017-09-20 15:31:06 +02:00
Robin Raymond 875db33579 comments on extra lines 2017-09-20 09:26:42 +02:00
Philipp Dörfler 4e5dd5db95 Removed superflous tls_auth_only = yes 2017-09-20 09:00:17 +02:00
Philipp Dörfler 893c6db5cd Now using pkgs.writeText
this places header cleanup rules into /store out of /etc and avoids the name clash.
2017-09-20 08:38:40 +02:00
Philipp Dörfler 16e31c6a0d Added header filtering for removing sensitive information. 2017-09-20 00:05:01 +02:00
Philipp Dörfler 46d14bcdf0 Increased security of TLS encryption 2017-09-19 23:54:40 +02:00
Robin Raymond b98654f99a fixes #9 2017-09-14 10:56:22 +02:00