exim4-config 脚本自动化?

mas*_*erq 3 bash exim exim4

我需要在多个服务器上设置 exim4,但是我想知道是否可以创建一个脚本来自动完成安装过程并使用我的主机名在 exim4 上设置它?

sudo dpkg-重新配置 exim4-config

第 1 步:顶部选项(互联网站点;直接使用 SMTP 发送和接收邮件

第 2 步:主机名(默认)

第三步:127.0.0.1;::1(默认)

步骤 4:主机名(默认)

第 5 步:主机名

第 6 步:主机名

第 7 步:否

步骤 8:/var/mail/ 中的 mbox 格式

第 9 步:否

步骤10:根主机名

非常感谢任何帮助。谢谢!

Jas*_*sen 5

当我遇到这个问题时,我使用 debconf-set-selections 这样做了

debconf-set-selections <<CONF
exim4-config    exim4/dc_other_hostnames        string  $hostnames
exim4-config    exim4/dc_eximconfig_configtype  select  internet site; mail is sent and received directly using SMTP
exim4-config    exim4/no_config boolean true
# rest of the secret sauce omitted...
CONF
Run Code Online (Sandbox Code Playgroud)

  • 使用 `debconf-get-selections | 在已安装 exim4 的系统上使用 grep exim4` 来获取此类设置的列表。如果您缺少“debconf-get-selections”可执行文件,则必须安装“debconf-utils”。 (3认同)