I need some help to troubleshoot a recent (I think it’s recent) issue with Baïkal. When I invite someone to an event, no email is sent (with thunderbird or with android calendar). It used to work just fine.
I do not know how to troubleshoot this, I do not even know where to start. Is there a log or something I can review or share here to have a hint?
- DietPi version | 8.21.1
- Distro version | bulleye
- Kernel version | Linux DietPi 6.1.50-current-rockchip64 #3 SMP PREEMPT Wed Aug 30 14:11:13 UTC 2023 aarch64 GNU/Linux
- Architecture | arm64
- SBC model | ROCK64 (aarch64)
N.B.: Even if I’m still on bulleye, I’m using php8.2.
Not sure either. How did you enable emails on the server? Via
sendmail using an external SMTP server, and if so, does it work when using
sendmail directly? Probably PHP logs give a hint:
journalctl -u php8.2-fpm
Well, I’m using postfix.
maybe I should switch to sendmail?
The command you gave me only list when php-fpm was started and stopped, so no hint here.
I don’t remember why I installed postfix, so I hope I won’t break anything, but I’ll try to install sendmail. What I don’t understand is that it used to work fine. And I don’t remember touching anything related to baïkal
are there any error or pending mails within postfix? Have a look there
Well, I uninstalled postfix. Sorry Joulinar.
As from now, I switched, following this tutorial (https://web.archive.org/web/20210922180027/https://mchodled.com/posts/2020/Apr/03/de-google-your-calendar-with-baikal/#configure-email-invitation-plugin), to msmtp. I created a free tier account on mailjet. I validated my domain and everything.
Now, if I
echo "My message" | mail -s subject firstname.lastname@example.org everything works.
But, in php, mail() is not working… I tested with a test.php file, nothing ships and php-fpm logs are empty… My /etc/php/8.2/fpm/php.ini reads
sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc --logfile /var/log/msmtp.log -t"
I don’t get what I am missing…
Do you guys can help me?
Damn. If I try ‘php -r “mail(‘email@example.com’, ‘Test Email’, ‘Test email body’);”’ it works.
So I guess there’ s another php.ini, or something else? Any idea?
I’ve got it! /etc/msmtprc needs to be 0600 and not anything else. So a simple chmod did the trick.
Anyway, if anyone needs to send mail, I recommand the tutorial on archive.org