27

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

39

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.

1
  • 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 8 '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.

0
3

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

1
  • 3
    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.

1
  • 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. Feb 12 '15 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.