Monday, May 02, 2022

Re: rspamd and pyzor

Am 02.05.22 19:06 schrieb kasak:
> Hello misc!
>
> I have some information for rspamd users, and one question.
>
> As you may know, rspamd not using pyzor by directly calling pyzor binary.
>
> Instead, they say, you need to create special systemd socket, and call pyzor
> through it.
>
> It is described on rspamd manuals:
> https://rspamd.com/doc/modules/external_services.html#pyzor-specific-details
>
> OpenBSD does not has systemd, but it has inetd.
>
> This is simple way to create socket similar to systemd:
>
> 127.0.0.1:5953    stream    tcp    nowait    root /usr/local/bin/pyzor   
> pyzor check
>
> It actually works, but you may notice, that i'm using "root" here.
>
> I've tried to use _rspamd user, but for some reason it drops an error
>
> rspamd[90054]: <9ef568>; lua; pyzor.lua:134: error parsing response: ERROR
> [Errno 13] Permission denied: '/root/.pyzor'.\\0a
>
> Can somebody explain to me, what is happening here? Why socket, runned as
> _rspamd try to access root home instead of _rspamd home ?

I don't know what this pyzor so I became curious and take a look...
Their doc say clearly that default homedir is ~/.pyzor
So if your instance of pyzor tries to access /root/.pyzor than it is a
strong indication that you are running pyzor as root, no?

To debug this I would suggest to start pyzor manually with the user you
want it to run (see su(1)).
It's been ages ago when I used inetd thats why I cant help with that.
But are you sure that you need it for pyzor?!?!?!?

No comments:

Post a Comment