Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have tried to automate the exim setup via puppet. I followed the approach described here, whiched worked for me for a few packages, but for exim I had a problem: one selection was not correctly applied on a fresh system.

When setting up exim or running dpkg-reconfigure exim4-config, I select the smarthost option as shown in the screenshot below enter image description here

Exporting the selections to a file results in the following (stripped some parts)

$ debconf-get-selections | grep exim
exim4-config    exim4/dc_other_hostnames        string  my.other.hostname
exim4-config    exim4/dc_eximconfig_configtype  select  mail sent by smarthost; received via SMTP or fetchmail
exim4-config    exim4/no_config boolean true
exim4-config    exim4/hide_mailname     boolean true
exim4-config    exim4/dc_postmaster     string
exim4-config    exim4/dc_smarthost      string  my.smarthost.com::port
exim4-config    exim4/dc_relay_domains  string
exim4-config    exim4/dc_relay_nets     string
exim4-base      exim4/purge_spool       boolean false
exim4-config    exim4/mailname  string  my.mail.name

As you can see, all options look just fine. Note that dc_eximconfig_configtype (line 2 of the output) shows the text of the selected value from the interactive configuration.

When trying to use this export in my puppet configuration, that one parameter is not correctly applied:

package { "exim4":
  responsefile => my-exported-exim4-debconf,
  ensure => installed;
}

I have also tried to import the configuration via debconf-get-selections, which I assume puppet is doing in this case on a debian environment, but it seems to be ignored without providing any indication.

Is this a known error? Do you know how I can either solve this problem with a different configuration export (e.g. provide an integer index for that parameter), or suggest an alternative of distributing the exim configuration with puppet?

Thank you
Kariem

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Since the exim install doesn't come up with the config options, and just defaults to local mode, that may be why the options are getting set.

Anyway, one good option would be instead of using a dpkg-reconfigure, have puppet config the file /etc/exim4/update-exim4.conf.conf then run the command update-exim4.conf.

After you run the dpkg config once, the file will have the options set for you to reference for puppet's master copy, you'll probably want to use a template in puppet since there's hostnames in the file as well.

share|improve this answer

You should be able to define the config type and smarthost in a local macro file. This would be /etc/exim4/conf.d/main/00_local_macros for a split configuration or /etc/exim4/exim4.conf.localmacros for the templated configuration.

The variables should be DC_eximconfig_configtype, DC_eximconfig_satellite, and DC_smarthost. See the section headed dynamically by /usr/sbin/update-exim4.conf in /var/lib/exim4/config.autogenerated.

share|improve this answer
    
They're DCsmarthost and DCconfig_satellite (without first _) on Ubuntu Lucid. –  sendmoreinfo Dec 1 '11 at 14:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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