Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #199446 > unrolled thread

Cannot Install/Uninstall sendmail

Started byLuis Finotti <luis.finotti@gmail.com>
First post2018-08-27 18:40 +0200
Last post2018-08-28 17:00 +0200
Articles 10 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  Cannot Install/Uninstall sendmail Luis Finotti <luis.finotti@gmail.com> - 2018-08-27 18:40 +0200
    Re: Cannot Install/Uninstall sendmail David Wright <deblis@lionunicorn.co.uk> - 2018-08-28 15:10 +0200
      Re: Cannot Install/Uninstall sendmail Luis Finotti <luis.finotti@gmail.com> - 2018-08-28 15:20 +0200
        Re: Cannot Install/Uninstall sendmail David Wright <deblis@lionunicorn.co.uk> - 2018-08-28 15:50 +0200
          Re: Cannot Install/Uninstall sendmail Luis Finotti <luis.finotti@gmail.com> - 2018-08-28 15:50 +0200
            Re: Cannot Install/Uninstall sendmail David Wright <deblis@lionunicorn.co.uk> - 2018-08-28 16:30 +0200
              Re: Cannot Install/Uninstall sendmail Luis Finotti <luis.finotti@gmail.com> - 2018-08-28 16:50 +0200
                Re: Cannot Install/Uninstall sendmail Jonathan Dowland <jmtd@debian.org> - 2018-08-29 13:00 +0200
                  Re: Cannot Install/Uninstall sendmail Erik Christiansen <dvalin@internode.on.net> - 2018-08-29 13:50 +0200
            Re: Cannot Install/Uninstall sendmail Cindy-Sue Causey <butterflybytes@gmail.com> - 2018-08-28 17:00 +0200

#199446 — Cannot Install/Uninstall sendmail

FromLuis Finotti <luis.finotti@gmail.com>
Date2018-08-27 18:40 +0200
SubjectCannot Install/Uninstall sendmail
Message-ID<wrsIx-r1-11@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi everyone,

I'm having trouble installing/removing sendmail in Debian Sid (well,
aptosid -- http://www.aptosid.com -- actually).

I tried to install and it failed: https://pastebin.com/Qu2jRqsn

'apt -f install' did not fix it, nor did 'dpkg --configure -a'.

Since it was not essential (and did not install correctly), I tried to
uninstall it, but it also fails:

-------------------------
# apt remove procmail sendmail sendmail-base sendmail-bin sendmail-cf
sensible-mda
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  procmail sendmail sendmail-base sendmail-bin sendmail-cf sensible-mda
0 upgraded, 0 newly installed, 6 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 4,213 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 1537409 files and directories currently installed.)
Removing sendmail (8.15.2-11) ...
Removing sensible-mda (8.15.2-11) ...
Removing sendmail-bin (8.15.2-11) ...
Removing sendmail-base (8.15.2-11) ...
update-inetd: error: --group is only relevant with --add
dpkg: error processing package sendmail-base (--remove):
 installed sendmail-base package pre-removal script subprocess returned
error exit status 255
Removing procmail (3.22-26) ...
Removing sendmail-cf (8.15.2-11) ...
Errors were encountered while processing:
 sendmail-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
--------------------------------

One notices in the failed install attempt (the pastebin link above):

--------------------------
adduser: Warning: The home directory `/var/lib/sendmail' does not belong to
the user you are currently creating.
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
--------------------------

I had:
--------------------------
# ls -ld /var/lib/sendmail
drwx------ 2 smmta smmta 4096 Aug 22 15:06 /var/lib/sendmail/
--------------------------

Changing ownership to root did not allow me to uninstall it.

Aptosid itself does not come with a mail daemon installed, so I must have
installed at some point some daemon that created the /var/lib/sendmail.
(If I were to try to install again, I'd probably opt for a lighter
alternative, something like ssmtp.  So, right now, I just want to remove
sendmail.)  So, I have sendmail-base stuck as not fully installed.

It was recommended I install 'openbsd-inetd' (it was not installed, neither
was xinetd), but it still fails to install: https://pastebin.com/sStYqMYi
(I also still cannot uninstall it...)

Any help would be greatly appreciated!

[toc] | [next] | [standalone]


#199483

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-08-28 15:10 +0200
Message-ID<wrLUS-3ta-11@gated-at.bofh.it>
In reply to#199446
On Mon 27 Aug 2018 at 12:38:42 (-0400), Luis Finotti wrote:
> Hi everyone,
> 
> I'm having trouble installing/removing sendmail in Debian Sid (well,
> aptosid -- http://www.aptosid.com -- actually).

Perhaps their forums might help.

> I tried to install and it failed: https://pastebin.com/Qu2jRqsn
> 
> 'apt -f install' did not fix it, nor did 'dpkg --configure -a'.
> 
> Since it was not essential (and did not install correctly), I tried to
> uninstall it, but it also fails:

[…]

> One notices in the failed install attempt (the pastebin link above):
> 
> --------------------------
> adduser: Warning: The home directory `/var/lib/sendmail' does not belong to
> the user you are currently creating.
> update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
> --------------------------
> 
> I had:
> --------------------------
> # ls -ld /var/lib/sendmail
> drwx------ 2 smmta smmta 4096 Aug 22 15:06 /var/lib/sendmail/
> --------------------------
> 
> Changing ownership to root did not allow me to uninstall it.

