From: Petter Reinholdtsen Date: Sun, 9 Nov 2014 22:03:13 +0000 (+0100) Subject: Added exim and xinetd config from http://johannes.sipsolutions.net/Projects/exim... X-Git-Url: https://pere.pagekite.me/gitweb/exim4-smtorp.git/commitdiff_plain/68232fa3daa7f25691a813fa05f48f921d19b909?ds=sidebyside Added exim and xinetd config from http://johannes.sipsolutions.net/Projects/exim-tor-hidden-mail/FAQ. --- diff --git a/exim4-conf.d/router/100_smtorp b/exim4-conf.d/router/100_smtorp new file mode 100644 index 0000000..4cc8275 --- /dev/null +++ b/exim4-conf.d/router/100_smtorp @@ -0,0 +1,29 @@ +# tor stuff first +# +# if we're submitting mail *from* a .tor/.onion address, +# make sure any header lines that may give us away is +# stripped out, and add a new, cryptic Message-ID. +# In address_data we store the name we should HELO as. +tor_to_any: + debug_print = "R: manualroute from .onion to $local_part@$domain" + driver = manualroute + domains = ! +local_domains + condition = ${if match {$sender_address_domain}{\N.*\.(onion|tor)$\N}} + address_data = $sender_address_domain + transport = remote_smtp_onion + self = send + route_list = * localhost + headers_remove = Received:Message-ID:X-Mailer:User-Agent + headers_add = Message-ID: <${lc:${sha1:$message_id}}@$sender_address_domain> + +# this catches the case where we're submitting mail +# from a regular email address where we don't need to +# rewrite any headers +any_to_tor: + debug_print = "R: manualroute for $local_part@$domain" + driver = manualroute + domains = ! +local_domains + transport = remote_smtp_onion + self = send + route_list = *.onion localhost ; *.tor localhost + address_data = $smtp_active_hostname diff --git a/exim4-conf.d/transport/100_smtorp b/exim4-conf.d/transport/100_smtorp new file mode 100644 index 0000000..31e72e1 --- /dev/null +++ b/exim4-conf.d/transport/100_smtorp @@ -0,0 +1,13 @@ +remote_smtp_onion: + debug_print = "T: remote_smtp_onion for $local_part@$original_domain" + driver = smtp + + # set helo_data to where we want to connect to, + # for the proxy program tor-smtp + helo_data = "$address_data $original_domain" + + # wherever we configured our script at + port = 12668 + + # cannot use TLS otherwise it will EHLO again!! + hosts_avoid_tls = * diff --git a/xinetd b/xinetd new file mode 100644 index 0000000..3a55a0b --- /dev/null +++ b/xinetd @@ -0,0 +1,12 @@ +service tor-smtp +{ + socket_type = stream + protocol = tcp + port = 12668 + bind = 127.0.0.1 + type = UNLISTED + wait = no + user = debian-tor + server = /usr/lib/exim4-smtorp/tor-smtp + server_args = localhost 9050 +}