exim4-config脚本自动?
我需要在多台服务器上设置exim4,但我想知道是否可以创建一个脚本,该脚本将自动通过安装过程并使用我的主机名在exim4上进行设置?exim4-config脚本自动?
须藤dpkg的-重新配置的exim4-配置
步骤1:顶部选项(因特网站点;邮件发送和接收直接使用SMTP
步骤2:主机名(默认)
步骤3: 127.0.0.1; :: 1(默认)
步骤4:主机名(默认)
步骤5:主机名
步骤6:主机名
步骤7:否
步骤8:在/ var /邮件mbox格式/
步骤9:无
步骤10:根主机名
任何帮助非常感谢。 谢谢!
Debian的正确解决方案是在运行dpkg-reconfigure
之前用您的选择填充Debconf数据库。详情请阅读man debconf-set-selections
。有一个在https://www.debian-administration.org/article/394/Automating_new_Debian_installations_with_preseeding
值得注意的是,上面的链接中的两条评论与Exim特别有关......'出现exim问题可能是由于事实debconf从'/etc/exim4/update-exim4.conf.conf'得到答案(类似这样的事情也发生在'locales'中)。在我使用的脚本中,我首先在更新/安装软件包之前替换原始的'update-exim4.conf.conf'。'&preseed方法并不完美。我在exim exim时遇到了很多麻烦,最终我用postfix替换了exim。 – Dogsbody 2018-01-05 10:37:38
一个HOWTO,当我有这个问题,我做了这样的debconf使用设置,选择
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
使用'debconf-get-selections |在已安装exim4的系统上使用grep exim4'来获取这些设置的列表。如果你缺少'debconf-get-selections'可执行文件,你必须安装'debconf-utils'。 – jlh 2017-01-17 19:28:45
[Linux中的shell脚本处理输入确认]的可能重复(HTTP://计算器.com/questions/7410771/handling-input-confirmations-in-linux-shell-scripting) – tripleee 2014-11-21 08:07:09