Error when removing Sendmail packages in Solaris 11.2


 
Thread Tools Search this Thread
Operating Systems Solaris Error when removing Sendmail packages in Solaris 11.2
# 1  
Old 03-25-2015
Oracle Error when removing Sendmail packages in Solaris 11.2

Hi,

I would like to completely remove the Sendmail packages from Solaris 11.2. I know how to disable Sendmail but as stated, I would like the packages to be removed from the system. I tried to remove the two packages (SUNWsndmu and SUNWsndmr) by using pkgrm. It doesn't work that well because I get:
Code:
root@solaris:~# pkgrm SUNWsndmu

The following package is currently installed:
   SUNWsndmu  Sendmail (/usr)
              (i386) 11.11,REV=2009.11.11

Do you want to remove this package? [y,n,?,q] y
pkgrm: ERROR: unable to change current working directory to </var/sadm/pkg/SUNWsndmu/install>

Removal of <SUNWsndmu> failed (internal error).
No changes were made to the system.

The same goes for the other package SUNWsndmr. I looked in the file system:
Code:
root@solaris:~# ls -l /var/sadm/pkg/SUNWsndmu/install
/var/sadm/pkg/SUNWsndmu/install: No such file or directory

I have tried the above on two fresh Solaris 11.2 installs (on different hardware) and in a virtual machine. All the same. I have used the Solaris 11.2 x86 text installer ISO (md5sum: c09f40ed91d43b0adf109c124154a2b4 sol-11_2-text-x86.iso).

Can someone please help me out with removing the Sendmail packages?

