[exim] Forcing incoming mail to be from a particular host on…

Pàgina inicial
Delete this message
Reply to this message
Autor: Jim Archer
Data:  
A: exim-users
Assumpte: [exim] Forcing incoming mail to be from a particular host on a domain name basis
Hi All...

I have a problem that must be simple to fix, but after hours I have not
found the solution.

I want to configure Exim4 (from Debian Sarge) to accept email for certain
domains from only certain hosts. This is because I am using (on some
domains, not all) an anti-SPAM service and want to prevent spammers from
bypassing it and connecting directly to the server. The mail server is
used both for SMTP outbound by users as well as the incoming machine.

To accomplish this, I added this to acl_check_rcpt:

  accept domains    = +spamsoap_domains
         endpass
         message    = traffic for $domain not accepted from 
$sender_host_address
         hosts      = 66.179.26.128/26


The spamsoap servers are those in the IP range specified in the acl.

This works if the email is coming from a server other than itself. I tried
adding 127.0.0.1, but that didn't help. If I send email to myself from my
mail client, it gives me the error and says it won't accept email from me
at my laptop's IP address. Anyone else who uses this machine as their
outbound email relay will have the same trouble. I could clear a bunch of
IP ranges, but that would leave all the SMPT AUTH users unable to send me
email and expose these domains to SPAM and viruses from other users.

I tried adding a router to force all email to those domains to go via smtp:

begin routers

spamsoap:
driver = dnslookup
domains = +spamsoap_domains
transport = remote_smtp
no_more


I tried various flavors of this, with and without the no_more. No joy.

Can someone please help me out?

Thanks very much...