Solved Sendmail stopped working due to invalid symlink

JosKlever

Verified User
Joined
Jun 7, 2015
Messages
60
This weekend the websites on my server couldn't send emails anymore. Wtih some tests I found out that this goes via /etc/sbin/sendmail, so I checked it.
Code:
[root@...]# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 9 Aug  7 08:59 /usr/sbin/sendmail -> /etc/exim

However /etc/exim doesn't exist. Via internet I found that it should be a different path, so I did:
Code:
[root@...]# ln -s /usr/sbin/sendmail exim
ln: failed to create symbolic link 'exim': File exists
[root@...]# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Aug  8 11:01 /usr/sbin/sendmail -> /etc/alternatives/mta

It's working again now, but I don't understand how it was caused en if this is the correct solution. Can anyone help me with this?
My system: dedicated server, AlmaLinux 8.6, DA 1.642, Custombuild 2917
As it looks like it started yesterday at the moment updated DA from 1.641 to 1.642
 
It's been fixed in rev. 2921. Thank you for the report!
 
Just bumped into this too and tracked it down to the same.
Thanks Martynas for the quick fix.

FWIW @JosKlever you have your link parameters reversed.

it's
Code:
cd /usr/sbin
ln -s exim sendmail
 
Thanks @smtalk for the quick fix!
How can I update CB naar 2921 (without waiting for the autoupdate)?

@wila I've used commands I found as solution in (probably some older) forum topics, so I thought it was safe ;)
I'll wait if the CB update will fix it, before trying to break things again. But thanks for the tip! :)
 
I found the update under Extra Features - CustomBuild 2.0 - CustomBuild Functions - Update CustomBuild script and packages.

Is it correct that the symlink didn't change with this update?
Code:
lrwxrwxrwx 1 root root 21 Aug  8 11:01 /usr/sbin/sendmail -> /etc/alternatives/mta
 
Tried updating, still the same here on 2921:
lrwxrwxrwx 1 root root 21 8 aug 14:09 /usr/sbin/sendmail -> /etc/alternatives/mta
 
Tried updating, still the same here on 2921:
lrwxrwxrwx 1 root root 21 8 aug 14:09 /usr/sbin/sendmail -> /etc/alternatives/mta
 
Back
Top