Background info on why I would like to uninstall Sendmail:
I am going to run the Solaris box as a file server (will use ZFS with it's included encryption) and I would like to get email notifications from scripts, cron jobs etc. On Linux I have been using sSMTP (a simple MTA) for many years. It is very light weight and simple and I only need to _send_ emails (using e.g. gmail servers as relay) so sSMTP is enough for me. I have managed to compile sSMTP for Solaris and it works fine when called manually from scripts etc. but I would like it to also send system emails e.g. from cron jobs. But when e.g. a cron job tries to send an email it will start Sendmail although I have disabled sendmail through:
Code:
root@solaris:~# svcadm disable svc:/network/sendmail-client:default
root@solaris:~# svcadm disable svc:/network/smtp:sendmail
root@solaris:~# svcs -a | grep -i send
disabled       20:36:34 svc:/network/smtp:sendmail
disabled       20:36:37 svc:/network/sendmail-client:default
root@solaris:~# ps aux | grep -i send
root      2292  0.0  0.1 8612 3044 pts/1    S 21:57:05  0:00 grep -i send

The above looks fine BUT when the cron job tries to send the email it starts Sendmail (instead of sSMTP):
Code:
root@solaris:~# ps aux | grep send
mike      2282  0.0  0.1 5096 2536 ?        S 21:56:00  0:00 /usr/lib/sendmail
root      2286  0.0  0.1 8612 3044 pts/1    S 21:56:08  0:00 grep send

I do not receive any email (to my external address e.g. someone@gmail.com) since I have not configured Sendmail. sSMTP (that is configured) does not seem to be run for system emails (e.g. cron job emails).

I have changed the symbolic link /usr/sbin/sendmail so:
Code:
root@solaris:~# ls -l /usr/sbin/sendmail
lrwxrwxrwx   1 root     root           5 Mar 25 00:20 /usr/sbin/sendmail -> ssmtp
root@solhp:~# which ssmtp
/usr/sbin/ssmtp

Still /usr/lib/sendmail is started.

So that is the reson I would like to completely remove Sendmail from the system.

If anyone has a solution to my problem (with or without removing Sendmail from the system) feel free to tell me. The only thing I want is to let sSMTP handle the sending of system emails, e.g. notifications, cron job email etc.

Thank you very much in advance!

BR,
tubiman
# 2  
Old 03-25-2015
The main issue is you are running a legacy SVR4 packaging command which is only supported to handle legacy packages which sendmail is not.

The supported way to remove a Solaris package under Solaris 11 and newer is:
Code:
pkg uninstall <package> ...

In that particular case, you would also need to remove the smtp-notify package which depends on sendmail.

You can run this command to see if no other dependency is present on you machine:
Code:
# pkg uninstall -n sendmail smtp-notify

Note that the -n tell pkg not to actually remove any package (trial run)

If you are fine with removing sendmail, simply run the command without the -n option.
Code:
# pkg uninstall sendmail smtp-notify

This User Gave Thanks to jlliagre For This Post:
# 3  
Old 03-25-2015
jlliagre, you solved my problem! Smilie

Thank you very much!

./t
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to install .p51 packages in Solaris 11.4?

Does anyone know how to install a package that comes in a p5i file in Solaris 11.4? The first thing the Oracle documentation says is to "launch packagemanager". Well they removed packagemanager from 11.4 (and you can't install it yourself). I want a package from... (7 Replies)
Discussion started by: Michele31416
7 Replies

2. Solaris

Solaris 10 packages

Hi all, Does anyone know where you can get solaris 10 packages these days? It seems that sunfreeware have now started charging you to download them, which is good. I have found opencsw, but that seems to rely on you hooking the machine into the interenet and at the moment I am trying to... (3 Replies)
Discussion started by: callmebob
3 Replies

3. Solaris

Installing packages in Solaris 11

I want to install EMCpower (EMC Powerpath package) in Solaris 11. At most of the places, I can see procedure to install packages which comes with repository. This is third party tool, I have downloaded it to /var/tmp. How should I install it ? root@orapdps11 # pkg publisher PUBLISHER ... (4 Replies)
Discussion started by: solaris_1977
4 Replies

4. Solaris

Solaris 10 - removing packages when files have been deleted

Is there any way to do this? Files/directory have been deleted but pkginfo reports the packages still there. Is there any way to clean this out? (2 Replies)
Discussion started by: paulfoel
2 Replies

5. UNIX for Dummies Questions & Answers

Solaris packages and installation query

Hi, Need a small help Bash$> pkginfo | grep -i compress system SUNWbzip The bzip compression utility system SUNWgzip The GNU Zip (gzip) compression utility system SUNWzip The Info-Zip (zip)... (9 Replies)
Discussion started by: mohtashims
9 Replies

6. Solaris

Solaris 10 packages

can one install packages from different Solaris 10 subversion on a SPARC? (if we don't have the install media for exact same Solaris10.) (3 Replies)
Discussion started by: orange47
3 Replies

7. Solaris

failsafe removing packages

hey i need to remove a package has my system will not boot up now. when i go into failsafe and mount the root onto /a if i run pkgrm -R /a SUNWvolu it says it does no exist, i een tried to pkginfo -R /a to see if i could see any packages, but it no packages are returned. as failsafe is... (1 Reply)
Discussion started by: dshakey
1 Replies

8. Solaris

Gnome Packages on Solaris 10 u6

If my system is supposed to be a pure oracle database server can i remove all the GNOME packages from the system ? Currently system is installed with Everything+OEM and i want the image to be as small as possible remove the unnecessary softwares from it so that its a master image for other servers.... (2 Replies)
Discussion started by: fugitive
2 Replies

9. Solaris

pkgrm without removing the dependent packages

Hi all, Is there any option to remove a package without removing the dependent packages.... ie, i need to remove a package, while trying to remove by using pkgrm command it says as some dependent packages also will get removed, i dont want to remove those dependent packages. (1 Reply)
Discussion started by: judi
1 Replies

10. Solaris

Solaris 8 Packages necessary for Floppy Access

I'm a newbie to Unix, but am working with some people that are more knowledgable than I, and we're all stumped. We are working to secure (Information Assurance) a Command & Control System that uses a Solaris 8 Application server. As part of this process, we are attempting to minimize the... (0 Replies)
Discussion started by: roygoodwin
0 Replies
Login or Register to Ask a Question