# Polkitd and sendmail issues



## max21 (Jun 14, 2018)

*About polkitd:*

This is how I do things so to preserve the old *mate-1.12.1*.  First I tar-up /usr/local and /root.  Then I copy all needed configuration files from /etc.  Then I wipe dd partition-1 and reinstall any new or old FreeBSD release so to take it from the top while preserving my favorite desktop.

I un-tar those files to the proper locations; add those save configuration files.  This has has never fail me on 8.2 - 10.2 - 11.0 - 11.1.  However, below are the result that I got at least once in the past, but for days now, I can’t remember what I had did to get rid of these errors back then.  Would anyone have an idea of what I need to do to fix this?  Giving up mate-1.12.1 is not an option like we did GNOME-2.

I'm beginning to wonder if these are really important for a system that is use as a private desktop -- not on or seen by any network other then the ISP network  with limitations.  I know dbus is neeeded by Virtualbox, expecially to match system tiime.


```
Jun 14 13:39:38 k9 kernel: Starting dbus.
Jun 14 13:39:38 k9 kernel: Unknown username "polkitd" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "polkitd" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "avahi" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "colord" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "polkit" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "haldaemon" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Unknown username "pulse" in message bus configuration file
Jun 14 13:39:38 k9 kernel: Failed to start message bus: Could not get UID and GID for username "messagebus"
Jun 14 13:39:38 k9 kernel: /etc/rc: WARNING: failed to start dbus
```



*About sendmail:*

I think I fool around with Postfix or some other tiny mail-relay with no success.  I must have left something lingering around somewhere.  If not maybe I had a difference user name way-back when.  I don’t know, Anyone have an idea about this also?

I have this in rc.conf from the beginning of time and never changed it, if not just once.

```
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
```

I just notice that I been getting this in /var/log/maillog.  Is something coming in, or is something trying to get out?  Why?

```
Jun 13 19:13:34 k9 newsyslog[558]: logfile first created
Jun 14 03:01:00 k9 sendmail[929]: gethostbyaddr(xxx.xxx.xxx.xxx) failed: 1
Jun 14 03:01:01 k9 sendmail[981]: gethostbyaddr(xxx.xxx.xxx.xxx) failed: 1
Jun 14 03:19:11 k9 sendmail[1190]: gethostbyaddr(xxx.xxx.xxx.xxx) failed: 1
Jun 14 03:19:11 k9 sendmail[1190]: STARTTLS=client: file /etc/mail/certs/host.cert unsafe: No such file or directory
Jun 14 03:19:11 k9 sendmail[1190]: STARTTLS=client: file /etc/mail/certs/host.key unsafe: No such file or directory
Jun 14 03:19:11 k9 sendmail[1190]: STARTTLS=client: file /etc/mail/certs/cacert.pem unsafe: No such file or directory
Jun 14 03:19:11 k9 sendmail[1190]: STARTTLS=client, error: load verify locs /etc/mail/certs, /etc/mail/certs/cacert.pem failed: 0
Jun 14 03:19:11 k9 sendmail[1164]: w5E3TCvR001164: from=root, size=529, class=0, nrcpts=1, msgid=<201806140319.w5E3TCvR001164@my.oil.can>, relay=root@localhost
Jun 14 03:19:11 k9 sendmail[1164]: w5E3TCvR001164: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30529, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jun 14 03:19:12 k9 sendmail[1219]: w5E3DRCE001219: from=root, size=2265, class=0, nrcpts=1, msgid=<201806140319.w5E3DRCE001219@my.oil.can>, relay=root@localhost
Jun 14 03:19:12 k9 sendmail[1219]: w5E3DRCE001219: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32265, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
```


----------



## ShelLuser (Jun 14, 2018)

The problem is that you never applied an actual solution to your problem, you merely postponed the inevitable.

Now, I have no idea what Mate is supposed to be but trying to preserve something and expect it to work while the underlying OS gets changed (sometimes drastically) is not the right approach. Also: why didn't you simply make a package out of Mate so that you could actually, well, maintain it?

Making a package is actually dead easy, look into pkg-create(8).

Anyway, there is no real solution there. Software will get compiled against libraries these days, and during upgrades those libraries change. Often they remain backwards compatible but in some cases there will be more drastic changes applied,. This is also why it is required that you rebuild all of your ports after a major OS upgrade.

(edit): Anyway, re-reading I think your issue seems somewhat simple: tried creating a messagebus account yet? Or maybe you copied /etc/passwd, installed the OS, copied it back and then expect things to work again? Because they won't, not necessarily, because there's also pwd_mkdb(8) to consider these days.

*Sendmail*

Why combine 2 problems?  That makes a thread messy IMO. Anyway, you need more than just editing /etc/rc.conf. You also need to stop the Periodic tasks and you might want to tell the system to use another Sendmail executable.

See this post of mine. I think your issue shown above is a direct result of not having edited /etc/mail/mailer.conf.


----------



