# Starting base sendmail requires older version of libraries



## drhowarddrfine (Jun 6, 2020)

```
ld-elf.so.1: Shared object "libicuuc.so.64" not found, required by "sendmail"
/etc/rc.d/sendmail: WARNING: failed to start sendmail
```

I have a laptop I use for playing around with code on and realized I never had *base* sendmail running on it. I did 
	
	



```
service sendmail onestart
```
 and received that error. 

My library version is libicuuc.so.67. Putting a symlink in for that only causes another issue wanting libssl.so.something else. 

So I don't recall what to do about that.


----------



## a6h (Jun 7, 2020)

drhowarddrfine said:


> Putting a symlink in for that only causes another issue wanting libssl.so.something else


I hope i didn't miss the point, by symlink, do you mean `ln -s` or libmap.conf(5)?
"libicuuc.so.61" not found, required by ...


----------



## drhowarddrfine (Jun 7, 2020)

vigole `ln -s`


----------



## Mjölnir (Jun 8, 2020)

This is no explanation for the genuine issue, but can avoid all issues related to sendmail(8):

If you do not need a "real" MTA installation, but a "client-only" configuration to receive mail locally and send mail upstream, you might consider using dma(8) instead of sendmail(8).
It's in the base, so all you have to do is adjusting the settings in /etc/dma/dma.conf and change /etc/mail/mailer.conf

```
sendmail        /usr/libexec/dma
mailq           /usr/libexec/dma
newaliases /usr/libexec/dma
hoststat /usr/libexec/dma
purgestat /usr/libexec/dma
```


----------



## SirDice (Jun 8, 2020)

drhowarddrfine said:


> I have a laptop I use for playing around with code on and realized I never had *base* sendmail running on it.


How do you update that machine? Using the source? Did you disable sendmail in src.conf? If you've never ran `make delete-old` then the sendmail that was  originally installed as part of the base never got removed. Subsequent updates would then never update it and you're left with stale executables.

Or maybe you once installed mail/sendmail? And only partially removed it? Because the base sendmail doesn't depend on libicuuc.so:

```
dice@maelcum:~ % freebsd-version -uk
12.1-STABLE
12.1-STABLE
dice@maelcum:~ % ldd /usr/sbin/sendmail
/usr/sbin/sendmail:
        libutil.so.9 => /lib/libutil.so.9 (0x80024c000)
        libc.so.7 => /lib/libc.so.7 (0x800264000)
```

Nothing from the base OS would ever depend on external libraries (libicuuc.so is installed by devel/icu).


----------



## drhowarddrfine (Jun 8, 2020)

SirDice The answer is no to all your questions and I only used `freebsd-update`. I am not familiar with `make delete-old` so perhaps that is the solution? 

I, too, was curious as to why devel/icu was required. I think I might have installed mail/postfix at one time or possibly some other mail program but I never installed sendmail from ports (as if I would really remember for sure).


----------



## SirDice (Jun 8, 2020)

drhowarddrfine said:


> I am not familiar with `make delete-old` so perhaps that is the solution?


No, that  really should only be done if you build from source. It's part of the build(7) process.



drhowarddrfine said:


> I, too, was curious as to why devel/icu was required. I think I might have installed mail/postfix at one time or possibly some other mail program but I never installed sendmail from ports (as if I would really remember for sure).


mjollnir hinted at this,  look in /etc/mail/mailer.conf. This file is used to 'translate' from sendmail to any other mailer. I'm almost certain there's something in yours  pointing to some old files. The default  should look like this:

```
# $FreeBSD: stable/12/etc/mail/mailer.conf 327236 2017-12-27 06:23:50Z delphij $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
sendmail        /usr/libexec/sendmail/sendmail
mailq           /usr/libexec/sendmail/sendmail
newaliases      /usr/libexec/sendmail/sendmail
hoststat        /usr/libexec/sendmail/sendmail
purgestat       /usr/libexec/sendmail/sendmail
```


----------



## drhowarddrfine (Jun 8, 2020)

SirDice  Yes, that's what I've got.


----------



## SirDice (Jun 8, 2020)

Ok. What does `ldd /usr/libexec/sendmail/sendmail` and `ldd /usr/sbin/sendmail`  tell you?


----------



## drhowarddrfine (Jun 8, 2020)

```
/usr/libexec/sendmail/sendmail:
    libutil.so.9 => /lib/libutil.so.9 (0x8002f8000)
    libssl.so.111 => /usr/lib/libssl.so.111 (0x80030f000)
    libcrypto.so.111 => /lib/libcrypto.so.111 (0x8003a7000)
    libwrap.so.6 => /usr/lib/libwrap.so.6 (0x800696000)
    libc.so.7 => /lib/libc.so.7 (0x8006a2000)
    libthr.so.3 => /lib/libthr.so.3 (0x800a9b000)

/usr/sbin/sendmail:
    libutil.so.9 => /lib/libutil.so.9 (0x800249000)
    libc.so.7 => /lib/libc.so.7 (0x800260000)
```


----------



## SirDice (Jun 8, 2020)

So, no libicuuc.so there. In other words, it's not sendmail that's doing this. Does `sysrc sendmail_program`  output anything?


----------



## drhowarddrfine (Jun 8, 2020)

sysrc: unknown variable 'sendmail_program'


----------



## SirDice (Jun 8, 2020)

Ok,  that's correct. You can set that variable to run something else instead of sendmail(8). Which would look like you're starting sendmail through /etc/rc.d/sendmail. That really leaves /etc/rc.d/sendmail itself or any of the *.cf files in /etc/mail/ that loads something that generates that library error. 

I'm starting to  grasp at straws here, but does `sh -x /etc/rc.d/sendmail onestart` provide any useful information? It's  going to produce a truckload of output though. So you may want to use script(1) to capture it.


----------



## drhowarddrfine (Jun 8, 2020)

You're right, I get a lot of stuff to sift through. I'm tearing out a fireplace while we're talking. I'll sift through this later but nothing jumped out at me right away.


----------



## Jose (Jun 8, 2020)

drhowarddrfine said:


> I, too, was curious as to why devel/icu was required. I think I might have installed mail/postfix at one time or possibly some other mail program but I never installed sendmail from ports (as if I would really remember for sure).


Postfix does not require ICU, at least if built with the default options.


----------

