# Not sure how to integrate senderscore and rspamd with opensmtpd on FreeBSD ..



## absduser (Jul 15, 2020)

I am running Opensmtpd on FreeBSD 12.1 and it is working well.

However, I had to comment out these two lines from my smtpd.conf:


```
filter senderscore proc-exec "/usr/local/libexec/opensmtpd/opensmtpd-filter-senderscore -blockBelow 10 -junkBelow 70 -slowFactor 5000"
filter rspamd proc-exec "/usr/local/libexec/opensmtpd/opensmtpd-filter-rspamd"
```

... because smtpd would start, but then immediately exit upon processing the first piece of mail.  Two pages of golang faults.

I have two initial questions here ...

First, do those two config lines, where I explicitly call the full path of the filter, look correct ?

Second, if rspamd is running as a persistent daemon from /etc/rc.conf:


```
rspamd_enable="YES"
```

... and I see it in the process list:


```
rspamd  76654  0.0  0.1 88660 49388  -  SsJ  Thu23   0:06.25 rspamd: main process (rspamd-2.4)
rspamd  78433  0.0  0.1 88660 49396  -  SJ   Thu23   0:01.97 rspamd: rspamd_proxy process (localhost:11332) (rspamd-2.4)
rspamd  78868  0.0  0.1 85836 48228  -  SJ   Thu23   0:27.14 rspamd: controller process (localhost:11334) (rspamd-2.4)
rspamd  80464  0.0  0.1 88688 49428  -  SJ   Thu23   0:20.26 rspamd: normal process (localhost:11333) (rspamd-2.4)
rspamd  80918  0.0  0.1 88688 49428  -  SJ   Thu23   0:20.21 rspamd: normal process (localhost:11333) (rspamd-2.4)
rspamd  81154  0.0  0.1 88688 49428  -  SJ   Thu23   0:20.26 rspamd: normal process (localhost:11333) (rspamd-2.4)
rspamd  81944  0.0  0.1 88688 49428  -  SJ   Thu23   0:20.20 rspamd: normal process (localhost:11333) (rspamd-2.4)
```

why am I *also* calling it to fire off on every piece of mail in smtpd.conf?  Is it correct to run it as a daemon *and also* call it per-email in smtpd.conf:


```
filter rspamd proc-exec "/usr/local/libexec/opensmtpd/opensmtpd-filter-rspamd"
```

Thanks.


----------



## absduser (Jul 26, 2020)

I continue to struggle with this ... every tutorial on opensmtpd with senderscore has, basically, the same config line that I have ... although they do not call it by the full path:

/usr/local/libexec/opensmtpd/opensmtpd-filter-senderscore

... and they call it simply "senderscore" which I think is how it must be installed on OpenBSD ...

I can run it on its own:

/usr/local/libexec/opensmtpd/opensmtpd-filter-senderscore

(and then just hit ctrl-D to exit)

... so it appears to run just fine, without errors ... it just can't run from opensmtpd using the standard config line that everyone else uses.

Errors give no clue.  Just golang exceptions and faults with no clues or hints ...


----------



## kjvbrt (Nov 11, 2020)

Hello,

I run into similar problem, and managed to run opensmtpd without errors using:

```
filter senderscore proc-exec "opensmtpd-filter-senderscore -blockBelow 10 -junkBelow 70 -slowFactor 5000"
filter rspamd proc-exec "opensmtpd-filter-rspamd"
```


----------

