]>
pere.pagekite.me Git - exim4-smtorp.git/blob - setup-exim-hidden-service
3 # Configure a machine without exim installed as a mail server receiving
4 # email using SMTP via Tor.
6 if dpkg
-l exim4
-config > /dev
/null
; then
7 echo "******************************************************************"
8 echo "* Unable to set up SMTP over Tor, exim4-config already installed *"
9 echo "* Purge the package and try again, or *"
10 echo "* run "dpkg
-reconfigure exim4
-config" to configure manually. *"
11 echo "******************************************************************"
15 torhsdir
=$(awk '/^HiddenServiceDir (.*) *$
/ { print
$2 }' /etc/tor/torrc)
16 if [ -e "$torhsdir/hostname" ] ; then
17 torhsname=$(cat "$torhsdir/hostname")
19 echo "*******************************************************************"
20 echo "* Unable to set up SMTP over TOR. There is no Tor hidden service *"
21 echo "* name in $torhsdir *"
22 echo "*******************************************************************"
23 echo "Please add lines like this to /etc/tor/torrc:"
25 echo "HiddenServiceDir /var/lib/tor/hidden_service/"
26 echo "HiddenServicePort 25 127.0.0.1:25"
30 cat <<EOF | debconf-set-selections
31 exim4-config exim4/dc_eximconfig_configtype select internet site; mail is sent and received directly using SMTP
32 exim4-config exim4/dc_local_interfaces string 127.0.0.1 ; ::1
33 exim4-config exim4/dc_other_hostnames string $torhsname
34 exim4-config exim4/use_split_config boolean true
37 DEBIAN_FRONTEND=noninteractive apt-get install -y exim4