On 20 Jul 2005 at 17:40, Jim Archer wrote about
"[exim] controlling where email for ":
|...
| I want to configure Exim4 (from Debian Sarge) to accept email for certain
^external
| 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
|...
| 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.
Does everyone who is authorized to use this server for outbound relay
use authentication? That would be best, you don't have to worry
about what host they are on.
Sounds like you just need to add an accept stanza to handle
authorized users sending to spamsoap_domains directly. If they all
authenticate, it can be as simple as:
accept domains = +spamsoap_domains
authenticated = *
Put this above the existing accept stanza (because of it's endpass).
- Fred