Debian – debconf is ignoring the default anwsers

debconfdebian

I'm trying to set default answers to debconf to automate exim config. I'm setting up new values with debconf-set-selections, but debconf ignores it. I'm puzzled. Here is a short copy/paste of my problem :

root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  mail sent by smarthost; no local mail
root@vm-iwd:/var/cache/debconf# echo "exim4-config exim4/dc_eximconfig_configtype select internet site; mail is sent and received directly using SMTP" | debconf-set-selections
root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  internet site; mail is sent and received directly using SMTP
root@vm-iwd:/var/cache/debconf# dpkg-reconfigure exim4-config -fnoninteractive
[ ok ] Stopping MTA for restart: exim4_listener.
[ ok ] Restarting MTA: exim4.
root@vm-iwd:/var/cache/debconf# debconf-get-selections | grep exim4/dc_eximconfig_configtype
exim4-config    exim4/dc_eximconfig_configtype  select  mail sent by smarthost; no local mail    

You see how debconf is ignoring my set-selections ? I tried to edit directly /var/cache/debconf/config.dat and try to use DEBCONF_DB_OVERRIDE, none of these methods works

I'm on debian 7.6, fresh netinst install.

Any ideas ?

Best Answer

Ok, so as Zoredache stated, modifying debconf default answers is not the solution.

So to change my config, I did the following :

  • Change /etc/exim4/update-exim4.conf.conf (eg. sed -i "s/dc_eximconfig_configtype=.*/dc_eximconfig_configtype='internet'/" /etc/exim4/update-exim4.conf.conf)
  • Run dpkg-reconfigure exim4-config -fnoninteractive