首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我如何通过木偶配置智能exim4?

我如何通过木偶配置智能exim4?
EN

Server Fault用户
提问于 2011-03-26 16:59:03
回答 2查看 3.4K关注 0票数 2

我已经尝试自动化进出口设置通过木偶。我遵循了描述这里的方法,为我提供了几个软件包,但是对于exim,我遇到了一个问题:一个选择没有正确地应用到一个新的系统上。

在设置exim或运行dpkg-reconfigure exim4-config时,我选择smarthost选项,如下面的屏幕快照所示

将所选内容导出到文件中,结果如下(去掉了某些部分)

代码语言:javascript
复制
$ 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行)显示了交互式配置中选定值的文本。

在我的傀儡配置中尝试使用此导出时,没有正确地应用该参数:

代码语言:javascript
复制
package { "exim4":
  responsefile => my-exported-exim4-debconf,
  ensure => installed;
}

我还尝试通过debconf-get-selections导入配置,我认为这个配置是在debian环境中使用的,但是它似乎没有提供任何指示就被忽略了。

这是已知的错误吗?您知道如何使用不同的配置导出来解决这个问题(例如,为该参数提供整数索引),还是建议使用傀儡分发exim配置的替代方案?

谢谢

卡里姆

EN

回答 2

Server Fault用户

回答已采纳

发布于 2011-03-26 18:38:03

由于exim安装没有提供配置选项,而只是默认为本地模式,这可能就是设置选项的原因。

无论如何,一个很好的选择是不要使用dpkg-reconfigure,让傀儡配置文件/etc/exim4/update-exim4.conf.conf,然后运行命令update-exim4.conf

在您运行dpkg配置一次之后,该文件将为您设置选项,以引用木偶的主副本,您可能希望在木偶中使用模板,因为文件中也有主机名。

票数 3
EN

Server Fault用户

发布于 2011-03-26 19:07:14

您应该能够在本地宏文件中定义配置类型和智能模式。这将是用于拆分配置的/etc/exim4/conf.d/main/00_local_macros或模板化配置的/etc/exim4/exim4.conf.localmacros

变量应该是DC_eximconfig_configtypeDC_eximconfig_satelliteDC_smarthost。参见dynamically by /usr/sbin/update-exim4.conf in /var/lib/exim4/config.autogenerated一节。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/252195

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档