Maddy: Difference between revisions
imported>Onny Add info about spam filtering |
imported>Onny Add notes on setup autoconfig |
||
| Line 85: | Line 85: | ||
[...] | [...] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Autoconfig === | |||
You can run an additional web service which provides autoconfig files for various mail clients like Thunderbird, iOS Mail or Outlook, so you don't have to manually configure your server settings into these apps. In this example, we going to tell the clients, that our mail server is running on the domain <code>example.org</code> and which IMAP/SMTP ports to use | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
services.go-autoconfig = { | |||
enable = true; | |||
domain = "autoconfig.example.org"; | |||
imap = { | |||
server = "example.org"; | |||
port = 993; | |||
}; | |||
smtp = { | |||
server = "example.org"; | |||
port = 587; | |||
}; | |||
}; | |||
</nowiki>}} | |||
After that the autoconfig service based on program [https://github.com/L11R/go-autoconfig go-autoconfig] will listen on http://localhost:1323 , serving the configuration informations used by the clients. | |||
You can use your preferred web server, for example [[Caddy]] to proxy this service to an outside facing domain like https://autoconfig.example.org | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
caddy = { | |||
enable = true; | |||
virtualHosts."autoconfig.example.org".extraConfig = '' | |||
reverse_proxy http://localhost:1323 | |||
''; | |||
}; | |||
</nowiki>}} | |||
You need DNS SRV-record on <code>example.org</code> to get Outlook and Thunderbird working: | |||
<code> | |||
_autodiscover._tcp IN SRV 0 0 443 autoconfig.example.org. | |||
</code> | |||
Of course autoconfig.example.org domain should point to your server running the service. | |||
[[Category:Mail Server]] | [[Category:Mail Server]] | ||