Postfix for Gmail: Difference between revisions

Klinger (talk | contribs)
mNo edit summary
m Cleanup for the secrets configuration, improved references formatting.
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This is how to setup Postfix to use Gmail as a relay host, so it can send email via Gmail, e.g. for output of cronjobs etc.
This is how to setup Postfix to use Gmail as a relay host, so it can send email via Gmail, e.g. for output of cronjobs etc.


== Setup sops-nix ==
== Secrets Configuration ==


Follow https://github.com/Mic92/sops-nix
This page follows the configuration defined in <code>[https://github.com/Mic92/sops-nix sops-nix]</code>, but you can use any [[Comparison of secret managing schemes|secret managing scheme]].
 
Make sure you can create secrets in /run/secrets before continuing.


== Add a "postfix/sasl_passwd" secret ==
== Add a "postfix/sasl_passwd" secret ==
Line 53: Line 51:
     'echo "This is a test email." | mail -s "Test Email from NixOS to root" root'
     'echo "This is a test email." | mail -s "Test Email from NixOS to root" root'


== Source / Credit ==
== References ==


This post came out of this [https://discourse.nixos.org/t/porting-my-postfix-gmail-smtp-to-nixos/30286 discussion].
[https://discourse.nixos.org/t/porting-my-postfix-gmail-smtp-to-nixos/30286 Porting my postfix gmail smtp to nixos] on the NixOS Discourse.




[[Category:Mail servers]]
[[Category:Mail Server]]
[[Category:Server]]
[[Category:Server]]