diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-07-25 23:56:45 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-07-25 23:56:52 -0600 |
| commit | ecdd297868a6a7df5b61ae38bace9462961e5b4f (patch) | |
| tree | dbd7d2fc03a0588b0d20e5715162c2343a8a5ba1 | |
| parent | 277e0c36a00e018a0090a984af934165be704aaa (diff) | |
home/mail: implement smtp send via gmail
| -rw-r--r-- | home/mail/default.nix | 67 |
1 files changed, 47 insertions, 20 deletions
diff --git a/home/mail/default.nix b/home/mail/default.nix index d75b1a8..febd75f 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -16,35 +16,58 @@ with lib; { accounts.email = { maildirBasePath = "mail"; - accounts.local = { - address = "${config.local.mail.address}@34project.org"; - userName = "${config.local.mail.address}@34project.org"; - inherit (config.local.mail) realName; + accounts = { + google = { + address = "alejandrosotochacon@gmail.com"; + userName = "alejandrosotochacon"; # Ver salida de: msmtp --configure alejandrosotochacon@gmail.com + inherit (config.local.mail) realName; - primary = true; + maildir = null; - # ${maildirBasePath}/${maildir.path} - maildir.path = ""; - folders.inbox = ""; + msmtp.enable = true; - msmtp.enable = true; - neomutt.enable = true; + passwordCommand = "pass show `hostname -s`/psk/gmail"; - imap = { - host = "badhost"; + smtp = { + host = "smtp.gmail.com"; - tls = { - enable = false; - useStartTls = false; + tls = { + enable = true; + useStartTls = true; + }; }; }; - smtp = { - host = "smtp.34project.org"; + local = { + address = "${config.local.mail.address}@34project.org"; + userName = "${config.local.mail.address}@34project.org"; + inherit (config.local.mail) realName; - tls = { - enable = true; - useStartTls = true; + primary = true; + + # ${maildirBasePath}/${maildir.path} + maildir.path = ""; + folders.inbox = ""; + + msmtp.enable = true; + neomutt.enable = true; + + imap = { + host = "badhost"; + + tls = { + enable = false; + useStartTls = false; + }; + }; + + smtp = { + host = "smtp.34project.org"; + + tls = { + enable = true; + useStartTls = true; + }; }; }; }; @@ -68,6 +91,10 @@ with lib; { extraConfig = '' auto_view text/html alternative_order text/plain text/enriched text/html + + reply-hook '~t ^alejandrosotochacon@gmail\.com$' 'my_hdr From: Alejandro Soto <alejandrosotochacon@gmail.com>' + macro compose '\3' "<edit-from><kill-line>Alejandro Soto \<alejandro@34project.org\><enter>" + macro compose '\g' "<edit-from><kill-line>Alejandro Soto \<alejandrosotochacon@gmail.com\><enter>" ''; }; }; |
