NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.62k stars 13.77k forks source link

Monica module creates an incorrect configuration for sending emails #345193

Open sehqlr opened 5 days ago

sehqlr commented 5 days ago

Describe the bug

Take a look at this link: https://github.com/NixOS/nixpkgs/blob/e2ba9edc297df26732330b7dfc26f5892b0b01ad/nixos/modules/services/web-apps/monica.nix#L299

The config item should be MAIL_FROM_ADDRESS not MAIL_FROM.

This is based on this link: https://github.com/monicahq/monica/blob/4.x/docs/installation/mail.md#use-smtp-with-monica

When this module is deployed and you attempt to use the mail feature, it fails with a message about invalid email headers.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Deploy the Monica module with the mail settings configured to talk to an SMTP service
  2. Attempt to invite a new user to Monica
  3. Observe the resulting error message

Expected behavior

I expect Monica to be configured to sent email if I pass in those configuration items

Screenshots

Screenshot from 2024-09-28 17-10-40

Additional context

I have not been able to test any other email functions, I'm assuming that no email sending works

Notify maintainers

@Guekka this is a one-line change, so I can do the PR if you'd rather

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[root@nixos:~]$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.33, NixOS, 24.05 (Uakari), 24.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

Guekka commented 4 days ago

Thank you for investigating @sehqlr Since you already have the fix in mind, I would prefer if you could please make the PR