aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2023-08-28 09:28:49 +0200
committerJoris2023-08-28 12:51:14 +0200
commit936871e6ba92a23b1956b30272af8c96951c7c2d (patch)
tree78d54478877c51dd152d271d356b2a3d9a5c274b
parent4854531d60ad2c68ccdbf19eed6fe9a6ce1b6797 (diff)
downloadbudget-936871e6ba92a23b1956b30272af8c96951c7c2d.tar.gz
budget-936871e6ba92a23b1956b30272af8c96951c7c2d.tar.bz2
budget-936871e6ba92a23b1956b30272af8c96951c7c2d.zip
Fix sendmail error
Since using a systemd user to run budget, sendmail is failing with: ``` warning: mail_queue_enter: create file maildrop/665739.29050: Permission denied ``` Try specifying the complete path, as mentioned in: https://github.com/NixOS/nixpkgs/issues/90248
-rw-r--r--src/mail.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mail.rs b/src/mail.rs
index dec8691..9fe0ed8 100644
--- a/src/mail.rs
+++ b/src/mail.rs
@@ -38,7 +38,8 @@ pub async fn send(
.map(|r| r.address)
.collect::<Vec<String>>();
- let mut command = Command::new("sendmail");
+ // https://github.com/NixOS/nixpkgs/issues/90248
+ let mut command = Command::new("/run/wrappers/bin/sendmail");
command.kill_on_drop(true);
command.arg("-f").arg(FROM_ADDRESS);
command.arg("--").args(recipient_addresses);