Don't reject onion domains

This commit is contained in:
Bob Mottram 2018-04-06 12:35:59 +01:00
parent 9372006289
commit c623ddae3c
1 changed files with 6 additions and 2 deletions

View File

@ -269,7 +269,10 @@ function configure_email_onion {
# 20:$onion_address # 20:$onion_address
# 3600 IN SRV 0 5 25 $onion_address # 3600 IN SRV 0 5 25 $onion_address
# Test with: exim -d -bt username@$onion_address # To test the system, on receiving server:
# exim -bd -d -oX 25
# On the sensing server:
# exim -d -oX 25 -bt username@$onion_address
{ echo "perl_startup = do '/etc/exim4/perl-routines.pl'"; { echo "perl_startup = do '/etc/exim4/perl-routines.pl'";
echo "perl_at_start"; } > /etc/exim4/conf.d/main/00_exim4-config_perl echo "perl_at_start"; } > /etc/exim4/conf.d/main/00_exim4-config_perl
@ -1093,7 +1096,8 @@ function spam_filtering {
# This configuration is based on https://wiki.debian.org/DebianSpamAssassin # This configuration is based on https://wiki.debian.org/DebianSpamAssassin
sed -i 's/local_parts = postmaster/local_parts = postmaster:abuse/g' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt sed -i 's/local_parts = postmaster/local_parts = postmaster:abuse/g' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
sed -i '/domains = +local_domains : +relay_to_domains/a\ set acl_m0 = rfcnames' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt sed -i '/domains = +local_domains : +relay_to_domains/a\ set acl_m0 = rfcnames' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
sed -i "s/accept/accept condition = \${if eq{\$acl_m0}{rfcnames} {1}{0}}/g" /etc/exim4/conf.d/acl/40_exim4-config_check_data # This prevents .onion domains from being accepted
#sed -i "s/accept/accept condition = \${if eq{\$acl_m0}{rfcnames} {1}{0}}/g" /etc/exim4/conf.d/acl/40_exim4-config_check_data
{ echo "warn message = X-Spam-Score: \$spam_score (\$spam_bar)"; { echo "warn message = X-Spam-Score: \$spam_score (\$spam_bar)";
echo ' spam = nobody:true'; echo ' spam = nobody:true';