exim4-config script automated?

∥☆過路亽.° 提交于 2019-12-19 04:42:47

问题


I need to setup exim4 on multiple servers however I was wondering if it's possible to create a script that will automatically go through the install process and set it up on exim4 with my hostname?

sudo dpkg-reconfigure exim4-config

Step 1 : Top option (Internet site; mail is sent and received directly using SMTP

Step 2 : hostname (default)

Step 3 : 127.0.0.1 ; ::1 (default)

Step 4 : hostname (default)

Step 5 : hostname

step 6 : hostname

step 7 : No

Step 8 : mbox format in /var/mail/

Step 9 : no

step 10 : root hostname

Any help greatly appreciated. Thanks!


回答1:


The proper solution for Debian is to populate the Debconf database with your choices before running dpkg-reconfigure. Read man debconf-set-selections for details. There is a howto at https://www.debian-administration.org/article/394/Automating_new_Debian_installations_with_preseeding




回答2:


when I had this problem I did it like this using 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


来源:https://stackoverflow.com/questions/27054568/exim4-config-script-automated

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!