* On 21/09/06 14:33 -0400, Steve Sobol wrote:
| 
| Exim 4.50, CentOS Linux 4.something
| 
| I have a mail server that handles a small number of domains, around 20 
| total. Five of those domains are spam-filtered through an external service 
| and mail to those domains should ONLY be delivered through that company's 
| SMTP servers. But I can't just tell exim to stop accepting mail sent 
| directly to it, because that will break a bunch of other domains that 
| AREN'T filtered, for which exim SHOULD accept mail directly.
| 
| How do I tell Exim to only accept messages handed off from a particular 
| block of IPs, but *only* for certain domains?

You could do this in acl_smtp_rcpt. Something like (off the top of my 
head):

1. Define the hosts (IPs)
   hostlist  allowed_hosts = 1.2.3.4 : 3.4.5.6/30 : a.b.c.d/NN

2. Define those domains you want to accept mail for as a domainlist.

   domainlist those_domains = blah


Now, at an early stage in acl_smtp_rcpt:

   deny  condition  = ${if match_domain {${domain:$h_to:}}{+those_domains}}
         !hosts     = +allowed_hosts


I am not sure how this will deal with cases where recipient is in the CC 
or BCC though.



        cheers
       - wash 
+----------------------------------+-----------------------------------------+
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
wash () WANANCHI ! com                  . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"  
                                                 --from a /. post

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to