Email via sendmail was not working probably due to NoNewPrivileges
Environment
- Installation type (OTP or From Source): OTP
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.1.2
- Elixir version (
elixir -v
for from source installations, N/A for OTP): N/A - Operating system: Ubuntu 20.04.1
- PostgreSQL version (
psql -V
): 12.4
Bug description
I set up postfix and confirmed that sudo -u pleroma sendmail <address>
works. But sudo -u pleroma ./bin/pleroma_ctl email test --to <address>
resulted in repetitive warning in sudo journalctl -u pleroma -f
and never sends the mail:
Oct 22 08:36:57 lil-cheaper pleroma[118076]: postdrop: warning: mail_queue_enter: create file maildrop/872844.118076: Permission denied
Oct 22 08:36:57 lil-cheaper postfix/postdrop[118076]: warning: mail_queue_enter: create file maildrop/872844.118076: Permission denied
This was resolved by changing NoNewPrivileges=true
to NoNewPrivileges=false
in pleroma.service
, and then the test mail was sent successfully. When I changed it back, the mail failed again. So the problem is probably due to the orginal NoNewPrivileges=true
.
I'm not that familiar with linux privileges and have no idea if this is a system issue or pleroma privilege bug. But even if this is a system issue I suppose this could be documented in the Pleroma.Emails.Mailer part in /docs/configuration/cheatsheet.md?