echo
This commit is contained in:
parent
2a4f71ddf4
commit
9754e7c21d
|
@ -156,37 +156,37 @@ function configure_email_onion {
|
||||||
echo "$DEFAULT_DOMAIN_NAME $onion_address" > /etc/exim4/onionrelay.txt
|
echo "$DEFAULT_DOMAIN_NAME $onion_address" > /etc/exim4/onionrelay.txt
|
||||||
cdb -m -c -t ~/onionrelay.tmp /etc/exim4/onionrelay.cdb /etc/exim4/onionrelay.txt
|
cdb -m -c -t ~/onionrelay.tmp /etc/exim4/onionrelay.cdb /etc/exim4/onionrelay.txt
|
||||||
|
|
||||||
{ "perl_startup = do '/etc/exim4/perl-routines.pl'";
|
{ echo "perl_startup = do '/etc/exim4/perl-routines.pl'";
|
||||||
"perl_at_start"; } > /etc/exim4/conf.d/main/perl
|
echo "perl_at_start"; } > /etc/exim4/conf.d/main/perl
|
||||||
|
|
||||||
{ "use Net::DNS::Resolver;";
|
{ echo "use Net::DNS::Resolver;";
|
||||||
"sub onionLookup {";
|
echo "sub onionLookup {";
|
||||||
" my \$hostname = shift;";
|
echo " my \$hostname = shift;";
|
||||||
" my \$res = Net::DNS::Resolver->new(nameservers => [qw(127.0.0.1)],);";
|
echo " my \$res = Net::DNS::Resolver->new(nameservers => [qw(127.0.0.1)],);";
|
||||||
" \$res->port(5300);";
|
echo " \$res->port(5300);";
|
||||||
" my \$query = \$res->search(\$hostname);";
|
echo " my \$query = \$res->search(\$hostname);";
|
||||||
" foreach my \$rr (\$query->answer) {";
|
echo " foreach my \$rr (\$query->answer) {";
|
||||||
" next unless \$rr->type eq \"A\";";
|
echo " next unless \$rr->type eq \"A\";";
|
||||||
" return \$rr->address;";
|
echo " return \$rr->address;";
|
||||||
" }";
|
echo " }";
|
||||||
" return 'no_such_host';";
|
echo " return 'no_such_host';";
|
||||||
"}"; } > /etc/exim4/perl-routines.pl
|
echo "}"; } > /etc/exim4/perl-routines.pl
|
||||||
|
|
||||||
{ "ONION_RELAYDB=/etc/exim4/onionrelay.cdb";
|
{ echo "ONION_RELAYDB=/etc/exim4/onionrelay.cdb";
|
||||||
"domainlist onion_relays = cdb;ONION_RELAYDB"; } > /etc/exim4/conf.d/domainlists
|
echo "domainlist onion_relays = cdb;ONION_RELAYDB"; } > /etc/exim4/conf.d/domainlists
|
||||||
|
|
||||||
{ "# send things over tor where we have an entry for it";
|
{ echo "# send things over tor where we have an entry for it";
|
||||||
"onionrelays:";
|
echo "onionrelays:";
|
||||||
" driver = manualroute";
|
echo " driver = manualroute";
|
||||||
" domains = +onion_relays";
|
echo " domains = +onion_relays";
|
||||||
" transport = onion_relay";
|
echo " transport = onion_relay";
|
||||||
" # get the automap IP for the onion address from the tor daemon";
|
echo " # get the automap IP for the onion address from the tor daemon";
|
||||||
" route_data = \${perl{onionLookup}{\${lookup{\$domain}cdb{ONION_RELAYDB}}}}";
|
echo " route_data = \${perl{onionLookup}{\${lookup{\$domain}cdb{ONION_RELAYDB}}}}";
|
||||||
" no_more"; } > /etc/exim4/conf.d/router/50_exim4-config-onion
|
echo " no_more"; } > /etc/exim4/conf.d/router/50_exim4-config-onion
|
||||||
|
|
||||||
{ "onion_relay:";
|
{ echo "onion_relay:";
|
||||||
" driver = smtp";
|
echo " driver = smtp";
|
||||||
" socks_proxy = 127.0.0.1 port=9050"; } > /etc/exim4/conf.d/transport/50_exim4-config_onion
|
echo " socks_proxy = 127.0.0.1 port=9050"; } > /etc/exim4/conf.d/transport/50_exim4-config_onion
|
||||||
|
|
||||||
if ! grep -q "AutomapHostsOnResolve" /etc/tor/torrc; then
|
if ! grep -q "AutomapHostsOnResolve" /etc/tor/torrc; then
|
||||||
echo 'AutomapHostsOnResolve 1' >> /etc/tor/torrc
|
echo 'AutomapHostsOnResolve 1' >> /etc/tor/torrc
|
||||||
|
|
Loading…
Reference in New Issue