What's the output from this attempt?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#199485

FromLuis Finotti <luis.finotti@gmail.com>
Date2018-08-28 15:20 +0200
Message-ID<wrM4x-3wj-1@gated-at.bofh.it>
In reply to#199483

[Multipart message — attachments visible in raw view] — view raw

Firstly, thanks for the reply!

On Tue, Aug 28, 2018 at 9:04 AM David Wright <deblis@lionunicorn.co.uk>
wrote:

> On Mon 27 Aug 2018 at 12:38:42 (-0400), Luis Finotti wrote:
> > Hi everyone,
> >
> > I'm having trouble installing/removing sendmail in Debian Sid (well,
> > aptosid -- http://www.aptosid.com -- actually).
>
> Perhaps their forums might help.
>

I tried:
http://www.aptosid.com/index.php?name=PNphpBB2&file=viewtopic&p=18661#18661

I've got some of the hints that I mentioned I've tried already from them.


>
> > I tried to install and it failed: https://pastebin.com/Qu2jRqsn
> >
> > 'apt -f install' did not fix it, nor did 'dpkg --configure -a'.
> >
> > Since it was not essential (and did not install correctly), I tried to
> > uninstall it, but it also fails:
>
> […]
>
> > One notices in the failed install attempt (the pastebin link above):
> >
> > --------------------------
> > adduser: Warning: The home directory `/var/lib/sendmail' does not belong
> to
> > the user you are currently creating.
> > update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
> > --------------------------
> >
> > I had:
> > --------------------------
> > # ls -ld /var/lib/sendmail
> > drwx------ 2 smmta smmta 4096 Aug 22 15:06 /var/lib/sendmail/
> > --------------------------
> >
> > Changing ownership to root did not allow me to uninstall it.
>
> What's the output from this attempt?
>

Here it is:

--------------------------------
# ls -ld /var/lib/sendmail/
drwx------ 2 root root 4096 Aug 22 15:06 /var/lib/sendmail/

# apt remove sendemail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'sendemail' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up sendmail-base (8.15.2-11) ...
Usage: update-inetd [<option>...] <command> <argument>

Commands:
  --add <entry-line>              add <entry-line>
  --remove <entry-regex>          remove <entry-regex>
  --enable <service>[,...]        enable <service> (comma-separated list)
  --disable <service>[,...]       disable <service> (comma-separated list)

Options:
  --group <group-name>            add entry to section <group-name>
  --pattern <pattern>             use <pattern> to select a service
  --comment-chars <characters>    use <characters> as comment characters
  --multi                         allow multiple removes/disables
  --file <filename>               use <filename> instead of /etc/inetd.conf
  --verbose                       explain what is being done
  --debug                         enables debugging mode
  --help                          display this help and exit
  --version                       output version information and exit

In order to prevent the shell from changing your <entry-line> definition you
have to quote the <entry-line> using single or double quotes. You can use
tabs
(tab character or \t) and spaces to separate the fields of the <entry-line>.

Note: users must use --comment-chars '#' to disable a service for that
setting
to survive upgrades. Package maintainer scripts should use the default
--comment-chars. See update-inetd(8) for details.

Usage: update-inetd [<option>...] <command> <argument>

Commands:
  --add <entry-line>              add <entry-line>
  --remove <entry-regex>          remove <entry-regex>
  --enable <service>[,...]        enable <service> (comma-separated list)
  --disable <service>[,...]       disable <service> (comma-separated list)

Options:
  --group <group-name>            add entry to section <group-name>
  --pattern <pattern>             use <pattern> to select a service
  --comment-chars <characters>    use <characters> as comment characters
  --multi                         allow multiple removes/disables
  --file <filename>               use <filename> instead of /etc/inetd.conf
  --verbose                       explain what is being done
  --debug                         enables debugging mode
  --help                          display this help and exit
  --version                       output version information and exit

In order to prevent the shell from changing your <entry-line> definition you
have to quote the <entry-line> using single or double quotes. You can use
tabs
(tab character or \t) and spaces to separate the fields of the <entry-line>.

Note: users must use --comment-chars '#' to disable a service for that
setting
to survive upgrades. Package maintainer scripts should use the default
--comment-chars. See update-inetd(8) for details.

Usage: update-inetd [<option>...] <command> <argument>

Commands:
  --add <entry-line>              add <entry-line>
  --remove <entry-regex>          remove <entry-regex>
  --enable <service>[,...]        enable <service> (comma-separated list)
  --disable <service>[,...]       disable <service> (comma-separated list)

Options:
  --group <group-name>            add entry to section <group-name>
  --pattern <pattern>             use <pattern> to select a service
  --comment-chars <characters>    use <characters> as comment characters
  --multi                         allow multiple removes/disables
  --file <filename>               use <filename> instead of /etc/inetd.conf
  --verbose                       explain what is being done
  --debug                         enables debugging mode
  --help                          display this help and exit
  --version                       output version information and exit

In order to prevent the shell from changing your <entry-line> definition you
have to quote the <entry-line> using single or double quotes. You can use
tabs
(tab character or \t) and spaces to separate the fields of the <entry-line>.

Note: users must use --comment-chars '#' to disable a service for that
setting
to survive upgrades. Package maintainer scripts should use the default
--comment-chars. See update-inetd(8) for details.

update-inetd: error: --group is only relevant with --add
dpkg: error processing package sendmail-base (--configure):
 installed sendmail-base package post-installation script subprocess
returned error exit status 255
Errors were encountered while processing:
 sendmail-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
--------------------------------

Any help would be greatly appreciated!

[toc] | [prev] | [next] | [standalone]


#199488

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-08-28 15:50 +0200
Message-ID<wrMxA-3FQ-7@gated-at.bofh.it>
In reply to#199485
On Tue 28 Aug 2018 at 09:14:36 (-0400), Luis Finotti wrote:

> # apt remove sendemail

Oops.

> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package 'sendemail' is not installed, so not removed
> 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Setting up sendmail-base (8.15.2-11) ...

sendmail-base is what you should be trying to remove.
And you should be using dpkg directly, not messing around with apt.
As you can see, you asked apt to remove something and it tries to
configure something instead. If you're going to use sid or a
sid lookalike, you're going to have to use the appropriate tools.

> dpkg: error processing package sendmail-base (--configure):
>  installed sendmail-base package post-installation script subprocess
> returned error exit status 255
> Errors were encountered while processing:
>  sendmail-base
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> --------------------------------
> 
> Any help would be greatly appreciated!

You see—you want to know what dpkg itself is doing.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#199489

FromLuis Finotti <luis.finotti@gmail.com>
Date2018-08-28 15:50 +0200
Message-ID<wrMxA-3FQ-9@gated-at.bofh.it>
In reply to#199488

[Multipart message — attachments visible in raw view] — view raw

Thanks for the reply again.

On Tue, Aug 28, 2018 at 9:41 AM David Wright <deblis@lionunicorn.co.uk>
wrote:

> On Tue 28 Aug 2018 at 09:14:36 (-0400), Luis Finotti wrote:
>
> > # apt remove sendemail
>
> Oops.
>
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > Package 'sendemail' is not installed, so not removed
> > 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> > 1 not fully installed or removed.
> > After this operation, 0 B of additional disk space will be used.
> > Setting up sendmail-base (8.15.2-11) ...
>
> sendmail-base is what you should be trying to remove.
> And you should be using dpkg directly, not messing around with apt.
> As you can see, you asked apt to remove something and it tries to
> configure something instead. If you're going to use sid or a
> sid lookalike, you're going to have to use the appropriate tools.
>
> > dpkg: error processing package sendmail-base (--configure):
> >  installed sendmail-base package post-installation script subprocess
> > returned error exit status 255
> > Errors were encountered while processing:
> >  sendmail-base
> > E: Sub-process /usr/bin/dpkg returned an error code (1)
> > --------------------------------
> >
> > Any help would be greatly appreciated!
>
> You see—you want to know what dpkg itself is doing.
>

Here it is:

# dpkg -P sendmail-base
(Reading database ... 1562548 files and directories currently installed.)
Removing sendmail-base (8.15.2-11) ...
update-inetd: error: --group is only relevant with --add
dpkg: error processing package sendmail-base (--purge):
 installed sendmail-base package pre-removal script subprocess returned
error exit status 255
Errors were encountered while processing:
 sendmail-base

Any suggestions?

[toc] | [prev] | [next] | [standalone]


#199496

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-08-28 16:30 +0200
Message-ID<wrNah-47Z-7@gated-at.bofh.it>
In reply to#199489
On Tue 28 Aug 2018 at 09:48:06 (-0400), Luis Finotti wrote:

> # dpkg -P sendmail-base
> (Reading database ... 1562548 files and directories currently installed.)
> Removing sendmail-base (8.15.2-11) ...
> update-inetd: error: --group is only relevant with --add
> dpkg: error processing package sendmail-base (--purge):
>  installed sendmail-base package pre-removal script subprocess returned
> error exit status 255
> Errors were encountered while processing:
>  sendmail-base
> 
> Any suggestions?

I would take a look at the pre-removal script sendmail-base.prerm to
see what it's trying to do. If there are parts that aren't sensible,
you could comment them out, alter things so that they can work, or
even just make them "succeed" with "|| true" so you get to the end
of the script. (Check sendmail-base.postinst while you're about it.)

The scripts will contain a record of what modifications they intended
to make to your system, so ultimately all you need to do is nullify
those changes, remove the files in sendmail-base.list and convince
dpkg that the package is purged. Manually if necessary.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#199499

FromLuis Finotti <luis.finotti@gmail.com>
Date2018-08-28 16:50 +0200
Message-ID<wrNtE-4e2-9@gated-at.bofh.it>
In reply to#199496

[Multipart message — attachments visible in raw view] — view raw

Thanks once more for the support!  The problem is now solved.

On Tue, Aug 28, 2018 at 10:20 AM David Wright <deblis@lionunicorn.co.uk>
wrote:

> On Tue 28 Aug 2018 at 09:48:06 (-0400), Luis Finotti wrote:
>
> > # dpkg -P sendmail-base
> > (Reading database ... 1562548 files and directories currently installed.)
> > Removing sendmail-base (8.15.2-11) ...
> > update-inetd: error: --group is only relevant with --add
> > dpkg: error processing package sendmail-base (--purge):
> >  installed sendmail-base package pre-removal script subprocess returned
> > error exit status 255
> > Errors were encountered while processing:
> >  sendmail-base
> >
> > Any suggestions?
>
> I would take a look at the pre-removal script sendmail-base.prerm to
> see what it's trying to do. If there are parts that aren't sensible,
> you could comment them out, alter things so that they can work, or
> even just make them "succeed" with "|| true" so you get to the end
> of the script. (Check sendmail-base.postinst while you're about it.)
>
> The scripts will contain a record of what modifications they intended
> to make to your system, so ultimately all you need to do is nullify
> those changes, remove the files in sendmail-base.list and convince
> dpkg that the package is purged. Manually if necessary.
>

Thanks for the pointer!   sendmail-base.prerm had the line:

update-inetd --group MAIL --disable smtp,smtps,submission;

and I was getting the error

update-inetd: error: --group is only relevant with --add

So, I changed it to:

update-inetd --disable smtp,smtps,submission;

and was then able to uninstall it.

Thanks again for your help.

[toc] | [prev] | [next] | [standalone]


#199558

FromJonathan Dowland <jmtd@debian.org>
Date2018-08-29 13:00 +0200
Message-ID<ws6mB-6Xx-7@gated-at.bofh.it>
In reply to#199499
On Tue, Aug 28, 2018 at 10:42:01AM -0400, Luis Finotti wrote:
>Thanks for the pointer!   sendmail-base.prerm had the line:
>
>update-inetd --group MAIL --disable smtp,smtps,submission;
>
>and I was getting the error
>
>update-inetd: error: --group is only relevant with --add

This would appear to be a bug[1] in the sendmail package, which, if you
have the time, might be worth reporting[2]. However both sendmail and
update-inetd are orphaned at the moment (no regular maintainers,
although Andreas Beckmann has done a lot of work via the QA team)

[1] https://salsa.debian.org/debian/sendmail/blob/master/debian/sendmail-base.prerm.in
[2] https://www.debian.org/Bugs/Reporting

-- 

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [next] | [standalone]


#199566

FromErik Christiansen <dvalin@internode.on.net>
Date2018-08-29 13:50 +0200
Message-ID<ws78Z-7rY-7@gated-at.bofh.it>
In reply to#199558
On 29.08.18 11:57, Jonathan Dowland wrote:
> However both sendmail and update-inetd are orphaned at the moment (no
> regular maintainers, although Andreas Beckmann has done a lot of work
> via the QA team)

After favouring sendmail for a decade and a half, I thought I was slow
to switch to postfix around 15 years ago when sendmail was already
showing signs of age, such as security issues, IIRC. That anyone would
use it today is quite a surprise.

Postfix has a nice set of sendmail compatibility functions, and the list
is very helpful. From the manpage:

       mailq(1), Sendmail compatibility interface
       newaliases(1), Sendmail compatibility interface
       sendmail(1), Sendmail compatibility interface

Erik

[toc] | [prev] | [next] | [standalone]


#199500

FromCindy-Sue Causey <butterflybytes@gmail.com>
Date2018-08-28 17:00 +0200
Message-ID<wrNDj-4ha-3@gated-at.bofh.it>
In reply to#199489
On 8/28/18, Luis Finotti <luis.finotti@gmail.com> wrote:
> On Tue, Aug 28, 2018 at 9:41 AM David Wright <deblis@lionunicorn.co.uk>
> wrote:
>
>> On Tue 28 Aug 2018 at 09:14:36 (-0400), Luis Finotti wrote:
>> > # apt remove sendemail
>>
>> Oops.
>>
>> > Reading package lists... Done
>> > Building dependency tree
>> > Reading state information... Done
>> > Package 'sendemail' is not installed, so not removed
>> > 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
>> > 1 not fully installed or removed.
>> > After this operation, 0 B of additional disk space will be used.
>> > Setting up sendmail-base (8.15.2-11) ...
>>
>> sendmail-base is what you should be trying to remove.
>> And you should be using dpkg directly, not messing around with apt.
>> As you can see, you asked apt to remove something and it tries to
>> configure something instead. If you're going to use sid or a
>> sid lookalike, you're going to have to use the appropriate tools.
>>
>> > dpkg: error processing package sendmail-base (--configure):
>> >  installed sendmail-base package post-installation script subprocess
>> > returned error exit status 255
>> > Errors were encountered while processing:
>> >  sendmail-base
>> > E: Sub-process /usr/bin/dpkg returned an error code (1)
>> > --------------------------------
>> >
>> > Any help would be greatly appreciated!
>>
>> You see—you want to know what dpkg itself is doing.
>>
>
> Here it is:
>
> # dpkg -P sendmail-base
> (Reading database ... 1562548 files and directories currently installed.)
> Removing sendmail-base (8.15.2-11) ...
> update-inetd: error: --group is only relevant with --add
> dpkg: error processing package sendmail-base (--purge):
>  installed sendmail-base package pre-removal script subprocess returned
> error exit status 255
> Errors were encountered while processing:
>  sendmail-base
>
> Any suggestions?


I've had luck on occasion by following where *my* setup tells me to try:

apt --fix-broken install

Generic just like that with no specific packages named.

Just had to run it a couple times recently. Sometimes I've gotten
lucky, and it fixes things just like that just that fast.

Other times it's like the other day. It will instead first attempt to
purge/remove the offending partially installed package. At one point,
I think I just gave up and let apt do what it thought might work.
Successfully remove a package *is* what it did.

This has just been since the one thread we had here about manually
installing via dpkg and then running into repeated missing
dependencies. I just checked ~/.bash_history and saw my topic was...
*cough* flash versus pepperflash. I was attempting deb package
installs with "dpkg -i" while otherwise only favoring the main
repository in /etc/apt/sources.list.

PS I finally gave up when I realized flash may have NEVER had anything
to do with the particular webpage issues I've had all these years. I
hate ol' timer's disease,.. been afflicted since about 1992. lol.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web