28

So I installed mailutils (apt-get install mailutils) and when I did a nice little setup screen popped up and started asking me questions. I guess I screwed up and cancelled out before I had all the data I need to configure. Anyhow, how do I get it to rerun that setup script?

PBI

Showcaselfloyd
  • 425
  • 1
  • 5
  • 7

4 Answers4

40

You can try with

dpkg-reconfigure -plow <PACKAGE>

This will ask again the configuration questions about the package. It may ask you to reconfigure related packages as well.

gmelodie
  • 105
  • 1
  • 5
Brigo
  • 1,534
  • 11
  • 8
  • What's the equivalent for debian 9? this command doesn't exists on my system. I've a lot of `dpkg-*` commands, but not this. – realtebo Mar 08 '19 at 11:34
10

Mailutils itself doesn't really have any specific configuration, as it's merely a collection of various mail utilities.

One of the dependencies of mailutils is the default-mta package which in ubuntu, is postfix. Postfix would have gotten installed when you ran apt-get install mailutils, and it's the postfix configuration screen you likely saw.

To re-run this configuration wizard, just run: $ dpkg-reconfigure postfix.

EEAA
  • 109,363
  • 18
  • 175
  • 245
4

You have two possibilities, reinstall the package (maybe you have to purge it and install again) or just reconfigure it (this is preferable):

dpkg-reconfigure mailutils

andrade
  • 169
  • 6
  • 4
    The mailutils package really has no configuration (other than setting some /etc/alternatives options). The configuration dialogue mentioned was for postfix, not mailutils. See the files in `/var/lib/dpkg/info` for more info... – EEAA Jan 31 '13 at 22:16
2

Generally, debian package installations can be rerun by running the postinst executable file cached by dpkg.

At least on my Ubuntu box, they can be found under /var/lib/dpkg/info/. The file should be named <package-name>.postinst.

Ovesh
  • 175
  • 1
  • 3
  • 12
  • 1
    This is actually not true, the `/var/lib/dpkg/info/package.postinst` will re-run the setup instructions but without asking the questions, the `/var/lib/dpkg/info/package.config` script is the one who ask them and reconfigures everything, so if you wanna repeat the process manually you would need to call it with the `reconfigure` parameter. – Javier López Feb 12 '15 at 21:24