Okay, I finally figured out the cause of the sogod error. From the Arch wiki on setting up sogo (and a couple other places), I had picked up on the instruction to set the ownership of /etc/sogo to the sogo:sogo user and group. This made sense to me, considering sogod runs as the sogo user, however it turns out that's what broke it for me. Returning ownership of /etc/sogo/sogo.conf to root:root enabled sogod to access the config again, even though sogod is running as the sogo user. I'm not sure why this is the case, but I guess in my setup, /etc/sogo needs to be owned by root, and the permissions need to be 0755 for /etc/sogo and 0600 for /etc/sogo/sogo.conf and 0700 for /var/spool/sogo. I also have /var/run/sogo and /var/spool/sogo owned by sogo:sogo, per the Arch wiki's instructions, though I'm not sure how strictly necessary that is given the wiki was incorrect about the ownership of the sogo config (at least for my setup), so it's possible those can stay owned by root and still work fine. But with things setup that way, I am now able to load the sogo webmail site. But that doesn't mean I'm all setup and ready to go just yet. I still have the issue of setting up the MariaDB database and getting sql authentication working correctly, but I'll open a separate thread for that issue.
Cheers! -- Secured with Tuta Mail: https://tuta.com/free-email Oct 8, 2025, 03:16 by [email protected]: > I actually just caught onto that shortly before your reply. I kept > researching and messing around with the nginx config, reviewing tons of > examples online, and I started to get a creeping hunch that it probably isn't > the nginx config that's been the problem, which may be why I've been confused > about re-writing the config exactly the way it had been back when I briefly > had it working, and yet I couldn't get it to work again. I finally caught a > sogod error in running "systemctl status sogo," and so now I'm aware it isn't > the nginx config, but sogo isn't actually running properly, and now I've > turned my attention toward figuring out why. It appears that the sogod > service is running, but with the following error: > > Oct 08 01:44:55 host.{REDACTED}.{TLD} systemd[1]: Starting sogo.service - > LSB: SOGo server... > Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11780]: * Starting SOGo sogo > Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11851]: 2025-10-08 01:44:56.073 > sogod[11851:11851] File NSDictionary.m: 671. In -[NSDictionary > initWithContentsOfFile:] Contents of file '/etc/sogo/sogo.conf' does not > contain a dictionary > Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11851]: > <0x0x560409ae2410[SOGoStartupLogger]> Cannot read configuration from > '/etc/sogo/sogo.conf'. Aborting > Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11780]: ...done. > Oct 08 01:44:56 host.{REDACTED}.{TLD} systemd[1]: Started sogo.service - LSB: > SOGo server. > > I'm not really sure what's meant by the lack of a dictionary (looking over > the documentation on how to setup sogo.conf, I don't think I'm missing any of > the really important config values, although it's possible I've misconfigured > one or two of them. I double-checked that the sogo user has permissions to > access the config file, with 0755 sogo:sogo perms on /etc/sogo and 0644 > sogo:sogo perms on /etc/sogo/sogo.conf. Despite having the debug values > enabled in sogo.conf, no info is getting logged to /var/log/sogo/sogo.log > (that only seems to happen when sogod runs properly). And I have no idea > what I did the other day that broke my ability to connect (I assumed the > entire time that I had an incorrect nginx config), so I'm not really sure how > to troubleshoot this problem beyond what I've already checked. So now this > thread has turned into a sogod troubleshooting attempt rather than an nginx > one. > > -- > Secured with Tuta Mail: > https://tuta.com/free-email > > > Oct 8, 2025, 03:05 by [email protected]: > >> 08.10.25, 04:02 +0200, gluonman ([email protected]): >> >>> The error appearing in /var/log/nginx/{REDACTED}.{TLD}/webmail/error.log: >>> 2025/10/07 20:53:57 [error] 923#923: *3 connect() failed (111: >>> Connection refused) while connecting to upstream, client: {REDACTED}, >>> server: mail.{REDACTED}.{TLD}, request: "GET / HTTP/1.1", upstream: >>> "http://127.0.0.1:20000/ <http://127.0.0.1:20000/>", host: "{REDACTED}" >>> >>> The error appearing in my web browser when attempting to visit the site: >>> Error code: 502 Bad Gateway >>> >> >> Looks like sogod simply isn't running. Check why / start it. >> >> -- >> Regards >> mks >> > >
