Mail Relay in Configuration
Issue description
It would be nice to have external mail relays as an option in the configuration (similar to what NixCloud is doing). I was able to manually enable this by adding the following to my configuration.nix, but it would be better as a built-in configuration option:
services.postfix = {
mapFiles."sasl_passwd" = builtins.toFile "sasl_passwd" "RELAY_IP RELAY_ACCOUNT:RELAY_PASSWORD";
extraConfig =
''
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = AUTH LOGIN
relayhost = [RELAY_IP]:587
'';
};