## max21 (Jun 14, 2018)

ShelLuser said:


> The problem is that you never applied an actual solution to your problem, you merely postponed the inevitable.
> 
> Now, I have no idea what Mate is supposed to be but trying to preserve something and expect it to work while the underlying OS gets changed (sometimes drastically) is not the right approach. Also: why didn't you simply make a package out of Mate so that you could actually, well, maintain it?
> .



For a minute I thought you did not know why I needed to explain.  I did not know how to do all that stuff back then and who would have thought that it would stop working in the next version of the OS in the first place.  I did not.

Now that I read your complete reply I think I get it.  Anyway, I just thought it was best to keep it short (wrong Again!).

These were kernel input found in my all.log:


```
Jun 14 13:39:38 my kernel: Starting dbus.
Jun 14 13:39:38 my kernel: Unknown username "polkitd" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "polkitd" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "avahi" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "colord" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "polkit" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "haldaemon" in message bus configuration file
Jun 14 13:39:38 my kernel: Unknown username "pulse" in message bus configuration file
Jun 14 13:39:38 my kernel: Failed to start message bus: Could not get UID and GID for username "messagebus"
Jun 14 13:39:38 my kernel: /etc/rc: WARNING: failed to start dbus
```

This is all rest about it found in my all.log - - excluding dates and username as above:

```
VT: Replacing driver "vga" with new "fb".
info: [drm] Initialized radeon 2.29.0 20080528 for drmn0 on minor 0
libupower-glib-WARNING: Couldn't connect to proxy: Could not connect: No such file or directory
WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
WARNING: Unable to find provider '' of required component 'dock'
gnome-keyring-daemon[903]: The Secret Service was already initialized
gnome-keyring-daemon[903]: The Secret Service was already initialized
gnome-keyring-daemon[903]: The SSH agent was already initialized
gnome-keyring-daemon[903]: The SSH agent was already initialized
gnome-keyring-daemon[903]: The PKCS#11 component was already initialized
gnome-keyring-daemon[903]: The PKCS#11 component was already initialized
mate-session[889]: GLib-GObject-WARNING: g_object_get_valist: object class 'UpClient' has no property named 'can-suspend'
mate-session[889]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
mate-session[889]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
```

I got to have everything to come-back and the inevitable way works for me and when that don't work anymore like Windows updates did for Netscape and others, I'll keep that last version of FreeBSD until quantum arrive or if the entire internet get screwed-up by some browser that require Update-900 forcing me to update my desktop to GNONE-99 or KDE.  I need nothing specical above what can be done with yesterday technology, 2008 +, and only quantum can change that, not x86-512.  Anything else is only trying to keep up with the un-needed crap already created.  btw: I  think I blew my change to create a package for mate-1.xx because I deleted everything in /var/cache/pkg long ago for needed space.  Now anything I install know nothing of what was install previously.  Never had an issue so far.  I just missed something this time and I did downgrade to 11.0 so I can SVN new to 11.2.  Other then that FreeBSD pkg will force an upgrade to the desktop, _guaranteed_., and you will never find mate-1.xx and all of it dependencies just like Gnome-2, ever again.  See ya!

Thanks ShelLuser


----------



## max21 (Jun 15, 2018)

Now I know where I went wrong.  I used freebsd-update - upgrade since 10.1 all the way up to 11.1. I never deleted the old lib when I did buildworld so that’s what been keeping my old mate-desktop ticking without these warning.  I forgot about this.  It been a long time.

Now all of a sudden, I want to clean things up and get rid of those old libraries by doing a pure install of 11.0 to be ready for 11.2.  Anyway, all I had to do was to set dbus_enable="NO" --  and now I get no more warning whatsoever.  All of my VM’s works!  They have sound, accurate time, etc.  All those other functions such as avahi and hald I never activated them anyway.  FreeBSD itself had nothing to do with my issues, so I’m sorry that I spoke a little harsh.  Being a geek-want-to-be, I crack whenever I have a problem before any new release or update, in fear that my desktop will not survive and sometime it don’t so I stay put until the next release or update!  I don’t expect anyone to understand these words but that’s the way it is.  I’m just surprise that disabling dbus was all it took and it did not hurt anything but my feeling.  It always something new everyday.  At least I got the chance to investigate those warning at a latter date.  I'll work on the suggest solutions for sendmail for now.  Thanks again ShelLuser


----------



## ShelLuser (Jun 15, 2018)

max21 said:


> FreeBSD itself had nothing to do with my issues, so I’m sorry that I spoke a little harsh.  Being a geek-want-to-be, I crack whenever I have a problem before any new release or update, in fear that my desktop will not survive and sometime it don’t so I stay put until the next release or update!


Don't sweat it, no need to be sorry. As much as most love FreeBSD I'm sure many of us would be lying if we said that we never cursed it too at some times   Not me of course, I don't do that 

More seriously: happy to hear you managed to fix it, thanks for the update!


----------

