Fossil Forum

Fossil email notifications

Fossil email notifications

Fossil email notifications

(1) By Robert Hairgrove (bobhairgrove) on 2023-05-11 08:55:44 [source]

In the document describing how to set up Email Alerts and Notifications, there is mention of the msmtp mail client. The document states under "Advanced Email Setups":

We believe the msmtp SMTP client is compatible with this protocol if you give it the -t option. To our knowledge, this remains untested, but if it works, this would be a useful option on a server hosting a Fossil repository which doesn't otherwise require a separate SMTP server for other purposes.

I just did this, and it seems to work very well. The provider for my little VPS has blocked port 25, but port 587 for STARTTLS works quite well (I didn't even have to enable this in the ufw firewall, it just worked for me). The .msmtprc file needs to reside in the web server's root directory (the DOCUMENT_ROOT) and have the same user and group as the web server has (usually www-data, www, nobody or something like that) and permissions set to 0600.

In Fossil, I selected "pipe to a command", and instead of "sendmail -ti" (which probably would have also worked, since I added that to the /etc/mail.rc), I used "msmtp -t" directly. I think there is a symlink sendmail somewhere which points to msmtp, and both programs have a "-t" option. For msmtp one can also include the "-i" option, but it is ignored, according to the docs.

For anyone who only needs to be able to send out notifications from Fossil, or from cron jobs, etc., and doesn't need the full capability offered by Postfix or any of the other mail servers, this is definitely the least troublesome to set up and configure correctly.

I am very glad that I saw msmtp mentioned on this Fossil document, otherwise I might still be tring to get Postfix running on my server!

(2.1) By Warren Young (wyoung) on 2023-05-11 12:31:04 edited from 2.0 in reply to 1 [link] [source]

Thanks for reporting. I've updated the doc to be more definite on this point now that we have a successful test of the option.

And you're welcome; msmtp was my idea. I used to use it with other software that was compiled in the days of unencrypted-everything and couldn't speak to any real SMTP servers any more due to all the mandatory access controls but did know how to call on a local sendmail implementation.