albertito / chasquid

SMTP (email) server with a focus on simplicity, security, and ease of operation [mirror]

Home Page:https://blitiri.com.ar/p/chasquid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpamAssassin integration in Ubuntu 16.04 needs adjustment

kjarex opened this issue · comments

This is not necessarily an issue (but could be) but more of a hint for anyone who struggles with spamc not being able to connect to spamd.

At least on Ubuntu SpamAssassin comes (at least on 16.04, don't know how it is with newer versions) per default set up to use a socket. But that's something chasquid seems not to expect and therefor spamc will fail.
The call of spamc in the post-data hook (in the chasquid configs) needs to be adjusted accordingly --socket /YourSocketPath).

As I said, this was meant primarily for anyone who runs into the same problem, so they don't have to figure it all out themselves.

BUT maybe just as an idea: since chasquid anyways checks whether spamc exists - maybe check whether spamd is running and if so on which port/socket and adjust the call automatically. I don't know how easy this can be done to work on all of the supported platforms (does netstat look everywhere the same? does spamc even call necessarily spamd or could it also call other daemons, or is spamd even called on every system spamd?)

Thanks for reporting this!

I generally aim for the default hook to be useful out of the box at least on the latest Debian stable and Ubuntu LTS, so I'm happy to make adjustments as needed. That said, Ubuntu 16.04 is ~6 years old at this point so it may be a bit too old to justify complex changes :(

I'm going to try the default post-data hook on the last two Ubuntu LTS releases (22.04 and 20.04), to check that it still works reasonably out of the box.

If you don't mind me asking, what's keeping you on Ubuntu 16.04?

Thanks again!

so it may be a bit too old to justify complex changes

That's absolutely fine. Actually, even if it was the current version, I don't see an absolute need for changes. I really only opened the issue just so it's there to find for anyone who runs also into it, so they don't have to figure out which component causes the issue or where to fix it. The error one receives is about spamc not being able to connect to spamd, so it's not too obvious that it can be fixed quickly by adjusting one line of a chasquid file.

If you don't mind me asking, what's keeping you on Ubuntu 16.04?

It hosts just my private stuff, so should there be any downtime as a consequence it would be no big deal (at least no bigger deal than an upgrade). And as Ubuntu still serves security fixes till 2026(I think?) I'm not concerned about security either. I'll upgrade eventually.

so it may be a bit too old to justify complex changes

That's absolutely fine. Actually, even if it was the current version, I don't see an absolute need for changes. I really only opened the issue just so it's there to find for anyone who runs also into it, so they don't have to figure out which component causes the issue or where to fix it. The error one receives is about spamc not being able to connect to spamd, so it's not too obvious that it can be fixed quickly by adjusting one line of a chasquid file.

Thanks, much appreciate it!

If you don't mind me asking, what's keeping you on Ubuntu 16.04?

It hosts just my private stuff, so should there be any downtime as a consequence it would be no big deal (at least no bigger deal than an upgrade). And as Ubuntu still serves security fixes till 2026(I think?) I'm not concerned about security either. I'll upgrade eventually.

Great, thanks for explaining in more detail. The context is very informative hopefully it helps me make better decisions :)

I couldn't think of any good reason why Ubuntu would switch from socket to port (nor vice versa) as one is probably as good as the other. So I checked the packages of the newer Ubuntu versions, but indeed they seem to use ports. So I checked the xenial/16.04 package again, and to my surprise it doesn't seem to use a socket either.

So I apologise for the hassle and guess you can just close this. While I still have no idea how I ended up with the setting to use sockets. I know I didn't set this up myself intentionally/ knowingly, but it very much seems to be the result of some of my own actions but obviously not a default setting.

So never mind, but 'Sorry' for all of this.

Thanks for checking!

And nothing to be sorry about, I really appreciate the report in any case :)