Re: [exim] Need help

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
Subject: Re: [exim] Need help
On Saturday 21 April 2007 15:09, Hotni Ida Manullang wrote:
> I need to reject messages if send from smtp host relay
> before host client.
> [...]
> I want to reject if messages arrive from
> aaa.bbb.ccc.ddd but $host variable in exim is contain
> client host 10.23.10.45.


Since you have obfuscated and deleted some information your question becomes
more difficult to understand. But as I understand it, you want to reject mail
that a prior relay received from a certain host ("aaa.bbb.ccc.ddd").

Is aaa.bbb.ccc.ddd an IP address or a FQDN? You seem to contradict yourself.
Also, is aaa.bbb.ccc.ddd on your network? I assume that the two Windows
servers are on your network. Why do you want to reject mail from it? Because
it is sending spam or for some other reason?

If the Windows relays can't be configured to reject the mail directly, I'd
suggest firewalling them off and force all mail to go through your Exim
server. You don't want to cause bounce messages to be sent unless the
rejected mail comes from an authenticated user of your own. If the offending
host *is* one of your own, then I'm curious as to why you want to reject mail
from it. Anyway, Exim doesn't have any special Received line parsing -
SpamAssassin is better at that, and there may be other tools as well, but you
could perform a simple regex matching:

${if match {$h_Received:}{(?mi)^Received:\s+from\s+aaa\.bbb\.ccc\.ddd\s+}}

Use this in a 'condition' condition in the DATA ACL. But again, it's not the
best solution or even a good solution.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans