我已经尝试自动化进出口设置通过木偶。我遵循了描述这里的方法,为我提供了几个软件包,但是对于exim,我遇到了一个问题:一个选择没有正确地应用到一个新的系统上。
在设置exim或运行dpkg-reconfigure exim4-config时,我选择smarthost选项,如下面的屏幕快照所示

将所选内容导出到文件中,结果如下(去掉了某些部分)
$ 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正如你所看到的,所有的选项看起来都很好。注意,dc_eximconfig_configtype (输出的第2行)显示了交互式配置中选定值的文本。
在我的傀儡配置中尝试使用此导出时,没有正确地应用该参数:
package { "exim4":
responsefile => my-exported-exim4-debconf,
ensure => installed;
}我还尝试通过debconf-get-selections导入配置,我认为这个配置是在debian环境中使用的,但是它似乎没有提供任何指示就被忽略了。
这是已知的错误吗?您知道如何使用不同的配置导出来解决这个问题(例如,为该参数提供整数索引),还是建议使用傀儡分发exim配置的替代方案?
谢谢
卡里姆
发布于 2011-03-26 18:38:03
由于exim安装没有提供配置选项,而只是默认为本地模式,这可能就是设置选项的原因。
无论如何,一个很好的选择是不要使用dpkg-reconfigure,让傀儡配置文件/etc/exim4/update-exim4.conf.conf,然后运行命令update-exim4.conf。
在您运行dpkg配置一次之后,该文件将为您设置选项,以引用木偶的主副本,您可能希望在木偶中使用模板,因为文件中也有主机名。
发布于 2011-03-26 19:07:14
您应该能够在本地宏文件中定义配置类型和智能模式。这将是用于拆分配置的/etc/exim4/conf.d/main/00_local_macros或模板化配置的/etc/exim4/exim4.conf.localmacros。
变量应该是DC_eximconfig_configtype、DC_eximconfig_satellite和DC_smarthost。参见dynamically by /usr/sbin/update-exim4.conf in /var/lib/exim4/config.autogenerated一节。
https://serverfault.com/questions/252195
复制相似问题