# what broke my spamdb config?



## cbrace (Oct 24, 2016)

Hi all,

After upgrading to v11.0, mail/spamd wouldn't start, and returned the following error message:

```
spamdb: Can't find service "spamd-sync" in /etc/services
```
DDG returned precisely ONE hit for this: spamd-setup: cannot find service "spamd-cfg" in /etc/services

Which fortunately provided the answer. When I added the following three lines to /etc/services, spamd started as normal:

```
spamd           8025/tcp                # spamd(8)
spamd-sync      8025/udp                # spamd(8) synchronisation
spamd-cfg       8026/tcp                # spamd(8) configuration
```
Any thoughts about what happened here?


----------



## ANOKNUSA (Oct 25, 2016)

There are no "spamd" entries in /etc/services in 10.3-RELEASE, either. Just to get this out of the way: you reinstalled all your ports/packages after upgrading the system, correct?


----------



## kpa (Oct 25, 2016)

The spamd entries in services(5) are supposed to be added by the port or package installation, if they are not the port is broken and needs to be fixed.

Edit: The other possibility is that your upgrade didn't process the custom entries in services(5) as it should have. If you used freebsd-update(8) the problem is in that tool. If you used the source based upgrade you probably didn't use mergemaster(8) properly.


----------



## cbrace (Oct 25, 2016)

First, I renamed the thread since clearly v11.0 didn't break anything.

Second, I rebuilt all my ports using ports-mgmt/synth. I just checked its logs, and it did upgrade spamd.

It is possible that when I ran freebsd-update I didn't pay attention closely when mergemaster was invoked to manage a couple of config files. Perhaps this is what happened?

I wonder though why the port didn't re-add the /etc/services entries when it was rebuilt...


----------



## SirDice (Oct 25, 2016)

No port will ever edit files in /etc/, it's basically off-limits for third party software. I have spamd running on 10.3-RELEASE and those entries are not there.


----------



## cbrace (Oct 25, 2016)

This is puzzling. On my freshly upgraded system, as I indicated at the top, spamd wouldn't start without those entries :/


----------



## SirDice (Oct 25, 2016)

Well, mine only opens a file socket, I have no use for an open network port. So it may be something in your configuration.


----------



## ANOKNUSA (Oct 26, 2016)

SirDice said:


> No port will ever edit files in /etc/, it's basically off-limits for third party software.



There's definitely an option for mail/opensmtpd to rewrite /etc/mail/mailer.conf automatically. It's turned off by default, though. In any case, there's no such option for mail/spamd.


----------



## kpa (Oct 26, 2016)

For custom users and groups the ports(7) system has a mechanism and that one does modify /etc files directly:

https://www.freebsd.org/doc/en/books/porters-handbook/users-and-groups.html

I couldn't find anything related for services(5) so it looks like every port has their own hack to add the custom entries to /etc/services if needed.


----------

